From 4894ff5d3dded33b4d50c5cba7c3659f340ae9a7 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期一, 24 二月 2025 23:06:48 +0800
Subject: [PATCH] 下面阶段查询bug
---
business/src/main/resources/mapper/ProjectInfoMapper.xml | 39 +++++++++++++++------------------------
1 files changed, 15 insertions(+), 24 deletions(-)
diff --git a/business/src/main/resources/mapper/ProjectInfoMapper.xml b/business/src/main/resources/mapper/ProjectInfoMapper.xml
index c6db4ae..5694ac9 100644
--- a/business/src/main/resources/mapper/ProjectInfoMapper.xml
+++ b/business/src/main/resources/mapper/ProjectInfoMapper.xml
@@ -132,17 +132,14 @@
<if test="query.projectStatus !=null and query.projectStatus!=''">
and TPI.project_status = #{query.projectStatus}
</if>
- <if test="query.projectPhase !=null and query.projectPhase!=''">
+ <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=" assignmentStatus !=null and assignmentStatus!=''">-->
-<!-- and TPI.project_phase = #{projectPhase}-->
-<!-- </if>-->
+ <if test="query.projectPhase != null and query.projectPhase != 5 ">
+ and TPI.used_status = 2
+ </if>
<if test="query.fundType !=null and query.fundType!=''">
and TPI.fund_type = #{query.fundType}
- </if>
- <if test="query.projectPhase !=null and query.projectPhase!=''">
- and TPI.project_phase = #{query.projectPhase}
</if>
<if test="query.investType !=null and query.investType!=''">
and TPI.invest_type = #{query.investType}
@@ -153,28 +150,22 @@
<if test="query.projectStartTime !=null and query.projectEndTime !=null">
and TPI.create_project_time between #{query.projectStartTime} and #{query.projectEndTime}
</if>
- <if test="query.reserveOrPrevious != null and query.reserveOrPrevious == 'reserve'">
- and TPP.process_ins_id is null
- </if>
- <if test="query.reserveOrPrevious != null and query.reserveOrPrevious == 'previous'">
- and TPP.process_ins_id is not null
- </if>
- <if test="query.projectCategory != 6">
- and TPI.used_status = 2
- </if>
- <if test="query.projectCategory == 3">
+<!-- <if test="query.reserveOrPrevious != null and query.reserveOrPrevious == 'reserve'">-->
+<!-- and TPP.process_ins_id is null-->
+<!-- </if>-->
+<!-- <if test="query.reserveOrPrevious != null and query.reserveOrPrevious == 'previous'">-->
+<!-- and TPP.process_ins_id is not null-->
+<!-- </if>-->
+ <if test="query.projectPhase == 3">
and (TPI.project_status = 'working' or TPI.project_status = 'stop')
</if>
- <if test="query.projectCategory == 6">
-<!-- <if test="query.role == 0">-->
-<!-- and TPI.used_status != 2-->
-<!-- </if>-->
- <if test="query.role == 1">
+ <if test="query.projectPhase == null">
+ <if test="query.role != null and query.role == 1">
and TPI.used_status = 1 and FIND_IN_SET(#{query.competentDepartment}, TPI.competent_department) > 0
</if>
</if>
<!-- 涓氫富鏁版嵁鏉冮檺 -->
- <if test="query.role == 0">
+ <if test="query.role != null and query.role == 0">
${query.params.dataScope}
</if>
</where>
@@ -242,7 +233,7 @@
<id column="id" property="id"/>
</resultMap>
<select id="checkProjectNameAndIdIsUnique" resultMap="pInfo">
- select p.id from t_project_info p where p.project_name =#{name} and p.id != #{id}
+ select p.id from t_project_info p where p.project_name =#{name} and p.id != #{id} and p.deleted = 0
<if test="code !=null and code !=''">
and p.project_code =#{code}
</if>
--
Gitblit v1.8.0