Commit 92ed692f authored by 王晓倩's avatar 王晓倩

右上角报警器数量统计修改

parent 22747988
......@@ -144,22 +144,17 @@ public class TDetectorInfoController extends BaseController
try {
TDetectorInfo detector = new TDetectorInfo();
detector.setIsDel("0");
List<TDetectorInfo> tDetectorInfoList = tDetectorInfoService.selectTDetectorInfoList(detector);
detector.setDetectorStatus("0");
List<TDetectorInfo> onlineList = tDetectorInfoService.selectTDetectorInfoList(detector);
int onlineNum = onlineList.size();
List<String> strList = new ArrayList<>();
for(TDetectorInfo info : tDetectorInfoList){
strList.add(info.getDetectorCode());
}
List<TDetectorReportData> dataList = tDetectorReportDataService.countDetector(strList);
int totalNum = dataList.size();
detector.setDetectorStatus("1");
List<TDetectorInfo> offlineList = tDetectorInfoService.selectTDetectorInfoList(detector);
int offlineNum = offlineList.size();
int handledNum = 0;
for(TDetectorReportData data : dataList){
if(!StringUtils.isEmpty(data.getIsCancelAlarm()) && !data.getIsCancelAlarm().equals("0")){
++handledNum;
}
}
detector.setDetectorStatus("2");
List<TDetectorInfo> alarmList = tDetectorInfoService.selectTDetectorInfoList(detector);
int alarmNum = alarmList.size();
List<TDetectorAlarmInfoVO> alarmVO = tDetectorReportDataService.selectTDetectorAlarm();
for(TDetectorAlarmInfoVO alarm : alarmVO){
......@@ -170,9 +165,9 @@ public class TDetectorInfoController extends BaseController
}
}
map.put("totalNum", totalNum);
map.put("handledNum", handledNum);
map.put("noHandeldNum", totalNum-handledNum);
map.put("alarmNum", alarmNum);
map.put("onlineNum", onlineNum);
map.put("offlineNum", offlineNum);
map.put("pageData", alarmVO);
} catch (Exception ie){
......
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