wangyangyang пре 4 година
родитељ
комит
8b72de4da0
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      sms_water/src/main/resources/mapper/MonitorInfoMapper.xml

+ 1 - 1
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 and  b.`STATUS`=1
+        INNER JOIN sms_device_parm b on d.DEVICE_ID=b.DEVICE_ID and d.ATTRIBUTE_ID = b.ATTRIBUTE_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>