From 716457984c949e7ff5f1047e474e7ee43541a151 Mon Sep 17 00:00:00 2001 From: caihaohan Date: Fri, 20 Oct 2023 14:56:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=8E=B7=E5=8F=96=E4=BC=81=E6=A0=87?= =?UTF-8?q?=E8=AE=A1=E5=88=92=E5=88=97=E8=A1=A8=E6=96=B0=E5=A2=9E=E6=8E=92?= =?UTF-8?q?=E9=99=A4id?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../enterprise/entity/dto/ESPlanQueryDTO.java | 23 +++++++++++++++---- .../xml/EnterpriseStandardPlanMapper.xml | 6 +++++ 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/laws-modules/src/main/java/com/jero/modules/laws/enterprise/entity/dto/ESPlanQueryDTO.java b/laws-modules/src/main/java/com/jero/modules/laws/enterprise/entity/dto/ESPlanQueryDTO.java index 2b711314..b189a9fc 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/enterprise/entity/dto/ESPlanQueryDTO.java +++ b/laws-modules/src/main/java/com/jero/modules/laws/enterprise/entity/dto/ESPlanQueryDTO.java @@ -10,6 +10,7 @@ import lombok.NoArgsConstructor; import lombok.experimental.Accessors; import org.springframework.format.annotation.DateTimeFormat; +import java.util.ArrayList; import java.util.Date; import java.util.List; @@ -93,15 +94,27 @@ public class ESPlanQueryDTO { @ApiModelProperty(value = "项目状态列表,流程中用") private List projectStatusList; - public void transIdsToList() { - if (StrUtil.isBlank(this.selections)) { - return; + @ApiModelProperty(value = "排除Id列表,流程中用") + private String excludeIds; + + @JSONField(serialize = false) + @ApiModelProperty(value = "排除Id列表,流程中用") + private List excludeIdList; + + public List transIdsToList(String values) { + if (StrUtil.isBlank(values)) { + return new ArrayList<>(); } - this.idList = StrUtil.split(this.selections, StrUtil.COMMA); + return StrUtil.split(values, StrUtil.COMMA); } public void setSelections(String selections) { this.selections = selections; - this.transIdsToList(); + this.idList = transIdsToList(selections); + } + + public void setExcludeIds(String excludeIds) { + this.excludeIds = excludeIds; + this.excludeIdList = transIdsToList(excludeIds); } } diff --git a/laws-modules/src/main/java/com/jero/modules/laws/enterprise/mapper/xml/EnterpriseStandardPlanMapper.xml b/laws-modules/src/main/java/com/jero/modules/laws/enterprise/mapper/xml/EnterpriseStandardPlanMapper.xml index ac65f1c3..dc198108 100644 --- a/laws-modules/src/main/java/com/jero/modules/laws/enterprise/mapper/xml/EnterpriseStandardPlanMapper.xml +++ b/laws-modules/src/main/java/com/jero/modules/laws/enterprise/mapper/xml/EnterpriseStandardPlanMapper.xml @@ -185,6 +185,12 @@ #{item} + + AND p.id NOT IN + + #{item} + +