From 8241ddde076c3418f359e48009585a2d9aae7ed7 Mon Sep 17 00:00:00 2001
From: wujian <14790700720@163.com>
Date: 星期五, 29 三月 2024 14:19:25 +0800
Subject: [PATCH] chenge plan

---
 jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java b/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java
index ecaa8ea..5411454 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/em/inspectionPlanItemsProject/controller/EmInspectionPlanItemsProjectController.java
@@ -6,6 +6,7 @@
 import java.util.stream.Collectors;
 import javax.servlet.http.HttpServletResponse;
 
+import cn.hutool.core.collection.CollUtil;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.jcdm.framework.websocket.WebSocketUsers;
@@ -66,11 +67,12 @@
         List<EmInspectionPlanItemsProject> list = emInspectionPlanItemsProjectService.list(new LambdaQueryWrapper<EmInspectionPlanItemsProject>()
                 .eq(EmInspectionPlanItemsProject::getPlanTaskId, itemsProject.getPlanTaskId()));
 
-        List<String> collect = list.stream().map(EmInspectionPlanItemsProject::getResults).collect(Collectors.toList());
-
-        if(collect.stream().noneMatch(s -> s.equals("0"))){
+        List<String> collect = list.stream()
+                .map(EmInspectionPlanItemsProject::getResults)
+                .filter(x-> !"1".equals(x)).collect(Collectors.toList());
+        if(CollUtil.isEmpty(collect)){
             EmInspectionPlanTask planTaskById = emInspectionPlanTaskService.getById(itemsProject.getPlanTaskId());
-            planTaskById.setResults("1");
+            planTaskById.setState("1");
             emInspectionPlanTaskService.saveOrUpdate(planTaskById);
         }
         return AjaxResult.success();

--
Gitblit v1.9.3