From 12f73bafbe361f78d68a35de83ca3b3b4d4e0224 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期五, 14 二月 2025 16:27:43 +0800
Subject: [PATCH] 查询待办任务时,判断是否挂起状态

---
 business/src/main/resources/mapper/ProjectProcessMapper.xml |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/business/src/main/resources/mapper/ProjectProcessMapper.xml b/business/src/main/resources/mapper/ProjectProcessMapper.xml
index aa8f67a..b2d5fb5 100644
--- a/business/src/main/resources/mapper/ProjectProcessMapper.xml
+++ b/business/src/main/resources/mapper/ProjectProcessMapper.xml
@@ -31,6 +31,7 @@
         <result column="longitude" property="longitude" />
         <result column="latitude" property="latitude" />
         <result column="project_owner_unit" property="projectOwnerUnit" />
+        <result column="project_owner_unit_name" property="projectOwnerUnitName" />
         <result column="project_contact_person" property="projectContactPerson" />
         <result column="contact" property="contact" />
         <result column="gmt_create_time" property="gmtCreateTime" />
@@ -61,17 +62,21 @@
         SELECT
             PI.*,
             TPP.process_def_id,
-            TPP.process_ins_id
+            TPP.process_ins_id,
+            d.dept_name as project_owner_unit_name
         FROM
             t_project_info PI
-                LEFT JOIN t_project_process TPP ON TPP.project_id = PI.id AND TPP.deleted = 0 AND PI.deleted = 0
+                LEFT JOIN t_project_process TPP ON TPP.project_id = PI.id AND TPP.deleted = 0
+                LEFT JOIN sys_dept d ON d.dept_id = PI.project_owner_unit
         <where>
+            AND PI.used_status = 2 AND PI.deleted = 0
             <if test="query.projectName != null and query.projectName != ''">
                 AND PI.project_name like concat('%', #{query.projectName}, '%')
             </if>
             <if test="query.projectCode != null and query.projectCode != ''">
                 AND PI.project_code like concat('%', #{query.projectCode}, '%')
             </if>
+            ${query.params.dataScope}
         </where>
 
     </select>

--
Gitblit v1.8.0