Browse Source

管网列表增加单位

yuejiaying 3 years ago
parent
commit
11d484bb19
1 changed files with 2 additions and 1 deletions
  1. 2 1
      sms_water/src/main/resources/mapper/OnlineMonitorMapper.xml

+ 2 - 1
sms_water/src/main/resources/mapper/OnlineMonitorMapper.xml

@@ -552,7 +552,7 @@
     </select>
     <!-- 查询设备参数-->
     <select id="statsDeviceParm" resultMap="deviceDataMap">
-        SELECT t6.id device_id,t6.device_code,t6.device_name,t7.attribute_id,t7.parm_type attribute_type,t3.scene_type_name,
+        SELECT t6.id device_id,t6.device_code,t6.device_name,t7.attribute_id,t7.parm_type attribute_type,t3.scene_type_name,t10.unit,
          case when t7.attribute_id is  null then null when t8.id is null then 0 else 1 end is_alarm
         <if test="type == 4 ">,t9.latest_value</if>
         from sms_scene t1
@@ -583,6 +583,7 @@
             and t7.parm_type in(14)
         </if>
         left join sms_alarm_details t8 on t8.attribute_id=t7.attribute_id and t8.device_id=t7.device_id and t8.scene_id=t7.scene_id and t8.`status` = 1 and t8.state = 1
+        left join sms_device_attribute t10 on t10.id=t7.attribute_id and t10.status=1
         where t1.parent_scene_id = 0 and t1. status = 1 and t1. enable_state = 1 and t3.scene_type_name = '管网' and t5.scene_type_name = #{sceneTypeName}
         <if test="sceneIds != null and sceneIds.size() > 0">
             and t1.id  in