| | |
| | | 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; |
| | |
| | | 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(); |