| | |
| | | @Override |
| | | public YearDeviceDataVO yearFightingAdminDeviceData(){ |
| | | YearDeviceDataVO data = new YearDeviceDataVO(); |
| | | |
| | | FireStatisticRequest param = new FireStatisticRequest(); |
| | | param.setIndexCode("api_fire_statistic"); |
| | | BaseResponse<FireStatisticResponse> response = HKService.fireStatistic(param); |
| | |
| | | data.setProtectNum(Constants.formatIntegerNum(response.getData().getMaintenanceNum())); |
| | | data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getDeviceTotalNum())); |
| | | } |
| | | |
| | | param = new FireStatisticRequest(); |
| | | param.setIndexCode("api_fire_statistic_month"); |
| | | BaseResponse<FireStatisticResponse> response1 = HKService.fireStatisticMonth(param); |
| | |
| | | data.setMonthTotalNum(Constants.formatIntegerNum(response1.getData().getDeviceTotalNum())); |
| | | } |
| | | return data; |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | BaseResponse<List<FindDeviceStatisticsResponse>> response = HKService.findDeviceStatistics(param1); |
| | | if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ){ |
| | | for(FindDeviceStatisticsResponse r :response.getData()){ |
| | | DeviceNumByTypeVO t = new DeviceNumByTypeVO(); |
| | | t.setTypeName(r.getDeviceTypeName()); |
| | | t.setTotalDeviceNum(Constants.formatIntegerNum(r.getTotalDeviceCount())); |
| | | if(r.getDevices()!=null){ |
| | | for(FindDeviceStatisticsInfoResponse td : r.getDevices()){ |
| | | DeviceNumByTypeVO t = new DeviceNumByTypeVO(); |
| | | t.setTypeName(td.getDeviceName()); |
| | | //屏蔽数 |
| | | t.setShieldDeviceNum(Constants.formatIntegerNum(t.getShieldDeviceNum() )+ Constants.formatIntegerNum(td.getShieldSensorCount())); |
| | | //报警数 |
| | |
| | | t.setErrDeviceNum(Constants.formatIntegerNum(t.getErrDeviceNum())+ Constants.formatIntegerNum(td.getFaultSensorCount())); |
| | | //总设备数 |
| | | t.setTotalDeviceNum(Constants.formatIntegerNum(t.getTotalDeviceNum())+ Constants.formatIntegerNum(td.getTotalSensorCount())); |
| | | list.add(t); |
| | | // data.setOfflineDeviceNum(Constants.formatIntegerNum( data.getOfflineDeviceNum())+Constants.formatIntegerNum(t.getOfflineDeviceNum())); |
| | | data.setShieldDeviceNum(Constants.formatIntegerNum( data.getShieldDeviceNum())+Constants.formatIntegerNum(t.getShieldDeviceNum())); |
| | | data.setAlarmDeviceNum(Constants.formatIntegerNum( data.getAlarmDeviceNum())+Constants.formatIntegerNum(t.getAlarmDeviceNum())); |
| | | data.setOnlineDeviceNum(Constants.formatIntegerNum( data.getOnlineDeviceNum())+Constants.formatIntegerNum(t.getOnlineDeviceNum())); |
| | | data.setErrDeviceNum(Constants.formatIntegerNum( data.getErrDeviceNum())+Constants.formatIntegerNum(t.getErrDeviceNum())); |
| | | data.setTotalDeviceNum(Constants.formatIntegerNum( data.getTotalDeviceNum())+Constants.formatIntegerNum(t.getTotalDeviceNum())); |
| | | } |
| | | } |
| | | list.add(t); |
| | | data.setOfflineDeviceNum(Constants.formatIntegerNum( data.getOfflineDeviceNum())+Constants.formatIntegerNum(t.getOfflineDeviceNum())); |
| | | data.setShieldDeviceNum(Constants.formatIntegerNum( data.getAlarmDeviceNum())+Constants.formatIntegerNum(t.getShieldDeviceNum())); |
| | | data.setAlarmDeviceNum(Constants.formatIntegerNum( data.getAlarmDeviceNum())+Constants.formatIntegerNum(t.getAlarmDeviceNum())); |
| | | data.setOnlineDeviceNum(Constants.formatIntegerNum( data.getOnlineDeviceNum())+Constants.formatIntegerNum(t.getOnlineDeviceNum())); |
| | | data.setErrDeviceNum(Constants.formatIntegerNum( data.getErrDeviceNum())+Constants.formatIntegerNum(t.getErrDeviceNum())); |
| | | data.setTotalDeviceNum(Constants.formatIntegerNum( data.getTotalDeviceNum())+Constants.formatIntegerNum(t.getTotalDeviceNum())); |
| | | } |
| | | } |
| | | /* FireDevStatusTotalRequest param = new FireDevStatusTotalRequest(); |