From 1e5d108d1f1991b2ddda91a19de5716bee0f306d Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期一, 20 七月 2026 16:41:10 +0800
Subject: [PATCH] 【丽水】随访统计科室逻辑调整

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java |   29 +++++++++++++++++++++++++----
 1 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
index 4db09ad..caa866b 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java
@@ -573,15 +573,29 @@
                 if (statisticaltype == 1) {
                     if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getLeavehospitaldistrictcodes())) {
                         //鍏ㄩ儴鐥呭尯
-                        String deptInfo = user.getDeptInfo();
-                        List<String> leavehospitaldistrictcodes = JSON.parseArray(deptInfo).stream().map(item -> (String) ((List<?>) item).get(0)).collect(Collectors.toList());
+                        List<String> leavehospitaldistrictcodes = null;
+                        SysUserDept sysUserWard = new SysUserDept();
+                        sysUserWard.setUserId(user.getUserId());
+                        sysUserWard.setOrgid(user.getOrgid());
+                        sysUserWard.setDeptType("2");
+                        List<SysUserDept> wardList = sysUserDeptService.selectSysUserDeptList(sysUserWard);
+                        if(CollectionUtils.isNotEmpty(wardList)) {
+                            leavehospitaldistrictcodes = wardList.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList());
+                        }
                         serviceSubtaskCountReq.setLeavehospitaldistrictcodes(leavehospitaldistrictcodes);
                     }
                 } else if (statisticaltype == 2) {
                     if (CollectionUtils.isEmpty(serviceSubtaskCountReq.getDeptcodes())) {
                         //鍏ㄩ儴绉戝
-                        String hospInfo = user.getHospInfo();
-                        List<String> deptCodes = JSON.parseArray(hospInfo).stream().map(item -> (String) ((List<?>) item).get(0)).collect(Collectors.toList());
+                        List<String> deptCodes = null;
+                        SysUserDept sysUserDept = new SysUserDept();
+                        sysUserDept.setUserId(user.getUserId());
+                        sysUserDept.setOrgid(user.getOrgid());
+                        sysUserDept.setDeptType("1");
+                        List<SysUserDept> deptList = sysUserDeptService.selectSysUserDeptList(sysUserDept);
+                        if(CollectionUtils.isNotEmpty(deptList)){
+                            deptCodes = deptList.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList());
+                        }
                         serviceSubtaskCountReq.setDeptcodes(deptCodes);
                     }
                 }
@@ -886,6 +900,13 @@
         return serviceSubtaskService.getHeLibraryCount(heLibraryCountVO);
     }
 
+    @ApiOperation("鑾峰彇瀹f暀缁熻瓒呴摼鎺�")
+    @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
+    @PostMapping("/gethelibraryCountHyperlink")
+    public AjaxResult gethelibraryCountHyperlink(@RequestBody HeLibraryCountVO heLibraryCountVO) {
+        return success(serviceSubtaskService.gethelibraryCountHyperlink(heLibraryCountVO));
+    }
+
     /**
      * 鎵嬪姩鍙戦�侀棶鍗锋ā鏉跨殑鐭俊鍔熻兘
      *

--
Gitblit v1.9.3