From 14f2352da6fc317cd0d5fad85f2d146fc1b6bc64 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期五, 27 三月 2026 09:31:57 +0800
Subject: [PATCH] 【丽水】getDeptRanking 增加OrgId

---
 smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
index 1877ccc..d219368 100644
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
+++ b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskMapper.xml
@@ -371,7 +371,7 @@
                 </foreach>
             </if>
             <if test=" visitDeptCodes != null and visitDeptCodes.size()>0">
-                and visit_dept_name IN
+                and visit_dept_code IN
                 <foreach collection="visitDeptCodes" item="visitDeptCode" open="(" separator=","
                          close="))">
                     #{visitDeptCode}
@@ -389,7 +389,7 @@
                 </foreach>
             </if>
             <if test=" visitDeptCodes != null and visitDeptCodes.size()>0">
-                OR visit_dept_name IN
+                OR visit_dept_code IN
                 <foreach collection="visitDeptCodes" item="visitDeptCode" open="(" separator=","
                          close="))">
                     #{visitDeptCode}
@@ -1894,6 +1894,9 @@
         FROM service_subtask
         WHERE DATE_FORMAT(finishtime, '%Y-%m-%d') >= #{startDate}
           AND DATE_FORMAT(finishtime, '%Y-%m-%d') &lt;= #{endDate}
+        <if test="orgid != null">
+            AND orgid = #{orgid}
+        </if>
         GROUP BY deptname
     </select>
 

--
Gitblit v1.9.3