소스 검색

eer天数据排序和数据质量数据返回代码调整

wangchenghong 3 년 전
부모
커밋
5dad5e93e7

+ 3 - 4
src/main/java/com/persagy/apm/energy/report/common/service/impl/CommonServiceImpl.java

@@ -227,10 +227,6 @@ public class CommonServiceImpl implements CommonService {
             String itemId = itemIdList[0];
             String itemStandardCode = itemIdList[1];
             String targetCode = iDataAnalysisWebService.getTargetCode(userCode, groupCode, itemId);
-            if (null == targetCode) {
-                log.info("根据itemId:" + itemId + "未获取到数据质量配置信息");
-                return new HotelProjectMaintenanceGraph();
-            }
             CountAndDayRateDataVo dataVo = iDataAnalysisWebService.getIotDataAnalysisData(userCode, groupCode, projectId, reportDate, targetCode);
             List<DateGraphItemVO> dateGraphItemVOList = new ArrayList<>();
             TreeMap<Date, Double> dataMap = dataVo.getDataMap();
@@ -421,6 +417,9 @@ public class CommonServiceImpl implements CommonService {
             hotelProjectChillerPlantEfficiency.setMaxEerTime(vo.getMaxEerTimeList());
             hotelProjectChillerPlantEfficiency.setMinEerTime(vo.getMinEerTimeList());
             hotelProjectChillerPlantEfficiency.setCoolingCapacityCurrentMonth(vo.getCoolingCapacityCurrentMonth());
+            List<DateGraphItemVO> eerDetailInfo = vo.getEerDetailInfo();
+            sortMap.put("date", 1);
+            DataUtils.sort(vo.getEerDetailInfo(), sortMap);
             hotelProjectChillerPlantEfficiency.setEerDetailInfo(vo.getEerDetailInfo());
             if (vo.getEer() != null) {
                 hotelProjectChillerPlantEfficiency.setRankWithinClimateZone(i + 1);

+ 4 - 0
src/main/java/com/persagy/apm/energy/report/iotdataanalysis/service/impl/IDataAnalysisWebServiceImpl.java

@@ -55,6 +55,10 @@ public class IDataAnalysisWebServiceImpl implements IDataAnalysisWebService {
 
     @Override
     public CountAndDayRateDataVo getIotDataAnalysisData(String userId, String groupCode, String projectId, Date reportDate, String targetCode) {
+        if(targetCode == null){
+            log.info("targetCode为空故不进行数据质量信息的查询");
+            return new CountAndDayRateDataVo();
+        }
         CountAndDayRateDataVo vo = new CountAndDayRateDataVo();
         try {
             JSONObject paramObject = new JSONObject();