|
@@ -75,6 +75,12 @@
|
|
|
<result property="pointY" column="point_y" jdbcType="VARCHAR"/>
|
|
|
<result property="address" column="address" jdbcType="VARCHAR"/>
|
|
|
<result property="deviceState" column="device_state" jdbcType="INTEGER"/>
|
|
|
+ <collection property="MonitorDataEntities" ofType="com.huaxu.dto.MonitorDataDto" javaType="list">
|
|
|
+ <result property="attributeId" column="attribute_id" jdbcType="INTEGER"/>
|
|
|
+ <result property="attributeName" column="attribute_name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="unit" column="unit" jdbcType="VARCHAR"/>
|
|
|
+ <result property="isAlarm" column="is_Alarm" jdbcType="VARCHAR"/>
|
|
|
+ </collection>
|
|
|
</collection>
|
|
|
</resultMap>
|
|
|
|
|
@@ -642,6 +648,7 @@
|
|
|
<!--查询管网地图图层及设备-->
|
|
|
<select id="selectPipeNetLayer" resultMap="layerMap">
|
|
|
select t4.id scene_id,t4.scene_name,t5.scene_type_name,t6.id device_id,t6.device_code,t6.device_name,t6.point_x,t6.point_y,t6.address
|
|
|
+ ,t8.attribute_id ,ifnull(t8.remark, t9.`name`) attribute_name,t9.unit,case when t8.attribute_id is null then null when t10.id is null then 0 else 1 end is_alarm
|
|
|
<if test="flag == null or flag ==0">
|
|
|
,if (t7.alarm_count>0, 1, 0) device_state
|
|
|
</if>
|
|
@@ -661,6 +668,9 @@
|
|
|
</if>
|
|
|
from sms_alarm_details a1 where a1.`status` = 1 and a1.state = 1 group by a1.scene_id, a1.device_id
|
|
|
)t7 on t7.scene_id=t2.scene_id and t7.device_id=t2.device_id
|
|
|
+ left join sms_device_parm t8 on t8.scene_id = t2.scene_id and t8.device_id=t2.device_id and t8. status = 1 and t8.is_suspension = 1
|
|
|
+ left join sms_device_attribute t9 on t8.attribute_id=t9.id and t9.status = 1
|
|
|
+ left join sms_alarm_details t10 on t10.scene_id=t2.scene_id and t10.device_id=t2.device_id and t10.attribute_id=t8.attribute_id and t10.status = 1 and t10.state=1
|
|
|
where t1.parent_scene_id = 0 and t1. status = 1 and t1. enable_state = 1 and t3.scene_type_name = '管网'
|
|
|
<choose>
|
|
|
<when test="sceneTypeName != null and sceneTypeName !=''">
|
|
@@ -679,7 +689,7 @@
|
|
|
<if test="sceneIds == null or sceneIds.size() == 0">
|
|
|
and t1.id is null
|
|
|
</if>
|
|
|
- order by t4.scene_name,t6.date_create
|
|
|
+ order by t4.scene_name,t8.seq
|
|
|
</select>
|
|
|
<!--查询昨日水厂制水总量-->
|
|
|
<select id="selectTotalYieldWater" resultType="java.lang.Double">
|