| | |
| | | //下发昨日占比 |
| | | ApiPointValueWriteDTO dto = new ApiPointValueWriteDTO(); |
| | | dto.setPointNo(entry.getValue().get(0).getPointNo()); |
| | | dto.setValue(value/totalValue*100); |
| | | double percent = totalValue==0?0:value/totalValue*100; |
| | | dto.setValue(percent); |
| | | dataPointApi.writePointRealValue(dto); |
| | | |
| | | if(entry.getValue().get(0).getPointNoMonth()!=null){ |
| | |
| | | //下发前三十日占比 |
| | | ApiPointValueWriteDTO monthDto = new ApiPointValueWriteDTO(); |
| | | monthDto.setPointNo(entry.getValue().get(0).getPointNoMonth()); |
| | | monthDto.setValue(value30/totalValueMonth*100); |
| | | double percentMonth = totalValueMonth==0?0:value30/totalValueMonth*100; |
| | | monthDto.setValue(percentMonth); |
| | | dataPointApi.writePointRealValue(monthDto); |
| | | } |
| | | }); |
| | |
| | | dto.setPointNo(entity.getPowerNo()); |
| | | dto.setStart(startTime); |
| | | dto.setEnd(endTime); |
| | | logger.info("开始查询,测点:"+entity.getPowerNo()+"startTime:"+startTime+"endTime:"+endTime); |
| | | |
| | | //查找数据 |
| | | List<ApiPointValueDTO> valueList = dataPointApi.queryPointHistoryValue(dto); |