@@ -79,8 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -79,8 +79,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<where> d.is_del = '0'
<where> d.is_del = '0'
<iftest="deviceCode != null and deviceCode != ''"> and d.device_code like concat('%',#{deviceCode},'%')</if>
<iftest="deviceCode != null and deviceCode != ''"> and d.device_code like concat('%',#{deviceCode},'%')</if>
<iftest="deviceType != null and deviceType != ''"> and d.device_type = #{deviceType}</if>
<iftest="deviceType != null and deviceType != ''"> and d.device_type = #{deviceType}</if>
<iftest="startReportTime != null "> and t.report_time >= #{startReportTime}</if>
<iftest="startReportTime != null "> and t.create_time >= #{startReportTime}</if>
<iftest="endReportTime != null "> and t.report_time <= #{endReportTime}</if>
<iftest="endReportTime != null "> and t.create_time <= #{endReportTime}</if>
<iftest="communicationStatus != null and communicationStatus != ''"> and t.communication_status = #{communicationStatus}</if>
<iftest="communicationStatus != null and communicationStatus != ''"> and t.communication_status = #{communicationStatus}</if>
<iftest="deviceStatus != null and deviceStatus != ''"> and t.device_status = #{deviceStatus}</if>
<iftest="deviceStatus != null and deviceStatus != ''"> and t.device_status = #{deviceStatus}</if>
</where>
</where>
...
@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
'报警'
'报警'
END AS device_status
END AS device_status
FROM
FROM
t_device_report_data t
(select tt1.* from t_device_report_data tt1, (select max(device_report_data_id)device_report_data_id,device_num from t_device_report_data group by device_num) tt2 where tt1.device_report_data_id =tt2.device_report_data_id ) t