From 1b9936ba920d65df09ab8dba79c6252568ee26e4 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 26 三月 2025 12:16:02 +0800
Subject: [PATCH] 任务统计bug

---
 business/src/main/resources/mapper/PlanMapper.xml |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/business/src/main/resources/mapper/PlanMapper.xml b/business/src/main/resources/mapper/PlanMapper.xml
index 0b433f7..d25ab8e 100644
--- a/business/src/main/resources/mapper/PlanMapper.xml
+++ b/business/src/main/resources/mapper/PlanMapper.xml
@@ -63,8 +63,9 @@
             pi.invest_type
         FROM t_project_info AS pi
         LEFT JOIN t_plan AS p ON p.project_info_id = pi.id
+        LEFT JOIN sys_dept d ON d.dept_id = PI.project_owner_unit
         <where>
-            pi.deleted = 0
+            pi.deleted = 0 AND pi.used_status = 2
             <if test="query.projectName!= null and query.projectName!= ''">
                 AND pi.project_name LIKE CONCAT('%', #{query.projectName}, '%')
             </if>
@@ -83,6 +84,7 @@
             <if test="query.yearStatus!= null">
                 AND p.year_status = #{query.yearStatus}
             </if>
+            ${query.params.dataScope}
         </where>
     </select>
 

--
Gitblit v1.8.0