| | |
| | | request.setSorts(new ArrayList<>()); |
| | | RuleEventFiledOptionsRequest file = new RuleEventFiledOptionsRequest(); |
| | | file.setFieldName("event_type"); |
| | | file.setFieldValue("131588");//安防告警 |
| | | file.setFieldValue("131588,131593");//安防告警和人员告警 |
| | | file.setType("in"); |
| | | if(type == 1){ |
| | | file.setFieldValue("131588");//安防告警 |
| | | }else if(type == 2){ |
| | | |
| | | }else if(type == 1){ |
| | | |
| | | file.setFieldValue("131593");//人员告警 |
| | | } |
| | | request.getFiledOptions().add(file); |
| | | SortRequest sort = new SortRequest(); |
| | |
| | | 3) 自来水二氧化碳排放量(kg)=自来水使用量(m3)×0.91;*/ |
| | | data.setCarbon(Constants.formatBigdecimal2Float((carbonElec.multiply(new BigDecimal(0.785))) |
| | | .add(carbonGas.multiply(new BigDecimal(0.19))) |
| | | .add(carbonWater.multiply(new BigDecimal(0.91))))); |
| | | .add(carbonWater.multiply(new BigDecimal(0.91)))).divide(new BigDecimal(1000),2,BigDecimal.ROUND_HALF_UP)); |
| | | return data; |
| | | |
| | | } |
| | |
| | | data.setRingPercent("0"); |
| | | data.setSecondRegionDataList(new ArrayList<>()); |
| | | } |
| | | return data; |
| | | if(data.getSecondRegionDataList()!=null && data.getSecondRegionDataList().size()>1){ |
| | | int index =-1; |
| | | for (int i = 0; i <data.getSecondRegionDataList().size() ; i++) { |
| | | RegionTopPowerResponse t=data.getSecondRegionDataList().get(i); |
| | | if(Constants.formatBigdecimal(t.getPercent()).compareTo(new BigDecimal(1)) == 0){ |
| | | index =i; |
| | | break; |
| | | } |
| | | } |
| | | if(index>-1){ |
| | | data.getSecondRegionDataList().remove(index);//删除根节点数据 |
| | | } |
| | | } |
| | | |
| | | return data; |
| | | } |
| | | /** |
| | | * 近12个水电气油耗数据统计 |
| | |
| | | (int) retentionList.stream().filter(i->Constants.equalsInteger(i.getType(),Constants.THREE) |
| | | &&Constants.equalsInteger(i.getCarType(),Constants.RetentionCarType.outTruck)).count() |
| | | ); |
| | | data.setVideoPluginUrl(getVideoUrl()); |
| | | return data; |
| | | } |
| | | |
| | | private String getVideoUrl() { |
| | | return systemDictDataBiz.queryByCode(Constants.FTP,Constants.FTP_RESOURCE_PATH).getCode()+"plugin/VideoWebPlugin.exe"; |
| | | } |
| | | |
| | | private void getParkingCarsNum(SecurityBoardVO data) { |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | data.setVideoPluginUrl(getVideoUrl()); |
| | | String indexCodes = systemDictDataBiz.queryByCode(Constants.HK_PARAM,Constants.HK_CHANGNEI_SCREEN_INDEXCODES).getCode(); |
| | | if(StringUtils.isNotBlank(indexCodes)){ |
| | | data.setVideoIndexCodes(indexCodes.split(",")); |
| | | } |
| | | } |
| | | |
| | | return data; |