Commit 5bfb4c80 by 杨林龙

首页查询返回查询时间

1 parent 92137664
......@@ -152,8 +152,11 @@ public class HomeService extends AbstractCommonService {
returnMap.put("powerOffAlarmCount", powerOffAlarmCount);
// 统计设备离线报警
String lostBegin = DateUtil.formatDate(DateUtils.addHours(new Date(), -72));
Date date = new Date();
String lostBegin = DateUtil.formatDate(DateUtils.addHours(date, -72));
List<StatCountModel> offLineAlarmCountList = vehicleMapper.getOffLineAlarmCount(lostBegin);
returnMap.put("offLineAlarmStartTime", lostBegin);
returnMap.put("offLineAlarmEndTime", DateUtil.formatDate(date));
//设备离线数
Integer offLineAlarmCount = offLineAlarmCountList.stream().map(StatCountModel::getCnt).filter(Objects::nonNull).reduce(0, Integer::sum);
returnMap.put("offLineAlarmCount", offLineAlarmCount);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!