Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
65936d5b95
|
|
@ -49,4 +49,14 @@ public class CollectDeviceHisVo {
|
|||
*/
|
||||
private int limit;
|
||||
|
||||
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String startTime;
|
||||
|
||||
/**
|
||||
* 结束时间
|
||||
*/
|
||||
private String endTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where tcdh.is_warn =1 and tcd.const_id = #{id}
|
||||
</select>
|
||||
<select id="temperatureList" resultType="com.bonus.base.screen.domain.CollectDeviceHisVo">
|
||||
select tcdh.create_time as createTime,tcdh.remark as remark,tcd.dev_name as devName,tcdh.attr_val as attrVal
|
||||
from tb_collect_device_his tcdh
|
||||
left join tb_collect_device tcd on tcdh.dev_id = tcd.id
|
||||
where tcdh.is_warn =0 and tcd.id = #{id}
|
||||
<choose>
|
||||
<when test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
select tcdh.create_time as createTime,tcdh.remark as remark,tcd.dev_name as devName,tcdh.attr_val as attrVal
|
||||
from tb_collect_device_his tcdh
|
||||
left join tb_collect_device tcd on tcdh.dev_id = tcd.id
|
||||
where tcdh.is_warn =0 and tcd.id = #{id}
|
||||
and tcdh.create_time BETWEEN #{startTime} AND #{endTime}
|
||||
</when>
|
||||
<otherwise>
|
||||
select tcdh.create_time as createTime,tcdh.remark as remark,tcd.dev_name as devName,tcdh.attr_val as attrVal
|
||||
from tb_collect_device_his tcdh
|
||||
left join tb_collect_device tcd on tcdh.dev_id = tcd.id
|
||||
where tcdh.is_warn =0 and tcd.id = #{id} ORDER BY tcdh.create_time DESC limit 20
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue