Explorar o código

修正数据质量断线次数默认值和调整日志信息

wangchenghong %!s(int64=3) %!d(string=hai) anos
pai
achega
616284ed66

+ 10 - 11
src/main/java/com/persagy/apm/energy/report/centermiddleware/service/impl/ICenterMiddlewareWebServiceImp.java

@@ -76,7 +76,7 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
 
     @Override
     public List<ProjectEERDataVo> getProjectEERDataList(List<String> pjIdList, String groupCode, Date reportDate) {
-        log.info("项目列表:"+pjIdList+"查询EER数据开始");
+        log.info("项目列表:" + pjIdList + "查询EER数据开始");
         if (CollectionUtils.isEmpty(pjIdList) || StringUtils.isEmpty(groupCode) || null == reportDate) {
             log.info("查询ProjectEERDataVo时参数为空,故不进行查询");
             return new ArrayList<>();
@@ -117,8 +117,8 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
                     dateGraphItemVO.setValue(eer);
                     dateGraphItemVOList.add(dateGraphItemVO);
                 }
-                log.info("项目:"+pjId+"allCoolingCapacity:"+allCoolingCapacity);
-                log.info("项目:"+pjId+"allPowerConsumption:"+allPowerConsumption);
+                log.info("项目:" + pjId + "allCoolingCapacity:" + allCoolingCapacity);
+                log.info("项目:" + pjId + "allPowerConsumption:" + allPowerConsumption);
                 Double allEer = null;
                 if (allCoolingCapacity != null && allPowerConsumption != null && allPowerConsumption != 0.0) {
                     allEer = allCoolingCapacity / allPowerConsumption;
@@ -134,7 +134,7 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
         } catch (Exception e) {
             log.error("计算ProjectEERDataVo异常:", e);
         }
-        log.info("项目列表:"+pjIdList+"查询EER数据结束"+"结果列表:"+resultList);
+        log.info("项目列表:" + pjIdList + "查询EER数据结束");
         return resultList;
     }
 
@@ -170,7 +170,6 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
 
     private TreeMap<Date, Double> getDayCountData(String pjId, String groupCode, Date reportDate, String infoCode, List<String> classCodeList, List<Date> dateList) {
         List<String> objectIdList = getObjectIdList(pjId, groupCode, classCodeList);
-        log.info("项目:"+pjId+"对象id:"+objectIdList);
         if (!CollectionUtils.isEmpty(objectIdList)) {
             return getInfoCodePeriodDataCountMap(pjId, groupCode, objectIdList, reportDate, infoCode, "1d",dateList);
         }
@@ -178,7 +177,7 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
     }
 
     private List<String> getObjectIdList(String pjId, String groupCode, List<String> classCodeList) {
-        log.info("查询对象信息列表开始,项目:"+pjId+"groupCode:"+groupCode+"classCodeList:"+classCodeList);
+        log.info("查询对象信息列表开始,项目:" + pjId + "groupCode:" + groupCode + "classCodeList:" + classCodeList);
         if (StringUtils.isEmpty(pjId) || StringUtils.isEmpty(groupCode) || CollectionUtils.isEmpty(classCodeList)) {
             log.info("查询中台对象信息时参数为空,故不进行查询");
             return new ArrayList<>();
@@ -193,7 +192,7 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
             queryObjectInfoDTO.setCriteria(criteria);
             PoemsFeignResponse<ObjectInfoVO> response = centerMiddlewareWebClient.getObjectInfo(queryObjectInfoDTO);
             List<ObjectInfoVO> objectInfoVOList = response.getContent();
-            log.info("中台返回对象结果:"+objectInfoVOList);
+            log.info("中台返回对象结果:" + objectInfoVOList);
             if (!CollectionUtils.isEmpty(objectInfoVOList)) {
                 for (ObjectInfoVO vo : objectInfoVOList) {
                     resultList.add(vo.getId());
@@ -202,12 +201,12 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
         } catch (Exception e) {
             log.error("查询中台对象信息时异常:", e);
         }
-        log.info("查询对象信息列表结束,结果:"+resultList);
+        log.info("查询对象信息列表结束");
         return resultList;
     }
 
     private TreeMap<Date, Double> getInfoCodePeriodDataCountMap(String pjId, String groupCode, List<String> objectIdList, Date reportDate, String infoCode, String period, List<Date> dateList) {
-        log.info("项目:"+pjId+"infoCod:"+infoCode+"查询数据列表开始");
+        log.info("项目:" + pjId + "infoCod:" + infoCode + "查询数据列表开始");
         if (StringUtils.isEmpty(pjId) || StringUtils.isEmpty(groupCode) || CollectionUtils.isEmpty(objectIdList) || null == reportDate) {
             log.info("查询历史数据时参数为空,故不进行查询");
             return new TreeMap<>();
@@ -235,7 +234,7 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
             batchQueryPeriodDataDTO.setCriterias(criteriasObjDTOList);
             PoemsFeignResponse<PoemsFeignResponse<PeriodDataInfoVO>> response = centerMiddlewareWebClient.getPeriodDataInfo(batchQueryPeriodDataDTO);
             List<PoemsFeignResponse<PeriodDataInfoVO>> responseList = response.getContent();
-            log.info("项目:"+pjId+"infoCod:"+infoCode+"数据列表:"+responseList);
+            log.info("项目:" + pjId + "infoCod:" + infoCode + "数据列表:" + responseList);
             if (!CollectionUtils.isEmpty(responseList)) {
                 for (PoemsFeignResponse<PeriodDataInfoVO> responseVo : responseList) {
                     List<PeriodDataInfoVO> periodDataInfoVOList = responseVo.getContent();
@@ -268,7 +267,7 @@ public class ICenterMiddlewareWebServiceImp implements ICenterMiddlewareWebServi
         } catch (Exception e) {
             log.error("查询中台对象信息时异常:", e);
         }
-        log.info("项目:"+pjId+"infoCod:"+infoCode+"查询数据列表结束"+"结果:"+dataMap);
+        log.info("项目:" + pjId + "infoCod:" + infoCode + "查询数据列表结束");
         return dataMap;
     }
 

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

@@ -270,6 +270,9 @@ public class CommonServiceImpl implements CommonService {
             return new HotelProjectMaintenanceInfo();
         }
         HotelProjectMaintenanceInfo hotelProjectMaintenanceInfo = new HotelProjectMaintenanceInfo();
+        // 设置默认值
+        hotelProjectMaintenanceInfo.setBreakCount(0);
+        hotelProjectMaintenanceInfo.setBreakLostTime(0.0);
         List<HotelProjectMaintenanceGraph> hotelProjectMaintenanceGraphList = new ArrayList<>();
         if (!CollectionUtils.isEmpty(functionList)) {
             for (Function function : functionList) {