From 2f09efc660bf2cc94cbc5291ad25ca06fc9bdadf Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期六, 24 一月 2026 22:03:09 +0800
Subject: [PATCH] feat: 增加OCR测试,车辆

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TaskDispatchSyncUtilService.java |   65 +++++++++++++++++++++++++-------
 1 files changed, 50 insertions(+), 15 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TaskDispatchSyncUtilService.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TaskDispatchSyncUtilService.java
index 8300d98..9c3c5d5 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TaskDispatchSyncUtilService.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TaskDispatchSyncUtilService.java
@@ -15,6 +15,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.stream.Collectors;
 
 @Service
 @Slf4j
@@ -42,7 +43,7 @@
 
         // 鑾峰彇绠$悊鍛業D锛堝垱寤轰汉ID瀵瑰簲鐨凮A_UserID锛�
         String adminID = taskSyncUtilService.getAdminID(task);
-
+        String serviceOrdClass = "BF";
         // 鑾峰彇璋冨害鍗曠被鍨嬶紙浠庝换鍔℃墍灞為儴闂ㄧ殑璋冨害鍗曠紪鐮佽幏鍙栵級
         String dispatchOrdClass = "SA"; // 榛樿鍊�
         if (task.getDeptId() != null) {
@@ -50,6 +51,7 @@
                 SysDept dept = sysDeptMapper.selectDeptById(task.getDeptId());
                 if (dept != null && StringUtils.isNotEmpty(dept.getDispatchOrderClass())) {
                     dispatchOrdClass = dept.getDispatchOrderClass();
+                    serviceOrdClass = dept.getServiceOrderClass();
 //                    log.info("鑾峰彇浠诲姟鎵�灞為儴闂ㄧ殑璋冨害鍗曠紪鐮佹垚鍔燂紝閮ㄩ棬ID: {}, 璋冨害鍗曠紪鐮�: {}", task.getDeptId(), dispatchOrdClass);
                 }
             } catch (Exception e) {
@@ -57,7 +59,23 @@
             }
         }
         params.put("AdminID", adminID);
-
+        params.put("ServiceOrdClass", serviceOrdClass);
+        String serviceOrdAreaType = "1"; // 榛樿鍊�
+        if (StringUtils.isNotEmpty(emergency.getDocumentTypeId())) {
+            serviceOrdAreaType = emergency.getDocumentTypeId();
+//            log.info("鑾峰彇鍗曟嵁绫诲瀷ID鎴愬姛锛屼换鍔D: {}, 鍗曟嵁绫诲瀷ID: {}", task.getTaskId(), serviceOrdAreaType);
+        } else {
+            log.warn("浠诲姟鏈厤缃崟鎹被鍨婭D锛屼换鍔D: {}锛屼娇鐢ㄩ粯璁ゅ��", task.getTaskId());
+        }
+        params.put("ServiceOrdAreaType", serviceOrdAreaType); // 浠庝换鍔$殑document_type_id鑾峰彇
+        String serviceOrdType = "1"; // 榛樿鍊�
+        if (StringUtils.isNotEmpty(emergency.getTaskTypeId())) {
+            serviceOrdType = emergency.getTaskTypeId();
+//            log.info("鑾峰彇浠诲姟绫诲瀷ID鎴愬姛锛屼换鍔D: {}, 浠诲姟绫诲瀷ID: {}", taskId, serviceOrdType);
+        } else {
+            log.warn("浠诲姟鏈厤缃换鍔$被鍨婭D锛屼换鍔D: {}锛屼娇鐢ㄩ粯璁ゅ��", task.getTaskId());
+        }
+        params.put("ServiceOrdType", serviceOrdType); // 鏈嶅姟鍗曟墽琛岀被鍨嬶紙浠庝换鍔$殑task_type_id鑾峰彇锛�
         // 鍩烘湰淇℃伅
         params.put("DispatchOrdClass", dispatchOrdClass);
         params.put("ServiceOrdID", emergency.getLegacyServiceOrdId().toString());
@@ -104,7 +122,8 @@
                 transferPrice = "0";
             }
         }
-        params.put("DispatchOrdPerfomance", transferPrice);
+        //鎴愪氦浠�
+        params.put("ServiceOrdTraTxnPrice", transferPrice);
         params.put("StretcherMoney", "0"); // 鎶媴鏋惰垂
         params.put("AddMoneyType", ""); // 闄勫姞椤圭洰
         params.put("AddMoney", "0"); // 闄勫姞椤圭洰璐圭敤
@@ -304,9 +323,10 @@
             // 鑾峰彇浠诲姟鐨勬墽琛屼汉鍛樹俊鎭垪琛紙鍖呭惈瑙掕壊绫诲瀷锛� //TODO 濡傛灉鏈変袱涓徃鏈哄氨瑕� 璁剧疆銆�Entourage_1鍜孍ntourage_2
             //涓や釜鎶ゅ+灏辫璁剧疆 Entourage_4鍜孍ntourage_6
             //涓や釜鍖荤敓瑕佽缃� Entourage_3鍜孍ntourage_5
-            List<TaskCreateVO.AssigneeInfo> assignees = getTaskAssignees(task.getTaskId());
 
