From ae6fd06555845067b72a0b094126c858275a5bd9 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 29 十一月 2024 06:54:04 +0800
Subject: [PATCH] 项目分类查询、异常项目

---
 business/src/main/resources/mapper/ProjectInfoMapper.xml |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/business/src/main/resources/mapper/ProjectInfoMapper.xml b/business/src/main/resources/mapper/ProjectInfoMapper.xml
index 251f0c0..0da2550 100644
--- a/business/src/main/resources/mapper/ProjectInfoMapper.xml
+++ b/business/src/main/resources/mapper/ProjectInfoMapper.xml
@@ -55,7 +55,7 @@
 
     <select id="getPage" resultMap="resultMap">
         SELECT
-            TPI.*,
+            TPI.*,TPP.process_instance_id as processId,
             TPIF.total_investment  as TPIF_totalInvestment,
             TPIF.principal as TPIF_principal,TPIF.government_investment_total as TPIF_government_investment_total,TPIF.central_investment_total as TPIF_central_investment_total,
             TPIF.central_budget_investment as TPIF_central_budget_investment,TPIF.central_fiscal_investment as TPIF_central_fiscal_investment,
@@ -101,11 +101,9 @@
         LEFT JOIN t_project_investment_info TPII ON TPI.id = TPII.project_id and TPII.deleted = 0
         LEFT JOIN t_project_investment_policy_compliance TPIPC ON TPI.id = TPIPC.project_id and TPIPC.deleted = 0
         LEFT JOIN t_project_unit_registration_info TPURI ON TPI.id = TPURI.project_id and TPURI.deleted = 0
+        LEFT JOIN t_project_process TPP ON TPI.id = TPP.project_id and TPP.deleted = 0
         <where>
             TPI.deleted = 0
-            <if test="query.projectCategory !=null and query.projectCategory!=''">
-                and TPI.project_phase = #{query.projectCategory}
-            </if>
             <if test="query.projectName !=null and query.projectName!=''">
                 and TPI.project_name like concat('%',#{query.projectName},'%')
             </if>
@@ -145,8 +143,14 @@
             <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_instance_id is null
+            </if>
+            <if test="query.reserveOrPrevious != null and query.reserveOrPrevious == 'previous'">
+                and TPP.process_instance_id is not null
+            </if>
         </where>
-        order by gmt_create
+        order by TPI.gmt_create
     </select>
 
 </mapper>

--
Gitblit v1.8.0