From 884f26b6c148310ed7cc487977eca95de4b883c5 Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期二, 23 六月 2026 18:38:28 +0800
Subject: [PATCH] 【市一】外链开放机构号生成

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java |   60 +++++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 41 insertions(+), 19 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 56c6428..a1f195b 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
@@ -1,5 +1,6 @@
 package com.ruoyi.web.controller.smartor;
 
+import com.alibaba.fastjson.JSON;
 import com.github.pagehelper.ISelect;
 import com.google.gson.Gson;
 import com.google.gson.reflect.TypeToken;
@@ -27,6 +28,7 @@
 import com.ruoyi.quartz.task.RyTask;
 import com.ruoyi.system.service.ISysConfigService;
 import com.ruoyi.system.service.ISysUserDeptService;
+import com.smartor.common.QwenLLMUtil;
 import com.smartor.domain.*;
 import com.smartor.domain.VO.HeLibraryCountVO;
 import com.smartor.domain.VO.ServiceSubtaskCotinueCountVO;
@@ -91,6 +93,9 @@
 
     @Value("${spring.profiles.active}")
     private String active;
+
+    @Value("${isAdmin}")
+    private List<Long> isAdmin;
 
     @Autowired
     private RedisCache redisCache;
@@ -552,25 +557,25 @@
 
         if(ObjectUtils.isNotEmpty(statisticaltype)){
             SysUser user = getLoginUser().getUser();
-            if(statisticaltype==1){
-                if(CollectionUtils.isEmpty(serviceSubtaskCountReq.getLeavehospitaldistrictcodes())){
-                    //鍏ㄩ儴鐥呭尯
-                    String deptInfo = user.getDeptInfo();
-                    Gson gson = new Gson();
-                    // 3. 瀹氫箟 List 绫诲瀷锛堟牳蹇冿級
-                    TypeToken<List<String>> typeToken = new TypeToken<List<String>>() {};
-                    List<String> leavehospitaldistrictcodes = gson.fromJson(deptInfo, typeToken.getType());
-                    serviceSubtaskCountReq.setLeavehospitaldistrictcodes(leavehospitaldistrictcodes);
-                }
-            }else if(statisticaltype==2){
-                if(CollectionUtils.isEmpty(serviceSubtaskCountReq.getDeptcodes())){
-                    //鍏ㄩ儴绉戝
-                    String hospInfo = user.getHospInfo();
-                    Gson gson = new Gson();
-                    // 3. 瀹氫箟 List 绫诲瀷锛堟牳蹇冿級
-                    TypeToken<List<String>> typeToken = new TypeToken<List<String>>() {};
-                    List<String> deptCodes = gson.fromJson(hospInfo, typeToken.getType());
-                    serviceSubtaskCountReq.setDeptcodes(deptCodes);
+            if(!isAdmin.contains(user.getUserId())){
+                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());
+                        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());
+                        serviceSubtaskCountReq.setDeptcodes(deptCodes);
+                    }
                 }
             }
         }
@@ -879,6 +884,16 @@
         ryTask.dealOutHospInfo();
     }
 
+    @PostMapping("/compensateTasktest")
+    public void compensateTasktest(@RequestParam("subId")Long subId) {
+        ryTask.compensateTaskTest(subId);
+    }
+
+    @PostMapping("/longTaskSendtest")
+    public void longTaskSendtest(@RequestParam("subId")Long subId) {
+        ryTask.longTaskSendTest(subId);
+    }
+
     @PostMapping("/syncMedInhospForShiyi")
     public void syncMedInhospForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) {
         collectHISService.syncMedInhosp(startTime, endTime);
@@ -888,4 +903,11 @@
     public void syncMedOperForShiyi(@RequestParam("startTime") String startTime, @RequestParam("endTime") String endTime) {
         collectHISService.syncOper(startTime, endTime);
     }
+
+    @PostMapping("/qwenLLMTest")
+    public int qwenLLMTest(@RequestParam("voiceText") String questionText, @RequestParam("voiceText") String voiceText,
+                                      @RequestParam("value") String value,@RequestParam("regexText") String regexText) {
+        int result = ryTask.qwenLLMTest(questionText, voiceText, value, regexText);
+        return result;
+    }
 }

--
Gitblit v1.9.3