feat: 获取企标计划列表新增排除id

This commit is contained in:
2023-10-20 14:56:12 +08:00
parent 46a07a42e5
commit 716457984c
2 changed files with 24 additions and 5 deletions
@@ -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<String> projectStatusList;
public void transIdsToList() {
if (StrUtil.isBlank(this.selections)) {
return;
@ApiModelProperty(value = "排除Id列表,流程中用")
private String excludeIds;
@JSONField(serialize = false)
@ApiModelProperty(value = "排除Id列表,流程中用")
private List<String> excludeIdList;
public List<String> 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);
}
}
@@ -185,6 +185,12 @@
#{item}
</foreach>
</if>
<if test="param.excludeIdList != null and param.excludeIdList.size() > 0">
AND p.id NOT IN
<foreach item="item" index="index" collection="param.excludeIdList" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select>
<select id="getDetailById" resultType="com.jero.modules.laws.enterprise.entity.EnterpriseStandardPlan">