Jelajahi Sumber

Merge remote-tracking branch 'origin/master'

wangyangyang 4 tahun lalu
induk
melakukan
abfd1f095d

+ 4 - 4
sms_water/src/main/resources/mapper/MonitorDataReportMapper.xml

@@ -1166,16 +1166,16 @@
             from sms_scene_type st
             left join sms_scene s on s.SCENE_TYPE_ID =st.id and PARENT_SCENE_ID ='0'
             left join sms_device_parm dp on dp.PARENT_SCENE_ID =s.ID
-
-            left join sms_alarm_details ad on ad.STATE = 1 and ad.SCENE_ID=dp.SCENE_ID and ad.DEVICE_ID =dp.DEVICE_ID and ad.ATTRIBUTE_ID =dp.ATTRIBUTE_ID
-
-            where s.`STATUS`=1 and st.SCENE_TYPE_NAME = '水厂' and s.TENANT_ID =#{tenantId}
             <if test="parmType != null and  parmType == -1">
                 and dp.PARM_TYPE in (15,8,10,11,18,19)
             </if>
             <if test="parmType != null and  parmType != -1">
                 and dp.PARM_TYPE = #{parmType}
             </if>
+            left join sms_alarm_details ad on ad.STATE = 1 and ad.SCENE_ID=dp.SCENE_ID and ad.DEVICE_ID =dp.DEVICE_ID and ad.ATTRIBUTE_ID =dp.ATTRIBUTE_ID
+
+            where s.`STATUS`=1 and st.SCENE_TYPE_NAME = '水厂' and s.TENANT_ID =#{tenantId}
+
         <if test="userType!=null and userType!=-999 and userType!=-9999 and  programItems != null and programItems.size() > 0">
             <if test="permissonType == 5 or permissonType == 2">
                 and ( s.DEPT_ORG_ID in