feat(dms): 更新关机记录查询的时间范围过滤逻辑

- 添加 params 参数支持时间范围查询功能
- 实现 shut_begin_time 字段的时间区间过滤
- 保留原有的 shutBeginTime 和 shutEndTime 单点时间过滤
- 修复 XML 特殊字符转义问题
- 优化查询条件的组合逻辑
master
zangch@mesnac.com 2 weeks ago
parent ef8acbe6fc
commit 8c1286c228

@ -43,8 +43,11 @@
<where>
<if test="shutType != null ">and shut_type_id = #{shutType}</if>
<if test="shutReason != null and shutReason != ''">and shut_reason = #{shutReason}</if>
<if test="shutBeginTime != null ">and shut_begin_time >= #{shutBeginTime}</if>
<if test="shutEndTime != null ">and #{shutEndTime}>=shut_end_time</if>
<if test="params != null and params.beginTime != null and params.endTime != null">
and shut_begin_time between #{params.beginTime} and #{params.endTime}
</if>
<if test="shutBeginTime != null ">and shut_begin_time &gt;= #{shutBeginTime}</if>
<if test="shutEndTime != null ">and #{shutEndTime} &gt;= shut_end_time</if>
<if test="shutTime != null ">and shut_time = #{shutTime}</if>
<if test="deviceCode != null and deviceCode != ''">and machine_id in (select OBJ_ID from base_deviceledger where device_code = #{deviceCode})</if>
</where>

Loading…
Cancel
Save