Commit 9a2be87d authored by 李秀明's avatar 李秀明

修改设备告警查询条件

parent 29f8d0ec
......@@ -106,11 +106,17 @@ public class EquipmentAlarmController extends AbstractBaseController {
List<CommonRequest> queryRequests = new ArrayList<>();
CommonRequest request = new CommonRequest();
request.setName("beginDate");
request.setValue(StringUtil.isNotEmpty(beginDate) ? StringUtils.trimToNull(beginDate).substring(0, 10) + " 00:00:00" : null);
request.setValue(beginDate);
if (StringUtil.isNotEmpty(beginDate) && StringUtils.trimToNull(beginDate).length() == 10) {
request.setValue(StringUtils.trimToNull(beginDate).substring(0, 10) + " 00:00:00");
}
queryRequests.add(request);
CommonRequest request1 = new CommonRequest();
request1.setName("endDate");
request1.setValue(StringUtil.isNotEmpty(endDate) ? StringUtils.trimToNull(endDate).substring(0, 10) + " 23:59:59" : null);
request1.setValue(endDate);
if (StringUtil.isNotEmpty(endDate) && StringUtils.trimToNull(endDate).length() == 10) {
request1.setValue(StringUtils.trimToNull(endDate).substring(0, 10) + " 23:59:59");
}
queryRequests.add(request1);
CommonRequest request2 = new CommonRequest();
request2.setName("warehouseStructureName");
......
......@@ -226,8 +226,9 @@
</if>
<if test="param.beginDate!=null">AND wlesal.create_date <![CDATA[>=]]> #{param.beginDate}</if>
<if test="param.endDate!=null">AND wlesal.create_date <![CDATA[<=]]> #{param.endDate}</if>
<if test="param.alarmType == 'BREAKDOWN'">AND wlesal.type = #{param.alarmType}</if>
<if test="param.alarmType == 'FIREALARM'">AND wlesal.type = #{param.alarmType}</if>
<if test="param.alarmType != null and param.alarmType != ''">
AND UPPER(wlesal.type) = UPPER(#{param.alarmType})
</if>
<if test="param.isFireAlarm == 'false'">AND wlesal.type != 'FIREALARM'</if>
<if test="param.orgCode != null and param.orgCode != ''">AND wlesal.org_code = #{param.orgCode}</if>
<if test="param.type != null and param.type != ''">AND wlesal.type = #{param.type}</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment