diff --git a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java index b6a04b3..b002b7a 100644 --- a/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java +++ b/src/main/java/com/biutag/supervision/controller/mobileSupervision/TaskProblemController.java @@ -13,10 +13,13 @@ import com.biutag.supervision.pojo.entity.SupTaskPerson; import com.biutag.supervision.pojo.entity.SupTaskProblem; import com.biutag.supervision.pojo.model.UserAuth; import com.biutag.supervision.pojo.param.TaskProblemQueryParam; +import com.biutag.supervision.service.SupDepartService; import com.biutag.supervision.service.SupTaskProblemService; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; +import java.util.ArrayList; +import java.util.List; import java.util.Objects; import java.util.stream.Collectors; @@ -31,12 +34,20 @@ public class TaskProblemController { private final SupTaskProblemService taskProblemService; + private final SupDepartService departService; @GetMapping public Result> page(TaskProblemQueryParam queryParam) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + List orgIds =new ArrayList<>(); + if(StrUtil.isNotBlank(queryParam.getDepartId())){ + orgIds = departService.getAllNodeIds(queryParam.getDepartId()); + } queryWrapper.eq(StrUtil.isNotBlank(queryParam.getTaskType()), SupTaskProblem::getTaskType, queryParam.getTaskType()) .eq(Objects.nonNull(queryParam.getTaskId()), SupTaskProblem::getTaskId, queryParam.getTaskId()) .eq(StrUtil.isNotBlank(queryParam.getContentId()), SupTaskProblem::getContentId, queryParam.getContentId()) + .eq(StrUtil.isNotBlank(queryParam.getDistributionState()),SupTaskProblem::getDistributionState,queryParam.getDistributionState()) + .like(StrUtil.isNotBlank(queryParam.getThingDesc()),SupTaskProblem::getThingDesc,queryParam.getThingDesc()) + .in(StrUtil.isNotBlank(queryParam.getDepartId()),SupTaskProblem::getDepartId,orgIds) .orderByDesc(SupTaskProblem::getCreateTime); UserAuth user = UserContextHolder.getCurrentUser(); if (TaskTypeEnum.problem_shooting.name().equals(queryParam.getTaskType()) && !AppConstants.USER_TYPE_SUPER.equals(user.getUserType()) ) { diff --git a/src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java b/src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java index 65f0632..3258f76 100644 --- a/src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java +++ b/src/main/java/com/biutag/supervision/pojo/param/TaskProblemQueryParam.java @@ -16,6 +16,12 @@ public class TaskProblemQueryParam extends BasePage { private Integer taskId; private String contentId; - + //问题来源 private String actionType; + //分发状态 + private String distributionState; + //涉及单位 + private String departId; + //问题描述 + private String thingDesc; }