Commit 7fc6e662 authored by chenzhao's avatar chenzhao

修改bug 4689 时间筛选

parent be869b9d
......@@ -135,6 +135,10 @@ public class EquipmentSpecificAlarmController extends AbstractBaseController {
public ResponseModel getAlarmPage(int pageNum, int pageSize, AlarmDTO dto) {
dto.setStatus("1");
Page page = new Page(pageNum, pageSize);
if (dto.getStartDate() != null && dto.getEndDate() != null){
dto.setStartDate(dto.getStartDate().split(" ")[0]+" 00:00:00");
dto.setEndDate(dto.getEndDate().split(" ")[0]+" 23:59:59");
}
Page<EquipSpecificAlarmDTO> pageBean = iEquipmentSpecificAlarmService.getAlarmPage(page, dto);
return CommonResponseUtil.success(pageBean);
}
......
......@@ -946,7 +946,7 @@
and d.fireEquipmentCode like CONCAT('%', #{dto.fireEquipmentCode}, '%' )
</if>
<if test='dto.startDate != null and dto.startDate != "" and dto.endDate != null and dto.endDate != ""'>
DATE_FORMAT(d.createDate, '%Y-%m-%d' ) BETWEEN DATE_FORMAT(#{dto.startDate}, '%Y-%m-%d' ) and DATE_FORMAT(#{dto.endDate}, '%Y-%m-%d' )
and d.createDate BETWEEN #{dto.startDate} and #{dto.endDate}
</if>
</where>
ORDER BY
......
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