From 257ab33f3c19325d07d08240404e34fd34c21bbe Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期二, 25 二月 2025 03:04:26 +0800
Subject: [PATCH] 分页bug、多选修改不选时未清除数据库bug
---
business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java | 8 ++++++++
business/src/main/resources/mapper/ProjectInfoMapper.xml | 10 ++++++++--
business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java | 26 ++++++++++++++++++--------
business/src/main/java/com/ycl/domain/query/ProjectInfoQuery.java | 3 +++
4 files changed, 37 insertions(+), 10 deletions(-)
diff --git a/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java b/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java
index 86f1b53..bfa4cee 100644
--- a/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java
+++ b/business/src/main/java/com/ycl/domain/form/ProjectInfoForm.java
@@ -160,21 +160,29 @@
List<Long> competentDepartmentList = form.getCompetentDepartmentList();
if(!CollectionUtils.isEmpty(competentDepartmentList)){
entity.setCompetentDepartment(StringUtils.join(competentDepartmentList, ","));
+ } else {
+ entity.setCompetentDepartment("");
}
//璧勯噾绫诲瀷杞崲
List<String> fundTypeList = form.getFundTypeList();
if(!CollectionUtils.isEmpty(fundTypeList)){
entity.setFundType(StringUtils.join(fundTypeList, ","));
+ } else {
+ entity.setFundType("");
}
//閲嶇偣鍒嗙被杞崲
List<String> importanceTypeList = form.getImportanceTypeList();
if(!CollectionUtils.isEmpty(importanceTypeList)){
entity.setImportanceType(StringUtils.join(importanceTypeList, ","));
+ } else {
+ entity.setImportanceType("");
}
//绠$悊褰掑彛杞崲
List<String> managementCentralizationList = form.getManagementCentralizationList();
if(!CollectionUtils.isEmpty(managementCentralizationList)){
entity.setManagementCentralization(StringUtils.join(managementCentralizationList, ","));
+ } else {
+ entity.setManagementCentralization("");
}
return entity;
}
diff --git a/business/src/main/java/com/ycl/domain/query/ProjectInfoQuery.java b/business/src/main/java/com/ycl/domain/query/ProjectInfoQuery.java
index cda1ce2..4b8d65b 100644
--- a/business/src/main/java/com/ycl/domain/query/ProjectInfoQuery.java
+++ b/business/src/main/java/com/ycl/domain/query/ProjectInfoQuery.java
@@ -61,5 +61,8 @@
@ApiModelProperty("鏄惁鏄紓甯搁」鐩煡璇細0 涓嶆槸 1鏄�")
private Integer exe;
+
+ @ApiModelProperty("鏄惁鏄」鐩腑蹇冩煡璇細0 涓嶆槸 1鏄�")
+ private Integer center;
}
diff --git a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
index a7fb97f..4f24ca5 100644
--- a/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
+++ b/business/src/main/java/com/ycl/service/impl/ProjectInfoServiceImpl.java
@@ -323,6 +323,9 @@
if (query.getProjectEndTime() != null) {
query.setProjectEndTime(DateUtils.getDayEnd(query.getProjectEndTime()));
}
+ if (YesOrNo.YES.getCode().equals(query.getCenter())) {
+ query.setProjectPhase("6");
+ }
// 寮傚父椤圭洰鏆傛椂杩斿洖绌�
if (YesOrNo.YES.getCode().equals(query.getExe())) {
return Result.ok().data(new ArrayList<>()).total(0);
@@ -464,15 +467,22 @@
finish.add(item);
}
- if (ImportanceTypeEnum.PROVINCIAL_KEY.getType().equals(item.getImportanceType())) {
- province.add(item);
- } else if (ImportanceTypeEnum.SUINING_KEY.getType().equals(item.getImportanceType())) {
- city.add(item);
- } else if (ImportanceTypeEnum.SHEHONG_KEY.getType().equals(item.getImportanceType())) {
- county.add(item);
- } else // if (ImportanceTypeEnum.NORMAL.getType().equals(item.getImportanceType()))
- {
+ if (StringUtils.isBlank(item.getImportanceType())) {
normal.add(item);
+ // 浣跨敤contains锛屽洜涓洪噸鐐瑰垎绫诲彲澶氶�夛紝浣跨敤,鍒嗗壊瀛樺偍鐨�
+ } else {
+ if (item.getImportanceType().contains(ImportanceTypeEnum.PROVINCIAL_KEY.getType())) {
+ province.add(item);
+ }
+ if (item.getImportanceType().contains(ImportanceTypeEnum.SUINING_KEY.getType())) {
+ city.add(item);
+ }
+ if (item.getImportanceType().contains(ImportanceTypeEnum.SHEHONG_KEY.getType())) {
+ county.add(item);
+ }
+ if (item.getImportanceType().contains(ImportanceTypeEnum.NORMAL.getType())) {
+ normal.add(item);
+ }
}
});
//鍗曚綅鍏堥粯璁や负鍏�
diff --git a/business/src/main/resources/mapper/ProjectInfoMapper.xml b/business/src/main/resources/mapper/ProjectInfoMapper.xml
index 5615363..7704f4a 100644
--- a/business/src/main/resources/mapper/ProjectInfoMapper.xml
+++ b/business/src/main/resources/mapper/ProjectInfoMapper.xml
@@ -124,7 +124,12 @@
and TPI.project_type = #{query.projectType}
</if>
<if test="query.importanceType !=null and query.importanceType!=''">
- and TPI.importance_type = #{query.importanceType}
+ and (
+ TPI.importance_type like concat('%',#{query.importanceType},'%')
+ <if test="query.importanceType == 'normal'">
+ or TPI.importance_type is null or TPI.importance_type = ''
+ </if>
+ )
</if>
<if test="query.tag !=null and query.tag!=''">
and TPI.tag like concat('%',#{query.tag},'%')
@@ -135,7 +140,8 @@
<if test="query.projectPhase !=null and query.projectPhase!='' and query.projectPhase!=6 and query.projectPhase!=5">
and TPI.project_phase = #{query.projectPhase}
</if>
- <if test="query.projectPhase != null and query.projectPhase != 5 ">
+ /* 鍙涓嶆槸6灏辨煡瀹℃牳閫氳繃鐨勶紝6鏄」鐩腑蹇� */
+ <if test="query.projectPhase != 6">
and TPI.used_status = 2
</if>
<if test="query.fundType !=null and query.fundType!=''">
--
Gitblit v1.8.0