| | |
| | | log.info("curValue=" + curValue); |
| | | for (PowerNetDropdownEntity netDropdown : dropdownList) { |
| | | PowerDemandQueryRespDTO dto = ConvertUtils.sourceToTarget(netDropdown, PowerDemandQueryRespDTO.class); |
| | | if (!CollectionUtils.isEmpty(pointsHisValues.get(netDropdown.getExt1()))) { |
| | | Map<String, BigDecimal> pointValueMap = new HashMap<>(); |
| | | pointsHisValues.get(netDropdown.getExt1()).forEach(item -> { |
| | | pointValueMap.put(item.get("time").toString(), DecimalUtil.toBigDecimal(item.get("value"))); |
| | | |
| | | if (CollectionUtils.isEmpty(pointsHisValues.get(netDropdown.getCurCos()))) { |
| | | continue; |
| | | }); |
| | | dto.setCurDemand(pointValueMap.get(DateUtils.format(curValue.getT(),DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND))); |
| | | dto.setDataTime(curValue.getT()); |
| | | } |
| | | Map<String, BigDecimal> pointValueMap = new HashMap<>(); |
| | | pointsHisValues.get(netDropdown.getCurCos()).forEach(item -> { |
| | | pointValueMap.put(item.get("time").toString(), DecimalUtil.toBigDecimal(item.get("value"))); |
| | | |
| | | }); |
| | | dto.setCurDemand(pointValueMap.get(DateUtils.format(curValue.getT(),DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND))); |
| | | dto.setDataTime(curValue.getT()); |
| | | result.add(dto); |
| | | } |
| | | } |