Ver código fonte

修改统计量

wangyangyang 4 anos atrás
pai
commit
9d5a680167

+ 0 - 1
sms_water/src/main/java/com/huaxu/controller/MonitorInfoController.java

@@ -89,7 +89,6 @@ public class MonitorInfoController {
                     System.out.println("dateValue.getAttributeId()" + dateValue.getAttributeId() + " " + dateValue.getDataValue());
                 }
                 for (SceneDeviceAttributeDto itemAttribute : sceneDeviceAttributeDtos) {
-                    System.out.println("itemAttribute.getAttributeId()" + itemAttribute.getAttributeId());
                     Double attributeDiffValue = 0d;
                     if(!map.containsKey(itemAttribute.getAttributeId())) {
                         System.out.println("map.containsKey(itemAttribute.getAttributeId()" + map.containsKey(itemAttribute.getAttributeId()));

+ 2 - 2
sms_water/src/main/resources/mapper/MonitorInfoMapper.xml

@@ -104,7 +104,7 @@
         INNER JOIN sms_day_report c on a.ATTRIBUTE_ID=c.ATTRIBUTE_ID and a.DEVICE_ID=c.DEVICE_ID
         INNER JOIN (select b.PARM_TYPE,max(d.collect_date) collect_date
         from sms_day_report d
-        INNER JOIN sms_device_parm b on d.ATTRIBUTE_ID=b.ID
+        INNER JOIN sms_device_parm b on d.ATTRIBUTE_ID=b.ID and  b.`STATUS`=1
         where d.DEVICE_ID = #{report.deviceId}
         <if test="report.year != null ">and d.`YEAR`=#{report.year}</if>
         <if test="report.month != null ">and d.`MONTH`=#{report.month}</if>
@@ -112,7 +112,7 @@
         and (b.PARM_TYPE =3 or b.PARM_TYPE =4 or b.PARM_TYPE =5 or b.PARM_TYPE =6)
         GROUP BY b.PARM_TYPE) as tab on a.PARM_TYPE=tab.PARM_TYPE and c.collect_date=tab.collect_date
         where
-        a.DEVICE_ID = #{report.deviceId}
+        a.DEVICE_ID = #{report.deviceId} and  a.`STATUS`=1
         <if test="report.sceneId != null ">and a.PARENT_SCENE_ID = #{report.sceneId}</if>
         <if test="report.year != null ">and c.`YEAR`=#{report.year}</if>
         <if test="report.month != null ">and c.`MONTH`=#{report.month}</if>