瀏覽代碼

功能完善

hlf 5 月之前
父節點
當前提交
f9ae362a21
共有 1 個文件被更改,包括 4 次插入5 次删除
  1. 4 5
      ims-service/ims-eval/src/main/java/com/ims/eval/cache/CacheContext.java

+ 4 - 5
ims-service/ims-eval/src/main/java/com/ims/eval/cache/CacheContext.java

@@ -234,10 +234,9 @@ public class CacheContext implements CommandLineRunner {
 		ruleList.clear();
 		ruleMap.clear();
 		ruleList = organizationEvaluationRuleService.list();
-
-		ruleList = ruleList.stream().filter(t -> !t.getDelFlag() && t.getIsCheck()).collect(Collectors.toList());
-		ruleMap = ruleList.stream().collect(Collectors.groupingBy(OrganizationEvaluationRule::getOrganizationId));
+		if (ruleList != null) {
+			ruleList = ruleList.stream().filter(t -> t != null && !t.getDelFlag() && t.getIsCheck()).collect(Collectors.toList());
+			ruleMap = ruleList.stream().collect(Collectors.groupingBy(OrganizationEvaluationRule::getOrganizationId));
+		}
 	}
-
-
 }