rk
4 天以前 7b95d5cd6cb9cb6ce48c0d4667d5e3f2334012b3
server/visits/dmvisit_service/src/main/java/com/doumee/service/business/impl/thrid/BoardServiceImpl.java
@@ -1505,24 +1505,42 @@
    @Override
    public    YearDeviceDataVO yearFightingAdminDeviceData(){
        YearDeviceDataVO data = new YearDeviceDataVO();
        FireStatisticRequest param = new FireStatisticRequest();
        param.setIndexCode("api_fire_statistic");
        BaseResponse<FireStatisticResponse> response = HKService.fireStatistic(param);
        if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ) {
            data.setProtectNum(Constants.formatIntegerNum(response.getData().getMaintenanceNum()));
            data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getDeviceTotalNum()));
//        FireStatisticRequest param = new FireStatisticRequest();
//        param.setIndexCode("api_fire_statistic");
//        BaseResponse<FireStatisticResponse> response = HKService.fireStatistic(param);
//        if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE) && response.getData()!=null ) {
//            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);
//        if(response1 != null && StringUtils.equals(response1.getCode(), HKConstants.RESPONSE_SUCCEE)
//                && response1.getData()!=null ) {
//            data.setMonthAddNum(Constants.formatIntegerNum(response1.getData().getMaintenanceNumMonth()));
//            data.setMonthTotalNum(Constants.formatIntegerNum(response1.getData().getDeviceTotalNum()));
//        }
        data.setProtectNum(Constants.ZERO);
        data.setPlanProtectTotal(Constants.ZERO);
        data.setMonthAddNum(Constants.ZERO);
        data.setMonthTotalNum(Constants.ZERO);
        BaseResponse<SensorStatusStatisticResponse> response = HKService.sensorStatusStatistic();
        if(response != null && StringUtils.equals(response.getCode(), HKConstants.RESPONSE_SUCCEE)
                && response.getData()!=null ) {
            data.setProtectNum(Constants.formatIntegerNum(response.getData().getSensorMainNum()));
            data.setPlanProtectTotal(Constants.formatIntegerNum(response.getData().getSensorNum()));
            data.setMonthAddNum(Constants.formatIntegerNum(response.getData().getSensorMainMonthNum()));
            data.setMonthTotalNum(Constants.formatIntegerNum(response.getData().getSensorNum()));
        }
        param = new FireStatisticRequest();
        param.setIndexCode("api_fire_statistic_month");
        BaseResponse<FireStatisticResponse> response1 = HKService.fireStatisticMonth(param);
        if(response1 != null && StringUtils.equals(response1.getCode(), HKConstants.RESPONSE_SUCCEE)
                && response1.getData()!=null ) {
            data.setMonthAddNum(Constants.formatIntegerNum(response1.getData().getMaintenanceNumMonth()));
            data.setMonthTotalNum(Constants.formatIntegerNum(response1.getData().getDeviceTotalNum()));
        }
        return data;
    }
    /**
     * 【消防管控】看板-分类和汇总的各状态设备数量
     * @return