Selaa lähdekoodia

查询节能工单时工单id列表加入非空判断

wangchenghong 3 vuotta sitten
vanhempi
commit
a2a5389fe9

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

@@ -22,6 +22,10 @@ public class IEquipRunManagerServiceImpl implements IEquipRunManagerService {
 
     @Override
     public Map<String, Double> getEnergySaveWorderMap(List<String> workOrderIdList) {
+        if (CollectionUtils.isEmpty(workOrderIdList)) {
+            log.info("获取节能工单信息入参为空,故不进行查询");
+            return new HashMap<>();
+        }
         Map<String, Double> resultMap = new HashMap<>();
         try {
             QueryEnergySaveWorkerParamDTO queryEnergySaveWorkerParamDTO = new QueryEnergySaveWorkerParamDTO();

+ 1 - 0
src/main/java/com/persagy/apm/energy/report/manualfilling/service/impl/IManualFillingServiceImpl.java

@@ -36,6 +36,7 @@ public class IManualFillingServiceImpl implements IManualFillingService {
                 for (IndicatorFillingDataVo vo : indicatorFillingDataVoList) {
                     if (DateUtils.date2Str(reportDate, DateUtils.SDF_SECOND).equals(vo.getTime())) {
                         result = vo.getData();
+                        break;
                     }
                 }
             }