瀏覽代碼

修改bug

lwhhszx 2 年之前
父節點
當前提交
111bf81350
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      PAS/src/main/java/cn/cslg/pas/service/ProjectService.java

+ 1 - 1
PAS/src/main/java/cn/cslg/pas/service/ProjectService.java

@@ -313,7 +313,7 @@ public class ProjectService extends ServiceImpl<ProjectMapper, Project> {
         List<SystemDict> systemDictList = systemDictService.getSystemDictListByType(Collections.singletonList(Constants.ENTERPRISE_APPLICATION_SCENARIO));
         for (SystemDict systemDict : systemDictList) {
             Map<String, Object> result = new HashMap<>();
-            List<Project> tempList = projectList.stream().filter(item -> item.getScenarioList().contains(Integer.parseInt(systemDict.getValue()))).collect(Collectors.toList());
+            List<Project> tempList = projectList.stream().filter(item ->item.getScenarioList()!=null&& item.getScenarioList().contains(Integer.parseInt(systemDict.getValue()))).collect(Collectors.toList());
             result.put("completed", tempList.stream().filter(item -> item.getStatus().equals("1")).count());
             result.put("unfinished", tempList.stream().filter(item -> item.getStatus().equals("0")).count());
             map.put(systemDict.getLabel(), result);