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

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

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