| | |
| | | return; |
| | | } |
| | | for (PowerDemandEntity demand : demandList) { |
| | | // 查询今天的最大需量 |
| | | logger.info("查询今天的最大需量"); |
| | | ApiPointValueQueryDTO pointValueQuery0 = new ApiPointValueQueryDTO(); |
| | | pointValueQuery0.setStart(dayStart); |
| | | pointValueQuery0.setEnd(nowTime); |
| | | pointValueQuery0.setPointNo(demand.getCurDemand()); |
| | | Map<String, Object> maxValue = dataPointApi.queryPointMaxValue(pointValueQuery0); |
| | | BigDecimal todayMax = BigDecimal.ZERO; |
| | | if (CollectionUtils.isEmpty(maxValue) && maxValue.containsKey(demand.getCurDemand())) { |
| | | todayMax = new BigDecimal(maxValue.get(demand.getCurDemand()).toString()); |
| | | if (CollectionUtils.isEmpty(maxValue)) { |
| | | logger.info("maxValue is empty"); |
| | | continue; |
| | | } |
| | | |
| | | BigDecimal todayMax = new BigDecimal(maxValue.get(demand.getCurDemand()).toString()); |
| | | logger.info("todayMax=" + todayMax); |
| | | List<ApiPointValueDTO> valueList = dataPointApi.queryPointHistoryValue(pointValueQuery0); |
| | | if (CollectionUtils.isEmpty(valueList)) { |
| | | logger.info("valueList is empty"); |
| | |
| | | } |
| | | } |
| | | |
| | | // 查询本月需量发生记录 |
| | | logger.info("查询本月需量发生记录"); |
| | | BigDecimal monthMax = powerMaxdemandMainService.getMax(demand.getCode(), monStart, nowTime); |
| | | |
| | | // 保存记录 |
| | |
| | | String mainId = powerMaxdemandMainService.add(mainEntity); |
| | | |
| | | Map<String, Object> params1 = new HashMap<>(); |
| | | params1.put("pCode", demand.getCode()); |
| | | params1.put("groupName", demand.getName()); |
| | | List<PowerNetDropdownEntity> dropdownList = powerNetDropdownService.list(params1); |
| | | if (CollectionUtils.isEmpty(dropdownList)) { |
| | | logger.info("dropdownList is empty"); |