-            if (assignees == null || assignees.isEmpty()) {
+            List<TaskCreateVO.AssigneeInfo> assignees = getTaskAssignees(task.getTaskId());
+            log.info("浠诲姟鐨勬墽琛屼汉鍛�:{}",assignees.stream().map(TaskCreateVO.AssigneeInfo::getUserName).collect(Collectors.joining(",")));
+            if (assignees.isEmpty()) {
                 log.warn("浠诲姟鏃犳墽琛屼汉鍛橈紝浠诲姟ID: {}", task.getTaskId());
                 // 璁剧疆榛樿绌哄��
                 params.put("EntourageLeadID", "");
@@ -324,13 +344,16 @@
             String driverOaId = "";      // 鍙告満鐨凮A_UserID
             String doctorOaId = "";      // 鍖荤敓鐨凮A_UserID
             String nurseOaId = "";       // 鎶ゅ+鐨凮A_UserID
+            String driverOaId2="";
+            String nurseOaId2="";
+            String doctorOaId2="";
 
             // 閬嶅巻鎵ц浜哄憳锛屾牴鎹鑹茬被鍨嬪垎閰嶅埌瀵瑰簲鐨凟ntourage鍙傛暟
             for (int i = 0; i < assignees.size(); i++) {
                 TaskCreateVO.AssigneeInfo assignee = assignees.get(i);
                 Long userId = assignee.getUserId();
                 String userType = assignee.getUserType(); // 鐩存帴浣跨敤鍓嶇浼犻�掔殑瑙掕壊绫诲瀷
-
+                log.info("浜哄憳鍚屾,鐢ㄦ埛ID:{},绫诲瀷锛歿}",userId,userType);
                 if (userId == null) {
                     continue;
                 }
@@ -343,11 +366,15 @@
                 }
 
                 String oaUserId = user.getOaUserId().toString();
-
+                log.info("浜哄憳鍚屾 22222,鐢ㄦ埛ID:{},绫诲瀷锛歿}",userId,userType);
                 // 鏍规嵁鐢ㄦ埛绫诲瀷鍒嗛厤鍒板搴旂殑Entourage鍙傛暟
                 if ("driver".equals(userType)) {
-                    if (driverOaId.isEmpty()) {
-                        driverOaId = oaUserId;
+                        if(driverOaId.isEmpty()){
+                            driverOaId = oaUserId;
+                        }
+                        if(driverOaId2.isEmpty()){
+                            driverOaId2 = oaUserId;
+                        }
                         if(params.get("Entourage_1")==null) {
                             params.put("Entourage_1", oaUserId);
                         }else{
@@ -357,10 +384,14 @@
                         if (i == 0 && leadEntourageId.isEmpty()) {
                             leadEntourageId = "1"; // 鍙告満瀵瑰簲Entourage_1
                         }
-                    }
+
                 } else if ("doctor".equals(userType)) {
                     if (doctorOaId.isEmpty()) {
                         doctorOaId = oaUserId;
+                    }
+                    if(doctorOaId2.isEmpty()){
+                        doctorOaId2 = oaUserId;
+                    }
                         if(params.get("Entourage_3")==null) {
                             params.put("Entourage_3", oaUserId);
                         }else{
@@ -370,10 +401,14 @@
                         if (i == 0 && leadEntourageId.isEmpty()) {
                             leadEntourageId = "3"; // 鍖荤敓瀵瑰簲Entourage_3
                         }
-                    }
+
                 } else if ("nurse".equals(userType)) {
                     if (nurseOaId.isEmpty()) {
                         nurseOaId = oaUserId;
+                    }
+                    if(nurseOaId2.isEmpty()){
+                        nurseOaId2 = oaUserId;
+                    }
                         if(params.get("Entourage_4")==null) {
                             params.put("Entourage_4", oaUserId);
                         }else{
@@ -383,7 +418,7 @@
                         if (i == 0 && leadEntourageId.isEmpty()) {
                             leadEntourageId = "4"; // 鎶ゅ+瀵瑰簲Entourage_4
                         }
-                    }
+
                 }
             }
 
@@ -392,9 +427,9 @@
 //            params.put("Entourage_1", driverOaId);  // 鍙告満
 //            params.put("Entourage_3", doctorOaId);  // 鍖荤敓
 //            params.put("Entourage_4", nurseOaId);   // 鎶ゅ+
-
-//            log.info("浠诲姟鎵ц浜哄憳鍚屾鎴愬姛锛屼换鍔D: {}, 棰嗛槦ID: {}, 鍙告満: {}, 鍖荤敓: {}, 鎶ゅ+: {}",
-//                task.getTaskId(), leadEntourageId, driverOaId, doctorOaId, nurseOaId);
+            log.info("鎵ц浜哄憳:{}", params);
+            log.info("浠诲姟鎵ц浜哄憳鍚屾鎴愬姛锛屼换鍔D: {}, 棰嗛槦ID: {}, 鍙告満: {}, 鍖荤敓: {}, 鎶ゅ+: {}",
+                task.getTaskId(), leadEntourageId, driverOaId, doctorOaId, nurseOaId);
 
         } catch (Exception e) {
             log.error("鍚屾浠诲姟鎵ц浜哄憳寮傚父锛屼换鍔D: {}", task.getTaskId(), e);

--
Gitblit v1.9.1