From 037f2c36f944add78589213007dd8f50374b6cd4 Mon Sep 17 00:00:00 2001 From: pengwei Date: Thu, 31 Jul 2025 15:22:12 +0800 Subject: [PATCH] =?UTF-8?q?fit=EF=BC=9A=E7=9D=A3=E5=AF=9F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=E5=AE=8C=E5=96=84(=E6=9F=A5=E8=AF=A2=E6=9D=A1?= =?UTF-8?q?=E4=BB=B6=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mobileSupervision/TaskProblemController.java | 11 +++++++++++ .../supervision/pojo/param/TaskProblemQueryParam.java | 8 +++++++- 2 files changed, 18 insertions(+), 1 deletion(-) 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; }