From 2b326b025aa0121abe008c3e7072c39a0dc286db Mon Sep 17 00:00:00 2001
From: 陈昶聿 <chychen@nbjetron.com>
Date: 星期二, 10 十一月 2026 13:59:38 +0800
Subject: [PATCH] 合并修改com/ruoyi/quartz/task/RyTacom/ruoyi/quartz/task/RyTask.java:3sk.java:3com/ruoyi/quart/task/RyTask.java:3

---
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskController.java |   31 +++++++++++++++++++++----------
 1 files changed, 21 insertions(+), 10 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 af20ef9..6a19f59 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,6 +1,6 @@
 package com.ruoyi.web.controller.smartor;
 
-import com.alibaba.fastjson.JSON;
+import com.alibaba.fastjson2.util.TypeUtils;
 import com.github.pagehelper.ISelect;
 import com.ruoyi.common.annotation.AddOrgId;
 import com.ruoyi.common.annotation.Log;
@@ -848,26 +848,35 @@
     @AddOrgId(field = "orgid", paramIndex = 0, campusField = "campusid")
     @PostMapping("/getSfStatisticsCountDetailsHyperLink")
     public AjaxResult getSfStatisticsCountDetailsHyperLink(@RequestBody ServiceSubtaskCountReq serviceSubtaskCountReq) {
+        Integer statisticaltype = serviceSubtaskCountReq.getStatisticaltype();
+        if (statisticaltype != null && statisticaltype != 1 && statisticaltype != 2 && statisticaltype != 3) {
+            return error("缁熻缁村害statisticaltype浠呮敮鎸侊細1-鎸夌梾鍖� 2-鎸夌瀹� 3-鎸塼askid");
+        }
+        if (serviceSubtaskCountReq.getScriptid() == null
+                && StringUtils.isEmpty(serviceSubtaskCountReq.getScriptContent())) {
+            return error("闂ID(scriptid)涓嶈兘涓虹┖");
+        }
+        if (serviceSubtaskCountReq.getOptionText() == null) {
+            return error("闂閫夐」(optionText)涓嶈兘涓虹┖");
+        }
+
         LoginUser loginUser = getLoginUser();
         String orgid = loginUser.getUser().getOrgid();
+        serviceSubtaskCountReq.setOrgid(orgid);
+
+        // 涓� getSfStatisticsCountDetails 淇濇寔鐩稿悓鐨勯厤缃瓫閫夊彛寰�
         String configKey = serviceSubtaskCountReq.getConfigKey();
         if (StringUtils.isNotEmpty(configKey)) {
             String configValue = configService.selectConfigByKey(configKey, orgid);
             serviceSubtaskCountReq.setConfigValue(configValue);
             if (StringUtils.isEmpty(configValue)) {
-                String logInfo = "getSfStatisticsCount-鍙傛暟 " + configKey + " 鏈厤缃�, 璇烽厤缃ソ鍚庨噸璇�";
+                String logInfo = "getSfStatisticsCountDetailsHyperLink-鍙傛暟 " + configKey + " 鏈厤缃�, 璇烽厤缃ソ鍚庨噸璇�";
                 log.error(logInfo);
                 return error(logInfo);
             }
         }
 
-        String followUpCountStyle = configService.selectConfigByKey("followUpCountStyle", orgid);
-        if (ObjectUtils.isNotEmpty(followUpCountStyle)) {
-            serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle);
-        } else {
-            serviceSubtaskCountReq.setFollowUpCountStyle("1");
-        }
-        return success(serviceSubtaskService.getSfStatisticsHyperlink(serviceSubtaskCountReq));
+        return success(serviceSubtaskService.getSfStatisticsScriptDetailsHyperlink(serviceSubtaskCountReq));
     }
     /**
      * 鍙戦�佺煭淇℃ā鏉�
@@ -1069,7 +1078,9 @@
             Map<String, Object> redisMap = redisCache.getCacheObject(userId + "patItemCount");
             Boolean redisFlag = false;
             if (MapUtils.isNotEmpty(redisMap)) {
-                ServiceSubtaskEntity oldCondition = (ServiceSubtaskEntity) redisMap.get("searchCondition");
+                // Redis 鍙嶅簭鍒楀寲鍚庯紝searchCondition 鍙兘鏄� JSONObject锛岀洿鎺ュ己杞細瑙﹀彂 ClassCastException锛岃繖閲岀粺涓�杞崲
+                Object cachedCondition = redisMap.get("searchCondition");
+                ServiceSubtaskEntity oldCondition = TypeUtils.cast(cachedCondition, ServiceSubtaskEntity.class);
                 if (ObjectUtils.isNotEmpty(oldCondition) && isSameCondition(oldCondition, serviceSubtaskEntity)) {
                     redisFlag = true;
                     map = redisMap;

--
Gitblit v1.9.3