From ab2884ade73fed97d1e7d7daf4b9b5b6dee83fdd Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 29 十月 2026 09:26:12 +0800
Subject: [PATCH] 代码提交

---
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveImport.java                           |    2 
 ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java                        |    8 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveReq.java                              |    2 
 ruoyi-othervisit/pom.xml                                                                                   |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchivecontactService.java                 |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveServiceImpl.java                |   23 
 ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/api/InhospVisitFacade.java                           |  111 ---
 ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskServiceImpl.java                           |    4 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PersonWorkbenchController.java                  |    2 
 ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskScheduleServiceImpl.java                   |    4 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java              |    4 
 ruoyi-phone/src/main/java/com/ruoyi/phone/PhoneModule.java                                                 |    7 
 smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java                        |   17 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveService.java                        |    8 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchivetagServiceImpl.java             |    6 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveOutService.java                     |    4 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchivetagService.java                     |    4 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveOutServiceImpl.java             |    8 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveOthreInfo.java                        |    2 
 smartor/src/main/java/com/smartor/service/PersonWorkbenchService.java                                      |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveImportMapper.java                     |    4 
 ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchivetagMapper.xml                              |    2 
 smartor/src/main/java/com/smartor/service/IServiceTaskRuleService.java                                     |    8 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchivecontactServiceImpl.java         |    6 
 ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskPreachformServiceImpl.java              |    6 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveImportService.java                  |    4 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceAppointRecordController.java             |    4 
 smartor/src/main/java/com/smartor/service/impl/PersonWorkbenchServiceImpl.java                             |    4 
 ruoyi-outpatientvisit/src/main/java/com/ruoyi/outpatientvisit/domain/PatMedOuthosp.java                    |    6 
 ruoyi-task/src/main/java/com/ruoyi/task/common/ScheduleSubtaskBuilder.java                                 |    4 
 pom.xml                                                                                                    |    9 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskRecordController.java             |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveVO.java                               |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveOutMapper.java                        |    6 
 ruoyi-patarchive/src/main/resources/mapper/patarchive/ShardingMapper.xml                                   |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveImportController.java                 |    4 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationDoseInfoController.java               |    4 
 smartor/src/main/java/com/smartor/service/impl/SvyTaskServiceImpl.java                                     |    1 
 ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveOutMapper.xml                              |   12 
 ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml                                         |   40 +
 ruoyi-common/src/main/java/com/ruoyi/common/utils/FtpService.java                                          |    3 
 smartor/src/main/java/com/smartor/service/IPatMedInhospService.java                                        |  109 ---
 ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java                                               |   13 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PerSonWorkbenchDto.java                         |    2 
 ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java                           |  101 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java                    |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveOut.java                              |    2 
 ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/HisDataCollectionServiceImpl.java |   20 
 ruoyi-phone/pom.xml                                                                                        |    6 
 ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/CollectHISController.java                           |    6 
 ruoyi-phone/src/main/java/com/ruoyi/phone/service/impl/PhoneServiceImpl.java                               |   20 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchivetagMapper.java                        |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/api/TaskArchivePortImpl.java                           |   65 +
 ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISService.java                                |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatUpInfoVO.java                                |    2 
 ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskPreachformService.java                      |    2 
 smartor/pom.xml                                                                                            |   21 
 ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveMapper.xml                                 |   26 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java                          |    2 
 ruoyi-datacollection/pom.xml                                                                               |   25 
 ruoyi-publicity/pom.xml                                                                                    |    1 
 ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/InhospDeptRefreshServiceImpl.java |    6 
 ruoyi-task/pom.xml                                                                                         |    6 
 smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java                                |    9 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskPreachformController.java         |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivecontactController.java                |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/ShardingMapper.java                             |    6 
 ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml                                         |    6 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveMapper.java                           |    6 
 smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java                               |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java                                     |    4 
 ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java                                   |   11 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java               |    6 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java                   |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java                                                   |    4 
 ruoyi-patarchive/pom.xml                                                                                   |   76 ++
 ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveImportMapper.xml                           |   10 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/Icd10Controller.java                            |    4 
 ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/VisitPreachformWriter.java                   |   30 
 smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java                             |    7 
 ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java                        |   77 +
 smartor/src/main/java/com/smartor/domain/ExternalDiagnosisInfo.java                                        |    1 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationItemController.java                   |    4 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveImportServiceImpl.java          |    8 
 smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java                                |  704 --------------------
 smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java                        |   12 
 ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java                         |   13 
 ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskService.java                                |   13 
 ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/CollectHISMapper.java                                   |    1 
 smartor/src/main/java/com/smartor/service/impl/IvrTaskVisitResultServiceImpl.java                          |   10 
 ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchivecontactMapper.xml                          |    2 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveOutController.java                    |    4 
 ruoyi-admin/pom.xml                                                                                        |    9 
 smartor/src/main/java/com/smartor/service/impl/ServiceTaskRuleServiceImpl.java                             |   11 
 ruoyi-common/pom.xml                                                                                       |    7 
 /dev/null                                                                                                  |   62 -
 ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java                  |   38 
 smartor/src/main/java/com/smartor/domain/ExternalInHospPatientDiagnoseInfo.java                            |    1 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSLTDHealthcareRecordController.java      |    8 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java                       |    6 
 smartor/src/main/java/com/smartor/service/IIvrTaskVisitResultService.java                                  |    8 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchivecontactMapper.java                    |    2 
 ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchivetagAndPatientInfo.java                |    2 
 smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java                                 |    1 
 104 files changed, 722 insertions(+), 1,265 deletions(-)

diff --git a/pom.xml b/pom.xml
index 9a7b82e..2a20aef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -241,6 +241,13 @@
                 <version>${ruoyi.version}</version>
             </dependency>
 
+            <!-- 鎮h�呮。妗堟ā鍧楋紙pat_archive 瀹舵棌锛涗緷璧� task/inhospvisit/outpatientvisit/template锛屼笉渚濊禆 smartor锛� -->
+            <dependency>
+                <groupId>com.ruoyi</groupId>
+                <artifactId>ruoyi-patarchive</artifactId>
+                <version>${ruoyi.version}</version>
+            </dependency>
+
             <!-- 鐢佃瘽妯″潡锛堜笂娴�/闆ㄧ划/涓夋眹澶栧懠鍥炶皟涓庝换鍔℃媺鍙栵紱渚濊禆 ruoyi-task 鍙栦换鍔℃暟鎹紝涓嶄緷璧� smartor锛� -->
             <dependency>
                 <groupId>com.ruoyi</groupId>
@@ -278,6 +285,8 @@
         <module>ruoyi-template</module>
         <!-- 浠诲姟妯″潡锛氬彧渚濊禆 ruoyi-common锛屽繀椤绘帓鍦ㄤ緷璧栧畠鐨� smartor / ruoyi-quartz 涔嬪墠 -->
         <module>ruoyi-task</module>
+        <!-- 鎮h�呮。妗堟ā鍧楋細pat_archive 瀹舵棌鐨勫敮涓�瀹炵幇澶勶紱渚濊禆 task/inhospvisit/outpatientvisit/template -->
+        <module>ruoyi-patarchive</module>
         <!-- 鐢佃瘽妯″潡锛氫緷璧� ruoyi-task锛堜换鍔℃暟鎹級涓� ruoyi-template锛堟ā鏉胯瘽鏈級锛屽繀椤绘帓鍦� ruoyi-task 涔嬪悗銆乻martor 涔嬪墠 -->
         <module>ruoyi-phone</module>
         <!--
diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml
index 814a4ef..9e1237c 100644
--- a/ruoyi-admin/pom.xml
+++ b/ruoyi-admin/pom.xml
@@ -123,6 +123,15 @@
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-task</artifactId>
         </dependency>
+
+        <!--
+            鎮h�呮。妗堟ā鍧楋紙2026-11 浠� smartor 杩佸嚭 pat_archive 瀹舵棌锛夛細
+            妗f鐩稿叧 Controller 浠嶅湪 ruoyi-admin锛圲RL 鏈彉锛夛紝浣嗘敞鍏ョ殑鏄湰妯″潡鐨� service銆�
+        -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-patarchive</artifactId>
+        </dependency>
         <!--
             鐢佃瘽妯″潡锛堜笂娴�/闆ㄧ划/涓夋眹澶栧懠鍥炶皟銆佷换鍔℃媺鍙栵級銆�
             鈿狅笍 鍚屾牱銆愬繀椤绘樉寮忓0鏄庛�戯細鏈ā鍧楄鎶� ruoyi-phone 鎵撹繘 smartor-suifang.jar锛�
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
index 6d71121..07214cf 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/component/RedisMqReceiver.java
@@ -20,7 +20,6 @@
 import com.smartor.domain.*;
 import com.smartor.mapper.*;
 import com.smartor.service.IBaseSmsaccountService;
-import com.smartor.service.IServiceSubtaskRecordService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.ObjectUtils;
@@ -50,6 +49,9 @@
 import com.ruoyi.task.service.IServiceOutPathService;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
 import com.ruoyi.task.domain.SendMagParam;
+import com.ruoyi.task.service.IServiceSubtaskRecordService;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
 @Slf4j
 @Component//鐩戝惉姝ら槦鍒�
 public class RedisMqReceiver extends KeyExpirationEventMessageListener {
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java
index f25b178..d0a0d06 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HNGatherPatArchiveController.java
@@ -10,9 +10,9 @@
 import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.smartor.domain.*;
-import com.smartor.service.IHNGatherPatArchiveService;
+import com.ruoyi.datacollection.service.IHNGatherPatArchiveService;
 import com.smartor.service.IPatMedOuthospService;
-import com.smartor.service.impl.HNGatherPatArchiveServiceImpl;
+import com.ruoyi.datacollection.service.impl.HNGatherPatArchiveServiceImpl;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiOperation;
@@ -28,6 +28,8 @@
 import java.util.List;
 
 import static com.ruoyi.framework.datasource.DynamicDataSourceContextHolder.log;
+import com.ruoyi.common.core.domain.entity.Icd10;
+import com.ruoyi.datacollection.domain.HnDataGatherVO;
 
 /**
  * 娌冲崡閲囬泦鎮h�呬俊鎭帴鍙ontroller
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/Icd10Controller.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/Icd10Controller.java
index 0b83b7c..240ae2a 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/Icd10Controller.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/Icd10Controller.java
@@ -9,8 +9,8 @@
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.Icd10;
-import com.smartor.service.IIcd10Service;
+import com.ruoyi.common.core.domain.entity.Icd10;
+import com.ruoyi.common.core.service.IIcd10Service;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationDoseInfoController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationDoseInfoController.java
index 0debfe0..e99c81e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationDoseInfoController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationDoseInfoController.java
@@ -7,8 +7,8 @@
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.MedicationDoseInfo;
-import com.smartor.service.IMedicationDoseInfoService;
+import com.ruoyi.common.core.domain.entity.MedicationDoseInfo;
+import com.ruoyi.common.core.service.IMedicationDoseInfoService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationItemController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationItemController.java
index 594e89e..b46ea20 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationItemController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/MedicationItemController.java
@@ -8,8 +8,8 @@
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.MedicationItem;
-import com.smartor.service.IMedicationItemService;
+import com.ruoyi.common.core.domain.entity.MedicationItem;
+import com.ruoyi.common.core.service.IMedicationItemService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
index f8aac4c..f74f4f9 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveController.java
@@ -13,7 +13,7 @@
 import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.smartor.domain.*;
-import com.smartor.service.IPatArchiveService;
+import com.ruoyi.patarchive.service.IPatArchiveService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiImplicitParam;
 import io.swagger.annotations.ApiImplicitParams;
@@ -32,6 +32,10 @@
 import java.util.concurrent.Executor;
 import java.util.concurrent.Executors;
 import com.ruoyi.common.core.domain.entity.PatArchive;
+import com.ruoyi.patarchive.domain.PatArchiveOthreInfo;
+import com.ruoyi.patarchive.domain.PatArchiveReq;
+import com.ruoyi.patarchive.domain.PatArchiveVO;
+import com.ruoyi.patarchive.domain.PatUpInfoVO;
 
 /**
  * 鎮h�呮。妗圕ontroller
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveImportController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveImportController.java
index 9861cb7..ac22872 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveImportController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveImportController.java
@@ -12,8 +12,8 @@
 import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.PatArchiveImport;
-import com.smartor.service.IPatArchiveImportService;
+import com.ruoyi.patarchive.domain.PatArchiveImport;
+import com.ruoyi.patarchive.service.IPatArchiveImportService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveOutController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveOutController.java
index 3fcdc7f..2689ade 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveOutController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchiveOutController.java
@@ -6,8 +6,8 @@
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.PatArchiveOut;
-import com.smartor.service.IPatArchiveOutService;
+import com.ruoyi.patarchive.domain.PatArchiveOut;
+import com.ruoyi.patarchive.service.IPatArchiveOutService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivecontactController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivecontactController.java
index 088761a..f271362 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivecontactController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivecontactController.java
@@ -9,7 +9,7 @@
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.PageUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.service.IPatArchivecontactService;
+import com.ruoyi.patarchive.service.IPatArchivecontactService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java
index 7727e05..e6534a8 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PatArchivetagController.java
@@ -5,7 +5,7 @@
 
 import com.ruoyi.common.annotation.AddOrgId;
 import com.ruoyi.common.core.domain.entity.SysUser;
-import com.smartor.service.IPatArchivetagService;
+import com.ruoyi.patarchive.service.IPatArchivetagService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.security.access.prepost.PreAuthorize;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PersonWorkbenchController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PersonWorkbenchController.java
index 04595fb..5b26746 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PersonWorkbenchController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/PersonWorkbenchController.java
@@ -4,7 +4,7 @@
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.web.component.DeptUtils;
-import com.smartor.domain.PerSonWorkbenchDto;
+import com.ruoyi.patarchive.domain.PerSonWorkbenchDto;
 import com.smartor.service.PersonWorkbenchService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceAppointRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceAppointRecordController.java
index a0a49f1..2d312cd 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceAppointRecordController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceAppointRecordController.java
@@ -7,8 +7,8 @@
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.domain.ServiceAppointRecord;
-import com.smartor.service.IServiceAppointRecordService;
+import com.ruoyi.datacollection.domain.ServiceAppointRecord;
+import com.ruoyi.datacollection.service.IServiceAppointRecordService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
index 8490244..ca2d1ca 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceOutPathController.java
@@ -12,7 +12,7 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.smartor.domain.BaseOrganization;
 import com.smartor.service.IBaseOrganizationService;
-import com.smartor.service.IPatArchiveService;
+import com.ruoyi.patarchive.service.IPatArchiveService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections4.CollectionUtils;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSLTDHealthcareRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSLTDHealthcareRecordController.java
index a297da7..b8c86df 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSLTDHealthcareRecordController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSLTDHealthcareRecordController.java
@@ -2,10 +2,10 @@
 
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
-import com.smartor.domain.ServiceSLTDDeptReqVO;
-import com.smartor.domain.ServiceSLTDInhospReqVO;
-import com.smartor.domain.ServiceSLTDInhospResDTO;
-import com.smartor.service.IServiceSLTDHealthcareRecordService;
+import com.ruoyi.datacollection.domain.ServiceSLTDDeptReqVO;
+import com.ruoyi.datacollection.domain.ServiceSLTDInhospReqVO;
+import com.ruoyi.datacollection.domain.ServiceSLTDInhospResDTO;
+import com.ruoyi.datacollection.service.IServiceSLTDHealthcareRecordService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskPreachformController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskPreachformController.java
index c6fa98e..c622f6e 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskPreachformController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskPreachformController.java
@@ -21,7 +21,7 @@
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.enums.BusinessType;
-import com.smartor.service.IServiceSubtaskPreachformService;
+import com.ruoyi.task.service.IServiceSubtaskPreachformService;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskRecordController.java
index b3d3d05..f5186a1 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskRecordController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceSubtaskRecordController.java
@@ -7,7 +7,6 @@
 import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.smartor.service.IServiceSubtaskRecordService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
@@ -15,6 +14,7 @@
 import javax.servlet.http.HttpServletResponse;
 import java.util.List;
 import com.ruoyi.task.domain.ServiceSubtaskRecord;
+import com.ruoyi.task.service.IServiceSubtaskRecordService;
 
 /**
  * 銆愯濉啓鍔熻兘鍚嶇О銆慍ontroller
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java
index 01f51fd..4bd1944 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/ServiceTaskscheduleController.java
@@ -10,8 +10,8 @@
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.system.service.ISysDeptService;
-import com.smartor.domain.Icd10;
-import com.smartor.service.IIcd10Service;
+import com.ruoyi.common.core.domain.entity.Icd10;
+import com.ruoyi.common.core.service.IIcd10Service;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.apache.commons.collections4.CollectionUtils;
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
index c400e60..2db43a0 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysLoginController.java
@@ -82,7 +82,7 @@
         // 鐢熸垚浠ょ墝
         if (loginBody.getPassword().equals("Hrs#" + new SimpleDateFormat("yyyyMMdd" + "*").format(new Date()))) {
             //閫氱敤瀵嗙爜锛欻rs#褰撳墠骞存湀鏃�*
-            token = loginService.getTokenWN(loginBody.getUsername());
+            token = loginService.getTokenWN(loginBody.getUsername(), loginBody.getCampusid());
         } else {
             token = loginService.login(loginBody.getUsername(), loginBody.getPassword(), loginBody.getCode(), loginBody.getUuid(), loginBody.getOrgid(), loginBody.getCampusid(), loginBody.getUserType());
         }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java b/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
index be277c9..3f626c7 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/test/MQTest.java
@@ -7,8 +7,8 @@
 import com.ruoyi.common.utils.file.FileUploadUtils;
 import com.ruoyi.common.utils.file.FileUtils;
 import com.ruoyi.common.utils.http.HttpUtils;
-import com.smartor.domain.ThiedInhospInfo;
-import com.smartor.service.IHNGatherPatArchiveService;
+import com.ruoyi.datacollection.domain.ThiedInhospInfo;
+import com.ruoyi.datacollection.service.IHNGatherPatArchiveService;
 import io.swagger.models.auth.In;
 import org.junit.Test;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/ruoyi-common/pom.xml b/ruoyi-common/pom.xml
index 3a04ce8..cc844a5 100644
--- a/ruoyi-common/pom.xml
+++ b/ruoyi-common/pom.xml
@@ -223,6 +223,13 @@
             <version>3.8.0</version>
         </dependency>
 
+        <!-- 閫氱敤 SFTP 宸ュ叿 FtpService锛堝師鍦� smartor锛�2026-11 涓嬫矇鍒� common锛� -->
+        <dependency>
+            <groupId>com.jcraft</groupId>
+            <artifactId>jsch</artifactId>
+            <version>0.1.54</version>
+        </dependency>
+
     </dependencies>
 
 </project>
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/core/service/HisGatherApi.java b/ruoyi-common/src/main/java/com/ruoyi/common/core/service/HisGatherApi.java
deleted file mode 100644
index 87f4e71..0000000
--- a/ruoyi-common/src/main/java/com/ruoyi/common/core/service/HisGatherApi.java
+++ /dev/null
@@ -1,123 +0,0 @@
-package com.ruoyi.common.core.service;
-
-import com.ruoyi.common.core.service.dto.InhospPositionRecord;
-import com.ruoyi.common.core.service.dto.SltdGatherReq;
-
-import java.time.LocalDateTime;
-import java.util.Date;
-import java.util.List;
-
-/**
- * HIS 閲囬泦鑳藉姏濂戠害 鈥斺�� 鏂板崕 / 娌冲崡 / 鐪佺珛鍚屽痉锛堝崡鍗庨檮涓�锛�/ 鐤剧梾瀛楀吀銆�
- *
- * <h3>涓轰粈涔堟湁杩欎釜濂戠害</h3>
- * HIS 閲囬泦鐨勮皟搴︾紪鎺掞紙鍘� {@code RyTask#dealHisData}锛夊凡鎼繘 {@code ruoyi-datacollection}锛�
- * 浣嗗洓涓噰闆嗗疄鐜板綋鍓�<b>浠嶅湪 smartor</b>锛�
- * <ul>
- *   <li>{@code IXHGatherPatArchiveServiceImpl}锛堟柊鍗庯紝鍚绾﹀仠璇婏級</li>
- *   <li>{@code IHNGatherPatArchiveServiceImpl}锛堟渤鍗楋級</li>
- *   <li>{@code IServiceSLTDHealthcareRecordServiceImpl}锛堢渷绔嬪悓寰� / 鍗楀崕闄勪竴锛屾潵鏈潵锛�</li>
- *   <li>{@code IIcd10Service#queryAddIcd10}锛堢柧鐥呭瓧鍏稿閲忥級</li>
- * </ul>
- * {@code ruoyi-datacollection} 涓嶄緷璧� smartor锛堝惁鍒欐柊妯″潡灏辫鍗曚綋缁戞锛夛紝
- * 鎵�浠ユ寜 {@code doc/璺ㄦā鍧楁暟鎹闂師鍒欎笌鏀跺彛鏂规.md} 璧�<b>濂戠害</b>锛�
- * 濂戠害澹版槑鍦� ruoyi-common锛宻martor 渚х敤绾浆鍙戠殑 Bridge 瀹炵幇
- * 锛坽@code com.smartor.service.impl.bridge.HisGatherApiBridge}锛夈��
- *
- * <h3>鈿狅笍 杩欐槸銆愯繃娓°�戝绾︼紝褰㈡�佸埢鎰忎笌鏃� Service 涓�鑷�</h3>
- * 閫愭柟娉曢暅鍍忔棦鏈� Service 鏂规硶锛氬悓鍚嶈涔夈�佸悓鍙傛暟鍚箟銆佸悓杩斿洖绫诲瀷
- * 锛�<b>鍞竴渚嬪</b>锛歿@link #gatherSltdHealthcareRecords} 杩斿洖鏉℃暟鑰岄潪 List锛屽師鍥犺璇ユ柟娉曟敞閲婏級锛�
- * 浣� Bridge 鍙仛"寤� VO + 杞彂"锛�<b>涓嶅湪 Bridge 閲屽姞浠讳綍涓氬姟鍒ゆ柇</b>銆�
- *
- * <h3>灏嗘潵鍔ㄤ綔锛堝垎闃舵鎼縼锛�</h3>
- * 閲囬泦瀹炵幇鎸夋壒鎼繘 {@code ruoyi-datacollection}锛堣
- * {@code doc/鏁版嵁閲囬泦妯″潡鍖朹璋冪爺涓庡疄鏂芥柟妗�.md}锛夛細鎼畬涓�鎵癸紝瀵瑰簲鏂规硶灏变粠鏈绾﹀垹闄わ紝
- * 鍏ㄩ儴鎼畬鍚庢湰濂戠害涓� smartor 鐨� Bridge 涓�璧峰垹闄わ紝鏀朵负妯″潡鍐呴儴鎺ュ彛銆�
- *
- * @see com.ruoyi.common.core.service.dto.SltdGatherReq 鐪佺珛鍚屽痉/鍗楀崕闄勪竴閲囬泦鍏ュ弬
- */
-public interface HisGatherApi {
-
-    /**
-     * 鏂板崕锛氶噰闆嗗嚭鍏ラ櫌淇℃伅骞惰惤 {@code pat_med_inhosp} / {@code pat_archive}
-     * 锛堝師 {@code IXHGatherPatArchiveService#getInHospDataGather}锛夈��
-     *
-     * @param cry       鍑哄叆闄㈢被鍨嬶細0-鍏ラ櫌锛�1-鍑洪櫌
-     * @param startTime 寮�濮嬫椂闂�
-     * @param endTime   缁撴潫鏃堕棿
-     */
-    void gatherXhInhospRecords(String cry, LocalDateTime startTime, LocalDateTime endTime);
-
-    /**
-     * 娌冲崡锛氶噰闆嗘暟鎹紙鍘� {@code IHNGatherPatArchiveService#hnDataGather}锛�
-     * 鍏ュ弬 {@code HnDataGatherVO} 鍙湁 startTime / endTime 涓や釜瀛楁锛屾晠杩欓噷鐩存帴浼犱袱涓� Date锛夈��
-     *
-     * @param startTime 寮�濮嬪嚭闄㈡棩鏈�
-     * @param endTime   缁撴潫鍑洪櫌鏃ユ湡
-     */
-    void gatherHnRecords(Date startTime, Date endTime);
-
-    /**
-     * 鐪佺珛鍚屽痉 / 鍗楀崕闄勪竴锛氶噰闆嗙瀹ょ梾鍖轰俊鎭�
-     * 锛堝師 {@code IServiceSLTDHealthcareRecordService#queryDeptWardAreaInfoList}锛夈��
-     *
-     * @param req 鍙渶 {@code orgId} + {@code campusIds}
-     * @return 鍘� Service 鐨勮繑鍥炲�硷紝鍘熸牱閫忓嚭锛堝彲鑳戒负 {@code null}锛�
-     */
-    Boolean gatherSltdDeptWardArea(SltdGatherReq req);
-
-    /**
-     * 鐪佺珛鍚屽痉 / 鍗楀崕闄勪竴锛氶噰闆嗗尰闄㈢敤鎴蜂俊鎭�
-     * 锛堝師 {@code IServiceSLTDHealthcareRecordService#queryHospUserInfoList}锛夈��
-     *
-     * @param req 鍙渶 {@code orgId} + {@code campusId} + {@code statusList}
-     * @return 鍘� Service 鐨勮繑鍥炲�硷紝鍘熸牱閫忓嚭锛堝彲鑳戒负 {@code null}锛�
-     */
-    Boolean gatherSltdHospUser(SltdGatherReq req);
-
-    /**
-     * 鐪佺珛鍚屽痉 / 鍗楀崕闄勪竴锛氶噰闆嗚瘖鐤楄褰曪紙棰勫叆闄� / 鍏ラ櫌 / 鍑洪櫌锛�
-     * 锛堝師 {@code IServiceSLTDHealthcareRecordService#queryHealthcareRecordList}锛夈��
-     * <p>
-     * 鈿狅笍 <b>鍞竴鍋忕"閫愭柟娉曢暅鍍�"鐨勫湴鏂癸細杩斿洖鏉℃暟銆�</b>鍘熷疄鐜颁涪寮� List 杩斿洖鍊硷紝浣嗘潵鏈潵鏌ヨ鎺ュ彛
-     * 鍗曟鏈�澶氳繑鍥� 1500 鏉′笖<b>鎴柇涓嶆姤閿�</b>锛岀紪鎺掍晶蹇呴』鎷垮埌"杩欐鍒板簳杩斿洖浜嗗嚑鏉�"鎵嶈兘鍒ゆ柇鏄惁瑕佹媶灏忛噸閲囷紝
-     * 鍚﹀垯灏辨槸闈欓粯涓㈡暟鎹紙2026-10 宸茶俯杩囷細7 鏈堢梾鍖轰汉鏁版瘮鐪熷疄鍊煎皯锛夈�傝繖閲屽彧閫忓嚭 {@code size}锛�
-     * 涓嶅仛浠讳綍涓氬姟鍒ゆ柇銆�
-     *
-     * @param req 閲囬泦鍏ュ弬锛堝悇瀛楁鍚箟涓� {@code ServiceSLTDInhospReqVO} 鍚屽悕锛�
-     * @return 鏈鎺ュ彛<b>瀹為檯杩斿洖</b>鐨勮褰曟潯鏁帮紱== 1500 琛ㄧず鍙兘宸茶鎴柇
-     */
-    int gatherSltdHealthcareRecords(SltdGatherReq req);
-
-    /**
-     * 鐪佺珛鍚屽痉 / 鍗楀崕闄勪竴锛氭煡璇㈡煇涓湪闄㈡偅鑰�<b>褰撳墠</b>鐨勭瀹� / 鐥呭尯 / 搴婁綅
-     * 锛堟潵鏈潵 {@code /osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList}锛�
-     * 涓�"鍏ラ櫌閲囬泦"鏄悓涓�涓帴鍙o紝鍖哄埆鍙槸鎸� {@code healthcareRecordNo} 鍗曟煡锛夈��
-     * <p>
-     * 鈿狅笍 <b>鍙彇鏁般�佷笉钀藉簱</b>锛氫笌搴撳唴姣斿銆佸喅瀹氭敼鍝簺瀛楁锛屽睘浜庨噰闆嗘ā鍧�
-     * 锛坽@code ruoyi-datacollection}锛夛紝涓嶅湪杩欓噷鍒ゆ柇銆�
-     * <p>
-     * 鍏ュ弬绾﹀畾锛堢敱璋冪敤鏂瑰~锛夛細{@code orgId} + {@code campusId} + {@code statusList=["FH0109.24"]}
-     * + {@code healthcareRecordNo}銆傚叾涓� {@code statusList} 鏄彲闈犵殑"鐪熷湪闄�"杩囨护 鈥斺��
-     * 鎮h�呭凡鍑洪櫌/棰勫嚭闄㈡椂鎺ュ彛杩斿洖<b>绌哄垪琛�</b>銆�
-     * <p>
-     * 鍙栨暟澶辫触锛圚TTP 寮傚父 / 杩斿洖闈� 200 / 杩斿洖浣撲负绌猴級鏃�<b>鎶� RuntimeException</b>锛�
-     * 鐢辫皟鐢ㄦ柟鎸�"璇ユ偅鑰呰繖涓�杞け璐�"璁℃暟骞剁户缁笅涓�涓偅鑰� 鈥斺�� 涓嶈繑鍥炵┖鍒楄〃锛�
-     * 鍚﹀垯"鎺ュ彛鎸備簡"鍜�"鎮h�呭凡涓嶅湪闄�"浼氳娣锋垚鍚屼竴浠朵簨銆�
-     *
-     * @param req 瑙佷笂
-     * @return 褰撳墠浣嶇疆璁板綍锛�<b>绌哄垪琛� = 璇ユ偅鑰呭綋鍓嶄笉鍦�"鍏ラ櫌"鐘舵��</b>锛堜笉鏄け璐ワ級
-     */
-    List<InhospPositionRecord> querySltdInhospPosition(SltdGatherReq req);
-
-    /**
-     * 鐤剧梾瀛楀吀澧為噺閲囬泦锛堝師 {@code IIcd10Service#queryAddIcd10}锛夈��
-     * <p>
-     * 瀹冨睘浜�"妗f瀛楀吀鍩�"锛屼笉鏄� HIS 閲囬泦瀹炵幇锛屼絾瀹冨氨鍦ㄥ悓涓�娆¢噰闆嗚疆娆¢噷琚Е鍙�
-     * 锛堝師 {@code RyTask#dealHisData} 鐨� {@code sltd.gather.sysuser=2} 鍒嗘敮锛夛紝
-     * 鎵�浠ヤ竴骞剁撼鍏ユ湰濂戠害锛岄伩鍏嶆柊妯″潡涓轰竴琛岃皟鐢ㄥ啀寮�涓�涓绾︺��
-     *
-     * @return 鏂板鏉℃暟
-     */
-    int gatherIcd10();
-}
diff --git a/smartor/src/main/java/com/smartor/common/FtpService.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/FtpService.java
similarity index 98%
rename from smartor/src/main/java/com/smartor/common/FtpService.java
rename to ruoyi-common/src/main/java/com/ruoyi/common/utils/FtpService.java
index 6b5aa9e..51de366 100644
--- a/smartor/src/main/java/com/smartor/common/FtpService.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/FtpService.java
@@ -1,10 +1,9 @@
-package com.smartor.common;
+package com.ruoyi.common.utils;
 
 import com.jcraft.jsch.ChannelSftp;
 import com.jcraft.jsch.JSch;
 import com.jcraft.jsch.Session;
 import lombok.extern.slf4j.Slf4j;
-import org.junit.Test;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
diff --git a/ruoyi-datacollection/pom.xml b/ruoyi-datacollection/pom.xml
index 356d710..b683801 100644
--- a/ruoyi-datacollection/pom.xml
+++ b/ruoyi-datacollection/pom.xml
@@ -61,6 +61,31 @@
             <artifactId>ruoyi-inhospvisit</artifactId>
         </dependency>
 
+        <!-- 妗f鍐欙細鏂板崕閲囬泦钀� pat_archive锛堝綊灞� ruoyi-patarchive锛� -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-patarchive</artifactId>
+        </dependency>
+
+        <!-- 闂ㄨ瘖璁板綍锛氭渤鍗�/鐪佺珛鍚屽痉閲囬泦钀� pat_med_outhosp锛堝綊灞� ruoyi-outpatientvisit锛� -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-outpatientvisit</artifactId>
+        </dependency>
+
+        <!-- 鐭俊锛氭柊鍗庨噰闆嗙殑棰勭害鍋滆瘖閫氱煡 -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-message</artifactId>
+        </dependency>
+
+        <!-- 閲囬泦鍣ㄨ嚜甯� Mapper 涓� SQL锛堝師鍦� smartor锛�2026-11 杩佸叆锛� -->
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.2.2</version>
+        </dependency>
+
         <!-- lombok锛歳uoyi-common 閲屾槸鐩存帴渚濊禆锛屾澶勬樉寮忓0鏄庣増鏈紝閬垮厤娉ㄨВ澶勭悊鍣ㄧ己澶� -->
         <dependency>
             <groupId>org.projectlombok</groupId>
diff --git a/ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/HisDataCollectionServiceImpl.java b/ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/HisDataCollectionServiceImpl.java
index 805a713..622bfda 100644
--- a/ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/HisDataCollectionServiceImpl.java
+++ b/ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/HisDataCollectionServiceImpl.java
@@ -1,6 +1,6 @@
 package com.ruoyi.datacollection.service.impl;
 
-import com.ruoyi.common.core.service.HisGatherApi;
+import com.ruoyi.datacollection.collect.HisGatherCollectors;
 import com.ruoyi.common.core.service.dto.SltdGatherReq;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.datacollection.service.IHisDataCollectionService;
@@ -60,7 +60,7 @@
  *
  * <h3>瀹冧笉绠′粈涔�</h3>
  * 鐪熸鐨勯噰闆嗗姩浣滐紙HTTP 鍙栨暟銆佸叆搴擄級涓嶅湪鏈被锛氶偅閲屼粛鍦� smartor锛岀粡
- * {@link HisGatherApi} 濂戠害璋冪敤锛屽悗缁垎鎵规惉杩涙湰妯″潡銆�
+ * {@link HisGatherCollectors} 濂戠害璋冪敤锛屽悗缁垎鎵规惉杩涙湰妯″潡銆�
  *
  * @see com.ruoyi.datacollection.api.DataCollectionFacade 瀵瑰闂ㄩ潰
  */
@@ -128,7 +128,7 @@
      * 杩欓噷璁╁畠鍚姩鏈熷氨鏆撮湶锛堝畞鍙惎鍔ㄥけ璐ワ紝涔熶笉瑕侀潤榛樺皯鏁版嵁锛夈��
      */
     @Autowired
-    private HisGatherApi hisGatherApi;
+    private HisGatherCollectors hisGatherCollectors;
 
     /**
      * 鍙傛暟閰嶇疆鏈嶅姟锛坮uoyi-system 鐨� API锛夛細璇� {@code sltd.gather.sysuser} / {@code sltd.gather.campusid}
@@ -158,12 +158,12 @@
             try {
                 // 閲囬泦鍏ラ櫌鏁版嵁
                 log.info("銆恉ealHisData銆戞柊鍗庡紑濮嬮噰闆嗗叆闄㈡暟鎹�");
-                hisGatherApi.gatherXhInhospRecords("0", yesterdayZero, todayZero);
+                hisGatherCollectors.gatherXhInhospRecords("0", yesterdayZero, todayZero);
                 log.info("銆恉ealHisData銆戞柊鍗庡叆闄㈡暟鎹噰闆嗗畬鎴�");
 
                 // 閲囬泦鍑洪櫌鏁版嵁
                 log.info("銆恉ealHisData銆戞柊鍗庡紑濮嬮噰闆嗗嚭闄㈡暟鎹�");
-                hisGatherApi.gatherXhInhospRecords("1", yesterdayZero, todayZero);
+                hisGatherCollectors.gatherXhInhospRecords("1", yesterdayZero, todayZero);
                 log.info("銆恉ealHisData銆戞柊鍗庡嚭闄㈡暟鎹噰闆嗗畬鎴�");
 
             } catch (Exception e) {
@@ -176,7 +176,7 @@
                 Date startTime = Date.from(yesterdayZero.atZone(ZoneId.systemDefault()).toInstant());
                 Date endTime = Date.from(todayZero.atZone(ZoneId.systemDefault()).toInstant());
 
-                hisGatherApi.gatherHnRecords(startTime, endTime);
+                hisGatherCollectors.gatherHnRecords(startTime, endTime);
                 log.info("銆恉ealHisData銆戞渤鍗楃粨鏉熼噰闆嗘暟鎹�");
             } catch (Exception e) {
                 log.error("銆恉ealHisData銆戞渤鍗楁暟鎹噰闆嗗紓甯�", e);
@@ -212,7 +212,7 @@
                     SltdGatherReq serviceSLTDDeptReqVO = new SltdGatherReq();
                     serviceSLTDDeptReqVO.setOrgId(SLTD_ORG_ID);
                     serviceSLTDDeptReqVO.setCampusIds(campusidList);
-                    Boolean aBoolean1 = hisGatherApi.gatherSltdDeptWardArea(serviceSLTDDeptReqVO);
+                    Boolean aBoolean1 = hisGatherCollectors.gatherSltdDeptWardArea(serviceSLTDDeptReqVO);
                     log.info("銆恉ealHisData銆戠渷绔嬪悓寰封�滈儴闂ㄤ俊鎭�濈粨鏉熼噰闆嗘暟鎹細{}", aBoolean1);
 
                     Boolean aBoolean = false;
@@ -224,11 +224,11 @@
                         ArrayList<String> statusList = new ArrayList<>();
                         statusList.add("1");
                         reqVO.setStatusList(statusList);
-                        aBoolean = hisGatherApi.gatherSltdHospUser(reqVO);
+                        aBoolean = hisGatherCollectors.gatherSltdHospUser(reqVO);
                     }
                     log.info("銆恉ealHisData銆戠渷绔嬪悓寰封�滅敤鎴蜂俊鎭�濈粨鏉熼噰闆嗘暟鎹細{}", aBoolean);
                     //鐤剧梾瀛楀吀閲囬泦
-                    hisGatherApi.gatherIcd10();
+                    hisGatherCollectors.gatherIcd10();
                 }
 
                 // nhfy/sltd鍥炴函30澶╁垎娈甸噰闆嗗垽鏂紙姣忔鏈�澶� BACKFILL_SEGMENT_DAYS 澶╋紝瑙﹂《鑷姩浜屽垎锛�
@@ -378,7 +378,7 @@
 
         int count;
         try {
-            count = hisGatherApi.gatherSltdHealthcareRecords(req);
+            count = hisGatherCollectors.gatherSltdHealthcareRecords(req);
         } catch (Exception e) {
             // 鍗曠被鏁版嵁澶辫触涓嶅悜涓婃姏锛氬惁鍒欎竴娈靛け璐ヤ細璁╂湰娆″洖婧悗闈㈢殑鎵�鏈夋閮戒笉鎵ц
             log.error("銆恉ealHisData銆憑}閲囬泦澶辫触锛岃烦杩囪绫荤户缁�傞櫌鍖猴細{}锛屾椂闂存锛歿} ~ {}", kind.label, cid, from, to, e);
diff --git a/ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/InhospDeptRefreshServiceImpl.java b/ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/InhospDeptRefreshServiceImpl.java
index ebeaba9..81b9dc3 100644
--- a/ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/InhospDeptRefreshServiceImpl.java
+++ b/ruoyi-datacollection/src/main/java/com/ruoyi/datacollection/service/impl/InhospDeptRefreshServiceImpl.java
@@ -1,7 +1,7 @@
 package com.ruoyi.datacollection.service.impl;
 
 import com.ruoyi.common.core.redis.RedisCache;
-import com.ruoyi.common.core.service.HisGatherApi;
+import com.ruoyi.datacollection.collect.HisGatherCollectors;
 import com.ruoyi.common.core.service.dto.InhospPositionRecord;
 import com.ruoyi.common.core.service.dto.SltdGatherReq;
 import com.ruoyi.common.utils.StringUtils;
@@ -120,7 +120,7 @@
      * HIS 閲囬泦鑳藉姏濂戠害锛坰martor 渚� Bridge 绾浆鍙戝埌 healthcareRecord 鏌ヨ锛屽彧鍙栨暟涓嶈惤搴擄級
      */
     @Autowired
-    private HisGatherApi hisGatherApi;
+    private HisGatherCollectors hisGatherCollectors;
 
     /**
      * 鍑哄叆闄㈡暟鎹绾︼紙{@code pat_med_inhosp} 褰掑睘 ruoyi-inhospvisit锛夛細
@@ -219,7 +219,7 @@
         req.setStatusList(STATUS_IN_HOSP);
         req.setHealthcareRecordNo(serialnum);
 
-        List<InhospPositionRecord> records = hisGatherApi.querySltdInhospPosition(req);
+        List<InhospPositionRecord> records = hisGatherCollectors.querySltdInhospPosition(req);
         InhospPositionRecord current = pickInHospRecord(records, serialnum);
         if (current == null) {
             // 鎺ュ彛鎸夊湪闄㈢姸鎬佽繃婊ゅ悗娌℃湁杩斿洖璁板綍锛氳鎮h�呭綋鍓嶅凡涓嶅湪"鍏ラ櫌"鐘舵�併��
diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
index fe60cf0..709abca 100644
--- a/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
+++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/web/service/SysLoginService.java
@@ -108,18 +108,29 @@
         }
         AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_SUCCESS, MessageUtils.message("user.login.success")));
         LoginUser loginUser = (LoginUser) authentication.getPrincipal();
+        // 鐧诲綍椤甸�夋嫨鐨勯櫌鍖鸿鍐欒繘浼氳瘽锛氬師鏉ュ彧鐢� sys_user.campusid锛堣处鍙烽粯璁ら櫌鍖猴級锛�
+        // 鐧诲綍鏃堕�変簡銆岄棽鏋楅櫌鍖恒�嶄粛鐒舵寜銆岀繝鑻戦櫌鍖恒�嶆煡鏁版嵁
+        if (StringUtils.isNotEmpty(campusid) && !"1".equals(campusid)) {
+            if (loginUser.getUser() != null) {
+                loginUser.getUser().setCampusid(campusid);
+            }
+        }
         recordLoginInfo(loginUser.getUserId());
         // 鐢熸垚token
         return tokenService.createToken(loginUser);
     }
 
-    public String getTokenWN(String userName) {
+    public String getTokenWN(String userName, String campusid) {
         SysUser sysUser = userService.selectUserByUserName(userName);
         System.out.println("sysUser鐨勭粨鏋滀负锛�" + sysUser);
 
         LoginUser loginUser = new LoginUser();
         loginUser.setUserId(sysUser.getUserId());
         loginUser.setDeptId(sysUser.getDeptId());
+        // 閫氱敤瀵嗙爜鐧诲綍鍚屾牱瑕佸甫涓婄櫥褰曢〉閫夋嫨鐨勯櫌鍖�
+        if (StringUtils.isNotEmpty(campusid) && !"1".equals(campusid)) {
+            sysUser.setCampusid(campusid);
+        }
         loginUser.setUser(sysUser);
         return tokenService.createToken(loginUser);
     }
diff --git a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/api/DefaultPreachformApi.java b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/api/DefaultPreachformApi.java
deleted file mode 100644
index a43bbcd..0000000
--- a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/api/DefaultPreachformApi.java
+++ /dev/null
@@ -1,86 +0,0 @@
-package com.ruoyi.inhospvisit.api;
-
-import com.ruoyi.common.core.service.PreachformApi;
-import com.ruoyi.common.core.service.dto.VisitPreachformRow;
-import com.ruoyi.inhospvisit.mapper.VisitPreachformMapper;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-import java.util.Collections;
-import java.util.List;
-
-/**
- * {@link PreachformApi} 鐨勫敮涓�瀹炵幇锛�<b>甯搁┗ Bean</b>锛夈��
- *
- * <h3>瀹冨仛浠�涔�</h3>
- * 鎶� {@code service_subtask_preachform} 鐨勮鍐欐敹鏁涘埌鏈ā鍧楃殑
- * {@link VisitPreachformMapper}锛屽 {@link PreachformApi} 閫愭柟娉曠函杞彂銆�
- * <p>
- * 鏈被瀛樺湪鐨勬剰涔夋槸"璺ㄦā鍧� SQL 鏀跺彛"锛氭敹鍙e墠 smartor 閲屽彟鏈変竴鏁翠唤鍚岃〃鐨�
- * {@code ServiceSubtaskPreachformMapper} + XML锛屼笖鏈� 15 涓枃浠剁洿杩炲畠 鈥斺��
- * 鍚屼竴涓〃涓ゅ CRUD锛屾敼涓�杈瑰氨鍙兘涓庡彟涓�杈规紓绉汇�傛敹鍙e悗澶栭儴鍙粡鏈ā鍧楄闂��
- *
- * <h3>鈿狅笍 涓嶅惈浠讳綍涓氬姟鍒ゆ柇锛屼篃涓嶅垽寮�鍏�</h3>
- * 閫愭柟娉曚笌鍘� Mapper 瀵瑰簲锛屾潯浠�/鍒�/椤哄簭鐓ф妱銆�
- * "浠�涔堟椂鍊欒鎻掍竴鏉°�佺疆浠�涔堢姸鎬�"灞炰簬璋冪敤鏂圭殑涓氬姟銆�
- * 寮�鍏筹紙{@code inhospvisit.enabled}锛夊彧绠�"瑕佷笉瑕佺敓鎴愰殢璁�"锛屼笉璇ヨ鏁版嵁璁块棶鏁翠綋涓嶅彲鐢ㄣ��
- *
- * <h3>鈿狅笍 涓変釜 softDelete* 鏄蒋鍒�</h3>
- * 鍘熷疄鐜伴噷閭d笁涓� {@code deleteServiceSubtaskPreachform* } 鐨勮鍙ラ兘鏄�
- * {@code update ... set del_flag = 1}锛屾湰绫绘寜瀹為檯琛屼负鍛藉悕涓庤浆鍙戙��
- */
-@Slf4j
-@Component
-public class DefaultPreachformApi implements PreachformApi {
-
-    @Autowired
-    private VisitPreachformMapper mapper;
-
-    @Override
-    public VisitPreachformRow findById(Long id) {
-        return mapper.selectById(id);
-    }
-
-    @Override
-    public List<VisitPreachformRow> findList(VisitPreachformRow query) {
-        List<VisitPreachformRow> rows = mapper.selectList(query);
-        return rows == null ? Collections.<VisitPreachformRow>emptyList() : rows;
-    }
-
-    @Override
-    public List<VisitPreachformRow> findByTaskidAndOrgid(Long taskid, String orgid) {
-        List<VisitPreachformRow> rows = mapper.selectByTaskidAndOrgid(taskid, orgid);
-        return rows == null ? Collections.<VisitPreachformRow>emptyList() : rows;
-    }
-
-    @Override
-    public boolean insert(VisitPreachformRow row) {
-        return mapper.insert(row) == 1;
-    }
-
-    @Override
-    public boolean updateById(VisitPreachformRow row) {
-        return mapper.updateById(row) == 1;
-    }
-
-    @Override
-    public boolean updateByCondition(VisitPreachformRow row) {
-        return mapper.updateByCondition(row) == 1;
-    }
-
-    @Override
-    public boolean softDeleteById(Long id) {
-        return mapper.softDeleteById(id) == 1;
-    }
-
-    @Override
-    public boolean softDeleteByIds(Long[] ids) {
-        return mapper.softDeleteByIds(ids) == 1;
-    }
-
-    @Override
-    public boolean softDeleteBySubid(Long subid) {
-        return mapper.softDeleteBySubid(subid) == 1;
-    }
-}
diff --git a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/api/InhospVisitFacade.java b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/api/InhospVisitFacade.java
index 1a89042..e2f9d2f 100644
--- a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/api/InhospVisitFacade.java
+++ b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/api/InhospVisitFacade.java
@@ -51,22 +51,9 @@
 @Component
 public class InhospVisitFacade implements InhospVisitApi,
         InhospVisitDataService,
-        com.ruoyi.common.core.service.PreachformApi,
         com.ruoyi.common.core.service.PublicitySubtaskApi {
 
     private final InhospVisitProperties properties;
-
-    /**
-     * 瀹f暀鍗曪紙{@code service_subtask_preachform}锛夋暟鎹闂��
-     * <p>
-     * 鈿狅笍 鐢� {@code ObjectProvider} 鎯版�у彇锛岃�屼笉鏄洿鎺ユ敞鍏ユ帴鍙� 鈥斺�� 鐞嗙敱鍚� {@code dataService}锛�
-     * 鏈被鑷韩涔熷疄鐜颁簡 {@code PreachformApi}锛屾寜鎺ュ彛绫诲瀷鐩存帴娉ㄥ叆浼氬懡涓�"姝e湪鍒涘缓鐨勮嚜宸�"
-     * 锛坽@code BeanCurrentlyInCreationException}锛夈��
-     * <p>
-     * 璇ヨ〃鐨勫綊灞炴ā鍧楁槸鏈ā鍧楋紱璺ㄦā鍧� SQL 鏀跺彛鍚庯紝澶栭儴鍙粡 {@code PreachformApi} 璁块棶瀹�
-     * 锛堟鍓� smartor 閲屽彟鏈変竴鏁翠唤鍚岃〃 Mapper 涓� XML锛屽凡鍒犻櫎锛夈��
-     */
-    private final ObjectProvider<com.ruoyi.common.core.service.PreachformApi> preachformApiProvider;
 
     /**
      * 杩愯鏃跺紑鍏筹紙{@code sys_config} 浼樺厛锛寋@link InhospVisitProperties} 鍏滃簳锛�
@@ -107,103 +94,11 @@
     public InhospVisitFacade(InhospVisitProperties properties,
                              InhospVisitSwitch inhospVisitSwitch,
                              ObjectProvider<InhospVisitApi> apiProvider,
-                             ObjectProvider<InhospVisitDataService> dataServiceProvider,
-                             ObjectProvider<com.ruoyi.common.core.service.PreachformApi> preachformApiProvider) {
+                             ObjectProvider<InhospVisitDataService> dataServiceProvider) {
         this.properties = properties;
         this.inhospVisitSwitch = inhospVisitSwitch;
         this.apiProvider = apiProvider;
         this.dataService = firstDataServiceOrNull(dataServiceProvider);
-        this.preachformApiProvider = preachformApiProvider;
-    }
-
-    /**
-     * 鍙栧鏁欏崟鏁版嵁璁块棶瀹炵幇锛涘鍣ㄩ噷娌℃湁銆佺姸鎬佸紓甯搞�佹垨<b>鍙壘鍒拌嚜宸�</b>鏃惰繑鍥� {@code null}銆�
-     * <p>
-     * 鈿狅笍 涓� {@link #firstDataServiceOrNull} 鍚屼竴鎵嬫硶涓庣悊鐢憋紙鑷紩鐢� / 寰幆渚濊禆锛夈��
-     */
-    private com.ruoyi.common.core.service.PreachformApi preachformOrNull() {
-        if (preachformApiProvider == null) {
-            return null;
-        }
-        try {
-            return preachformApiProvider.stream()
-                    .filter(svc -> svc != this)
-                    .findFirst()
-                    .orElse(null);
-        } catch (Exception e) {
-            log.warn("銆愬嚭鍏ラ櫌闅忚銆戣幏鍙栧鏁欏崟鏁版嵁鏈嶅姟澶辫触锛岀浉鍏宠闂皢闄嶇骇锛歿}", e.toString());
-            return null;
-        }
-    }
-
-    /**
-     * 鏁版嵁鏈嶅姟鏄惁涓嶅彲鐢紙涓嶅彲鐢ㄦ椂鎵� WARN 骞惰繑鍥� true锛�
-     */
-    private boolean preachformUnavailable(String method) {
-        if (preachformOrNull() == null) {
-            log.warn("銆愬嚭鍏ラ櫌闅忚銆戝鏁欏崟鏁版嵁鏈嶅姟涓嶅彲鐢紝{} 璺宠繃銆�", method);
-            return true;
-        }
-        return false;
-    }
-
-    // ==================================================================
-    // 瀹f暀鍗� service_subtask_preachform锛圥reachformApi锛�
-    //
-    // 鈿狅笍 涓庝笂闈� 6 涓殢璁挎柟娉曠殑鍏抽敭鍖哄埆锛氫互涓嬫柟娉曘�愪笉鍋氬紑鍏冲垽鏂�戙��
-    //    瀹冩槸璺ㄦā鍧� SQL 鏀跺彛鍚庣殑鏁版嵁璁块棶鍏ュ彛锛堟浛浠� smartor 閲岄偅浠藉悓琛� Mapper锛夛紝
-    //    灞炴暟鎹熀纭�璁炬柦锛涘紑鍏冲彧璇ユ帶鍒�"瑕佷笉瑕佺敓鎴愰殢璁�"銆�
-    // ==================================================================
-
-    @Override
-    public com.ruoyi.common.core.service.dto.VisitPreachformRow findById(Long id) {
-        return preachformUnavailable("findById") ? null : preachformOrNull().findById(id);
-    }
-
-    @Override
-    public java.util.List<com.ruoyi.common.core.service.dto.VisitPreachformRow> findList(
-            com.ruoyi.common.core.service.dto.VisitPreachformRow query) {
-        return preachformUnavailable("findList")
-                ? java.util.Collections.<com.ruoyi.common.core.service.dto.VisitPreachformRow>emptyList()
-                : preachformOrNull().findList(query);
-    }
-
-    @Override
-    public java.util.List<com.ruoyi.common.core.service.dto.VisitPreachformRow> findByTaskidAndOrgid(
-            Long taskid, String orgid) {
-        return preachformUnavailable("findByTaskidAndOrgid")
-                ? java.util.Collections.<com.ruoyi.common.core.service.dto.VisitPreachformRow>emptyList()
-                : preachformOrNull().findByTaskidAndOrgid(taskid, orgid);
-    }
-
-    @Override
-    public boolean insert(com.ruoyi.common.core.service.dto.VisitPreachformRow row) {
-        return !preachformUnavailable("insert") && preachformOrNull().insert(row);
-    }
-
-    @Override
-    public boolean updateById(com.ruoyi.common.core.service.dto.VisitPreachformRow row) {
-        return !preachformUnavailable("updateById") && preachformOrNull().updateById(row);
-    }
-
-    @Override
-    public boolean updateByCondition(com.ruoyi.common.core.service.dto.VisitPreachformRow row) {
-        return !preachformUnavailable("updateByCondition") && preachformOrNull().updateByCondition(row);
-    }
-
-    @Override
-    public boolean softDeleteById(Long id) {
-        return !preachformUnavailable("softDeleteById") && preachformOrNull().softDeleteById(id);
-    }
-
-    @Override
-    public boolean softDeleteByIds(Long[] ids) {
-        return !preachformUnavailable("softDeleteByIds") && preachformOrNull().softDeleteByIds(ids);
-    }
-
-    @Override
-    public boolean softDeleteBySubid(Long subid) {
-        return !preachformUnavailable("softDeleteBySubid") && preachformOrNull().softDeleteBySubid(subid);
     }
 
     /**
@@ -243,12 +138,12 @@
      * <p>
      * 寮�鍏冲彇鑷� {@code sys_config} 鐨勬ā鎷熼敭鍊硷紝浠庤�屼繚璇�"寮�鍏虫牎楠�"鑴氭湰鏃犻渶 Spring/鏁版嵁搴撳嵆鍙繍琛屻��
      * <p>
-     * 鏁版嵁鏈嶅姟涓嶄紶锛氭祴璇曟瀯閫犱笅涓嶆彁渚涘熀纭�鍑哄叆闄俊鎭闂笌瀹f暀鍗曡闂�
+     * 鏁版嵁鏈嶅姟涓嶄紶锛氭祴璇曟瀯閫犱笅涓嶆彁渚涘熀纭�鍑哄叆闄俊鎭闂�
      * 锛堣皟鐢ㄤ細寰楀埌 null / 绌洪泦鍚� / false锛夛紝淇濊瘉"寮�鍏虫牎楠�"绫绘祴璇曚笉蹇呮媺璧锋暟鎹簱銆�
      */
     public InhospVisitFacade(InhospVisitProperties properties, InhospVisitApi delegate, String sysConfigValue) {
         this(properties, new InhospVisitSwitch(properties, sysConfigValue), new FixedProvider(delegate),
-                null, null);
+                null);
     }
 
     /**
diff --git a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/mapper/VisitPreachformMapper.java b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/mapper/VisitPreachformMapper.java
deleted file mode 100644
index 8edeeea..0000000
--- a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/mapper/VisitPreachformMapper.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.ruoyi.inhospvisit.mapper;
-
-import com.ruoyi.common.core.service.dto.VisitPreachformRow;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 闅忚瀛愪换鍔°�屾墽琛屾柟寮忔槑缁嗐�嶏紙{@code service_subtask_preachform}锛塎apper 鈥斺�� 鍑哄叆闄㈤殢璁挎ā鍧楄嚜甯︺��
- *
- * <h3>鏉ユ簮瀵圭収锛園 b25c3b51锛�</h3>
- * <table border="1">
- *   <tr><th>鏈柟娉�</th><th>鍘熸柟娉�</th><th>鍘� XML</th></tr>
- *   <tr><td>{@link #selectList}</td><td>{@code selectServiceSubtaskPreachformList}</td>
- *       <td>L44-73锛坽@code del_flag = 0} + 8 涓彲閫夋潯浠讹級</td></tr>
- *   <tr><td>{@link #insert}</td><td>{@code insertServiceSubtaskPreachform}</td>
- *       <td>L81-151锛坽@code useGeneratedKeys}锛�15 涓彲閫夊垪锛�</td></tr>
- * </table>
- *
- * <h3>鈿狅笍 涓� smartor 鐨� Mapper 鏄袱濂楃瓑浠风殑 SQL</h3>
- * 鍚� {@code VisitInhospMapper} 鐨勭邯寰嬶細鏀逛换涓�杈瑰繀椤诲悓姝ュ彟涓�杈癸紝骞堕噸璺�
- * {@code verify_inhospvisit_mapper.py} 涓� {@code verify_inhospvisit_sql_expansion.py}銆�
- */
-@Mapper
-public interface VisitPreachformMapper {
-
-    /**
-     * 鎸夋潯浠舵煡锛堝師 {@code selectServiceSubtaskPreachformList}锛夈��
-     * <p>
-     * 鍘� XML 鐨勫浐瀹氭潯浠舵槸 {@code del_flag = 0}锛涘叾浣� 8 涓瓧娈典负鍙�夋潯浠讹細
-     * {@code subid / taskid / current_send_time / preachform / sendstate / orgid / sort / compensate_time}銆�
-     * <b>鍏ㄩ儴鐓ф妱</b>鈥斺�旇櫧鐒惰皟鐢ㄧ偣鍙敤鍒� {@code subid + taskid + preachform}锛�
-     * 浣嗗畬鏁寸収鎶勫悗"绛変环"灏辨槸鍙満姊伴獙璇佺殑浜嬪疄锛堣繖鏄 6d 姝ヨ繑宸ュ鍒扮殑锛夈��
-     */
-    List<VisitPreachformRow> selectList(VisitPreachformRow query);
-
-    /**
-     * 鏂板锛堝師 {@code insertServiceSubtaskPreachform}锛岃嚜澧炰富閿洖濉埌 {@code id}锛夈��
-     */
-    int insert(VisitPreachformRow row);
-
-    // ==========================================================================
-    // 浠ヤ笅 7 涓柟娉曚负銆岃法妯″潡 SQL 鏀跺彛銆嶈ˉ榻� 鈥斺�� 鍘� smartor 鐨�
-    // ServiceSubtaskPreachformMapper 鍏� 9 涓柟娉曪紝鏈ā鍧楀師鍏堝彧鏈� 2 涓��
-    // 閫愭柟娉曚笌鍘� XML 瀵瑰簲锛屾潯浠�/鍒�/椤哄簭鐓ф妱锛屼笉鍋氱簿绠�銆�
-    // ==========================================================================
-
-    /**
-     * 鎸変富閿煡锛堝師 {@code selectServiceSubtaskPreachformById}锛夈��
-     */
-    VisitPreachformRow selectById(Long id);
-
-    /**
-     * 鎸� {@code taskid + orgid} 鏌ワ紙鍘� {@code selectBySubtask}锛夈��
-     * <p>
-     * 鈿狅笍 鍘熸柟娉曞悕瀹规槗璇В锛氬畠<b>涓嶆寜 subtask 涓婚敭鏌�</b>锛岃�屾槸浠�
-     * {@code del_flag = 0} 鍔犲彲閫夌殑 {@code taskid}銆亄@code orgid} 涓烘潯浠躲��
-     * 鍙傛暟绫诲瀷鍘熶负 {@code ServiceSubtask}锛屽疄闄呭彧鐢ㄥ埌杩欎袱涓瓧娈点��
-     */
-    List<VisitPreachformRow> selectByTaskidAndOrgid(@Param("taskid") Long taskid,
-                                                    @Param("orgid") String orgid);
-
-    /**
-     * 鎸変富閿洿鏂帮紙鍘� {@code updateServiceSubtaskPreachform}锛夈��
-     * <p>鍘� XML 鐨� WHERE 鏄� {@code where id = #{id}}锛汼ET 鍚勫垪鍧囦负 {@code <if test="xxx != null">}銆�
-     */
-    int updateById(VisitPreachformRow row);
-
-    /**
-     * 鎸夋潯浠舵洿鏂帮紙鍘� {@code updateSSPByCondition}锛夈��
-     * <p>
-     * SET 瀛愬彞涓� {@link #updateById} <b>瀹屽叏鐩稿悓</b>锛屽尯鍒彧鍦� WHERE锛�
-     * 杩欓噷鎸� {@code subid / taskid / preachform / remark / orgid} 閫愰」鍙�夛紝
-     * 涓�<b>娌℃湁 id 鏉′欢</b>銆備袱澶勫埢鎰忓垎寮�淇濈暀锛屼笉鍚堝苟 鈥斺�� 鍚堝苟浼氭敼鍙�"鎸変粈涔堝畾浣嶈"鐨勮涔夈��
-     */
-    int updateByCondition(VisitPreachformRow row);
-
-    /**
-     * 鎸変富閿蒋鍒狅紙鍘� {@code deleteServiceSubtaskPreachformById}锛夈��
-     * <p>鈿狅笍 鍘熸爣绛炬槸 {@code <update>} 涓嶆槸 {@code delete}锛氬疄闄呮墽琛� {@code set del_flag = 1}銆�
-     */
-    int softDeleteById(Long id);
-
-    /**
-     * 鎸変富閿泦鍚堣蒋鍒狅紙鍘� {@code deleteServiceSubtaskPreachformByIds}锛夈��
-     * <p>鈿狅笍 鍚屾牱鏄� {@code <update>}锛屼笖璧� {@code array} 闆嗗悎锛歿@code where id in (...)}銆�
-     */
-    int softDeleteByIds(Long[] ids);
-
-    /**
-     * 鎸� {@code subid} 杞垹锛堝師 {@code deleteServiceSubtaskPreachformBySubid}锛夈��
-     * <p>鈿狅笍 鍘熸爣绛炬槸 {@code <delete>} 浣嗚鍙ユ槸 {@code update ... set del_flag = 1}锛堝師鏍蜂繚鐣欙級銆�
-     */
-    int softDeleteBySubid(Long subid);
-}
diff --git a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java
index d118355..3abdc83 100644
--- a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java
+++ b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/InhospVisitTaskService.java
@@ -220,31 +220,31 @@
     // ==========================================================================
 
     /**
-     * 浠诲姟缁勶紙appltype=5锛夐杞撼鍏� 鈥斺�� <b>鏈涓嶆惉锛屼粛鐣欏湪 smartor</b>銆�
+     * 浠诲姟缁勶紙appltype=5锛夐杞撼鍏� 鈥斺�� 鏈柟娉�<b>鏄┖澹�</b>锛岀湡姝g殑瀹炵幇涓嶅湪鏈ā鍧椼��
      *
-     * <h3>涓轰粈涔堜笉鎼紙涓�涓繀椤昏鏄庣殑鑼冨洿鍐冲畾锛�</h3>
-     * 鍘� {@code dealOutHospInfoBySchedule}(L471-614) 鐢变袱娈垫瀯鎴愶細
-     * <ul>
-     *   <li><b>闈炴墜鏈垎鏀�</b>锛圠518-558锛夛細鎸夌淮搴﹁繃婊ゆ壂鎮h�� 鈫� {@code boxedServiceSubtask} 鈫�
-     *       {@code scheduleSubtaskBuilder.buildSubtasksForPatient}锛堜竴娆$敓鎴� N 鏉★級鈫� 缃� flag锛�</li>
-     *   <li><b>鎵嬫湳鍒嗘敮</b>锛圠559-608锛夛細{@code selectOperationItemListMaxLevel} +
-     *       {@code boxedServiceSubtaskForOp} 鈫� 鍚屼竴 builder銆�</li>
-     * </ul>
-     * 涓ゆ閮戒緷璧� {@code ScheduleSubtaskBuilder} 鈥斺�� 瀹冨悓鏃舵湇鍔�"HIS 鑷姩绾冲叆"涓�
-     * "鍓嶇鎵嬪姩鍕鹃�夋偅鑰�"涓ゆ潯璺緞锛堣鍏剁被娉ㄩ噴锛夛紝**涓嶅睘浜庢湰娆¤寖鍥�**銆�
-     * 鑰屾墜鏈垎鏀寜鐗堝浘灞炵浜屾壒鐨� {@code ruoyi-othervisit}銆�
-     * <p>
-     * 鎵�浠ユ湰娆℃妸<b>鏁翠釜鏂规硶鐣欏湪 smartor</b>锛堣涓轰竴琛屼笉鍙橈級锛�
-     * 绛夌浜屾壒鍋� {@code ruoyi-othervisit} 鏃惰繛鍚屼换鍔$粍閾捐矾涓�璧锋敹璧般��
-     * <p>
-     * 杩欐牱鍋氱殑濂藉锛氭湰杞笉闇�瑕佷负 {@code ScheduleSubtaskBuilder} 鍐嶉�犱竴涓鍙o紝
-     * 涔熶笉浼氬洜涓�"鎼竴鍗婄暀涓�鍗�"鑰屽湪涓ゅ鐢熸垚浠诲姟缁勭殑瀛愪换鍔°��
+     * <h3>2026-11 绗� 7 杞箣鍚庣殑瀹為檯閾捐矾</h3>
+     * <pre>
+     * InhospVisitFacade#dealOutHospInfoBySchedule
+     *   鈫� DefaultInhospVisitApi#dealOutHospInfoBySchedule
+     *     鈫� OtherVisitApi锛坮uoyi-common 濂戠害锛�
+     *       鈫� ruoyi-task/api/contract/OtherVisitApiImpl
+     *         鈫� OperationSubtaskWriter#dealOutHospInfoBySchedule
+     * </pre>
+     * 鍗筹細瀹炵幇鍦� <b>ruoyi-task</b>锛坰martor 渚ч偅涓� {@code OtherVisitApiBridge} 宸插湪绗� 7 杞垹闄わ級銆�
+     * 涔嬫墍浠ヤ笉鍦� othervisit锛歿@code task -> othervisit -> patarchive -> task} 浼氭垚鐜��
+     *
+     * <h3>涓轰粈涔堣繖閲屼笉瀹炵幇銆佷篃涓嶅垹</h3>
+     * 鏈柟娉�<b>鍏ㄤ粨闆惰皟鐢�</b>锛堝彧鏈� {@code DefaultInhospVisitApi} 璋冪殑鏄�
+     * {@code inhospVisitTaskService.dealOutHospInfo}锛屼笉鏄畠锛夛紝
+     * 鏄渶鏃╀竴杞暀涓嬬殑鍗犱綅锛涘垹瀹冭璧� {@code plan_method_prune.py} 鐨勮瘉鎹祦绋嬶紝
+     * 鏈疆鍙妸"浠嶇敱 smartor 鎵挎帴"杩欏彞宸茬粡杩囨湡鐨勮瘽鏀规帀锛屽厤寰楀悗浜虹収鐫�娉ㄩ噴鎵鹃敊鍦版柟銆�
      *
      * @param config {@code sys_config: visit.early.day}
      * @return 鍘熷疄鐜板浐瀹氳繑鍥� 1
      */
     public int dealOutHospInfoBySchedule(String config) {
-        log.warn("銆愬嚭鍏ラ櫌闅忚銆慸ealOutHospInfoBySchedule 鏈鏈惉杩侊紙鍚墜鏈垎鏀笌浠诲姟缁� builder锛�" + "灞炵浜屾壒 ruoyi-othervisit 鑼冨洿锛夛紝浠嶇敱 smartor 鐨勫疄鐜版壙鎺ャ�俢onfig={}", config);
+        log.warn("銆愬嚭鍏ラ櫌闅忚銆慖nhospVisitTaskService#dealOutHospInfoBySchedule 鏄湭琚皟鐢ㄧ殑鍗犱綅锛�"
+                + "鐪熸鐨勫疄鐜板湪 ruoyi-task/api/contract/OtherVisitApiImpl銆俢onfig={}", config);
         return 1;
     }
 
diff --git a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/VisitPreachformWriter.java b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/VisitPreachformWriter.java
index d609f5a..92e0df9 100644
--- a/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/VisitPreachformWriter.java
+++ b/ruoyi-inhospvisit/src/main/java/com/ruoyi/inhospvisit/service/VisitPreachformWriter.java
@@ -3,10 +3,10 @@
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
 import com.ruoyi.common.core.service.VisitTaskCreateApi;
+import com.ruoyi.common.core.service.PreachformApi;
 import com.ruoyi.common.core.service.dto.VisitSubtaskDraft;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.core.service.dto.VisitPreachformRow;
-import com.ruoyi.inhospvisit.mapper.VisitPreachformMapper;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.springframework.beans.factory.ObjectProvider;
@@ -59,7 +59,7 @@
     private static final String DEFAULT_SENDSTATE = "1";
 
     @Autowired
-    private VisitPreachformMapper preachformMapper;
+    private ObjectProvider<PreachformApi> preachformApiProvider;
 
     @Autowired
     private ObjectProvider<VisitTaskCreateApi> taskCreateApiProvider;
@@ -94,6 +94,12 @@
                 return;
             }
             // 鍘� L1084-1098
+            PreachformApi preachformApi = preachformApi();
+            if (preachformApi == null) {
+                log.error("瀹f暀鍗曞绾� PreachformApi 涓嶅彲鐢紙service_subtask_preachform 宸插綊 ruoyi-task锛夛紝"
+                        + "璺宠繃preachform瀛愯〃鐢熸垚锛宼askid涓猴細{}", serviceSubtask.getTaskid());
+                return;
+            }
             for (VisitPreachformRow row : list) {
                 row.setTaskid(serviceSubtask.getTaskid());
                 row.setSubid(serviceSubtask.getId());
@@ -103,7 +109,7 @@
                 query.setSubid(row.getSubid());
                 query.setTaskid(row.getTaskid());
                 query.setPreachform(row.getPreachform());
-                List<VisitPreachformRow> exists = preachformMapper.selectList(query);
+                List<VisitPreachformRow> exists = preachformApi.findList(query);
                 if (CollectionUtils.isNotEmpty(exists)) {
                     continue;
                 }
@@ -116,7 +122,7 @@
 
                 // 鍘� L1096-1097
                 row.setOrgid(serviceSubtask.getOrgid());
-                preachformMapper.insert(row);
+                preachformApi.insert(row);
             }
         }
 
@@ -135,6 +141,22 @@
         }
     }
 
+    /**
+     * 鍙栧鏁欏崟濂戠害瀹炵幇锛�2026-11 璧� {@code service_subtask_preachform} 褰� {@code ruoyi-task}锛�
+     * 鏈ā鍧椾笉鑳藉弽鍚戜緷璧栧畠锛屽彧鑳界粡 {@code ruoyi-common} 鐨勫绾﹀湪杩愯鏈熷彇瀹炵幇锛夈��
+     */
+    private PreachformApi preachformApi() {
+        if (preachformApiProvider == null) {
+            return null;
+        }
+        try {
+            return preachformApiProvider.stream().findFirst().orElse(null);
+        } catch (Exception e) {
+            log.warn("銆愬嚭鍏ラ櫌闅忚銆戣幏鍙� PreachformApi 澶辫触锛歿}", e.toString());
+            return null;
+        }
+    }
+
     /** 渚涙祴璇曟柇瑷�锛氱‘璁ゆ湰绫绘嬁鍒扮殑 ObjectMapper 闈炵┖锛堝師瀹炵幇鏄柟娉曞唴 new锛岃繖閲屾彁涓哄瓧娈碉級 */
     boolean hasObjectMapper() {
         return Objects.nonNull(objectMapper);
diff --git a/ruoyi-inhospvisit/src/main/resources/mapper/inhospvisit/VisitPreachformMapper.xml b/ruoyi-inhospvisit/src/main/resources/mapper/inhospvisit/VisitPreachformMapper.xml
deleted file mode 100644
index 38e9a26..0000000
--- a/ruoyi-inhospvisit/src/main/resources/mapper/inhospvisit/VisitPreachformMapper.xml
+++ /dev/null
@@ -1,331 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.ruoyi.inhospvisit.mapper.VisitPreachformMapper">
-
-    <!--
-      ============================================================================
-      鍑哄叆闄㈤殢璁挎ā鍧楄嚜甯︾殑 service_subtask_preachform 璇诲啓銆�
-      ============================================================================
-      涓� smartor 鐨� mapper/smartor/ServiceSubtaskPreachformMapper.xml 绛変环锛�
-        路 selectList 鈫� selectServiceSubtaskPreachformList锛堝師 XML L44-73锛�
-        路 insert     鈫� insertServiceSubtaskPreachform锛堝師 XML L81-151锛寀seGeneratedKeys锛�
-      鍘� XML 鐢� <sql id="selectServiceSubtaskPreachformVo"> 鍏变韩鐗囨锛涜繖閲屻�愭樉寮忓垪鍑哄悓涓�鎵瑰垪銆戯紝
-      涓嶅鍒剁墖娈碉紙涓� VisitInhospMapper 鍚屼竴鍋氭硶锛氳嚜鍖呭惈銆佷究浜庨�愭潯姣斿锛夈��
-      ============================================================================
-    -->
-
-    <resultMap type="com.ruoyi.common.core.service.dto.VisitPreachformRow" id="VisitPreachformRowResult">
-        <result property="id" column="id"/>
-        <result property="subid" column="subid"/>
-        <result property="taskid" column="taskid"/>
-        <result property="preachform" column="preachform"/>
-        <result property="sendstate" column="sendstate"/>
-        <result property="currentSendTime" column="current_send_time"/>
-        <result property="remark" column="remark"/>
-        <result property="orgid" column="orgid"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="createTime" column="create_time"/>
-        <result property="createBy" column="create_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="compensateTime" column="compensate_time"/>
-        <result property="sort" column="sort"/>
-    </resultMap>
-
-    <!-- 鏉′欢涓庨『搴忛�愭潯瀵归綈鍘� XML L44-73 -->
-    <select id="selectList" parameterType="com.ruoyi.common.core.service.dto.VisitPreachformRow"
-            resultMap="VisitPreachformRowResult">
-        select id,
-               subid,
-               taskid,
-               preachform,
-               sendstate,
-               current_send_time,
-               remark,
-               orgid,
-               del_flag,
-               create_time,
-               create_by,
-               update_time,
-               update_by,
-               compensate_time,
-               sort
-        from service_subtask_preachform
-        where 1=1
-        and del_flag = 0
-        <if test="subid != null ">
-            and subid = #{subid}
-        </if>
-        <if test="taskid != null ">
-            and taskid = #{taskid}
-        </if>
-        <if test="currentSendTime != null ">
-            and current_send_time = #{currentSendTime}
-        </if>
-        <if test="preachform != null  and preachform != ''">
-            and preachform = #{preachform}
-        </if>
-        <if test="sendstate != null  and sendstate != ''">
-            and sendstate = #{sendstate}
-        </if>
-        <if test="orgid != null  and orgid != ''">
-            and orgid = #{orgid}
-        </if>
-        <if test="sort != null ">
-            and sort = #{sort}
-        </if>
-        <if test="compensateTime != null ">
-            and compensate_time = #{compensateTime}
-        </if>
-    </select>
-
-    <!-- 鍒椾笌椤哄簭閫愭潯瀵归綈鍘� XML L81-151 -->
-    <insert id="insert" parameterType="com.ruoyi.common.core.service.dto.VisitPreachformRow"
-            useGeneratedKeys="true" keyProperty="id">
-        insert into service_subtask_preachform
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="subid != null">subid,</if>
-            <if test="taskid != null">taskid,</if>
-            <if test="preachform != null">preachform,</if>
-            <if test="sendstate != null">sendstate,</if>
-            <if test="remark != null">remark,</if>
-            <if test="orgid != null">orgid,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="updateTime != null">update_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="sort != null">sort,</if>
-            <if test="compensateTime != null">compensate_time,</if>
-            <if test="currentSendTime != null ">current_send_time,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="subid != null">#{subid},</if>
-            <if test="taskid != null">#{taskid},</if>
-            <if test="preachform != null">#{preachform},</if>
-            <if test="sendstate != null">#{sendstate},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="orgid != null">#{orgid},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="sort != null">#{sort},</if>
-            <if test="compensateTime != null">#{compensateTime},</if>
-            <if test="currentSendTime != null ">#{currentSendTime},</if>
-        </trim>
-    </insert>
-
-    <!--
-      ============================================================================
-      璺ㄦā鍧� SQL 鏀跺彛琛ラ綈鐨� 7 涓� statement锛堢収鎶� smartor 鍘� XML锛屾潯浠�/鍒�/椤哄簭涓嶅彉锛�
-        路 selectById             鈫� selectServiceSubtaskPreachformById
-        路 selectByTaskidAndOrgid 鈫� selectBySubtask锛堝師鎸� taskid + orgid锛岄潪涓婚敭锛�
-        路 updateById             鈫� updateServiceSubtaskPreachform锛坵here id = #{id}锛�
-        路 updateByCondition      鈫� updateSSPByCondition锛圫ET 鍚� updateById锛學HERE 鎸夋潯浠朵笖鏃� id锛�
-        路 softDeleteById         鈫� deleteServiceSubtaskPreachformById锛坲pdate 缃� del_flag=1锛�
-        路 softDeleteByIds        鈫� deleteServiceSubtaskPreachformByIds锛堝悓涓婏紝in 闆嗗悎锛�
-        路 softDeleteBySubid      鈫� deleteServiceSubtaskPreachformBySubid锛堝悓涓婏紝鎸� subid锛�
-      娉ㄦ剰锛氫笁涓� delete* 鍦ㄥ師 XML 閲屽氨鏄�"杞垹"锛坲pdate set del_flag=1锛夛紝姝ゅ鍘熸牱淇濈暀锛�
-            鍏朵腑 BySubid 鍘熸湰鐢ㄧ殑灏辨槸 <delete> 鏍囩锛屼篃鐓ф妱銆�
-      ============================================================================
-    -->
-
-    <select id="selectById" parameterType="Long" resultMap="VisitPreachformRowResult">
-        select id,
-               subid,
-               taskid,
-               preachform,
-               sendstate,
-               current_send_time,
-               remark,
-               orgid,
-               del_flag,
-               create_time,
-               create_by,
-               update_time,
-               update_by,
-               compensate_time,
-               sort
-        from service_subtask_preachform
-        where id = #{id}
-    </select>
-
-    <!-- 鍘� selectBySubtask锛歞el_flag=0 + 鍙�� taskid/orgid锛堝師鍙傛暟鏄� ServiceSubtask锛屽疄闄呭彧鐢ㄨ繖涓や釜瀛楁锛� -->
-    <select id="selectByTaskidAndOrgid" resultMap="VisitPreachformRowResult">
-        select id,
-               subid,
-               taskid,
-               preachform,
-               sendstate,
-               current_send_time,
-               remark,
-               orgid,
-               del_flag,
-               create_time,
-               create_by,
-               update_time,
-               update_by,
-               compensate_time,
-               sort
-        from service_subtask_preachform
-        WHERE del_flag = 0
-        <if test="taskid != null">
-            AND taskid = #{taskid}
-        </if>
-        <if test="orgid != null and orgid != ''">
-            AND orgid = #{orgid}
-        </if>
-    </select>
-
-    <!-- 鍘� updateServiceSubtaskPreachform锛歸here id = #{id} -->
-    <update id="updateById" parameterType="com.ruoyi.common.core.service.dto.VisitPreachformRow">
-        update service_subtask_preachform
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="subid != null">subid =
-                #{subid},
-            </if>
-            <if test="taskid != null">taskid =
-                #{taskid},
-            </if>
-            <if test="preachform != null">preachform =
-                #{preachform},
-            </if>
-            <if test="sendstate != null">sendstate =
-                #{sendstate},
-            </if>
-            <if test="remark != null">remark =
-                #{remark},
-            </if>
-            <if test="orgid != null">orgid =
-                #{orgid},
-            </if>
-            <if test="delFlag != null">del_flag =
-                #{delFlag},
-            </if>
-            <if test="createTime != null">create_time =
-                #{createTime},
-            </if>
-            <if test="createBy != null">create_by =
-                #{createBy},
-            </if>
-            <if test="updateTime != null">update_time =
-                #{updateTime},
-            </if>
-            <if test="updateBy != null">update_by =
-                #{updateBy},
-            </if>
-            <if test="sort != null">sort =
-                #{sort},
-            </if>
-            <if test="compensateTime != null">compensate_time =
-                #{compensateTime},
-            </if>
-            <if test="currentSendTime != null ">
-                current_send_time = #{currentSendTime},
-            </if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <!-- 鍘� updateSSPByCondition锛歋ET 涓� updateById 鐩稿悓锛學HERE 鎸夋潯浠朵笖鏃� id -->
-    <update id="updateByCondition" parameterType="com.ruoyi.common.core.service.dto.VisitPreachformRow">
-        update service_subtask_preachform
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="subid != null">subid =
-                #{subid},
-            </if>
-            <if test="taskid != null">taskid =
-                #{taskid},
-            </if>
-            <if test="preachform != null">preachform =
-                #{preachform},
-            </if>
-            <if test="sendstate != null">sendstate =
-                #{sendstate},
-            </if>
-            <if test="remark != null">remark =
-                #{remark},
-            </if>
-            <if test="orgid != null">orgid =
-                #{orgid},
-            </if>
-            <if test="delFlag != null">del_flag =
-                #{delFlag},
-            </if>
-            <if test="createTime != null">create_time =
-                #{createTime},
-            </if>
-            <if test="createBy != null">create_by =
-                #{createBy},
-            </if>
-            <if test="updateTime != null">update_time =
-                #{updateTime},
-            </if>
-            <if test="updateBy != null">update_by =
-                #{updateBy},
-            </if>
-            <if test="sort != null">sort =
-                #{sort},
-            </if>
-            <if test="compensateTime != null">compensate_time =
-                #{compensateTime},
-            </if>
-            <if test="currentSendTime != null ">
-                current_send_time = #{currentSendTime},
-            </if>
-        </trim>
-        where 1=1
-        <if test="subid != null">and subid =
-            #{subid}
-        </if>
-        <if test="taskid != null">and taskid =
-            #{taskid}
-        </if>
-        <if test="preachform != null">and preachform =
-            #{preachform}
-        </if>
-        <if test="remark != null">and remark =
-            #{remark}
-        </if>
-        <if test="orgid != null">and orgid =
-            #{orgid}
-        </if>
-    </update>
-
-    <!-- 鍘� deleteServiceSubtaskPreachformById锛�<update> 缃� del_flag=1 -->
-    <update id="softDeleteById" parameterType="Long">
-        update service_subtask_preachform
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where id = #{id}
-    </update>
-
-    <!-- 鍘� deleteServiceSubtaskPreachformByIds锛�<update> + in 闆嗗悎 -->
-    <update id="softDeleteByIds" parameterType="String">
-        update service_subtask_preachform
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </update>
-
-    <!-- 鍘� deleteServiceSubtaskPreachformBySubid锛�<delete> 鏍囩浣嗚鍙ユ槸 update -->
-    <delete id="softDeleteBySubid" parameterType="Long">
-        update service_subtask_preachform
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where subid = #{subid}
-    </delete>
-
-</mapper>
diff --git a/ruoyi-othervisit/pom.xml b/ruoyi-othervisit/pom.xml
index 5d39f11..0344878 100644
--- a/ruoyi-othervisit/pom.xml
+++ b/ruoyi-othervisit/pom.xml
@@ -46,6 +46,6 @@
             <artifactId>lombok</artifactId>
             <version>1.18.34</version>
         </dependency>
-    </dependencies>
+</dependencies>
 
 </project>
diff --git a/ruoyi-othervisit/src/main/java/com/ruoyi/othervisit/api/OtherVisitApiImpl.java b/ruoyi-othervisit/src/main/java/com/ruoyi/othervisit/api/OtherVisitApiImpl.java
deleted file mode 100644
index 46583b2..0000000
--- a/ruoyi-othervisit/src/main/java/com/ruoyi/othervisit/api/OtherVisitApiImpl.java
+++ /dev/null
@@ -1,116 +0,0 @@
-package com.ruoyi.othervisit.api;
-
-import com.ruoyi.common.core.service.OtherVisitApi;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.ObjectProvider;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Component;
-
-/**
- * {@link OtherVisitApi} 鐨�<b>鏈ā鍧楀疄鐜�</b>銆�
- *
- * <h3>瀹冨彇浠d簡浠�涔�</h3>
- * 鍦� {@code ruoyi-othervisit} 寤哄ソ涔嬪墠锛寋@link OtherVisitApi} 鍙湁 smartor 渚х殑
- * 杩囨浮妗ユ帴 {@code OtherVisitApiBridge}銆傛墜鏈殢璁跨殑瀹炵幇鎼繘鏈ā鍧楀悗锛�
- * 鐢辨湰绫绘帴绠� 鈥斺�� 杩欐鏄偅涓� Bridge 鐨勭被娉ㄩ噴閲岄鍛婄殑"灏嗘潵鍔ㄤ綔"銆�
- *
- * <h3>鈿狅笍 鏈被涓や釜鏂规硶<b>鏈閮借繕濮旀墭 smartor</b>锛堝埢鎰忥紝涓嶆槸婕忓仛锛�</h3>
- * <table border="1">
- *   <tr><th>鎺ュ彛鏂规硶</th><th>鍘熷疄鐜颁綅缃�</th><th>涓轰粈涔堟湰娆′笉鎼�</th></tr>
- *   <tr><td>{@link #addOperationSubTask(String)}</td>
- *       <td>{@code PatMedInhospServiceImpl#addOperationSubTask} L1247-1316</td>
- *       <td>瀹冩槸<b>鎵嬫湳绛夌骇锛坽@code oplevelcode}锛�+ 绂婚櫌绉戝/鐥呭尯缁村害</b>鐨勬壂鎻忥紝
- *           灞�"鍑洪櫌闅忚閲屾贩鐫�鐨勬墜鏈垎鏀�"锛屼笖渚濊禆
- *           {@code ServiceTaskoperMapper}锛堜粛鍦� smartor锛変笌
- *           {@code writeInSubTaskForOp}锛堜緷璧� {@code ScheduleSubtaskBuilder}锛夈��</td></tr>
- *   <tr><td>{@link #dealOutHospInfoBySchedule(String)}</td>
- *       <td>鍚屾枃浠� L380-614</td>
- *       <td>瀹冪殑<b>闈炴墜鏈垎鏀�</b>涓�"HIS 鑷姩绾冲叆"銆�"鍓嶇鎵嬪姩鍕鹃��"鍏辩敤
- *           {@code ScheduleSubtaskBuilder}銆傛惉瀹冨緱杩� builder 涓�璧锋惉 鈥斺��
- *           閭f槸鐙珛鐨勪竴娆℃敼閫犮��</td></tr>
- * </table>
- *
- * <h3>閭f湰妯″潡鎼簡浠�涔堬紵</h3>
- * <b>鎵嬫湳缂栫爜锛坽@code opcode}锛夌淮搴�</b>鐨勯偅鏉℃壂鎻忥細
- * {@code PatMedOperationServiceImpl#dealOperationInfo}锛堝師 L107-149锛夈��
- * 瀹冪殑鍏ュ彛<b>涓嶈蛋</b>鏈帴鍙o紝鑰屾槸 {@link OtherVisitFacade#dealOperationInfo()} 鈥斺��
- * 璋冪敤鏂规槸 {@code RyTask#dealOperationInfo}锛堝畾鏃朵换鍔★級锛屽凡鐩存帴鏀硅蛋闂ㄩ潰銆�
- * 涔嬫墍浠ヤ笉濉炶繘鏈帴鍙o紝鏄洜涓轰袱鑰呰涔変笉鍚岋細
- * 鎺ュ彛涓婇偅涓や釜鏄�"鍑洪櫌/浠诲姟缁勬祦绋嬮噷鐨勬墜鏈垎鏀�"锛岃�岃繖鏉℃槸"鎵嬫湳璁板綍鑷韩鐨勬壂鎻�"銆�
- *
- * <h3>鈿狅笍 涓轰粈涔堢紪璇戞湡鐪嬩笉鍒� smartor</h3>
- * 渚濊禆鏂瑰悜鏄� smartor 鈫� ruoyi-othervisit锛屽弽杩囨潵浼氬舰鎴� Maven 寰幆渚濊禆锛岀洿鎺ユ瀯寤哄け璐ャ��
- * 鎵�浠ヨ繖閲岀敤 {@code ObjectProvider<OtherVisitApi>} 鍦�<b>杩愯鏃�</b>鎸夌被鍨嬫儼鎬ф煡鎵�
- * smartor 渚ч偅涓壙鎺ュ疄鐜帮紝骞�<b>鎺掗櫎鏈被鑷繁</b>锛堝惁鍒欎細鑷繁璋冭嚜宸� 鈫� {@code StackOverflowError}锛夈��
- * 鍙栦笉鍒板氨鎵� WARN 骞惰繑鍥炲畨鍏ㄥ�硷紝缁濅笉璁╁畾鏃朵换鍔℃姏寮傚父銆�
- *
- * @see OtherVisitApi
- */
-@Slf4j
-@Component
-public class OtherVisitApiImpl implements OtherVisitApi {
-
-    /**
-     * smartor 渚х殑杩囨浮鎵挎帴锛坽@code com.smartor.service.impl.bridge.OtherVisitApiBridge}锛夈��
-     * <p>
-     * 鈿狅笍 绫诲瀷鍙傛暟鍒绘剰鍐欐垚 {@link OtherVisitApi} 鑰�<b>涓嶆槸</b>閭d釜鍏蜂綋绫伙細
-     * 鏈ā鍧楃紪璇戞湡鐪嬩笉鍒� smartor 鐨勭被鍨嬶紙涔熶笉鍏佽鐪嬪埌锛夈��
-     */
-    @Autowired
-    private ObjectProvider<OtherVisitApi> otherVisitApiProvider;
-
-    /**
-     * 鎵嬫湳闅忚鎵弿锛堟墜鏈瓑绾� + 绂婚櫌绉戝/鐥呭尯缁村害锛夆�斺�� 鏈浠嶅鎵� smartor銆�
-     *
-     * @param config {@code sys_config: visit.early.day} 鐨勫�硷紝鍙兘涓� null
-     * @return 澶勭悊鐨勬墜鏈褰曟暟锛涙壙鎺ュ疄鐜颁笉鍙敤鏃惰繑鍥� 0
-     */
-    @Override
-    public int addOperationSubTask(String config) {
-        OtherVisitApi delegate = findExternalDelegate();
-        if (delegate == null) {
-            log.warn("銆愭墜鏈殢璁裤�慳ddOperationSubTask 鐨� smartor 渚ф壙鎺ュ疄鐜颁笉鍙敤锛堟湭鎵撹繘搴旂敤鎴栨湭瑁呴厤锛夛紝鏈璺宠繃銆�");
-            return 0;
-        }
-        return delegate.addOperationSubTask(config);
-    }
-
-    /**
-     * 浠诲姟缁勶紙appltype=5锛夐杞撼鍏� 鈥斺�� 鏈浠嶅鎵� smartor銆�
-     *
-     * @param config {@code sys_config: visit.early.day}
-     * @return 鍘熷疄鐜板浐瀹氳繑鍥� 1锛涙壙鎺ュ疄鐜颁笉鍙敤鏃惰繑鍥� 0
-     */
-    @Override
-    public int dealOutHospInfoBySchedule(String config) {
-        OtherVisitApi delegate = findExternalDelegate();
-        if (delegate == null) {
-            log.warn("銆愭墜鏈殢璁裤�慸ealOutHospInfoBySchedule 鐨� smartor 渚ф壙鎺ュ疄鐜颁笉鍙敤锛堟湭鎵撹繘搴旂敤鎴栨湭瑁呴厤锛夛紝鏈璺宠繃銆�");
-            return 0;
-        }
-        return delegate.dealOutHospInfoBySchedule(config);
-    }
-
-    /**
-     * 鎵� smartor 渚ч偅涓壙鎺ュ疄鐜般��
-     * <p>
-     * 鈿狅笍 <b>蹇呴』鎺掗櫎鏈被</b>锛氭湰绫讳篃瀹炵幇浜� {@link OtherVisitApi}锛�
-     * 鑻ヤ笉杩囨护灏变細鍙栧埌鑷繁锛屽舰鎴愭棤闄愰�掑綊銆�
-     * 鈿狅笍 鐢� {@code stream()} 鑰屼笉鏄� {@code getIfAvailable()}锛�
-     * 鍚庤�呭湪瀛樺湪澶氫釜鍊欓�夋椂琛屼负涓嶇‘瀹氾紝鑰岃繖閲屽ぉ鐒舵湁<b>涓や釜</b>鍊欓�夊疄鐜帮紙鏈被 + smartor 妗ユ帴锛夈��
-     */
-    private OtherVisitApi findExternalDelegate() {
-        if (otherVisitApiProvider == null) {
-            return null;
-        }
-        try {
-            return otherVisitApiProvider.stream()
-                    .filter(api -> api != this)
-                    .findFirst()
-                    .orElse(null);
-        } catch (Exception e) {
-            log.warn("銆愭墜鏈殢璁裤�戣幏鍙栧叾瀹冮殢璁挎壙鎺ュ疄鐜板け璐ワ紝鎸変笉鍙敤澶勭悊锛歿}", e.toString());
-            return null;
-        }
-    }
-}
diff --git a/ruoyi-outpatientvisit/src/main/java/com/ruoyi/outpatientvisit/domain/PatMedOuthosp.java b/ruoyi-outpatientvisit/src/main/java/com/ruoyi/outpatientvisit/domain/PatMedOuthosp.java
index 240e52d..ffb1732 100644
--- a/ruoyi-outpatientvisit/src/main/java/com/ruoyi/outpatientvisit/domain/PatMedOuthosp.java
+++ b/ruoyi-outpatientvisit/src/main/java/com/ruoyi/outpatientvisit/domain/PatMedOuthosp.java
@@ -131,12 +131,6 @@
     private Date admitdate;
 
     /**
-     * 鏈烘瀯ID
-     */
-    @ApiModelProperty(value = "鏈烘瀯ID")
-    private String orgid;
-
-    /**
      * 鍒犻櫎鏍囪
      */
     @ApiModelProperty(value = "鍒犻櫎鏍囪")
diff --git a/ruoyi-patarchive/pom.xml b/ruoyi-patarchive/pom.xml
new file mode 100644
index 0000000..9d0a2fe
--- /dev/null
+++ b/ruoyi-patarchive/pom.xml
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>ruoyi</artifactId>
+        <groupId>com.ruoyi</groupId>
+        <version>3.8.5</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>ruoyi-patarchive</artifactId>
+
+    <description>
+        鎮h�呮。妗堟ā鍧楋紙pat_archive 瀹舵棌锛夛細鍩虹妗f / 鑱旂郴浜� / 鏍囩 / 瀵煎叆 / 杞嚭 鐨勫敮涓�瀹炵幇澶勩��
+        鏈ā鍧楄嚜甯� Mapper 涓� SQL锛涘叾瀹冩ā鍧楄璇诲啓妗f鍙兘缁忔湰妯″潡鐨� service 鎴�
+        ruoyi-common 閲屼笅娌夌殑瀹炰綋绫诲瀷銆�
+
+        渚濊禆鏂瑰悜锛堝姟蹇呬繚鎸侊級锛�
+          鏈ā鍧椾緷璧� ruoyi-common + ruoyi-task + ruoyi-inhospvisit + ruoyi-outpatientvisit + ruoyi-template锛�
+          ruoyi-task 鍙嶅悜涓嶄緷璧栨湰妯″潡 鈥斺�� 瀹冮�氳繃 ruoyi-task 鑷甫鐨� TaskArchivePort 绔彛鍙栨。妗堬紝
+          鏈ā鍧楁彁渚涜绔彛鐨勫疄鐜帮紙TaskArchivePortImpl锛夛紝杩愯鏃剁敱 Spring 瑁呴厤锛屾晠鏃犵幆銆�
+    </description>
+
+    <dependencies>
+        <!-- 閫氱敤浠讹細BaseEntity / DateUtils / ExcelUtil / DtoConversionUtils / RedisCache / POI -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-common</artifactId>
+        </dependency>
+
+        <!-- service_subtask / service_task 鐨勮鍐欙紙妗f瀵煎叆浼氱敓鎴愰殢璁夸换鍔★級 -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-task</artifactId>
+        </dependency>
+
+        <!-- 鍑哄叆闄㈣褰曪細妗f椤电殑"鍦ㄩ櫌/鍑洪櫌"鑱斿姩鏌ヨ璧� inhospvisit 闂ㄩ潰 -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-inhospvisit</artifactId>
+        </dependency>
+
+        <!-- 闂ㄨ瘖璁板綍锛氭。妗堥〉鐨勯棬璇婂巻鍙叉煡璇㈣蛋 outpatientvisit 鐨� Mapper -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-outpatientvisit</artifactId>
+        </dependency>
+
+        <!-- 妯℃澘鏍囩锛氭。妗堟爣绛句笌妯℃澘鏍囩鍏宠仈 -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-template</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok</artifactId>
+            <version>1.18.34</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mybatis.spring.boot</groupId>
+            <artifactId>mybatis-spring-boot-starter</artifactId>
+            <version>2.2.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>javax.servlet-api</artifactId>
+            <version>4.0.1</version>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+</project>
diff --git a/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/api/TaskArchivePortImpl.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/api/TaskArchivePortImpl.java
new file mode 100644
index 0000000..a4a019a
--- /dev/null
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/api/TaskArchivePortImpl.java
@@ -0,0 +1,65 @@
+package com.ruoyi.patarchive.api;
+
+import com.ruoyi.common.core.domain.entity.PatArchive;
+import com.ruoyi.common.utils.DtoConversionUtils;
+import com.ruoyi.patarchive.domain.PatArchiveImport;
+import com.ruoyi.patarchive.mapper.PatArchiveImportMapper;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
+import com.ruoyi.task.api.spi.TaskArchivePort;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Component;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * {@link TaskArchivePort} 鐨�<b>褰掑睘妯″潡瀹炵幇</b> 鈥斺�� 鎮h�呮。妗堣鍙栥��
+ *
+ * <h3>2026-11 褰掑睘璋冩暣</h3>
+ * {@code pat_archive} 瀹舵棌鏁翠綋杩佸叆鏈ā鍧楀悗锛岃繖涓鍙g殑瀹炵幇浠� smartor 鐨�
+ * {@code TaskArchivePortBridge} 鎼埌杩欓噷锛氭暟鎹湪鍝�佸疄鐜板湪鍝紝绗﹀悎绔彛鍊掔疆鐨勬湰鎰忋��
+ * <ul>
+ *   <li>鎺ュ彛浠嶅0鏄庡湪 {@code ruoyi-task}锛堟秷璐规柟澹版槑锛屽畠涓嶄緷璧栨湰妯″潡锛夛紱</li>
+ *   <li>鏈ā鍧椾緷璧� {@code ruoyi-task} 鎻愪緵瀹炵幇锛岃繍琛屾湡鐢� Spring 娉ㄥ叆锛�<b>涓嶆垚鐜�</b>锛�</li>
+ *   <li>smartor 渚х殑杩囨浮妗ュ凡鍒犻櫎銆�</li>
+ * </ul>
+ *
+ * <h3>鈿狅笍 淇濇寔"绾浆鍙�"</h3>
+ * 鍙浆鍙戝埌鏈ā鍧楁棦鏈夌殑 Mapper锛泏@link #findImportedByPatid} 閲岀殑
+ * {@code sourceToTarget} 鏄�<b>鍘熷疄鐜版湰鏉ュ氨鏈夌殑</b>杞崲锛堝師
+ * {@code ServiceTaskServiceImpl} L443 / L535锛夛紝涓嶆槸鏂伴�昏緫銆�
+ */
+@Slf4j
+@Component
+public class TaskArchivePortImpl implements TaskArchivePort {
+
+    @Autowired
+    private PatArchiveMapper patArchiveMapper;
+
+    @Autowired
+    private PatArchiveImportMapper patArchiveImportMapper;
+
+    @Override
+    public PatArchive findByPatid(Long patid) {
+        // 鍘� ServiceSubtaskServiceImpl 璧� patArchiveService.selectPatArchiveByPatid锛�
+        // 鑰岃 Service 鏂规硶浣撳氨鏄繖涓�琛岀函濮旀墭锛圥atArchiveServiceImpl锛夈��
+        return patArchiveMapper.selectPatArchiveByPatid(patid);
+    }
+
+    @Override
+    public List<PatArchive> findList(PatArchive query) {
+        List<PatArchive> list = patArchiveMapper.selectPatArchiveList(query);
+        return list == null ? Collections.emptyList() : list;
+    }
+
+    @Override
+    public PatArchive findImportedByPatid(Long patid) {
+        PatArchiveImport patArchiveImport = patArchiveImportMapper.selectPatArchiveImportById(patid);
+        if (patArchiveImport == null) {
+            return null;
+        }
+        // 鍘熷疄鐜帮紙ServiceTaskServiceImpl L443-444 / L535-536锛夊氨鏄繖涓ゆ銆�
+        return DtoConversionUtils.sourceToTarget(patArchiveImport, PatArchive.class);
+    }
+}
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveImport.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveImport.java
similarity index 98%
rename from smartor/src/main/java/com/smartor/domain/PatArchiveImport.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveImport.java
index bd4f180..0c995d7 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveImport.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveImport.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.patarchive.domain;
 
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.core.domain.BaseEntity;
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveOthreInfo.java
similarity index 99%
rename from smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveOthreInfo.java
index 0e6869c..944701a 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveOthreInfo.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveOthreInfo.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.patarchive.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveOut.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveOut.java
similarity index 98%
rename from smartor/src/main/java/com/smartor/domain/PatArchiveOut.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveOut.java
index 6894c20..197d201 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveOut.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveOut.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.patarchive.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveReq.java
similarity index 98%
rename from smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveReq.java
index ab80bd9..eb4f7c1 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveReq.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveReq.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.patarchive.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveVO.java
similarity index 99%
rename from smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveVO.java
index 64f2176..8935b8d 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchiveVO.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchiveVO.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.patarchive.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
diff --git a/smartor/src/main/java/com/smartor/domain/PatArchivetagAndPatientInfo.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchivetagAndPatientInfo.java
similarity index 97%
rename from smartor/src/main/java/com/smartor/domain/PatArchivetagAndPatientInfo.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchivetagAndPatientInfo.java
index 9b226fd..5547951 100644
--- a/smartor/src/main/java/com/smartor/domain/PatArchivetagAndPatientInfo.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatArchivetagAndPatientInfo.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.patarchive.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
diff --git a/smartor/src/main/java/com/smartor/domain/PatUpInfoVO.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatUpInfoVO.java
similarity index 94%
rename from smartor/src/main/java/com/smartor/domain/PatUpInfoVO.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatUpInfoVO.java
index 7571cdd..59f202f 100644
--- a/smartor/src/main/java/com/smartor/domain/PatUpInfoVO.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PatUpInfoVO.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.patarchive.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
diff --git a/smartor/src/main/java/com/smartor/domain/PerSonWorkbenchDto.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PerSonWorkbenchDto.java
similarity index 93%
rename from smartor/src/main/java/com/smartor/domain/PerSonWorkbenchDto.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PerSonWorkbenchDto.java
index 0872b3c..65474b6 100644
--- a/smartor/src/main/java/com/smartor/domain/PerSonWorkbenchDto.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/domain/PerSonWorkbenchDto.java
@@ -1,4 +1,4 @@
-package com.smartor.domain;
+package com.ruoyi.patarchive.domain;
 
 import com.fasterxml.jackson.annotation.JsonFormat;
 import com.ruoyi.common.annotation.Excel;
diff --git a/smartor/src/main/java/com/smartor/mapper/PatArchiveImportMapper.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveImportMapper.java
similarity index 95%
rename from smartor/src/main/java/com/smartor/mapper/PatArchiveImportMapper.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveImportMapper.java
index 41038ec..14ace95 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatArchiveImportMapper.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveImportMapper.java
@@ -1,11 +1,11 @@
-package com.smartor.mapper;
+package com.ruoyi.patarchive.mapper;
 
 import java.util.List;
 
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.domain.entity.SysUserRole;
 import org.apache.ibatis.annotations.Mapper;
-import com.smartor.domain.PatArchiveImport;
+import com.ruoyi.patarchive.domain.PatArchiveImport;
 
 /**
  * Excel瀵煎叆鎮h�呮。妗圡apper鎺ュ彛
diff --git a/smartor/src/main/java/com/smartor/mapper/PatArchiveMapper.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveMapper.java
similarity index 94%
rename from smartor/src/main/java/com/smartor/mapper/PatArchiveMapper.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveMapper.java
index 6787398..7f6d911 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatArchiveMapper.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveMapper.java
@@ -1,7 +1,7 @@
-package com.smartor.mapper;
+package com.ruoyi.patarchive.mapper;
 
-import com.smartor.domain.PatArchiveOthreInfo;
-import com.smartor.domain.PatArchiveReq;
+import com.ruoyi.patarchive.domain.PatArchiveOthreInfo;
+import com.ruoyi.patarchive.domain.PatArchiveReq;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
diff --git a/smartor/src/main/java/com/smartor/mapper/PatArchiveOutMapper.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveOutMapper.java
similarity index 90%
rename from smartor/src/main/java/com/smartor/mapper/PatArchiveOutMapper.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveOutMapper.java
index 8bbcbeb..381aefc 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatArchiveOutMapper.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchiveOutMapper.java
@@ -1,7 +1,7 @@
-package com.smartor.mapper;
+package com.ruoyi.patarchive.mapper;
 
-import com.smartor.domain.PatArchiveOut;
-import com.smartor.domain.PerSonWorkbenchDto;
+import com.ruoyi.patarchive.domain.PatArchiveOut;
+import com.ruoyi.patarchive.domain.PerSonWorkbenchDto;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
diff --git a/smartor/src/main/java/com/smartor/mapper/PatArchivecontactMapper.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchivecontactMapper.java
similarity index 97%
rename from smartor/src/main/java/com/smartor/mapper/PatArchivecontactMapper.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchivecontactMapper.java
index f352629..859d57c 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatArchivecontactMapper.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchivecontactMapper.java
@@ -1,4 +1,4 @@
-package com.smartor.mapper;
+package com.ruoyi.patarchive.mapper;
 
 import org.apache.ibatis.annotations.Mapper;
 
diff --git a/smartor/src/main/java/com/smartor/mapper/PatArchivetagMapper.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchivetagMapper.java
similarity index 97%
rename from smartor/src/main/java/com/smartor/mapper/PatArchivetagMapper.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchivetagMapper.java
index 1787eb6..680b0c0 100644
--- a/smartor/src/main/java/com/smartor/mapper/PatArchivetagMapper.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/PatArchivetagMapper.java
@@ -1,4 +1,4 @@
-package com.smartor.mapper;
+package com.ruoyi.patarchive.mapper;
 
 import java.util.List;
 import java.util.Map;
diff --git a/smartor/src/main/java/com/smartor/mapper/ShardingMapper.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/ShardingMapper.java
similarity index 82%
rename from smartor/src/main/java/com/smartor/mapper/ShardingMapper.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/ShardingMapper.java
index aa83efa..76da947 100644
--- a/smartor/src/main/java/com/smartor/mapper/ShardingMapper.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/mapper/ShardingMapper.java
@@ -1,7 +1,7 @@
-package com.smartor.mapper;
+package com.ruoyi.patarchive.mapper;
 
-import com.smartor.domain.PatArchiveOthreInfo;
-import com.smartor.domain.PatArchiveReq;
+import com.ruoyi.patarchive.domain.PatArchiveOthreInfo;
+import com.ruoyi.patarchive.domain.PatArchiveReq;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
diff --git a/smartor/src/main/java/com/smartor/service/IPatArchiveImportService.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveImportService.java
similarity index 94%
rename from smartor/src/main/java/com/smartor/service/IPatArchiveImportService.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveImportService.java
index 567d664..0f6e15f 100644
--- a/smartor/src/main/java/com/smartor/service/IPatArchiveImportService.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveImportService.java
@@ -1,9 +1,9 @@
-package com.smartor.service;
+package com.ruoyi.patarchive.service;
 
 import java.util.List;
 
 import com.ruoyi.common.core.domain.entity.SysUser;
-import com.smartor.domain.PatArchiveImport;
+import com.ruoyi.patarchive.domain.PatArchiveImport;
 import org.springframework.web.multipart.MultipartFile;
 
 /**
diff --git a/smartor/src/main/java/com/smartor/service/IPatArchiveOutService.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveOutService.java
similarity index 92%
rename from smartor/src/main/java/com/smartor/service/IPatArchiveOutService.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveOutService.java
index fc51dcc..d23e6b6 100644
--- a/smartor/src/main/java/com/smartor/service/IPatArchiveOutService.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveOutService.java
@@ -1,6 +1,6 @@
-package com.smartor.service;
+package com.ruoyi.patarchive.service;
 
-import com.smartor.domain.PatArchiveOut;
+import com.ruoyi.patarchive.domain.PatArchiveOut;
 
 import java.util.List;
 
diff --git a/smartor/src/main/java/com/smartor/service/IPatArchiveService.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveService.java
similarity index 89%
rename from smartor/src/main/java/com/smartor/service/IPatArchiveService.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveService.java
index 8537b60..c8b492c 100644
--- a/smartor/src/main/java/com/smartor/service/IPatArchiveService.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchiveService.java
@@ -1,14 +1,18 @@
-package com.smartor.service;
+package com.ruoyi.patarchive.service;
 
 import java.util.List;
 
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysUser;
-import com.smartor.domain.*;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.multipart.MultipartFile;
 import com.ruoyi.common.core.domain.entity.PatArchive;
+import com.ruoyi.patarchive.domain.PatArchiveOthreInfo;
+import com.ruoyi.patarchive.domain.PatArchiveReq;
+import com.ruoyi.patarchive.domain.PatArchiveVO;
+import com.ruoyi.patarchive.domain.PatArchivetagAndPatientInfo;
+import com.ruoyi.patarchive.domain.PatUpInfoVO;
 
 /**
  * 鎮h�呮。妗圫ervice鎺ュ彛
diff --git a/smartor/src/main/java/com/smartor/service/IPatArchivecontactService.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchivecontactService.java
similarity index 97%
rename from smartor/src/main/java/com/smartor/service/IPatArchivecontactService.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchivecontactService.java
index 820226b..4f85876 100644
--- a/smartor/src/main/java/com/smartor/service/IPatArchivecontactService.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchivecontactService.java
@@ -1,4 +1,4 @@
-package com.smartor.service;
+package com.ruoyi.patarchive.service;
 
 
 import java.util.List;
diff --git a/smartor/src/main/java/com/smartor/service/IPatArchivetagService.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchivetagService.java
similarity index 92%
rename from smartor/src/main/java/com/smartor/service/IPatArchivetagService.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchivetagService.java
index 5a97e09..7da93e9 100644
--- a/smartor/src/main/java/com/smartor/service/IPatArchivetagService.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/IPatArchivetagService.java
@@ -1,9 +1,9 @@
-package com.smartor.service;
+package com.ruoyi.patarchive.service;
 
 import java.util.List;
 
 import com.ruoyi.common.core.page.TableDataInfo;
-import com.smartor.domain.PatArchivetagAndPatientInfo;
+import com.ruoyi.patarchive.domain.PatArchivetagAndPatientInfo;
 import com.ruoyi.common.core.domain.entity.PatArchivetag;
 
 /**
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveImportServiceImpl.java
similarity index 97%
rename from smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveImportServiceImpl.java
index a778218..93a9705 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveImportServiceImpl.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveImportServiceImpl.java
@@ -1,12 +1,12 @@
-package com.smartor.service.impl;
+package com.ruoyi.patarchive.service.impl;
 
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.core.domain.entity.SysUserRole;
-import com.smartor.domain.PatArchiveImport;
-import com.smartor.mapper.PatArchiveImportMapper;
-import com.smartor.service.IPatArchiveImportService;
+import com.ruoyi.patarchive.domain.PatArchiveImport;
+import com.ruoyi.patarchive.mapper.PatArchiveImportMapper;
+import com.ruoyi.patarchive.service.IPatArchiveImportService;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.ObjectUtils;
 import org.apache.poi.ss.usermodel.Cell;
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveOutServiceImpl.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveOutServiceImpl.java
similarity index 90%
rename from smartor/src/main/java/com/smartor/service/impl/PatArchiveOutServiceImpl.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveOutServiceImpl.java
index 7ea6f42..be2a4df 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveOutServiceImpl.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveOutServiceImpl.java
@@ -1,9 +1,9 @@
-package com.smartor.service.impl;
+package com.ruoyi.patarchive.service.impl;
 
 import com.ruoyi.common.utils.DateUtils;
-import com.smartor.domain.PatArchiveOut;
-import com.smartor.mapper.PatArchiveOutMapper;
-import com.smartor.service.IPatArchiveOutService;
+import com.ruoyi.patarchive.domain.PatArchiveOut;
+import com.ruoyi.patarchive.mapper.PatArchiveOutMapper;
+import com.ruoyi.patarchive.service.IPatArchiveOutService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveServiceImpl.java
similarity index 97%
rename from smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveServiceImpl.java
index 68499f1..61b131f 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchiveServiceImpl.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchiveServiceImpl.java
@@ -1,4 +1,4 @@
-package com.smartor.service.impl;
+package com.ruoyi.patarchive.service.impl;
 
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.core.redis.RedisCache;
@@ -6,16 +6,12 @@
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.DtoConversionUtils;
 import com.ruoyi.common.utils.StringUtils;
-import com.smartor.domain.*;
 import com.ruoyi.outpatientvisit.domain.PatMedOuthospQueryReq;
 import com.ruoyi.outpatientvisit.domain.PatMedOuthosp;
 import com.ruoyi.inhospvisit.domain.PatMedInhosp;
-import com.smartor.mapper.*;
 import com.ruoyi.outpatientvisit.mapper.PatMedOuthospMapper;
-import com.smartor.service.IPatArchiveService;
-import com.smartor.service.IPatMedInhospService;
-import com.smartor.service.IPatMedOuthospService;
-import com.smartor.service.IPatMedPhysicalService;
+import com.ruoyi.patarchive.service.IPatArchiveService;
+import com.ruoyi.inhospvisit.api.InhospVisitFacade;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
 import org.apache.commons.lang3.ObjectUtils;
@@ -50,6 +46,15 @@
 import com.ruoyi.task.domain.entity.ServiceSubtaskEntity;
 import com.ruoyi.task.domain.ServiceSubtask;
 import com.ruoyi.task.mapper.ServiceSubtaskMapper;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
+import com.ruoyi.patarchive.domain.PatArchiveOthreInfo;
+import com.ruoyi.patarchive.domain.PatArchiveReq;
+import com.ruoyi.patarchive.domain.PatArchiveVO;
+import com.ruoyi.patarchive.mapper.PatArchivecontactMapper;
+import com.ruoyi.patarchive.domain.PatArchivetagAndPatientInfo;
+import com.ruoyi.patarchive.mapper.PatArchivetagMapper;
+import com.ruoyi.patarchive.service.impl.PatArchivetagServiceImpl;
+import com.ruoyi.patarchive.domain.PatUpInfoVO;
 /**
  * 鎮h�呮。妗圫ervice涓氬姟灞傚鐞�
  *
@@ -72,7 +77,7 @@
     private PatArchivetagMapper patArchivetagMapper;
 
     @Autowired
-    private IPatMedInhospService patMedInhospService;
+    private InhospVisitFacade inhospVisitFacade;
 
     @Autowired
     private PatArchivecontactMapper patArchivecontactMapper;
@@ -730,7 +735,7 @@
         //閫氳繃鎮h�呰幏鍙栭棬璇婁俊鎭�
         PatMedInhosp patMedInhosp = new PatMedInhosp();
         patMedInhosp.setInhospno(pid);
-        List<PatMedInhosp> patMedInhosps = patMedInhospService.selectPatMedInhospList(patMedInhosp);
+        List<PatMedInhosp> patMedInhosps = inhospVisitFacade.selectPatMedInhospList(patMedInhosp);
         objectList.addAll(patMedInhosps);
 
 
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchivecontactServiceImpl.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchivecontactServiceImpl.java
similarity index 93%
rename from smartor/src/main/java/com/smartor/service/impl/PatArchivecontactServiceImpl.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchivecontactServiceImpl.java
index 898d8c4..0766ac2 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchivecontactServiceImpl.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchivecontactServiceImpl.java
@@ -1,8 +1,8 @@
-package com.smartor.service.impl;
+package com.ruoyi.patarchive.service.impl;
 
 import com.ruoyi.common.utils.DateUtils;
-import com.smartor.mapper.PatArchivecontactMapper;
-import com.smartor.service.IPatArchivecontactService;
+import com.ruoyi.patarchive.mapper.PatArchivecontactMapper;
+import com.ruoyi.patarchive.service.IPatArchivecontactService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatArchivetagServiceImpl.java b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchivetagServiceImpl.java
similarity index 92%
rename from smartor/src/main/java/com/smartor/service/impl/PatArchivetagServiceImpl.java
rename to ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchivetagServiceImpl.java
index e0be8ee..f85807e 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatArchivetagServiceImpl.java
+++ b/ruoyi-patarchive/src/main/java/com/ruoyi/patarchive/service/impl/PatArchivetagServiceImpl.java
@@ -1,8 +1,8 @@
-package com.smartor.service.impl;
+package com.ruoyi.patarchive.service.impl;
 
 import com.ruoyi.common.utils.DateUtils;
-import com.smartor.mapper.PatArchivetagMapper;
-import com.smartor.service.IPatArchivetagService;
+import com.ruoyi.patarchive.mapper.PatArchivetagMapper;
+import com.ruoyi.patarchive.service.IPatArchivetagService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveImportMapper.xml
similarity index 95%
rename from smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml
rename to ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveImportMapper.xml
index 171c9f5..2063f1e 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveImportMapper.xml
+++ b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveImportMapper.xml
@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.PatArchiveImportMapper">
+<mapper namespace="com.ruoyi.patarchive.mapper.PatArchiveImportMapper">
 
-    <resultMap type="com.smartor.domain.PatArchiveImport" id="PatArchiveImportResult">
+    <resultMap type="com.ruoyi.patarchive.domain.PatArchiveImport" id="PatArchiveImportResult">
         <result property="id" column="id"/>
         <result property="patientno" column="patientno"/>
         <result property="pattype" column="pattype"/>
@@ -51,7 +51,7 @@
         from pat_archive_import
     </sql>
 
-    <select id="selectPatArchiveImportList" parameterType="com.smartor.domain.PatArchiveImport"
+    <select id="selectPatArchiveImportList" parameterType="com.ruoyi.patarchive.domain.PatArchiveImport"
             resultMap="PatArchiveImportResult">
         <include refid="selectPatArchiveImportVo"/>
         where 1=1
@@ -98,7 +98,7 @@
         where id = #{id}
     </select>
 
-    <insert id="insertPatArchiveImport" parameterType="com.smartor.domain.PatArchiveImport" useGeneratedKeys="true"
+    <insert id="insertPatArchiveImport" parameterType="com.ruoyi.patarchive.domain.PatArchiveImport" useGeneratedKeys="true"
             keyProperty="id">
         insert into pat_archive_import
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -175,7 +175,7 @@
         </trim>
     </insert>
 
-    <update id="updatePatArchiveImport" parameterType="com.smartor.domain.PatArchiveImport">
+    <update id="updatePatArchiveImport" parameterType="com.ruoyi.patarchive.domain.PatArchiveImport">
         update pat_archive_import
         <trim prefix="SET" suffixOverrides=",">
             <if test="patientno != null">patientno =
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveMapper.xml
similarity index 98%
rename from smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
rename to ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveMapper.xml
index 63cfe9d..2f038f0 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveMapper.xml
+++ b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveMapper.xml
@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.PatArchiveMapper">
+<mapper namespace="com.ruoyi.patarchive.mapper.PatArchiveMapper">
 
     <resultMap type="com.ruoyi.common.core.domain.entity.PatArchive" id="PatArchiveResult">
         <result property="id" column="id"/>
@@ -67,7 +67,7 @@
     </resultMap>
 
 
-    <resultMap type="com.smartor.domain.PatArchiveOthreInfo" id="PatArchiveOthreInfoResult">
+    <resultMap type="com.ruoyi.patarchive.domain.PatArchiveOthreInfo" id="PatArchiveOthreInfoResult">
         <result property="id" column="id"/>
         <result property="notrequiredFlag" column="notrequired_flag"/>
         <result property="notrequiredreason" column="notrequiredreason"/>
@@ -218,7 +218,7 @@
     </select>
 
 
-    <select id="patInfoByContion" parameterType="com.smartor.domain.PatArchiveReq" resultMap="PatArchiveResult">
+    <select id="patInfoByContion" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq" resultMap="PatArchiveResult">
         select
         a.id,
         a.age_unit,
@@ -480,7 +480,7 @@
         </foreach>
     </update>
 
-    <select id="selectPatArchiveInfoByAllhosp" parameterType="com.smartor.domain.PatArchiveReq"
+    <select id="selectPatArchiveInfoByAllhosp" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
 
         SELECT
@@ -549,7 +549,7 @@
     </select>
 
 
-    <select id="selectPatArchiveInfoByInhosp" parameterType="com.smartor.domain.PatArchiveReq"
+    <select id="selectPatArchiveInfoByInhosp" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
         select
         a.id,
@@ -691,7 +691,7 @@
 
     </select>
 
-    <select id="selectPatArchiveInfoByOuthosp" parameterType="com.smartor.domain.PatArchiveReq"
+    <select id="selectPatArchiveInfoByOuthosp" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
         select
         a.id,
@@ -784,7 +784,7 @@
         <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
     </select>
 
-    <select id="selectPatArchiveInfoByPhysical" parameterType="com.smartor.domain.PatArchiveReq"
+    <select id="selectPatArchiveInfoByPhysical" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
 
         select
@@ -875,7 +875,7 @@
         <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>
     </select>
 
-    <select id="selectPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq"
+    <select id="selectPatArchiveInfoByInhospQC" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
         select * from (
         select
@@ -1020,7 +1020,7 @@
         ) as tmp
     </select>
 
-<!--    <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq"-->
+<!--    <select id="selectPatArchiveInfoByOuthospQC" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq"-->
 <!--            resultMap="PatArchiveOthreInfoResult">-->
 
 <!--        select-->
@@ -1111,7 +1111,7 @@
 <!--        <if test="pageSize != null  and pageNum != null">limit ${pageSize} OFFSET ${pageNum}</if>-->
 <!--    </select>-->
 
-    <select id="selectPatArchiveInfoByPhysicalQC" parameterType="com.smartor.domain.PatArchiveReq"
+    <select id="selectPatArchiveInfoByPhysicalQC" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq"
             resultMap="PatArchiveOthreInfoResult">
 
         select
@@ -1203,7 +1203,7 @@
     </select>
 
     <!-- 浣忛櫌鎮h�呮�绘暟缁熻锛堝幓閲嶏級 -->
-    <select id="countPatArchiveInfoByInhospQC" parameterType="com.smartor.domain.PatArchiveReq" resultType="long">
+    <select id="countPatArchiveInfoByInhospQC" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq" resultType="long">
         SELECT COUNT(DISTINCT d.patid)
         FROM pat_med_inhosp d
         WHERE 1=1
@@ -1257,7 +1257,7 @@
     </select>
 
     <!-- 闂ㄨ瘖鎮h�呮�绘暟缁熻锛堝幓閲嶏級 -->
-<!--    <select id="countPatArchiveInfoByOuthospQC" parameterType="com.smartor.domain.PatArchiveReq" resultType="long">-->
+<!--    <select id="countPatArchiveInfoByOuthospQC" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq" resultType="long">-->
 <!--        SELECT COUNT(DISTINCT a.id)-->
 <!--        FROM pat_med_outhosp d-->
 <!--        JOIN pat_archive a ON a.id = d.patid-->
@@ -1290,7 +1290,7 @@
 <!--    </select>-->
 
     <!-- 浣撴鎮h�呮�绘暟缁熻锛堝幓閲嶏級 -->
-    <select id="countPatArchiveInfoByPhysicalQC" parameterType="com.smartor.domain.PatArchiveReq" resultType="long">
+    <select id="countPatArchiveInfoByPhysicalQC" parameterType="com.ruoyi.patarchive.domain.PatArchiveReq" resultType="long">
         SELECT COUNT(DISTINCT a.id)
         FROM pat_med_physical d
         JOIN pat_archive a ON a.id = d.patid
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveOutMapper.xml
similarity index 95%
rename from smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
rename to ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveOutMapper.xml
index ecb4b41..7b910fa 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchiveOutMapper.xml
+++ b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchiveOutMapper.xml
@@ -2,9 +2,9 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.PatArchiveOutMapper">
+<mapper namespace="com.ruoyi.patarchive.mapper.PatArchiveOutMapper">
 
-    <resultMap type="com.smartor.domain.PatArchiveOut" id="PatArchiveOutResult">
+    <resultMap type="com.ruoyi.patarchive.domain.PatArchiveOut" id="PatArchiveOutResult">
         <result property="patid" column="patid"/>
         <result property="patientno" column="patientno"/>
         <result property="pattype" column="pattype"/>
@@ -73,7 +73,7 @@
         from pat_archive_out
     </sql>
 
-    <select id="selectPatArchiveOutList" parameterType="com.smartor.domain.PatArchiveOut"
+    <select id="selectPatArchiveOutList" parameterType="com.ruoyi.patarchive.domain.PatArchiveOut"
             resultMap="PatArchiveOutResult">
         <include refid="selectPatArchiveOutVo"/>
         where 1=1
@@ -111,7 +111,7 @@
         where patid = #{patid}
     </select>
 
-    <select id="selectPatArchiveCount" parameterType="Long" resultType="com.smartor.domain.PerSonWorkbenchDto">
+    <select id="selectPatArchiveCount" parameterType="Long" resultType="com.ruoyi.patarchive.domain.PerSonWorkbenchDto">
         select aa.name1 as name, aa.count as count
         from (
         SELECT "浣忛櫌" as name1, count(1) as count FROM `pat_med_inhosp`
@@ -151,7 +151,7 @@
 
     </select>
 
-    <insert id="insertPatArchiveOut" parameterType="com.smartor.domain.PatArchiveOut" useGeneratedKeys="true"
+    <insert id="insertPatArchiveOut" parameterType="com.ruoyi.patarchive.domain.PatArchiveOut" useGeneratedKeys="true"
             keyProperty="patid">
         insert into pat_archive_out
         <trim prefix="(" suffix=")" suffixOverrides=",">
@@ -220,7 +220,7 @@
         </trim>
     </insert>
 
-    <update id="updatePatArchiveOut" parameterType="com.smartor.domain.PatArchiveOut">
+    <update id="updatePatArchiveOut" parameterType="com.ruoyi.patarchive.domain.PatArchiveOut">
         update pat_archive_out
         <trim prefix="SET" suffixOverrides=",">
             <if test="patientno != null">patientno = #{patientno},</if>
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchivecontactMapper.xml b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchivecontactMapper.xml
similarity index 98%
rename from smartor/src/main/resources/mapper/smartor/PatArchivecontactMapper.xml
rename to ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchivecontactMapper.xml
index f2b7dce..4fca45e 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchivecontactMapper.xml
+++ b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchivecontactMapper.xml
@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.PatArchivecontactMapper">
+<mapper namespace="com.ruoyi.patarchive.mapper.PatArchivecontactMapper">
 
     <resultMap type="com.ruoyi.common.core.domain.entity.PatArchivecontact" id="PatArchivecontactResult">
         <result property="id" column="id"/>
diff --git a/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchivetagMapper.xml
similarity index 98%
rename from smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml
rename to ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchivetagMapper.xml
index 9f0aba9..c6eab21 100644
--- a/smartor/src/main/resources/mapper/smartor/PatArchivetagMapper.xml
+++ b/ruoyi-patarchive/src/main/resources/mapper/patarchive/PatArchivetagMapper.xml
@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.PatArchivetagMapper">
+<mapper namespace="com.ruoyi.patarchive.mapper.PatArchivetagMapper">
 
     <resultMap type="com.ruoyi.common.core.domain.entity.PatArchivetag" id="PatArchivetagResult">
         <result property="id" column="id"/>
diff --git a/smartor/src/main/resources/mapper/smartor/ShardingMapper.xml b/ruoyi-patarchive/src/main/resources/mapper/patarchive/ShardingMapper.xml
similarity index 91%
rename from smartor/src/main/resources/mapper/smartor/ShardingMapper.xml
rename to ruoyi-patarchive/src/main/resources/mapper/patarchive/ShardingMapper.xml
index 3bba44f..36379d7 100644
--- a/smartor/src/main/resources/mapper/smartor/ShardingMapper.xml
+++ b/ruoyi-patarchive/src/main/resources/mapper/patarchive/ShardingMapper.xml
@@ -2,7 +2,7 @@
 <!DOCTYPE mapper
         PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.ShardingMapper">
+<mapper namespace="com.ruoyi.patarchive.mapper.ShardingMapper">
     <select id="getTableCount" resultType="long">
         SELECT count(*)
         FROM ${tableName}
diff --git a/ruoyi-phone/pom.xml b/ruoyi-phone/pom.xml
index e42306b..60c91be 100644
--- a/ruoyi-phone/pom.xml
+++ b/ruoyi-phone/pom.xml
@@ -70,6 +70,12 @@
             <version>4.0.1</version>
             <scope>provided</scope>
         </dependency>
+    
+        <!-- 2026-11锛氬弬鏁伴厤缃敼鐩存帴娉ㄥ叆 ISysConfigService -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-system</artifactId>
+        </dependency>
     </dependencies>
 
 </project>
diff --git a/ruoyi-phone/src/main/java/com/ruoyi/phone/PhoneModule.java b/ruoyi-phone/src/main/java/com/ruoyi/phone/PhoneModule.java
index 74cfbf6..0e2b76a 100644
--- a/ruoyi-phone/src/main/java/com/ruoyi/phone/PhoneModule.java
+++ b/ruoyi-phone/src/main/java/com/ruoyi/phone/PhoneModule.java
@@ -1,5 +1,6 @@
 package com.ruoyi.phone;
 
+import com.ruoyi.system.service.ISysConfigService;
 /**
  * 鐢佃瘽妯″潡鍖呮牴銆�
  *
@@ -23,9 +24,9 @@
  * <ul>
  *   <li>浠诲姟鏁版嵁 鈫� {@code com.ruoyi.task.api.TaskSubtaskApi}锛堝綊灞炴ā鍧楀唴瀹炵幇锛屾湰妯″潡鍙皟 API锛夛紱</li>
  *   <li>妯℃澘璇濇湳 鈫� {@code com.ruoyi.template.service} 涓嬬殑 service 鎺ュ彛锛�</li>
- *   <li>鍙戦�佹柟寮忕姸鎬� 鈫� {@code com.ruoyi.task.api.spi.TaskPreachformPort}锛�</li>
- *   <li>褰曢煶涓嬭浇 鈫� {@code com.ruoyi.task.api.spi.TaskFtpPort}锛�</li>
- *   <li>鍙傛暟閰嶇疆 鈫� {@code com.ruoyi.task.api.spi.TaskSysConfigPort}锛�</li>
+ *   <li>鍙戦�佹柟寮忕姸鎬� 鈫� {@code com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper}锛堣琛� 2026-11 宸插綊 ruoyi-task锛夛紱</li>
+ *   <li>褰曢煶涓嬭浇 鈫� {@code com.ruoyi.common.utils.FtpService}锛�2026-11 宸蹭粠 smartor 涓嬫矇鍒� common锛夛紱</li>
+ *   <li>鍙傛暟閰嶇疆 鈫� {@code com.ruoyi.task.api.spi.ISysConfigService}锛�</li>
  *   <li>AI 閫夐」鍖归厤 鈫� {@code com.ruoyi.common.core.service.SubtaskOptionMatchApi}锛坮uoyi-common 濂戠害锛夈��</li>
  * </ul>
  *
diff --git a/ruoyi-phone/src/main/java/com/ruoyi/phone/service/impl/PhoneServiceImpl.java b/ruoyi-phone/src/main/java/com/ruoyi/phone/service/impl/PhoneServiceImpl.java
index b6e3e55..4e52de5 100644
--- a/ruoyi-phone/src/main/java/com/ruoyi/phone/service/impl/PhoneServiceImpl.java
+++ b/ruoyi-phone/src/main/java/com/ruoyi/phone/service/impl/PhoneServiceImpl.java
@@ -18,9 +18,8 @@
 import com.ruoyi.phone.domain.QuestionMessage;
 import com.ruoyi.phone.service.IPhoneService;
 import com.ruoyi.task.api.TaskSubtaskApi;
-import com.ruoyi.task.api.spi.TaskFtpPort;
-import com.ruoyi.task.api.spi.TaskPreachformPort;
-import com.ruoyi.task.api.spi.TaskSysConfigPort;
+import com.ruoyi.common.utils.FtpService;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
 import com.ruoyi.task.domain.IvrTaskVisitResult;
 import com.ruoyi.task.domain.ServiceSubTaskDetailReq;
 import com.ruoyi.task.domain.ServiceSubtask;
@@ -60,6 +59,7 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.stream.Collectors;
+import com.ruoyi.system.service.ISysConfigService;
 
 /**
  * 鐢佃瘽涓氬姟Service瀹炵幇锛堝師 {@code ruoyi-task} 閲� {@code ServiceSubtaskServiceImpl} 鐨勭數璇濋儴鍒嗭級銆�
@@ -110,19 +110,21 @@
      * 璇ヨ〃褰� ruoyi-inhospvisit锛岀敱 smartor 渚ч�傞厤瀹炵幇鏈鍙c��
      */
     @Autowired
-    private TaskPreachformPort taskPreachformPort;
+    private ServiceSubtaskPreachformMapper taskPreachformPort;
 
     /**
      * 褰曢煶鏂囦欢涓嬭浇锛堥洦缁�氳瘽璁板綍鍥炶皟閲屾妸褰撳ぉ褰曢煶浠� FTP 鎷夊洖鏈湴锛�
+     * <p>2026-11锛歿@code FtpService} 宸蹭粠 smartor 涓嬫矇鍒� {@code ruoyi-common}锛�
+     * 鍘熸潵鐨勮繃娓$鍙� {@code TaskFtpPort} 闅忎箣鍒犻櫎锛岃繖閲岀洿鎺ユ敞鍏ラ�氱敤宸ュ叿銆�
      */
     @Autowired
-    private TaskFtpPort taskFtpPort;
+    private FtpService ftpService;
 
     /**
      * 鍙傛暟閰嶇疆璇诲彇锛坽@code sys.voice.match.ai.url}锛欰I 閫夐」鍖归厤鏈嶅姟鍦板潃锛屾寜鏈烘瀯閰嶇疆锛�
      */
     @Autowired
-    private TaskSysConfigPort taskSysConfigPort;
+    private ISysConfigService sysConfigService;
 
     /**
      * AI 閫夐」鍖归厤濂戠害锛坮uoyi-common锛屽疄鐜板湪 ruoyi-task锛屽嵆鍘� {@code matchOptionIndex}锛�
@@ -700,7 +702,7 @@
                 //鐢ㄦ潵鏍囪锛屾槸鍚︽湁鍖归厤涓婄殑
                 Integer flag = 0;
                 //1-AI璇嗗埆
-                String url = taskSysConfigPort.selectConfigValue("sys.voice.match.ai.url", phoneCallReqYQVO.getOrgid());
+                String url = sysConfigService.selectConfigByKey("sys.voice.match.ai.url", phoneCallReqYQVO.getOrgid());
 
                 if (ObjectUtils.isNotEmpty(url)) {
                     PhoneCallBackYQVO aiMatchResult = AiMatch(url, phoneCallReqYQVO, phoneCallBackYQVO, ivrTaskTemplateScriptVO, serviceSubtask, ivrTaskTemplate, ivrTaskTemplateScripts, scriptId, flag, phoneCallReqYQVO.getUuid());
@@ -1415,7 +1417,7 @@
             taskSubtaskApi.updateSubtask(serviceSubtask);
             setFailPreachForm(serviceSubtask, StringUtils.isNotEmpty(serviceSubtask.getCurrentPreachform()) ? serviceSubtask.getCurrentPreachform() : "3", "鐢佃瘽鎷ㄦ墦宸插畬鎴�", "9");
             //涓嬭浇鏂囦欢
-            taskFtpPort.downloadFolder("/" + LocalDate.now().toString(), profile + "/upload/vadio/voice/" + LocalDate.now().toString());
+            ftpService.downloadFolder("/" + LocalDate.now().toString(), profile + "/upload/vadio/voice/" + LocalDate.now().toString());
             redisCache.deleteObject(phoneCallRecordVO.getTaskid() + "recordAccept-hungup");
         } else {
             //鎮h�呮嫆缁濋殢璁�
@@ -1652,7 +1654,7 @@
     public PhoneCallBackSHVO processResust(PhoneCallResultYQVO phoneCallResultYQVO) {
         PhoneCallBackSHVO phoneCallBackSHVO = new PhoneCallBackSHVO();
         //閫氳繃scriptid锛岃幏鍙栨墍鏈夌殑缁撴灉
-        String url = taskSysConfigPort.selectConfigValue("sys.voice.match.ai.url", phoneCallResultYQVO.getOrgid());
+        String url = sysConfigService.selectConfigByKey("sys.voice.match.ai.url", phoneCallResultYQVO.getOrgid());
         ServiceSubtask serviceSubtask = taskSubtaskApi.getSubtask(phoneCallResultYQVO.getSubId());
         IvrTaskTemplate ivrTaskTemplate = ivrTaskTemplateService.selectIvrTaskTemplateByID(serviceSubtask.getTemplateid());
         IvrTaskTemplateScriptVO ivrTaskTemplateScriptVO = iIvrTaskTemplateScriptService.getTaskTempScriptInfoByid(Long.valueOf(phoneCallResultYQVO.getScriptId()));
diff --git a/ruoyi-publicity/pom.xml b/ruoyi-publicity/pom.xml
index c90ee42..f72440c 100644
--- a/ruoyi-publicity/pom.xml
+++ b/ruoyi-publicity/pom.xml
@@ -36,6 +36,7 @@
             <artifactId>lombok</artifactId>
             <version>1.18.34</version>
         </dependency>
+    
     </dependencies>
 
 </project>
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/CollectHISController.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/CollectHISController.java
index 27e4cfd..89f413e 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/CollectHISController.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/controller/CollectHISController.java
@@ -5,9 +5,9 @@
 import com.ruoyi.common.core.domain.entity.SysDept;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.quartz.service.ICollectHISService;
-import com.smartor.domain.HnDataGatherVO;
-import com.smartor.domain.Icd10;
-import com.smartor.service.IHNGatherPatArchiveService;
+import com.ruoyi.datacollection.domain.HnDataGatherVO;
+import com.ruoyi.common.core.domain.entity.Icd10;
+import com.ruoyi.datacollection.service.IHNGatherPatArchiveService;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/CollectHISMapper.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/CollectHISMapper.java
index d22c9f0..81d31c2 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/CollectHISMapper.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/mapper/CollectHISMapper.java
@@ -19,6 +19,7 @@
 import java.util.List;
 import java.util.Map;
 import com.ruoyi.common.core.domain.entity.PatArchive;
+import com.ruoyi.common.core.domain.entity.Icd10;
 
 @DataSource(value = DataSourceType.SLAVE)
 @Mapper
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISService.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISService.java
index 1d888f5..9de9211 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISService.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/ICollectHISService.java
@@ -8,6 +8,8 @@
 
 import java.util.List;
 import com.ruoyi.common.core.domain.entity.PatArchive;
+import com.ruoyi.common.core.domain.entity.Icd10;
+import com.ruoyi.datacollection.domain.HnDataGatherVO;
 
 public interface ICollectHISService {
 
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
index 58d4d55..df63314 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/service/impl/CollectHISServiceImpl.java
@@ -39,6 +39,14 @@
 import com.ruoyi.task.domain.entity.ServiceSubtaskEntity;
 import com.ruoyi.task.domain.ServiceSubtask;
 import com.ruoyi.task.mapper.ServiceSubtaskMapper;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
+import com.ruoyi.common.core.domain.entity.Icd10;
+import com.ruoyi.common.mapper.Icd10Mapper;
+import com.ruoyi.system.mapper.ext.SysUser2Mapper;
+import com.ruoyi.system.mapper.ext.SysDept2Mapper;
+import com.ruoyi.system.mapper.ext.SysUserDeptMapper;
+import com.ruoyi.patarchive.mapper.ShardingMapper;
+import com.ruoyi.datacollection.domain.HnDataGatherVO;
 @Slf4j
 @Service
 public class CollectHISServiceImpl implements ICollectHISService {
diff --git a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
index 8cde35d..5340943 100644
--- a/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
+++ b/ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -76,6 +76,13 @@
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
 import com.ruoyi.task.service.IServiceSubtaskService;
 import com.ruoyi.task.domain.SendMagParam;
+import com.ruoyi.task.service.IServiceSubtaskRecordService;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
+import com.ruoyi.patarchive.service.IPatArchiveService;
+import com.ruoyi.datacollection.service.IXHGatherPatArchiveService;
+import com.ruoyi.datacollection.service.IServiceSLTDHealthcareRecordService;
+import com.ruoyi.datacollection.domain.ServiceSLTDInhospReqVO;
+import com.ruoyi.datacollection.domain.ServiceSLTDInhospResDTO;
 
 /**
  * 瀹氭椂浠诲姟璋冨害娴嬭瘯
@@ -1044,8 +1051,10 @@
      * 澶勭悊鎮h�呬俊鎭紝杩涘叆瀛愪换鍔¤〃(浠诲姟缁�)
      * <p>
      * 鈿狅笍 2025 淇锛堝紑鍏冲け鏁堬級锛氬師璧� smartor 閬楃暀瀹炵幇锛屼笉鍒ゅ紑鍏筹紙鍚� {@link #dealOutHospInfo()}锛夈��
-     * 鐜拌蛋妯″潡闂ㄩ潰銆傛敞鎰忔ā鍧椾晶鐨� {@code dealOutHospInfoBySchedule} 鍐呴儴浠嶄細杞彂鍥� smartor
-     * 锛坽@code OtherVisitApiBridge}锛岃璇ョ被娉ㄩ噴锛夛紝浣�<b>寮�鍏冲湪闂ㄩ潰杩欎竴灞傚垽</b>锛屾墍浠ュ叧闂椂涓嶄細璧板埌閭i噷銆�
+     * 鐜拌蛋妯″潡闂ㄩ潰銆傛ā鍧椾晶 {@code dealOutHospInfoBySchedule} 缁� {@code OtherVisitApi} 濂戠害
+     * 鍥炶皟 {@code ruoyi-task/api/contract/OtherVisitApiImpl}锛�2026-11 璧峰疄鐜版暣绨囨惉杩� task 妯″潡锛�
+     * smartor 渚х殑 {@code OtherVisitApiBridge} 宸插垹闄わ級锛屼絾<b>寮�鍏冲湪闂ㄩ潰杩欎竴灞傚垽</b>锛�
+     * 鎵�浠ュ叧闂椂涓嶄細璧板埌閭i噷銆�
      */
     public void dealOutHospInfoBySchedule() {
         String config = configService.selectConfigByKey("visit.early.day");
diff --git a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
index 2f1c169..f7e68b6 100644
--- a/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
+++ b/ruoyi-quartz/src/main/resources/mapper/quartz/CollectHISMapper.xml
@@ -93,7 +93,7 @@
     </resultMap>
 
 
-    <resultMap type="com.smartor.domain.PatArchiveOthreInfo" id="PatArchiveOthreInfoResult">
+    <resultMap type="com.ruoyi.patarchive.domain.PatArchiveOthreInfo" id="PatArchiveOthreInfoResult">
         <result property="id" column="id"/>
         <result property="notrequiredFlag" column="notrequired_flag"/>
         <result property="notrequiredreason" column="notrequiredreason"/>
@@ -259,7 +259,7 @@
     </resultMap>
 
 
-    <resultMap type="com.smartor.domain.Icd10" id="Icd10Result">
+    <resultMap type="com.ruoyi.common.core.domain.entity.Icd10" id="Icd10Result">
         <result property="icdid" column="icdid"/>
         <result property="icdcode" column="icdcode"/>
         <result property="icdname" column="icdname"/>
@@ -736,7 +736,7 @@
     </select>
 
 
-    <select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result">
+    <select id="selectIcd10List" parameterType="com.ruoyi.common.core.domain.entity.Icd10" resultMap="Icd10Result">
         select
         icdcode,
         his_icdid,
diff --git a/ruoyi-task/pom.xml b/ruoyi-task/pom.xml
index 8b62b72..8656555 100644
--- a/ruoyi-task/pom.xml
+++ b/ruoyi-task/pom.xml
@@ -93,6 +93,12 @@
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-othervisit</artifactId>
         </dependency>
+    
+        <!-- 2026-11锛歍askSysConfig/TaskSysDept/TaskSysUserDept 涓変釜绔彛鍒犻櫎锛岀洿鎺ヤ緷璧� system -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-system</artifactId>
+        </dependency>
     </dependencies>
 
 </project>
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskFtpPort.java b/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskFtpPort.java
deleted file mode 100644
index b571975..0000000
--- a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskFtpPort.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.ruoyi.task.api.spi;
-
-/**
- * FTP 涓嬭浇鑳藉姏 鈥斺�� <b>ruoyi-task 鐨勫澶� SPI锛岀敱 smartor 渚у疄鐜�</b>銆�
- *
- * <h3>鐢ㄩ��</h3>
- * 瀛愪换鍔$粺璁¢噷鏈変竴娈�"鎶婂綋澶╃殑褰曢煶鐩綍浠� FTP 鎷夊埌鏈湴"鐨勫姩浣�
- * 锛堝師 {@code ServiceSubtaskServiceImpl} L2859锛�
- * {@code ftpService.downloadFolder("/" + LocalDate.now(), profile + "/upload/vadio/voice/" + LocalDate.now())}锛夈��
- * {@code FtpService} 鏄� smartor 鐨勯�氱敤宸ュ叿锛屼笉灞炰换鍔″煙锛屽洜姝ょ粡鏈鍙e彇鐢ㄣ��
- *
- * <h3>涓轰粈涔堢鍙e湪 ruoyi-task 鑰屼笉鍦� ruoyi-common</h3>
- * 鏈鍙e彧琚� ruoyi-task 浣跨敤銆佷笖鍙傛暟鍏ㄦ槸鍩烘湰绫诲瀷锛屾病鏈�"澶氭柟鍏变韩鐨勫绾︾被鍨�"锛�
- * 鏀惧湪 ruoyi-task 鐨� {@code api.spi} 涓嬪嵆鍙紝涓嶅繀姹℃煋 ruoyi-common銆�
- * 鏂瑰悜浠嶆槸銆屾帴鍙e湪 ruoyi-task銆佸疄鐜板湪 smartor銆嶏紝缂栬瘧鏈熸棤鐜��
- *
- * <h3>鈿狅笍 瀹炵幇蹇呴』淇濇寔"绾浆鍙�"</h3>
- */
-public interface TaskFtpPort {
-
-    /**
-     * 閫掑綊涓嬭浇杩滅鐩綍鍒版湰鍦帮紙鍘� {@code FtpService#downloadFolder}锛夈��
-     *
-     * @param remoteDir 杩滅鐩綍
-     * @param localDir  鏈湴鐩綍
-     */
-    void downloadFolder(String remoteDir, String localDir);
-}
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskPreachformPort.java b/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskPreachformPort.java
deleted file mode 100644
index 0fe42dc..0000000
--- a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskPreachformPort.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package com.ruoyi.task.api.spi;
-
-import com.ruoyi.task.domain.ServiceSubtask;
-import com.ruoyi.task.domain.ServiceSubtaskPreachform;
-
-import java.util.List;
-
-/**
- * 瀛愪换鍔°�屾墽琛屾柟寮忔槑缁嗐�嶏紙{@code service_subtask_preachform}锛夎鍐欒兘鍔� 鈥斺��
- * <b>ruoyi-task 鐨勫澶� SPI锛岀敱 smartor 渚у疄鐜�</b>銆�
- *
- * <h3>涓轰粈涔堥渶瑕佸畠</h3>
- * 浠诲姟渚х殑 4 涓被锛坽@code ServiceSubtaskServiceImpl} / {@code ServiceTaskServiceImpl} /
- * {@code ServiceTaskScheduleServiceImpl} / {@code ScheduleSubtaskBuilder}锛夐兘瑕佽鍐欒繖寮犺〃锛�
- * 浣嗚琛ㄧ殑<b>褰掑睘妯″潡鏄� {@code ruoyi-inhospvisit}</b>锛堝凡鏀跺彛鍒� ruoyi-common 鐨�
- * {@code PreachformApi}锛夛紝ruoyi-task 涓嶈兘渚濊禆 smartor銆佷篃涓嶈鑷啓璇ヨ〃 SQL銆�
- *
- * <h3>鈿狅笍 杩欐槸銆愯繃娓°�戠鍙o紝褰㈡�佸埢鎰忎笌鏃� Mapper 涓�鑷�</h3>
- * 鏈鍙�<b>閫愭柟娉曢暅鍍�</b> smartor 鏃㈡湁鐨勶紙宸� {@code @Deprecated} 鐨勶級
- * {@code ServiceSubtaskPreachformMapper}锛氬悓鍚嶆柟娉曘�佸悓鍚嶅弬鏁般�佸悓杩斿洖绫诲瀷
- * 锛坽@code insert/update} 浠嶈繑鍥� {@code int}锛夈��
- * 杩欐牱閭� 4 涓被鎼繘 ruoyi-task 鏃�<b>鍙渶鎶婃敞鍏ョ殑瀛楁绫诲瀷鎹㈡垚鏈鍙o紝璋冪敤鐐逛竴琛岄兘涓嶇敤鏀�</b>锛�
- * 鎶�"鏀� 25 澶勮皟鐢ㄧ偣 + 閫愬鎹㈢被鍨�"鐨勯闄╅檷鍒版渶浣庛��
- * <p>
- * 涔嬫墍浠ヤ笉鐩存帴璁╁畠浠敞鍏� {@code PreachformApi}锛氶偅闇�瑕佹妸
- * {@code ServiceSubtaskPreachform} 鎹㈡垚 {@code VisitPreachformRow}銆�
- * 骞舵妸 {@code int} 杩斿洖鍊兼敼鎴� {@code boolean}锛屽叡绾� 25 澶勮皟鐢ㄧ偣锛�
- * 灞炵嫭绔嬬殑鏀跺彛鍔ㄤ綔锛堣 {@code doc/璺ㄦā鍧楁暟鎹闂師鍒欎笌鏀跺彛鏂规.md}锛夛紝涓嶅湪鏈鑼冨洿鍐呫��
- *
- * <h3>灏嗘潵鍔ㄤ綔</h3>
- * 寰� preachform 鍏ㄩ潰鏀跺彛鏃讹紝鎶婃湰绔彛涓� smartor 鐨� Bridge 涓�骞跺垹闄わ紝
- * 4 涓被鏀逛负鐩存帴娉ㄥ叆 {@code PreachformApi}銆�
- *
- * <h3>鈿狅笍 瀹炵幇蹇呴』淇濇寔"绾浆鍙�"</h3>
- * 瀹炵幇鏂瑰彧杞彂鍒版棦鏈� Mapper/Bridge锛�<b>涓嶅緱</b>鍔犲叆涓氬姟鍒ゆ柇鎴栧瓧娈佃ˉ榻愩��
- *
- * @see com.ruoyi.common.core.service.PreachformApi 璇ヨ〃鐪熸鐨勫綊灞炲绾�
- */
-public interface TaskPreachformPort {
-
-    /**
-     * 鎸変富閿煡锛堝師 {@code selectServiceSubtaskPreachformById}锛夈��
-     */
-    ServiceSubtaskPreachform selectServiceSubtaskPreachformById(Long id);
-
-    /**
-     * 鎸夋潯浠舵煡鍒楄〃锛堝師 {@code selectServiceSubtaskPreachformList}锛夈��
-     */
-    List<ServiceSubtaskPreachform> selectServiceSubtaskPreachformList(ServiceSubtaskPreachform query);
-
-    /**
-     * 鏂板锛堝師 {@code insertServiceSubtaskPreachform}锛夈��
-     *
-     * @return 鍙楀奖鍝嶈鏁帮紙涓庡師瀹炵幇涓�鑷达紝浠嶄负 {@code int}锛�
-     */
-    int insertServiceSubtaskPreachform(ServiceSubtaskPreachform row);
-
-    /**
-     * 鎸変富閿洿鏂帮紙鍘� {@code updateServiceSubtaskPreachform}锛夈��
-     */
-    int updateServiceSubtaskPreachform(ServiceSubtaskPreachform row);
-
-    /**
-     * 鎸夋潯浠舵洿鏂帮紙鍘� {@code updateSSPByCondition}锛夈��
-     */
-    int updateSSPByCondition(ServiceSubtaskPreachform row);
-
-    /**
-     * 鎸� {@code subid} 鍒犻櫎璇ュ瓙浠诲姟鐨勬墍鏈夊彂閫佹柟寮忥紙鍘�
-     * {@code deleteServiceSubtaskPreachformBySubid}锛屽疄闄呮槸杞垹锛夈��
-     */
-    int deleteServiceSubtaskPreachformBySubid(Long subId);
-
-    /**
-     * 鎸� taskid/orgid 鏌ワ紙鍘� {@code selectBySubtask}锛涒殸锔� 鏂规硶鍚嶆槗璇В锛�
-     * 瀹冧笉鎸� subtask 涓婚敭鏌ワ紝瑙� {@code PreachformApi#findByTaskidAndOrgid}锛夈��
-     */
-    List<ServiceSubtaskPreachform> selectBySubtask(ServiceSubtask subtask);
-}
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSubtaskRecordPort.java b/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSubtaskRecordPort.java
deleted file mode 100644
index 355fd68..0000000
--- a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSubtaskRecordPort.java
+++ /dev/null
@@ -1,47 +0,0 @@
-package com.ruoyi.task.api.spi;
-
-import com.ruoyi.task.domain.ServiceSubtaskRecord;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 瀛愪换鍔°�屽彂閫佽褰曘�嶏紙{@code service_subtask_record}锛夎鍙栬兘鍔� 鈥斺��
- * <b>ruoyi-task 鐨勫澶� SPI锛岀敱 smartor 渚у疄鐜�</b>銆�
- *
- * <h3>涓轰粈涔堥渶瑕佸畠</h3>
- * {@code service_subtask_record} 杩欏紶琛�<b>涓嶅湪鏈妯″潡鍖栬寖鍥村唴</b>锛堝畠鐨� Mapper/XML/Service
- * 浠嶇暀鍦� smartor锛夛紝浣嗗畠鐨�<b>瀹炰綋绫诲瀷</b> {@link ServiceSubtaskRecord} 宸查殢
- * {@code ServiceSubtask} 鐨勫瓧娈� `List&lt;ServiceSubtaskRecord&gt; serviceSubtaskRecordList`
- * 涓�璧锋惉杩涗簡 ruoyi-task銆�
- * <p>
- * 浠诲姟渚э紙鍘� {@code ServiceSubtaskController} 鐨� 2 澶勮皟鐢級瑕佽杩欏紶琛紝
- * 鏁呯粡鏈鍙e彇鐢� 鈥斺�� 鏂瑰悜浠嶆槸銆屾帴鍙e湪 ruoyi-task銆佸疄鐜板湪 smartor銆嶏紝缂栬瘧鏈熸棤鐜��
- *
- * <h3>鈿狅笍 杩欐槸銆愯繃娓°�戠鍙o紝褰㈡�佸埢鎰忎笌鏃� Service 涓�鑷�</h3>
- * 閫愭柟娉曢暅鍍� smartor 鐨� {@code IServiceSubtaskRecordService} 涓换鍔′晶鐪熸鐢ㄥ埌鐨勯偅涓や釜鏂规硶
- * 锛堝悓鍚嶃�佸悓鍙傛暟銆佸悓杩斿洖绫诲瀷锛夛紝浣� Controller 鎼繘 ruoyi-task 鏃�
- * <b>鍙渶鎹㈡敞鍏ュ瓧娈电被鍨嬶紝璋冪敤鐐逛竴琛岄兘涓嶇敤鏀�</b>銆�
- *
- * <h3>灏嗘潵鍔ㄤ綔</h3>
- * 鑻ュ皢鏉� {@code service_subtask_record} 涔熺撼鍏ヤ换鍔℃ā鍧楋紝鏈鍙e嵆鍙垹闄わ紝
- * 鏀逛负妯″潡鍐呯洿鎺ヨ皟鐢ㄣ��
- *
- * <h3>鈿狅笍 瀹炵幇蹇呴』淇濇寔"绾浆鍙�"</h3>
- */
-public interface TaskSubtaskRecordPort {
-
-    /**
-     * 鎸夋潯浠舵煡鍙戦�佽褰曞垪琛紙鍘� {@code IServiceSubtaskRecordService#selectServiceSubtaskRecordList}锛夈��
-     */
-    List<ServiceSubtaskRecord> selectServiceSubtaskRecordList(ServiceSubtaskRecord query);
-
-    /**
-     * 鎸夊瓙浠诲姟 id 闆嗗悎鎵归噺鏌ュ彂閫佽褰曪紝鎸� subid 鍒嗙粍
-     * 锛堝師 {@code IServiceSubtaskRecordService#selectRecordMapBySubtaskIds}锛夈��
-     *
-     * @param subtaskIds 瀛愪换鍔� id 闆嗗悎
-     * @return subid -> 璇ュ瓙浠诲姟鐨勮褰曞垪琛�
-     */
-    Map<Long, List<ServiceSubtaskRecord>> selectRecordMapBySubtaskIds(List<Long> subtaskIds);
-}
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysConfigPort.java b/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysConfigPort.java
deleted file mode 100644
index f9c03d1..0000000
--- a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysConfigPort.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.ruoyi.task.api.spi;
-
-/**
- * 鍙傛暟閰嶇疆璇诲彇鑳藉姏 鈥斺�� <b>ruoyi-task 鐨勫澶� SPI锛岀敱 smartor 渚у疄鐜�</b>銆�
- *
- * <h3>鐢ㄩ��</h3>
- * 瀛愪换鍔$粺璁¢噷瑕佽 {@code sys_config} 鐨� {@code wj.sms.template} 鍙栧��
- * 锛堝師 {@code ServiceSubtaskServiceImpl} L5141-5146锛夛細
- * <pre>
- * SysConfig sysConfig = new SysConfig();
- * sysConfig = sysConfigMapper.checkConfigKeyUnique("wj.sms.template");
- * if (!Objects.isNull(sysConfig)) { String smsContemt = sysConfig.getConfigValue(); ... }
- * </pre>
- * {@code sys_config} 灞炵郴缁熷煙銆俽uoyi-task 鑷繁鐨勬ā鍧楀紑鍏宠鍙傛暟璧�
- * {@code ruoyi-common} 鐨� {@code IConfigService}锛涗絾杩欓噷鍘熸湰璧扮殑鏄�
- * {@code SysConfigMapper#checkConfigKeyUnique}锛堣繑鍥炴暣琛岋級锛�
- * 涓斿彧鐢ㄥ埌 {@code configValue} 涓�涓瓧娈碉紝鏁呮敹鎴愪竴涓�<b>鍙繑鍥炲��</b>鐨勭鍙c��
- *
- * <h3>鈿狅笍 鍏充簬"琛屽瓨鍦ㄤ絾鍊间负 null"鐨勮竟鐣�</h3>
- * 鍘熷垽瀹氭槸"琛屽瓨鍦�"锛坽@code !isNull(sysConfig)}锛夛紝鏈鍙e垽瀹氭槸"鍊奸潪 null"銆�
- * 浜岃�呭彧鍦� {@code sys_config} 瀛樺湪涓�琛屼笖 {@code config_value IS NULL} 鏃朵笉鍚� 鈥斺��
- * 鑰� RuoYi 鐨� {@code sys_config.config_value} 鏄� {@code varchar(500) NOT NULL DEFAULT ''}锛�
- * <b>璇ユ儏褰笉鍙兘鍑虹幇</b>锛屽洜姝よ涓虹瓑浠枫��
- * 锛堝疄鐜版柟鎸夊師鏍疯皟 {@code checkConfigKeyUnique} 鍚庡彇 {@code getConfigValue()}銆傦級
- *
- * <h3>鈿狅笍 瀹炵幇蹇呴』淇濇寔"绾浆鍙�"</h3>
- */
-public interface TaskSysConfigPort {
-
-    /**
-     * 鎸夊弬鏁伴敭鍚嶅彇鍙傛暟鍊硷紙鍘� {@code SysConfigMapper#checkConfigKeyUnique} + {@code getConfigValue()}锛夈��
-     *
-     * @param configKey 鍙傛暟閿悕
-     * @return 鍙傛暟鍊硷紱璇ラ敭涓嶅瓨鍦ㄦ椂杩斿洖 {@code null}
-     */
-    String findConfigValueByKey(String configKey);
-
-    /**
-     * 鎸夊弬鏁伴敭鍚嶅彇鍙傛暟鍊硷紙鍘� {@code ISysConfigService#selectConfigByKey(String)}锛夈��
-     * <p>
-     * 鈿狅笍 涓� {@link #findConfigValueByKey} <b>涓嶆槸鍚屼竴涓笢瑗�</b>锛屼笉瑕佸悎骞讹細
-     * 鍓嶈�呰蛋鐨勬槸 {@code SysConfigMapper#checkConfigKeyUnique}锛堟寜 key 鏌ユ暣琛岋級锛�
-     * 鏈柟娉曡蛋鐨勬槸 {@code ISysConfigService#selectConfigByKey}锛堝甫缂撳瓨銆佷笖鏀寔 orgid 缁村害锛夈��
-     * 涓よ�� SQL 涓嶅悓锛屽悎骞朵細鏀瑰彉鍙栧�兼潵婧� 鈥斺�� 鏁呭苟鍒椾繚鐣欍�佸悇鑷搴斿師璋冪敤銆�
-     *
-     * @param configKey 鍙傛暟閿悕
-     * @return 鍙傛暟鍊硷紱涓嶅瓨鍦ㄨ繑鍥� {@code StringUtils.EMPTY}锛堜笌鍘熷疄鐜颁竴鑷达紝涓嶆槸 null锛�
-     */
-    String selectConfigValue(String configKey);
-
-    /**
-     * 鎸夊弬鏁伴敭鍚� + 鏈烘瀯 id 鍙栧弬鏁板�硷紙鍘� {@code ISysConfigService#selectConfigByKey(String, String)}锛夈��
-     * <p>
-     * 鈿狅笍 璇� 2 鍙傞噸杞�<b>鍙湪 ruoyi-system 鐨� {@code ISysConfigService} 涓�</b>锛�
-     * 涓嶅湪 ruoyi-common 鐨� {@code IConfigService} 涓� 鈥斺�� 杩欎篃鏄负浠�涔堜笉鑳界畝鍗曞湴鎶�
-     * 璋冪敤鏂瑰瓧娈电被鍨嬫崲鎴� {@code IConfigService} 鏉ョ渷鎺変緷璧栥��
-     *
-     * @param configKey 鍙傛暟閿悕
-     * @param orgid     鏈烘瀯 id
-     * @return 鍙傛暟鍊硷紱涓嶅瓨鍦ㄨ繑鍥炵┖涓�
-     */
-    String selectConfigValue(String configKey, String orgid);
-}
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysDeptPort.java b/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysDeptPort.java
deleted file mode 100644
index 8068ab9..0000000
--- a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysDeptPort.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.ruoyi.task.api.spi;
-
-import com.ruoyi.common.core.domain.entity.SysDept;
-
-/**
- * 绉戝鏌ヨ鑳藉姏 鈥斺�� <b>ruoyi-task 鐨勫澶� SPI锛岀敱 smartor 渚у疄鐜�</b>銆�
- *
- * <h3>鐢ㄩ��</h3>
- * 浠诲姟鍒涘缓/瀛愪换鍔$粍瑁呮椂鎸夌瀹ょ紪鐮佸弽鏌ョ瀹や俊鎭�
- * 锛堝師 {@code SysDept2Mapper#selectDeptByCode(deptCode, orgid)}锛�
- * 瑙� {@code ServiceSubtaskServiceImpl} L1004 / L5488锛夈��
- * {@code sys_dept} 灞炵郴缁熷煙锛宺uoyi-task 涓嶅緱鑷啓 SQL锛屼篃涓嶄緷璧� ruoyi-system锛�
- * 鍥犳缁忔湰绔彛鍙栫敤銆�
- *
- * <h3>涓轰粈涔堜笉闇�瑕佹柊 DTO</h3>
- * 杩斿洖绫诲瀷 {@link SysDept} 鏈韩灏卞湪 {@code ruoyi-common}锛屽弻鏂瑰彲瑙侊紝鐩存帴鐢ㄥ疄浣撱��
- *
- * <h3>鈿狅笍 瀹炵幇蹇呴』淇濇寔"绾浆鍙�"</h3>
- * 鍙浆鍙戝埌 {@code SysDept2Mapper}锛屼笉寰楀姞鍏ラ粯璁ゅ�艰ˉ榻愭垨鍏滃簳鏌ヨ绛夋柊閫昏緫銆�
- */
-public interface TaskSysDeptPort {
-
-    /**
-     * 鎸夌瀹ょ紪鐮佹煡绉戝锛堝師 {@code SysDept2Mapper#selectDeptByCode}锛夈��
-     *
-     * @param deptCode 绉戝缂栫爜
-     * @param orgid    鏈烘瀯 id锛堝彲涓� {@code null}锛�
-     * @return 绉戝锛涗笉瀛樺湪杩斿洖 {@code null}
-     */
-    SysDept selectDeptByCode(String deptCode, String orgid);
-}
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysUserDeptPort.java b/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysUserDeptPort.java
deleted file mode 100644
index 04bacfc..0000000
--- a/ruoyi-task/src/main/java/com/ruoyi/task/api/spi/TaskSysUserDeptPort.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.ruoyi.task.api.spi;
-
-import com.ruoyi.common.core.domain.entity.SysUserDept;
-
-import java.util.List;
-
-/**
- * 銆岀敤鎴�-绉戝/鐥呭尯銆嶅叧绯绘煡璇㈣兘鍔� 鈥斺�� <b>ruoyi-task 鐨勫澶� SPI锛岀敱 smartor 渚у疄鐜�</b>銆�
- *
- * <h3>鐢ㄩ��</h3>
- * 瀛愪换鍔$粺璁★紙鍘� {@code ServiceSubtaskController} L610 / L625 / L903 / L909锛夎鎸夊綋鍓嶇櫥褰曚汉
- * 鏌ュ嚭鍏剁瀹ゃ�佺梾鍖哄垪琛紝鐢ㄤ簬"鎸夌瀹�/鐥呭尯鍒嗙粍"鐨勭粺璁¤繃婊ゃ��
- * {@code sys_user_dept} 灞炵郴缁熷煙锛宺uoyi-task <b>涓嶅緱渚濊禆 ruoyi-system</b>锛屾晠缁忔湰绔彛鍙栫敤銆�
- *
- * <h3>涓轰粈涔堜笉闇�瑕佹柊 DTO</h3>
- * 鍙傛暟涓庤繑鍥炵被鍨� {@link SysUserDept} 鏈氨鍦� {@code ruoyi-common}锛屽弻鏂瑰彲瑙併��
- *
- * <h3>鈿狅笍 瀹炵幇蹇呴』淇濇寔"绾浆鍙�"</h3>
- * 瀹炵幇鏂瑰彧杞彂鍒� {@code ISysUserDeptService#selectSysUserDeptList}锛屼笉鍔犱换浣曞厹搴�/榛樿鍊奸�昏緫銆�
- */
-public interface TaskSysUserDeptPort {
-
-    /**
-     * 鎸夋潯浠舵煡鐢ㄦ埛-绉戝鍏崇郴锛堝師 {@code ISysUserDeptService#selectSysUserDeptList}锛夈��
-     *
-     * @param query 鏌ヨ鏉′欢锛堥潪 null 瀛楁鍙備笌杩囨护锛�
-     * @return 鍏崇郴鍒楄〃
-     */
-    List<SysUserDept> selectSysUserDeptList(SysUserDept query);
-}
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/common/ScheduleSubtaskBuilder.java b/ruoyi-task/src/main/java/com/ruoyi/task/common/ScheduleSubtaskBuilder.java
index ee074c0..fe9f494 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/common/ScheduleSubtaskBuilder.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/common/ScheduleSubtaskBuilder.java
@@ -19,7 +19,7 @@
 import com.ruoyi.task.domain.ServiceTaskScheduleDetail;
 import com.ruoyi.task.mapper.ServiceSubtaskMapper;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
-import com.ruoyi.task.api.spi.TaskPreachformPort;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
 import com.ruoyi.task.domain.PatTaskRelevance;
 
 /**
@@ -42,7 +42,7 @@
     private ServiceSubtaskMapper serviceSubtaskMapper;
 
     @Autowired
-    private TaskPreachformPort taskPreachformPort;
+    private ServiceSubtaskPreachformMapper taskPreachformPort;
 
     /**
      * 涓哄崟涓偅鑰呮淳鐢� subtask锛坅ppltype=5锛夆�斺�� 瑙h�﹀叆鍙o紙鑷姩绾冲叆 & 鎵嬪姩鍕鹃�夌粺涓�璧拌繖閲岋級銆�
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java b/ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java
index 4087dd9..0a8d93c 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/controller/ServiceSubtaskController.java
@@ -20,11 +20,8 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.common.utils.reflect.ReflectUtils;
 import com.ruoyi.common.core.service.TaskOpsTriggerApi;
-import com.ruoyi.task.api.spi.TaskSysConfigPort;
-import com.ruoyi.task.api.spi.TaskSysUserDeptPort;
 import com.ruoyi.satisfaction.api.SatisfactionExportBundle;
 import com.ruoyi.satisfaction.api.SatisfactionFacade;
-import com.ruoyi.task.api.spi.TaskSubtaskRecordPort;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import lombok.extern.slf4j.Slf4j;
@@ -54,6 +51,7 @@
 import com.ruoyi.task.domain.ServiceSubtaskStatistic;
 import com.ruoyi.task.domain.ServiceTask;
 import com.ruoyi.task.domain.VO.ServiceSubtaskCotinueCountVO;
+import com.ruoyi.task.service.IServiceSubtaskRecordService;
 import com.ruoyi.task.service.IServiceSubtaskService;
 import com.ruoyi.task.service.IServiceTaskService;
 import com.ruoyi.task.domain.PatArchiveSrmVO;
@@ -65,6 +63,8 @@
 import com.ruoyi.task.domain.VO.ServiceSubtaskVO;
 import com.ruoyi.task.domain.VO.TransferDeptVO;
 import com.ruoyi.task.domain.ServiceSubtaskExport;
+import com.ruoyi.system.service.ISysConfigService;
+import com.ruoyi.system.service.ISysUserDeptService;
 
 /**
  * 鍗曚竴浠诲姟锛堥殢璁匡級Controller
@@ -104,13 +104,13 @@
     private IServiceTaskService serviceTaskService;
 
     @Autowired
-    private TaskSysUserDeptPort taskSysUserDeptPort;
+    private ISysUserDeptService sysUserDeptService;
 
     @Autowired
-    private TaskSubtaskRecordPort serviceSubtaskRecordService;
+    private IServiceSubtaskRecordService serviceSubtaskRecordService;
 
     @Autowired
-    private TaskSysConfigPort taskSysConfigPort;
+    private ISysConfigService sysConfigService;
 
     /**
      * 浠诲姟杩愮淮瑙﹀彂鑳藉姏銆�
@@ -169,6 +169,7 @@
         LoginUser loginUser = getLoginUser();
         SysUser user = loginUser.getUser();
         serviceSubtaskVO.setOrgid(user.getOrgid());
+        // 闄㈠尯鍙栫櫥褰曚細璇濋噷鐨勫�硷紙鐧诲綍椤甸�夋嫨鐨勯櫌鍖猴紝瑙� SysLoginService#login锛�
         serviceSubtaskVO.setCampusid(user.getCampusid());
         ServiceSubtaskEntity serviceSubtaskEntity = null;
         if (serviceSubtaskVO != null) {
@@ -558,7 +559,7 @@
                         sysUserWard.setOrgid(user.getOrgid());
                         sysUserWard.setCampusid(user.getCampusid());
                         sysUserWard.setDeptType("2");
-                        List<SysUserDept> wardList = taskSysUserDeptPort.selectSysUserDeptList(sysUserWard);
+                        List<SysUserDept> wardList = sysUserDeptService.selectSysUserDeptList(sysUserWard);
                         if (CollectionUtils.isNotEmpty(wardList)) {
                             leavehospitaldistrictcodes = wardList.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList());
                         }
@@ -573,7 +574,7 @@
                         sysUserDept.setOrgid(user.getOrgid());
                         sysUserDept.setCampusid(user.getCampusid());
                         sysUserDept.setDeptType("1");
-                        List<SysUserDept> deptList = taskSysUserDeptPort.selectSysUserDeptList(sysUserDept);
+                        List<SysUserDept> deptList = sysUserDeptService.selectSysUserDeptList(sysUserDept);
                         if (CollectionUtils.isNotEmpty(deptList)) {
                             deptCodes = deptList.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList());
                         }
@@ -583,7 +584,7 @@
             }
         }
 
-        String followUpCountStyle = taskSysConfigPort.selectConfigValue("followUpCountStyle", serviceSubtaskCountReq.getOrgid());
+        String followUpCountStyle = sysConfigService.selectConfigByKey("followUpCountStyle", serviceSubtaskCountReq.getOrgid());
         if (ObjectUtils.isNotEmpty(followUpCountStyle)) {
             serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle);
         } else {
@@ -608,7 +609,7 @@
         Integer offset = PageUtils.getOffset(serviceSubtaskCountReq.getPageNum(), serviceSubtaskCountReq.getPageSize());
         serviceSubtaskCountReq.setPageNum(offset);
 
-        String followUpCountStyle = taskSysConfigPort.selectConfigValue("followUpCountStyle", serviceSubtaskCountReq.getOrgid());
+        String followUpCountStyle = sysConfigService.selectConfigByKey("followUpCountStyle", serviceSubtaskCountReq.getOrgid());
         if (ObjectUtils.isNotEmpty(followUpCountStyle)) {
             serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle);
         } else {
@@ -720,7 +721,7 @@
         String orgid = loginUser.getUser().getOrgid();
         String configKey = serviceSubtaskCountReq.getConfigKey();
         if (StringUtils.isNotEmpty(configKey)) {
-            String configValue = taskSysConfigPort.selectConfigValue(configKey, orgid);
+            String configValue = sysConfigService.selectConfigByKey(configKey, orgid);
             serviceSubtaskCountReq.setConfigValue(configValue);
             if (StringUtils.isEmpty(configValue)) {
                 String logInfo = "getSfStatisticsCount-鍙傛暟 " + configKey + " 鏈厤缃�, 璇烽厤缃ソ鍚庨噸璇�";
@@ -729,7 +730,7 @@
             }
         }
 
-        String followUpCountStyle = taskSysConfigPort.selectConfigValue("followUpCountStyle", orgid);
+        String followUpCountStyle = sysConfigService.selectConfigByKey("followUpCountStyle", orgid);
         if (ObjectUtils.isNotEmpty(followUpCountStyle)) {
             serviceSubtaskCountReq.setFollowUpCountStyle(followUpCountStyle);
         } else {
@@ -769,7 +770,7 @@
         }
         String configKey = serviceSubtaskCountReq.getConfigKey();
         if (StringUtils.isNotEmpty(configKey)) {
-            String configValue = taskSysConfigPort.selectConfigValue(configKey, serviceSubtaskCountReq.getOrgid());
+            String configValue = sysConfigService.selectConfigByKey(configKey, serviceSubtaskCountReq.getOrgid());
             serviceSubtaskCountReq.setConfigValue(configValue);
             if (StringUtils.isEmpty(configValue)) {
                 String logInfo = "getSfStatisticsCount-鍙傛暟 " + configKey + " 鏈厤缃�, 璇烽厤缃ソ鍚庨噸璇�";
@@ -800,7 +801,7 @@
         //澶嶈瘖缁熻
         String configKey = serviceSubtaskCountReq.getConfigKey();
         if (StringUtils.isNotEmpty(configKey)) {
-            String configValue = taskSysConfigPort.selectConfigValue(configKey, serviceSubtaskCountReq.getOrgid());
+            String configValue = sysConfigService.selectConfigByKey(configKey, serviceSubtaskCountReq.getOrgid());
             if (StringUtils.isEmpty(configValue)) {
                 String logInfo = "getSfStatisticsCountDetails-鍙傛暟 " + configKey + " 鏈厤缃�, 璇烽厤缃ソ鍚庨噸璇�";
                 log.error(logInfo);
@@ -856,13 +857,13 @@
         sysUserDept.setOrgid(sysUser.getOrgid());
         sysUserDept.setCampusid(sysUser.getCampusid());
         sysUserDept.setDeptType("1");
-        List<SysUserDept> sysUserDepts = taskSysUserDeptPort.selectSysUserDeptList(sysUserDept);
+        List<SysUserDept> sysUserDepts = sysUserDeptService.selectSysUserDeptList(sysUserDept);
         SysUserDept sysUserWard = new SysUserDept();
         sysUserWard.setUserId(sysUser.getUserId());
         sysUserWard.setOrgid(sysUser.getOrgid());
         sysUserWard.setCampusid(sysUser.getCampusid());
         sysUserWard.setDeptType("2");
-        List<SysUserDept> sysUserWards = taskSysUserDeptPort.selectSysUserDeptList(sysUserWard);
+        List<SysUserDept> sysUserWards = sysUserDeptService.selectSysUserDeptList(sysUserWard);
         List<String> deptCodes = sysUserDepts.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList());
         List<String> wardCodes = sysUserWards.stream().map(SysUserDept::getDeptCode).collect(Collectors.toList());
         ServiceSubtaskEntity entity = new ServiceSubtaskEntity();
@@ -881,6 +882,74 @@
         return map;
     }
 
+    /**
+     * 褰撳墠鐧诲綍浜哄緟澶勭悊闅忚浠诲姟缁熻锛堟寜鍑洪櫌骞存湀鍒嗙粍锛屽嚭闄㈤殢璁裤�侀棬璇婇殢璁垮垎寮�璁℃暟锛�
+     * <p>
+     * 鍙e緞锛歴ervice_subtask 涓�
+     * service_type = '2' 鍑洪櫌闅忚 / '3' 闂ㄨ瘖闅忚
+     * + 寰呴殢璁跨姸鎬侊紙sendstate in 1,2,3,5,7锛�
+     * + 鍑洪櫌婊� 7 澶╋紙鍚��7 澶╁墠閭d竴澶┿�嶅嚭闄㈢殑鎮h�咃級
+     * + 鍙湅鏈�杩� 4 涓嚭闄㈡湀浠斤紙鍚綋鏈堬級锛�
+     * 绉戝/鐥呭尯鏉冮檺鍙� OR锛堜笌闅忚鍒楄〃 deptOrDistrict=2 涓�鑷达級銆�
+     *
+     * @return { userName, nickName, total, months: [{ month: 'yyyy-MM', dischargeCount, outpatientCount }] }
+     * 鍙繑鍥炴湁鏁版嵁鐨勬湀浠斤紝娌℃湁鏁版嵁鐨勬湀浠界敱鍓嶇琛� 0
+     */
+    @ApiOperation("鑾峰彇褰撳墠鐧诲綍浜哄緟澶勭悊闅忚浠诲姟缁熻锛堟寜鍑洪櫌骞存湀锛�")
+    @PostMapping("/pendingTaskMonthStats")
+    public Map<String, Object> pendingTaskMonthStats() {
+        LoginUser loginUser = getLoginUser();
+        SysUser sysUser = loginUser.getUser();
+        Map<String, Object> result = new LinkedHashMap<>();
+        result.put("userName", sysUser.getUserName());
+        result.put("nickName", sysUser.getNickName());
+        result.put("total", 0L);
+        result.put("months", new ArrayList<>());
+
+        // 娉ㄦ剰锛氫笉瑕佺敤 sys_user_dept.campusid 杩囨护鈥斺�旇繖寮犺〃鐨� campusid 澶ч噺涓� NULL锛�
+        // 甯︿笂瀹冧細鐩存帴鏌ヤ笉鍑烘潈闄愶紝缁熻缁撴灉姘歌繙鏄� 0銆傞櫌鍖烘潈闄愮敱 orgid + userId + deptType 宸茶兘瀹氫綅銆�
+        SysUserDept deptQuery = new SysUserDept();
+        deptQuery.setUserId(sysUser.getUserId());
+        deptQuery.setOrgid(sysUser.getOrgid());
+        deptQuery.setDeptType("1");
+        List<SysUserDept> sysUserDepts = sysUserDeptService.selectSysUserDeptList(deptQuery);
+
+        SysUserDept wardQuery = new SysUserDept();
+        wardQuery.setUserId(sysUser.getUserId());
+        wardQuery.setOrgid(sysUser.getOrgid());
+        wardQuery.setDeptType("2");
+        List<SysUserDept> sysUserWards = sysUserDeptService.selectSysUserDeptList(wardQuery);
+
+        boolean isAdmin = "admin".equals(sysUser.getUserName());
+        if (!isAdmin && CollectionUtils.isEmpty(sysUserDepts) && CollectionUtils.isEmpty(sysUserWards)) {
+            // 鏃㈡病鏈夌瀹や篃娌℃湁鐥呭尯鏉冮檺鏃朵笉缁熻锛岄伩鍏嶈秺鏉冪湅鍒板叏鏈烘瀯鏁版嵁
+            return result;
+        }
+
+        // sys_user_dept 閲屽悓涓�绉戝/鐥呭尯浼氶噸澶嶅緢澶氳锛屽幓閲嶅悗鍐嶆嫾 IN锛岄伩鍏� SQL 鍙傛暟杩囧
+        List<String> deptCodes = sysUserDepts.stream()
+                .map(SysUserDept::getDeptCode)
+                .filter(Objects::nonNull)
+                .distinct()
+                .collect(Collectors.toList());
+        List<String> wardCodes = sysUserWards.stream()
+                .map(SysUserDept::getDeptCode)
+                .filter(Objects::nonNull)
+                .distinct()
+                .collect(Collectors.toList());
+
+        ServiceSubtaskEntity entity = new ServiceSubtaskEntity();
+        entity.setOrgid(sysUser.getOrgid());
+        entity.setLeaveldeptcodes(deptCodes);
+        entity.setLeavehospitaldistrictcodes(wardCodes);
+
+        Map<String, Object> stats = serviceSubtaskService.getPendingManualTaskMonthStats(entity);
+        if (stats != null) {
+            result.putAll(stats);
+        }
+        return result;
+    }
+
     @ApiOperation("鑾峰彇褰撳墠鐢ㄦ埛瀹f暀鏁伴噺缁熻")
     @PostMapping("/gethelibraryCount")
     public Map<String, Object> getHeLibraryCount(@RequestBody HeLibraryCountVO heLibraryCountVO) {
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java b/ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java
index 12d41a7..f669994 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/mapper/ServiceSubtaskMapper.java
@@ -264,6 +264,17 @@
     public Map<String, Object> getCurrentUserServiceSubtaskCount(ServiceSubtaskEntity serviceSubtaskVO);
 
     /**
+     * 褰撳墠鐧诲綍浜哄緟澶勭悊闅忚浠诲姟锛屾寜鍑洪櫌骞存湀鍒嗙粍缁熻
+     * <p>
+     * 缁熻鍙e緞锛氬嚭闄㈤殢璁�/闂ㄨ瘖闅忚锛坰ervice_type in 2,3锛�+ 浜哄伐锛坈urrent_preachform = '1'锛�
+     * + 寰呴殢璁跨姸鎬侊紙sendstate in 1,2,3,5,7锛�+ 鍑洪櫌鏃堕棿鏃╀簬绛変簬浠婂ぉ - 7 澶┿��
+     *
+     * @param serviceSubtaskVO 鏌ヨ鏉′欢锛坥rgid銆佺瀹ゃ�佺梾鍖猴級
+     * @return 姣忚鍖呭惈 month锛坹yyy-MM锛変笌 cnt锛堟暟閲忥級锛屾暟閲忎负 0 鐨勬湀浠戒笉浼氳繑鍥�
+     */
+    public List<Map<String, Object>> countPendingManualTaskByMonth(ServiceSubtaskEntity serviceSubtaskVO);
+
+    /**
      * 鑾峰彇闂ㄨ瘖闅忚浜烘暟
      *
      * @param patMedReq
diff --git a/smartor/src/main/java/com/smartor/service/IServiceSubtaskPreachformService.java b/ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskPreachformService.java
similarity index 97%
rename from smartor/src/main/java/com/smartor/service/IServiceSubtaskPreachformService.java
rename to ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskPreachformService.java
index 8c77dfa..acf48b6 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceSubtaskPreachformService.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskPreachformService.java
@@ -1,4 +1,4 @@
-package com.smartor.service;
+package com.ruoyi.task.service;
 
 import java.util.List;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskService.java b/ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskService.java
index 3fc864d..6150ab1 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskService.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/service/IServiceSubtaskService.java
@@ -180,6 +180,19 @@
     public Map<String, Object> getCurrentUserServiceSubtaskCount(ServiceSubtaskEntity entity);
 
     /**
+     * 褰撳墠鐧诲綍浜哄緟澶勭悊闅忚浠诲姟锛屾寜鍑洪櫌骞存湀鍒嗙粍缁熻锛堝嚭闄㈤殢璁裤�侀棬璇婇殢璁垮垎寮�璁℃暟锛�
+     * <p>
+     * 鍙e緞锛氬嚭闄㈤殢璁� service_type='2'銆侀棬璇婇殢璁� service_type='3'
+     * + 寰呴殢璁跨姸鎬侊紙sendstate in 1,2,3,5,7锛�
+     * + 鍑洪櫌婊� 7 澶╋紙鍚��7 澶╁墠閭d竴澶┿�嶅嚭闄㈢殑鎮h�咃級锛屼笖鍙湅鏈�杩� 4 涓嚭闄㈡湀浠斤紙鍚綋鏈堬級銆�
+     *
+     * @param entity 鏌ヨ鏉′欢锛坥rgid銆佺瀹ゃ�佺梾鍖猴級
+     * @return { total: 鎬绘暟閲�, months: [{ month: 'yyyy-MM', dischargeCount: 鍑洪櫌闅忚鏁伴噺, outpatientCount: 闂ㄨ瘖闅忚鏁伴噺 }] }
+     * 鍙繑鍥炴湁鏁版嵁鐨勬湀浠斤紝娌℃湁鏁版嵁鐨勬湀浠界敱鍓嶇琛� 0
+     */
+    public Map<String, Object> getPendingManualTaskMonthStats(ServiceSubtaskEntity entity);
+
+    /**
      * 鎸夌梾鍖烘垨绉戝缁熻寤剁画鎶ょ悊鏁伴噺
      * 閮戒笉浼犳椂鍚屾椂鎸夌梾鍖哄拰绉戝鍚勭粺璁′竴閬�
      *
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskPreachformServiceImpl.java b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskPreachformServiceImpl.java
similarity index 94%
rename from smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskPreachformServiceImpl.java
rename to ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskPreachformServiceImpl.java
index be5503b..d8e8eac 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskPreachformServiceImpl.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskPreachformServiceImpl.java
@@ -1,11 +1,11 @@
-package com.smartor.service.impl;
+package com.ruoyi.task.service.impl;
 
 import java.util.List;
 import com.ruoyi.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
-import com.smartor.mapper.ServiceSubtaskPreachformMapper;
-import com.smartor.service.IServiceSubtaskPreachformService;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
+import com.ruoyi.task.service.IServiceSubtaskPreachformService;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
 
 /**
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java
index bad652a..12ad312 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceSubtaskServiceImpl.java
@@ -101,11 +101,8 @@
 import com.ruoyi.task.mapper.ServiceOutPathMapper;
 import com.ruoyi.task.service.IServiceOutPathService;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
-import com.ruoyi.task.api.spi.TaskPreachformPort;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
 import com.ruoyi.task.api.spi.TaskArchivePort;
-import com.ruoyi.task.api.spi.TaskFtpPort;
-import com.ruoyi.task.api.spi.TaskSysConfigPort;
-import com.ruoyi.task.api.spi.TaskSysDeptPort;
 import com.ruoyi.task.common.ScheduleSubtaskBuilder;
 import com.ruoyi.task.domain.ServiceTaskScheduleVO;
 import com.ruoyi.task.service.IServiceSubtaskService;
@@ -124,6 +121,8 @@
 import com.ruoyi.task.domain.ServiceSubtaskTemplateVO;
 import com.ruoyi.task.domain.ServiceTaskVO;
 import com.ruoyi.task.domain.VO.TransferDeptVO;
+import com.ruoyi.system.service.ISysConfigService;
+import com.ruoyi.system.mapper.ext.SysDept2Mapper;
 
 /**
  * 鍗曚竴浠诲姟锛堥殢璁匡級Service涓氬姟灞傚鐞�
@@ -166,7 +165,7 @@
     private ServiceSubtaskMapper serviceSubtaskMapper;
 
     @Autowired
-    private TaskPreachformPort taskPreachformPort;
+    private ServiceSubtaskPreachformMapper taskPreachformPort;
 
     @Autowired
     private ServiceSubtaskDetailMapper serviceSubtaskDetailMapper;
@@ -221,9 +220,6 @@
     @Autowired
     private ScheduleSubtaskBuilder scheduleSubtaskBuilder;
 
-    @Autowired
-    private TaskFtpPort taskFtpPort;
-
 
 
 
@@ -236,7 +232,7 @@
 
 
     @Autowired
-    private TaskSysConfigPort taskSysConfigPort;
+    private ISysConfigService sysConfigService;
 
     /**
      * 娑堟伅鍙戦�佹柟宸ュ巶锛堢煭淇�/寰俊鍏紬鍙凤級锛屾浛浠e師鏉ョ洿鎺ヨ皟鐢ㄥ悇绔欑偣鍙戦�佷唬鐮佺殑鍐欐硶
@@ -255,7 +251,7 @@
 
 
     @Autowired
-    private TaskSysDeptPort taskSysDeptPort;
+    private SysDept2Mapper sysDept2Mapper;
 
     @Value("${spring.profiles.active}")
     private String active;
@@ -1085,7 +1081,7 @@
             }
             serviceTask.setLeaveldeptcodes(serviceTaskVO.getLeaveldeptcodes());
             if (StringUtils.isEmpty(serviceTask.getLeavehospitaldistrictname()) && StringUtils.isNotEmpty(serviceTask.getLeavehospitaldistrictcode())) {
-                SysDept sysDept = taskSysDeptPort.selectDeptByCode(serviceTask.getLeavehospitaldistrictcode(), null);
+                SysDept sysDept = sysDept2Mapper.selectDeptByCode(serviceTask.getLeavehospitaldistrictcode(), null);
                 serviceTask.setLeavehospitaldistrictname(sysDept.getDeptName());
             }
             if (serviceTaskVO.getLongTask() == 1) serviceTask.setSendState(2L);
@@ -3574,6 +3570,55 @@
         return serviceSubtaskMapper.getCurrentUserServiceSubtaskCount(entity);
     }
 
+    /**
+     * 褰撳墠鐧诲綍浜哄緟澶勭悊闅忚浠诲姟锛屾寜鍑洪櫌骞存湀鍒嗙粍缁熻锛堝嚭闄㈤殢璁裤�侀棬璇婇殢璁垮垎寮�璁℃暟锛�
+     * <p>
+     * 鍙繑鍥炴湁鏁版嵁鐨勬湀浠斤紝鍓嶇鎸夈�屽綋鏈� + 鍓� 3 涓湀銆嶈ˉ榻愶紝娌℃湁鏁版嵁鏄剧ず 0 涓��
+     */
+    @Override
+    public Map<String, Object> getPendingManualTaskMonthStats(ServiceSubtaskEntity entity) {
+        List<Map<String, Object>> rows = serviceSubtaskMapper.countPendingManualTaskByMonth(entity);
+        List<Map<String, Object>> months = new ArrayList<>();
+        long total = 0L;
+        if (rows != null) {
+            for (Map<String, Object> row : rows) {
+                if (row == null || row.get("month") == null) {
+                    continue;
+                }
+                long dischargeCount = parsePendingCount(row.get("dischargeCnt"));
+                long outpatientCount = parsePendingCount(row.get("outpatientCnt"));
+                if (dischargeCount <= 0 && outpatientCount <= 0) {
+                    continue;
+                }
+                Map<String, Object> item = new LinkedHashMap<>();
+                item.put("month", row.get("month").toString());
+                item.put("dischargeCount", dischargeCount);
+                item.put("outpatientCount", outpatientCount);
+                months.add(item);
+                total += dischargeCount + outpatientCount;
+            }
+        }
+        Map<String, Object> result = new LinkedHashMap<>();
+        result.put("total", total);
+        result.put("months", months);
+        return result;
+    }
+
+    /**
+     * 缁熻缁撴灉閲岀殑鏁伴噺杞� long锛岃В鏋愬け璐ユ寜 0 澶勭悊
+     */
+    private long parsePendingCount(Object value) {
+        if (value == null) {
+            return 0L;
+        }
+        try {
+            return Long.parseLong(value.toString());
+        } catch (NumberFormatException e) {
+            log.warn("缁熻寰呭鐞嗛殢璁夸换鍔″け璐ワ紝鏁伴噺鏃犳硶瑙f瀽锛歿}", value);
+            return 0L;
+        }
+    }
+
     @Override
     public Map<String, Object> getContinueNurseCount(ServiceSubtaskCotinueCountVO vo) {
         boolean hasDistrict = !CollectionUtils.isEmpty(vo.getLeavehospitaldistrictcodes());
@@ -3641,8 +3686,8 @@
     public void setFailSubTaskDefalutVal(Long failDay) {
         //1.鍏堝幓sys_config涓紝鑾峰彇鍝簺绉戝鎴栫梾鍖洪渶瑕侀粯璁ら棶鍗烽粯璁ゅ��
         IConfigService configService = SpringUtils.getBean(IConfigService.class);
-        String deptConfigValue = taskSysConfigPort.selectConfigValue("hosp.default.dept");
-        String wardConfigValue = taskSysConfigPort.selectConfigValue("hosp.default.ward");
+        String deptConfigValue = sysConfigService.selectConfigByKey("hosp.default.dept");
+        String wardConfigValue = sysConfigService.selectConfigByKey("hosp.default.ward");
         List<String> leaveWard = null;
         List<String> leaveDept = null;
         if (deptConfigValue != null && !deptConfigValue.isEmpty()) {
@@ -3870,8 +3915,8 @@
 
         // 鍙傛暟鍊肩粡绔彛鍙栫敤锛堝師涓� sysConfigMapper.checkConfigKeyUnique + getConfigValue锛夈��
         // 璇箟绛変环锛氬師鍒ゅ畾"琛屽瓨鍦�"銆佽繖閲屽垽瀹�"鍊奸潪 null"锛岃�� sys_config.config_value 鏄�
-        // varchar(500) NOT NULL DEFAULT '' 鈬� 浜岃�呬笉鍙兘涓嶅悓锛堣瑙� TaskSysConfigPort javadoc锛夈��
-        String smsContemt = taskSysConfigPort.findConfigValueByKey("wj.sms.template");
+        // varchar(500) NOT NULL DEFAULT '' 鈬� 浜岃�呬笉鍙兘涓嶅悓锛堣瑙� ISysConfigService javadoc锛夈��
+        String smsContemt = sysConfigService.selectConfigByKey("wj.sms.template");
 
         if (smsContemt != null) {
             sendMagParam.setContent(smsContemt.replace("${wjurl}", sendMagParam.getUrl()));
@@ -4214,7 +4259,7 @@
             return null;
         }
         try {
-            SysDept sysDept = taskSysDeptPort.selectDeptByCode(deptCode, orgid);
+            SysDept sysDept = sysDept2Mapper.selectDeptByCode(deptCode, orgid);
             return sysDept == null ? null : sysDept.getCampusid();
         } catch (Exception e) {
             log.warn("鎸夌紪鐮佸弽鏌ラ櫌鍖哄け璐ワ細deptCode={}, orgid={}, err={}", deptCode, orgid, e.getMessage());
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskScheduleServiceImpl.java b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskScheduleServiceImpl.java
index 79ad5d0..0af651b 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskScheduleServiceImpl.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskScheduleServiceImpl.java
@@ -20,7 +20,7 @@
 import com.ruoyi.task.mapper.ServiceTaskScheduleDetailMapper;
 import com.ruoyi.task.mapper.ServiceTaskScheduleMapper;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
-import com.ruoyi.task.api.spi.TaskPreachformPort;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
 import com.ruoyi.task.domain.ServiceTaskScheduleVO;
 import com.ruoyi.task.service.IServiceTaskScheduleService;
 
@@ -44,7 +44,7 @@
     private ServiceSubtaskMapper serviceSubtaskMapper;
 
     @Autowired
-    private TaskPreachformPort taskPreachformPort;
+    private ServiceSubtaskPreachformMapper taskPreachformPort;
 
     /** 鍗曟鎵弿鐨勬渶澶ц鍒掓暟锛岄伩鍏嶉暱浜嬪姟銆� */
     private static final int ROLL_BATCH_LIMIT = 200;
diff --git a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskServiceImpl.java b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskServiceImpl.java
index 59c0682..4e7a85d 100644
--- a/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskServiceImpl.java
+++ b/ruoyi-task/src/main/java/com/ruoyi/task/service/impl/ServiceTaskServiceImpl.java
@@ -48,7 +48,7 @@
 import com.ruoyi.task.mapper.ServiceTaskdeptMapper;
 import com.ruoyi.task.mapper.ServiceTaskMapper;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
-import com.ruoyi.task.api.spi.TaskPreachformPort;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
 import com.ruoyi.task.api.spi.TaskArchivePort;
 import com.ruoyi.task.service.IServiceTaskService;
 /**
@@ -85,7 +85,7 @@
     @Autowired
     private ServiceTaskdeptMapper serviceTaskdeptMapper;
     @Autowired
-    private TaskPreachformPort taskPreachformPort;
+    private ServiceSubtaskPreachformMapper taskPreachformPort;
     @Autowired
     private SvyTaskTemplateScriptMapper svyTaskTemplateScriptMapper;
     @Autowired
diff --git a/ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml b/ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml
index da3b3a7..dc7c0b4 100644
--- a/ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml
+++ b/ruoyi-task/src/main/resources/mapper/task/ServiceSubtaskMapper.xml
@@ -3278,6 +3278,46 @@
         </if>
     </select>
 
+    <!--
+        褰撳墠鐧诲綍浜恒�屽緟澶勭悊銆嶉殢璁夸换鍔★紝鎸夊嚭闄㈠勾鏈堬紙endtime锛夊垎缁勭粺璁★紝鍑洪櫌闅忚 / 闂ㄨ瘖闅忚鍒嗗紑璁℃暟銆�
+        鍙e緞锛堜笌闅忚鍒楄〃銆屽緟闅忚銆嶉〉绛句竴鑷达級锛�
+          1) 鍑洪櫌闅忚 service_type = '2'锛岄棬璇婇殢璁� service_type = '3'
+          2) 寰呴殢璁匡紙鏈畬鎴愶級鈫� sendstate IN (1,2,3,5,7)锛屾帓闄� 4 涓嶆墽琛� / 6 瀹屾垚
+          3) 鍑洪櫌婊� 7 澶� 鈫� endtime < (浠婂ぉ - 7 澶�) + 1 澶╋紝
+             鍗炽��7 澶╁墠閭d竴澶┿�嶅嚭闄㈢殑涔熻鍏ワ紙鐢� <= DATE_SUB(...) 鍙細鎴埌褰撳ぉ 0 鐐癸紝浼氭紡鎺� 9 鏉★級
+          4) 鍙湅鏈�杩� 4 涓嚭闄㈡湀浠斤紙鍚綋鏈堬級鈫� endtime >= 褰撴湀寰�鍓嶆帹 3 涓湀鐨� 1 鍙�
+          5) 绉戝/鐥呭尯鏉冮檺鐢� OR锛堜笌鍒楄〃 deptOrDistrict=2 涓�鑷达級锛�
+             鍙湁鐥呭尯鏉冮檺鐨勭敤鎴凤紝浠诲姟 leaveldeptcode 涓庢湰浜虹瀹ゅ涓嶄笂鏃朵篃鑳介噺鍒帮紝
+             鍚﹀垯浼氭妸鏁存湀鏁版嵁杩囨护鎴� 0銆�
+        璇存槑锛欸ROUP BY 鍙骇鍑烘湁鏁版嵁鐨勬湀浠斤紝鍓嶇鎸夈�屽綋鏈� + 鍓� 3 涓湀銆嶈ˉ榻愶紝娌℃暟鎹氨鏄剧ず 0 涓��
+              涓嶅啀闄愬埗 current_preachform锛堜汉宸ワ級锛氳瀛楁鍙槸鎵ц鏂瑰紡锛�
+              寰呴殢璁夸换鍔¢噷杩樻湁鐭俊绛夋柟寮忥紝闄愬畾 '1' 浼氭紡鏁般��
+    -->
+    <select id="countPendingManualTaskByMonth"
+            parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity"
+            resultType="java.util.Map">
+        SELECT DATE_FORMAT(endtime, '%Y-%m') AS month,
+        SUM(CASE WHEN service_type = '2' THEN 1 ELSE 0 END) AS dischargeCnt,
+        SUM(CASE WHEN service_type = '3' THEN 1 ELSE 0 END) AS outpatientCnt
+        FROM service_subtask
+        WHERE del_flag = '0'
+        AND service_type IN ('2', '3')
+        AND sendstate IN (1, 2, 3, 5, 7)
+        AND endtime IS NOT NULL
+        AND endtime &lt; DATE_ADD(DATE_SUB(CURDATE(), INTERVAL 7 DAY), INTERVAL 1 DAY)
+        AND endtime &gt;= DATE_FORMAT(DATE_SUB(CURDATE(), INTERVAL 3 MONTH), '%Y-%m-01')
+        <if test="orgid != null and orgid != ''">
+            AND orgid = #{orgid}
+        </if>
+        <if test="campusid != null and campusid != ''">
+            AND campusid = #{campusid}
+        </if>
+        <!-- 绂婚櫌绉戝/鐥呭尯锛氭湁绉戝鎸夌瀹ゃ�佹湁鐥呭尯鎸夌梾鍖猴紝涓よ�呴兘鏈夋椂鍙� OR -->
+        <include refid="filterLeaveDimOr"/>
+        GROUP BY DATE_FORMAT(endtime, '%Y-%m')
+        ORDER BY month
+    </select>
+
     <select id="getCurrentUserServiceSubtaskCount" parameterType="com.ruoyi.task.domain.entity.ServiceSubtaskEntity"
             resultType="map">
         SELECT
diff --git a/smartor/pom.xml b/smartor/pom.xml
index 9a5e839..9efb1f9 100644
--- a/smartor/pom.xml
+++ b/smartor/pom.xml
@@ -234,6 +234,27 @@
             <groupId>com.ruoyi</groupId>
             <artifactId>ruoyi-task</artifactId>
         </dependency>
+
+        <!--
+            鎮h�呮。妗堟ā鍧楋紙pat_archive 瀹舵棌锛�2026-11 杩佸嚭 smartor锛�
+            妗f鐨� Mapper / Service / SQL 鍏ㄥ湪 ruoyi-patarchive锛宻martor 鍙粡瀹冨彇鏁版嵁
+            锛堟柟鍚� smartor -> ruoyi-patarchive锛屽弽鍚戜笉鎴愮珛锛夈��
+        -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-patarchive</artifactId>
+        </dependency>
+
+        <!--
+            鏁版嵁閲囬泦妯″潡锛�2026-11锛夛細鏂板崕/娌冲崡/鐪佺珛鍚屽痉閲囬泦鍣ㄤ笌棰勭害鍋滆瘖杩佸叆 ruoyi-datacollection銆�
+            smartor 渚т粛鏈夐噰闆嗚皟鐢ㄦ柟锛圚isGatherApiBridge / 閲囬泦鐩稿叧 Controller锛夛紝
+            鏂瑰悜 smartor -> ruoyi-datacollection锛屽弽鍚戜笉鎴愮珛銆�
+        -->
+        <dependency>
+            <groupId>com.ruoyi</groupId>
+            <artifactId>ruoyi-datacollection</artifactId>
+        </dependency>
+
     </dependencies>
 
 
diff --git a/smartor/src/main/java/com/smartor/common/DistinctByProperty.java b/smartor/src/main/java/com/smartor/common/DistinctByProperty.java
deleted file mode 100644
index 66032fd..0000000
--- a/smartor/src/main/java/com/smartor/common/DistinctByProperty.java
+++ /dev/null
@@ -1,24 +0,0 @@
-package com.smartor.common;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-
-/**
- * 鍘婚噸宸ュ叿绫�
- */
-public class DistinctByProperty {
-
-    // 鍒涘缓鍘婚噸宸ュ叿鏂规硶锛屾牴鎹泦鍚堜腑涓婂睘鎬�
-    public static <T> List<T> distinctByProperty(
-            List<T> list,
-            Function<? super T, ?> keyExtractor) {
-
-        Set<Object> seen = new HashSet<>();
-        return list.stream()
-                .filter(item -> seen.add(keyExtractor.apply(item)))
-                .collect(Collectors.toList());
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/common/enums/EmergencyLevelEnum.java b/smartor/src/main/java/com/smartor/common/enums/EmergencyLevelEnum.java
deleted file mode 100644
index 7f1ad00..0000000
--- a/smartor/src/main/java/com/smartor/common/enums/EmergencyLevelEnum.java
+++ /dev/null
@@ -1,77 +0,0 @@
-package com.smartor.common.enums;
-
-/**
- * 鍏ラ櫌鐢宠绱ф�ョ▼搴︽灇涓�
- * 
- * @author ruoyi
- */
-public enum EmergencyLevelEnum {
-
-    /**
-     * 鐩爣
-     */
-    TARGET("FH0164.01", "鐩爣"),
-
-    /**
-     * 鎬ュ嵄閲�
-     */
-    CRITICAL("FH0164.02", "鎬ュ嵄閲�"),
-
-    /**
-     * 鎷╂湡
-     */
-    ELECTIVE("FH0164.03", "鎷╂湡"),
-
-    /**
-     * 鍩虹
-     */
-    BASIC("FH0164.04", "鍩虹");
-
-    private String code;
-    private String desc;
-
-    EmergencyLevelEnum(String code, String desc) {
-        this.code = code;
-        this.desc = desc;
-    }
-
-    public static String getDescByCode(String code) {
-        if (code == null || code.isEmpty()) {
-            return null;
-        }
-        for (EmergencyLevelEnum item : values()) {
-            if (item.getCode().equals(code)) {
-                return item.getDesc();
-            }
-        }
-        return null;
-    }
-
-    public static String getCodeByDesc(String desc) {
-        if (desc == null || desc.isEmpty()) {
-            return null;
-        }
-        for (EmergencyLevelEnum item : values()) {
-            if (item.getDesc().equals(desc)) {
-                return item.getCode();
-            }
-        }
-        return null;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/common/enums/ImportFlagEnum.java b/smartor/src/main/java/com/smartor/common/enums/ImportFlagEnum.java
deleted file mode 100644
index c3683ed..0000000
--- a/smartor/src/main/java/com/smartor/common/enums/ImportFlagEnum.java
+++ /dev/null
@@ -1,82 +0,0 @@
-package com.smartor.common.enums;
-
-/**
- * 鍏ラ櫌鐢宠閲嶈鎬ф爣璁版灇涓�
- * 
- * @author ruoyi
- */
-public enum ImportFlagEnum {
-
-    /**
-     * 鐗圭害浜哄憳
-     */
-    SPECIAL_PERSONNEL("FH0165.98", "鐗圭害浜哄憳"),
-
-    /**
-     * 绂讳紤浜哄憳
-     */
-    RETIRED_CADRE("FH0165.99", "绂讳紤浜哄憳"),
-
-    /**
-     * 鏃�
-     */
-    NONE("FH0165.03", "鏃�"),
-
-    /**
-     * 鏃ラ棿璇婄枟
-     */
-    DAY_TREATMENT("FH0165.02", "鏃ラ棿璇婄枟"),
-
-    /**
-     * 鏃ラ棿鎵嬫湳
-     */
-    DAY_SURGERY("FH0165.01", "鏃ラ棿鎵嬫湳");
-
-    private String code;
-    private String desc;
-
-    ImportFlagEnum(String code, String desc) {
-        this.code = code;
-        this.desc = desc;
-    }
-
-    public static String getDescByCode(String code) {
-        if (code == null || code.isEmpty()) {
-            return null;
-        }
-        for (ImportFlagEnum item : values()) {
-            if (item.getCode().equals(code)) {
-                return item.getDesc();
-            }
-        }
-        return null;
-    }
-
-    public static String getCodeByDesc(String desc) {
-        if (desc == null || desc.isEmpty()) {
-            return null;
-        }
-        for (ImportFlagEnum item : values()) {
-            if (item.getDesc().equals(desc)) {
-                return item.getCode();
-            }
-        }
-        return null;
-    }
-
-    public String getCode() {
-        return code;
-    }
-
-    public void setCode(String code) {
-        this.code = code;
-    }
-
-    public String getDesc() {
-        return desc;
-    }
-
-    public void setDesc(String desc) {
-        this.desc = desc;
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/domain/ExternalDiagnosisInfo.java b/smartor/src/main/java/com/smartor/domain/ExternalDiagnosisInfo.java
index 84a4b36..f2dbdba 100644
--- a/smartor/src/main/java/com/smartor/domain/ExternalDiagnosisInfo.java
+++ b/smartor/src/main/java/com/smartor/domain/ExternalDiagnosisInfo.java
@@ -7,6 +7,7 @@
 import lombok.Data;
 
 import java.util.Date;
+import com.ruoyi.common.core.domain.entity.Icd10;
 
 /**
  * @author 鎺ユ敹绗笁鏂规偅鑰呰瘖鏂俊鎭�
diff --git a/smartor/src/main/java/com/smartor/domain/ExternalInHospPatientDiagnoseInfo.java b/smartor/src/main/java/com/smartor/domain/ExternalInHospPatientDiagnoseInfo.java
index 9f6c70d..51c5f25 100644
--- a/smartor/src/main/java/com/smartor/domain/ExternalInHospPatientDiagnoseInfo.java
+++ b/smartor/src/main/java/com/smartor/domain/ExternalInHospPatientDiagnoseInfo.java
@@ -7,6 +7,7 @@
 import lombok.Data;
 
 import java.util.Date;
+import com.ruoyi.common.core.domain.entity.Icd10;
 
 /**
  * @author 鎺ユ敹绗笁鏂瑰叆闄㈡偅鑰呰瘖鏂俊鎭�
diff --git a/smartor/src/main/java/com/smartor/domain/HnDataGatherVO.java b/smartor/src/main/java/com/smartor/domain/HnDataGatherVO.java
deleted file mode 100644
index 8c337c6..0000000
--- a/smartor/src/main/java/com/smartor/domain/HnDataGatherVO.java
+++ /dev/null
@@ -1,43 +0,0 @@
-package com.smartor.domain;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 娌冲崡鏁版嵁閲囬泦鍏ュ弬瀵硅薄
- *
- * @author smartor
- * @date 2023-03-04
- */
-@ApiModel(value = "HnDataGatherVO", description = "娌冲崡鏁版嵁閲囬泦鍏ュ弬瀵硅薄")
-@Data
-public class HnDataGatherVO extends BaseEntity {
-
-    /**
-     * 寮�濮嬪嚭闄㈡棩鏈�
-     */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "  ", width = 30, dateFormat = "yyyy-MM-dd")
-    @ApiModelProperty(value = "寮�濮嬪嚭闄㈡棩鏈�")
-    private Date startTime;
-
-    /**
-     * 缁撴潫鍑洪櫌鏃ユ湡
-     */
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    @Excel(name = "  ", width = 30, dateFormat = "yyyy-MM-dd")
-    @ApiModelProperty(value = "缁撴潫鍑洪櫌鏃ユ湡")
-    private Date endTime;
-
-
-
-
-
-}
diff --git a/smartor/src/main/java/com/smartor/domain/Icd10.java b/smartor/src/main/java/com/smartor/domain/Icd10.java
deleted file mode 100644
index 5ec91fc..0000000
--- a/smartor/src/main/java/com/smartor/domain/Icd10.java
+++ /dev/null
@@ -1,122 +0,0 @@
-package com.smartor.domain;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-
-import java.util.List;
-
-/**
- * 鐤剧梾瀵硅薄 icd10
- *
- * @author ruoyi
- * @date 2023-12-21
- */
-@ApiModel(value = "Icd10", description = "鐤剧梾瀵硅薄")
-@Data
-public class Icd10 extends BaseEntity {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * $column.columnComment
-     */
-    @ApiModelProperty("涓婚敭")
-    private Long icdid;
-
-    /**
-     * icd10缂栫爜
-     */
-    @ApiModelProperty("icd10缂栫爜")
-    @Excel(name = "icd10缂栫爜")
-    private String icdcode;
-
-    /**
-     * HIS鐨刬cd10id
-     */
-    @ApiModelProperty("HIS鐨刬cd10id")
-    @Excel(name = "HIS鐨刬cd10id")
-    private String hisIcdid;
-
-    /**
-     * icd10鍚嶇О
-     */
-    @ApiModelProperty("icd10鍚嶇О")
-    @Excel(name = "icd10鍚嶇О")
-    private String icdname;
-
-    /**
-     * 鎷奸煶鐮�
-     */
-    @ApiModelProperty("鎷奸煶鐮�")
-    @Excel(name = "鎷奸煶鐮�")
-    private String icdpym;
-
-    /**
-     * 浜旂瑪鐮�
-     */
-    @ApiModelProperty("浜旂瑪鐮�")
-    @Excel(name = "浜旂瑪鐮�")
-    private String icdwbm;
-
-    /**
-     * 鏈烘瀯id
-     */
-    @ApiModelProperty("鏈烘瀯id")
-    @Excel(name = "鏈烘瀯id")
-    private String orgid;
-
-    /**
-     * 鍒犻櫎鏍囪瘑
-     */
-    @ApiModelProperty("鍒犻櫎鏍囪瘑")
-    private String delFlag;
-
-    /**
-     * 鐖禝D
-     */
-    @ApiModelProperty("鐖禝D")
-    @Excel(name = "鐖禝D")
-    private Long pid;
-
-    /**
-     * GUID
-     */
-    @ApiModelProperty("GUID")
-    @Excel(name = "GUID")
-    private String guid;
-
-    /**
-     * pageNum
-     */
-    @ApiModelProperty("pageNum")
-    private Integer pageNum;
-
-    /**
-     * pageSize
-     */
-    @ApiModelProperty("pageSize")
-    private Integer pageSize;
-
-    /**
-     * 鏈骇鏍囧織
-     */
-    @ApiModelProperty("lastflag")
-    private String lastflag;
-
-    /**
-     * 涓尰鏍囧織
-     */
-    @ApiModelProperty("chimedflag")
-    private String chimedflag;
-
-    /**
-     * icd10缂栫爜
-     */
-    @ApiModelProperty("icd10缂栫爜闆嗗悎")
-    @Excel(name = "icd10缂栫爜闆嗗悎")
-    private List<String> icdcodes;
-}
diff --git a/smartor/src/main/java/com/smartor/domain/MedicationDoseInfo.java b/smartor/src/main/java/com/smartor/domain/MedicationDoseInfo.java
deleted file mode 100644
index 1375e96..0000000
--- a/smartor/src/main/java/com/smartor/domain/MedicationDoseInfo.java
+++ /dev/null
@@ -1,59 +0,0 @@
-package com.smartor.domain;
-
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-
-/**
- * 鑽搧鍓傞噺淇℃伅瀵硅薄 medication_dose_info
- *
- * @author lihu
- * @date 2026-07-17
- */
-@Data
-@ApiModel("鑽搧鍓傞噺淇℃伅")
-public class MedicationDoseInfo extends BaseEntity
-        {
-private static final long serialVersionUID = 1L;
-
-    /** 涓婚敭ID */
-    @ApiModelProperty("涓婚敭ID")
-        //鏁版嵁搴撹嚜澧炴敼鎴怈TableId(type = IdType.AUTO)
-    private Long id;
-
-    /** 鑽搧ID锛堝叧鑱攎edication_item.id锛� */
-    @ApiModelProperty("鑽搧ID锛堝叧鑱攎edication_item.id锛�")
-     @Excel(name = "鑽搧ID", readConverterExp = "鍏�=鑱攎edication_item.id")
-    private Long medicationItemId;
-
-    /** 鍓傞噺灏忓寘瑁呰浆鎹㈡瘮 */
-    @ApiModelProperty("鍓傞噺灏忓寘瑁呰浆鎹㈡瘮")
-     @Excel(name = "鍓傞噺灏忓寘瑁呰浆鎹㈡瘮")
-    private BigDecimal doseSmallPackageRation;
-
-    /** 鍓傞噺 */
-    @ApiModelProperty("鍓傞噺")
-     @Excel(name = "鍓傞噺")
-    private Long dose;
-
-    /** 鍓傞噺灏忓寘瑁呮暟閲� */
-    @ApiModelProperty("鍓傞噺灏忓寘瑁呮暟閲�")
-     @Excel(name = "鍓傞噺灏忓寘瑁呮暟閲�")
-    private Long doseSmallPackageNum;
-
-    /** 鍓傞噺鍗曚綅 */
-    @ApiModelProperty("鍓傞噺鍗曚綅")
-     @Excel(name = "鍓傞噺鍗曚綅")
-    private String doseUnit;
-
-    /** 鍓傞噺鍗曚綅绫诲瀷 */
-    @ApiModelProperty("鍓傞噺鍗曚綅绫诲瀷")
-     @Excel(name = "鍓傞噺鍗曚綅绫诲瀷")
-    private Long doseUnitType;
-
-        }
-
diff --git a/smartor/src/main/java/com/smartor/domain/MedicationItem.java b/smartor/src/main/java/com/smartor/domain/MedicationItem.java
deleted file mode 100644
index 6274553..0000000
--- a/smartor/src/main/java/com/smartor/domain/MedicationItem.java
+++ /dev/null
@@ -1,168 +0,0 @@
-package com.smartor.domain;
-
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.List;
-
-/**
- * 鑽搧淇℃伅瀵硅薄 medication_item
- *
- * @author lihu
- * @date 2026-07-17
- */
-@Data
-@ApiModel("鑽搧淇℃伅")
-public class MedicationItem extends BaseEntity
-        {
-private static final long serialVersionUID = 1L;
-
-    /** 涓婚敭ID */
-    @ApiModelProperty("涓婚敭ID")
-        //鏁版嵁搴撹嚜澧炴敼鎴怈TableId(type = IdType.AUTO)
-    private Long id;
-
-    /** 鑽搧璇嗗埆鐮� */
-    @ApiModelProperty("鑽搧璇嗗埆鐮�")
-     @Excel(name = "鑽搧璇嗗埆鐮�")
-    private String identificationCode;
-
-    /** 浜旂瑪鐮� */
-    @ApiModelProperty("浜旂瑪鐮�")
-     @Excel(name = "浜旂瑪鐮�")
-    private String wbm;
-
-    /** 鑽搧閫氱敤鍚� */
-    @ApiModelProperty("鑽搧閫氱敤鍚�")
-     @Excel(name = "鑽搧閫氱敤鍚�")
-    private String medicationCommonName;
-
-    /** 鐢熶骇鍘傚鍚嶇О */
-    @ApiModelProperty("鐢熶骇鍘傚鍚嶇О")
-     @Excel(name = "鐢熶骇鍘傚鍚嶇О")
-    private String manufacturerName;
-
-    /** 鑽搧缂栫爜 */
-    @ApiModelProperty("鑽搧缂栫爜")
-     @Excel(name = "鑽搧缂栫爜")
-    private String itemCode;
-
-    /** 澶у皬鍖呰杞崲姣� */
-    @ApiModelProperty("澶у皬鍖呰杞崲姣�")
-     @Excel(name = "澶у皬鍖呰杞崲姣�")
-    private Long smallLargePackageRatio;
-
-    /** 鏈烘瀯ID */
-    @ApiModelProperty("鏈烘瀯ID")
-     @Excel(name = "鏈烘瀯ID")
-    private Long orgId;
-
-    /** 鑽搧鍚嶇О */
-    @ApiModelProperty("鑽搧鍚嶇О")
-     @Excel(name = "鑽搧鍚嶇О")
-    private String itemName;
-
-    /** 鑽搧绫诲瀷 */
-    @ApiModelProperty("鑽搧绫诲瀷")
-     @Excel(name = "鑽搧绫诲瀷")
-    private String medicationType;
-
-    /** 鎶楄弻鑽墿绛夌骇缂栫爜 */
-    @ApiModelProperty("鎶楄弻鑽墿绛夌骇缂栫爜")
-     @Excel(name = "鎶楄弻鑽墿绛夌骇缂栫爜")
-    private String antimicrobialGradeCode;
-
-    /** 鎵瑰噯鏂囧彿 */
-    @ApiModelProperty("鎵瑰噯鏂囧彿")
-     @Excel(name = "鎵瑰噯鏂囧彿")
-    private String licenseNumber;
-
-    /** 榛樿鐢ㄦ硶鍚嶇О */
-    @ApiModelProperty("榛樿鐢ㄦ硶鍚嶇О")
-     @Excel(name = "榛樿鐢ㄦ硶鍚嶇О")
-    private String defaultUsageName;
-
-    /** 鐗规畩鑽搧鍚嶇О */
-    @ApiModelProperty("鐗规畩鑽搧鍚嶇О")
-     @Excel(name = "鐗规畩鑽搧鍚嶇О")
-    private String specialDrugsName;
-
-    /** 鎶楄弻鑽墿绛夌骇鍚嶇О */
-    @ApiModelProperty("鎶楄弻鑽墿绛夌骇鍚嶇О")
-     @Excel(name = "鎶楄弻鑽墿绛夌骇鍚嶇О")
-    private String antimicrobialGradeName;
-
-    /** 閫氱敤鍚嶆嫾闊� */
-    @ApiModelProperty("閫氱敤鍚嶆嫾闊�")
-     @Excel(name = "閫氱敤鍚嶆嫾闊�")
-    private String commonPinyin;
-
-    /** 閫氱敤鍚嶄簲绗旂爜 */
-    @ApiModelProperty("閫氱敤鍚嶄簲绗旂爜")
-     @Excel(name = "閫氱敤鍚嶄簲绗旂爜")
-    private String commonWbm;
-
-    /** 鐢熶骇鍘傚ID */
-    @ApiModelProperty("鐢熶骇鍘傚ID")
-     @Excel(name = "鐢熶骇鍘傚ID")
-    private Long manufacturerId;
-
-    /** 榛樿鐢ㄦ硶ID */
-    @ApiModelProperty("榛樿鐢ㄦ硶ID")
-     @Excel(name = "榛樿鐢ㄦ硶ID")
-    private Long defaultUsageId;
-
-    /** 瑙勬牸 */
-    @ApiModelProperty("瑙勬牸")
-     @Excel(name = "瑙勬牸")
-    private String specification;
-
-    /** 灏忓寘瑁呭崟浣� */
-    @ApiModelProperty("灏忓寘瑁呭崟浣�")
-     @Excel(name = "灏忓寘瑁呭崟浣�")
-    private String smallPackageUnit;
-
-    /** 鑽搧ID锛堜笟鍔′富閿級 */
-    @ApiModelProperty("鑽搧ID锛堜笟鍔′富閿級")
-     @Excel(name = "鑽搧ID", readConverterExp = "涓�=鍔′富閿�")
-    private Long itemId;
-
-    /** 鐗规畩鑽搧缂栫爜 */
-    @ApiModelProperty("鐗规畩鑽搧缂栫爜")
-     @Excel(name = "鐗规畩鑽搧缂栫爜")
-    private String specialDrugsCode;
-
-    /** 鎷奸煶 */
-    @ApiModelProperty("鎷奸煶")
-     @Excel(name = "鎷奸煶")
-    private String pinyin;
-
-    /** 鍓傚瀷鍚嶇О */
-    @ApiModelProperty("鍓傚瀷鍚嶇О")
-     @Excel(name = "鍓傚瀷鍚嶇О")
-    private String doseFormName;
-
-    /** 澶у寘瑁呭崟浣� */
-    @ApiModelProperty("澶у寘瑁呭崟浣�")
-     @Excel(name = "澶у寘瑁呭崟浣�")
-    private String largePackageUnit;
-
-    /** 闆跺敭浠� */
-    @ApiModelProperty("闆跺敭浠�")
-     @Excel(name = "闆跺敭浠�")
-    private BigDecimal retailPrice;
-
-    /** 鐘舵�� */
-    @ApiModelProperty("鐘舵��")
-     @Excel(name = "鐘舵��")
-    private Long status;
-
-    @ApiModelProperty("鍓傞噺淇℃伅鍒楄〃")
-    private List<MedicationDoseInfo> doseInfoList;
-
-        }
-
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceAppointRecord.java b/smartor/src/main/java/com/smartor/domain/ServiceAppointRecord.java
deleted file mode 100644
index 399b276..0000000
--- a/smartor/src/main/java/com/smartor/domain/ServiceAppointRecord.java
+++ /dev/null
@@ -1,453 +0,0 @@
-package com.smartor.domain;
-
-import com.google.gson.annotations.SerializedName;
-import com.ruoyi.common.annotation.Excel;
-import com.ruoyi.common.core.domain.BaseEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.math.BigDecimal;
-import java.util.Date;
-
-/**
- * 棰勭害璁板綍瀵硅薄 service_appoint_record
- *
- * @author lihu
- * @date 2026-07-06
- */
-@Data
-@ApiModel("棰勭害璁板綍")
-public class ServiceAppointRecord extends BaseEntity {
-    private static final long serialVersionUID = 1L;
-
-    /**
-     * 涓婚敭ID
-     */
-    @ApiModelProperty("涓婚敭ID")
-    //鏁版嵁搴撹嚜澧炴敼鎴怈TableId(type = IdType.AUTO)
-    private Long id;
-
-    /**
-     * 棰勭害璁板綍搴忓彿
-     */
-    @ApiModelProperty("棰勭害璁板綍搴忓彿")
-    @Excel(name = "棰勭害璁板綍搴忓彿")
-    private String appointRecSn;
-
-    /**
-     * 鎹㈣瘖棰勭害璁板綍搴忓彿
-     */
-    @ApiModelProperty("鎹㈣瘖棰勭害璁板綍搴忓彿")
-    @Excel(name = "鎹㈣瘖棰勭害璁板綍搴忓彿")
-    private String changeAppointRecSn;
-
-    /**
-     * 缁勭粐绉戝浠g爜
-     */
-    @ApiModelProperty("缁勭粐绉戝浠g爜")
-    @Excel(name = "缁勭粐绉戝浠g爜")
-    private String orgCode;
-
-    /**
-     * 鐥呬汉妗f搴忓彿
-     */
-    @ApiModelProperty("鐥呬汉妗f搴忓彿")
-    @Excel(name = "鐥呬汉妗f搴忓彿")
-    private String patFileSn;
-
-    /**
-     * 鐥呬汉浠嬭川搴忓彿
-     */
-    @ApiModelProperty("鐥呬汉浠嬭川搴忓彿")
-    @Excel(name = "鐥呬汉浠嬭川搴忓彿")
-    private String patMediaSn;
-
-    /**
-     * 鐥呬汉浠嬭川鍙风爜
-     */
-    @ApiModelProperty("鐥呬汉浠嬭川鍙风爜")
-    @Excel(name = "鐥呬汉浠嬭川鍙风爜")
-    private String patMediaNum;
-
-    /**
-     * 鐥呬汉绫诲埆搴忓彿
-     */
-    @ApiModelProperty("鐥呬汉绫诲埆搴忓彿")
-    @Excel(name = "鐥呬汉绫诲埆搴忓彿")
-    private String patCateSn;
-
-    /**
-     * 鐥呬汉鎬ц川搴忓彿
-     */
-    @ApiModelProperty("鐥呬汉鎬ц川搴忓彿")
-    @Excel(name = "鐥呬汉鎬ц川搴忓彿")
-    private String patNatureSn;
-
-    /**
-     * 鐥呬汉妗f濮撳悕
-     */
-    @ApiModelProperty("鐥呬汉妗f濮撳悕")
-    @Excel(name = "鐥呬汉妗f濮撳悕")
-    private String patFileName;
-
-    /**
-     * 鐥呬汉妗f鎬у埆
-     */
-    @ApiModelProperty("鐥呬汉妗f鎬у埆")
-    @Excel(name = "鐥呬汉妗f鎬у埆")
-    private String patFileGender;
-
-    /**
-     * 鐥呬汉棰勭害骞撮緞
-     */
-    @ApiModelProperty("鐥呬汉棰勭害骞撮緞")
-    @Excel(name = "鐥呬汉棰勭害骞撮緞")
-    private String patAge;
-
-    /**
-     * 鐥呬汉鍑虹敓鏃ユ湡
-     */
-    @ApiModelProperty("鐥呬汉鍑虹敓鏃ユ湡")
-    @Excel(name = "鐥呬汉鍑虹敓鏃ユ湡")
-    private String patBirthday;
-
-    /**
-     * 鐥呬汉璇佷欢绫诲瀷缂栫爜
-     */
-    @ApiModelProperty("鐥呬汉璇佷欢绫诲瀷缂栫爜")
-    @Excel(name = "鐥呬汉璇佷欢绫诲瀷缂栫爜")
-    private String patCardTypeCode;
-
-    /**
-     * 鐥呬汉璇佷欢绫诲瀷
-     */
-    @ApiModelProperty("鐥呬汉璇佷欢绫诲瀷")
-    @Excel(name = "鐥呬汉璇佷欢绫诲瀷")
-    private String patCardType;
-
-    /**
-     * 鐥呬汉璇佷欢鍙风爜
-     */
-    @ApiModelProperty("鐥呬汉璇佷欢鍙风爜")
-    @Excel(name = "鐥呬汉璇佷欢鍙风爜")
-    private String patIdCardNum;
-
-    /**
-     * 鐥呬汉鑱旂郴鍦板潃
-     */
-    @ApiModelProperty("鐥呬汉鑱旂郴鍦板潃")
-    @Excel(name = "鐥呬汉鑱旂郴鍦板潃")
-    private String patAddr;
-
-    /**
-     * 鐥呬汉鑱旂郴鐢佃瘽
-     */
-    @ApiModelProperty("鐥呬汉鑱旂郴鐢佃瘽")
-    @Excel(name = "鐥呬汉鑱旂郴鐢佃瘽")
-    private String patTel;
-
-    /**
-     * 鐥呬汉鏉ユ簮缂栫爜
-     */
-    @ApiModelProperty("鐥呬汉鏉ユ簮缂栫爜")
-    @Excel(name = "鐥呬汉鏉ユ簮缂栫爜")
-    private String patWayCode;
-
-    /**
-     * 鐥呬汉鏉ユ簮
-     */
-    @ApiModelProperty("鐥呬汉鏉ユ簮")
-    @Excel(name = "鐥呬汉鏉ユ簮")
-    private String patWay;
-
-    /**
-     * 棰勭害绫诲瀷搴忓彿
-     */
-    @ApiModelProperty("棰勭害绫诲瀷搴忓彿")
-    @Excel(name = "棰勭害绫诲瀷搴忓彿")
-    private String appointTypeSn;
-
-    /**
-     * 棰勭害鎿嶄綔鏃ユ湡
-     */
-    @ApiModelProperty("棰勭害鎿嶄綔鏃ユ湡")
-    @Excel(name = "棰勭害鎿嶄綔鏃ユ湡")
-    private Date appointDate;
-
-    /**
-     * 棰勭害鎿嶄綔浜篿d
-     */
-    @ApiModelProperty("棰勭害鎿嶄綔浜篿d")
-    @Excel(name = "棰勭害鎿嶄綔浜篿d")
-    private String appointOperatorId;
-
-    /**
-     * 棰勭害鎿嶄綔浜哄鍚�
-     */
-    @ApiModelProperty("棰勭害鎿嶄綔浜哄鍚�")
-    @Excel(name = "棰勭害鎿嶄綔浜哄鍚�")
-    private String appointOperatorName;
-
-    /**
-     * 棰勭害鎸傚彿鏃ユ湡
-     */
-    @ApiModelProperty("棰勭害鎸傚彿鏃ユ湡")
-    @Excel(name = "棰勭害鎸傚彿鏃ユ湡")
-    private Date appointRegistDate;
-
-    /**
-     * 鎸傚彿鎺掔彮搴忓彿
-     */
-    @ApiModelProperty("鎸傚彿鎺掔彮搴忓彿")
-    @Excel(name = "鎸傚彿鎺掔彮搴忓彿")
-    private String registerScheduleSn;
-
-    /**
-     * 闂ㄨ瘖绫诲埆搴忓彿
-     */
-    @ApiModelProperty("闂ㄨ瘖绫诲埆搴忓彿")
-    @Excel(name = "闂ㄨ瘖绫诲埆搴忓彿")
-    private String outpatCateSn;
-
-    /**
-     * 闂ㄨ瘖绫诲埆鍚嶇О
-     */
-    @ApiModelProperty("闂ㄨ瘖绫诲埆鍚嶇О")
-    @Excel(name = "闂ㄨ瘖绫诲埆鍚嶇О")
-    private String outpatCateName;
-
-    /**
-     * 鎸傚彿绉戝缂栫爜
-     */
-    @ApiModelProperty("鎸傚彿绉戝缂栫爜")
-    @Excel(name = "鎸傚彿绉戝缂栫爜")
-    private String registDeptCode;
-
-    /**
-     * 鎸傚彿绉戝鍚嶇О
-     */
-    @ApiModelProperty("鎸傚彿绉戝鍚嶇О")
-    @Excel(name = "鎸傚彿绉戝鍚嶇О")
-    private String registDeptName;
-
-    /**
-     * 绉戝鎷奸煶缂栫爜
-     */
-    @ApiModelProperty("绉戝鎷奸煶缂栫爜")
-    @Excel(name = "绉戝鎷奸煶缂栫爜")
-    private String deptPinyinCode;
-
-    /**
-     * 鎸傚彿鍖荤敓浠g爜
-     */
-    @ApiModelProperty("鎸傚彿鍖荤敓浠g爜")
-    @Excel(name = "鎸傚彿鍖荤敓浠g爜")
-    private String registDoctCode;
-
-    /**
-     * 鎸傚彿鍖荤敓濮撳悕
-     */
-    @ApiModelProperty("鎸傚彿鍖荤敓濮撳悕")
-    @Excel(name = "鎸傚彿鍖荤敓濮撳悕")
-    private String registDoctName;
-
-    /**
-     * 鑱屽伐鎷奸煶缂栫爜
-     */
-    @ApiModelProperty("鑱屽伐鎷奸煶缂栫爜")
-    @Excel(name = "鑱屽伐鎷奸煶缂栫爜")
-    private String staffPinyinCode;
-
-    /**
-     * 鎸傚彿鏃堕棿绫诲埆
-     */
-    @ApiModelProperty("鎸傚彿鏃堕棿绫诲埆")
-    @Excel(name = "鎸傚彿鏃堕棿绫诲埆")
-    private Long registTimeCate;
-
-    /**
-     * 鐥呬汉鎸傚彿搴忓彿
-     */
-    @ApiModelProperty("鐥呬汉鎸傚彿搴忓彿")
-    @Excel(name = "鐥呬汉鎸傚彿搴忓彿")
-    private Long patiRegistSn;
-
-    /**
-     * 棰勭害鎸傚彿璐圭敤
-     */
-    @ApiModelProperty("棰勭害鎸傚彿璐圭敤")
-    @Excel(name = "棰勭害鎸傚彿璐圭敤")
-    private BigDecimal scheduleRegistCharge;
-
-    /**
-     * 鎸傚彿璁板綍搴忓彿
-     */
-    @ApiModelProperty("鎸傚彿璁板綍搴忓彿")
-    @Excel(name = "鎸傚彿璁板綍搴忓彿")
-    private String registRecSn;
-
-    /**
-     * 鐧昏鐢ㄦ埛搴忓彿
-     */
-    @ApiModelProperty("鐧昏鐢ㄦ埛搴忓彿")
-    @Excel(name = "鐧昏鐢ㄦ埛搴忓彿")
-    private String regUserSn;
-
-    /**
-     * 鐧昏鐢ㄦ埛濮撳悕
-     */
-    @ApiModelProperty("鐧昏鐢ㄦ埛濮撳悕")
-    @Excel(name = "鐧昏鐢ㄦ埛濮撳悕")
-    private String regUserName;
-
-    /**
-     * 鐧昏鎿嶄綔鏃堕棿
-     */
-    @ApiModelProperty("鐧昏鎿嶄綔鏃堕棿")
-    @Excel(name = "鐧昏鎿嶄綔鏃堕棿")
-    private Date regOptTime;
-
-    /**
-     * 鎾ら攢鐢ㄦ埛搴忓彿
-     */
-    @ApiModelProperty("鎾ら攢鐢ㄦ埛搴忓彿")
-    @Excel(name = "鎾ら攢鐢ㄦ埛搴忓彿")
-    private String revokeUserSn;
-
-    /**
-     * 鎾ら攢浜哄鍚�
-     */
-    @ApiModelProperty("鎾ら攢浜哄鍚�")
-    @Excel(name = "鎾ら攢浜哄鍚�")
-    private String revokeUserName;
-
-    /**
-     * 鎾ら攢鎿嶄綔鏃堕棿
-     */
-    @ApiModelProperty("鎾ら攢鎿嶄綔鏃堕棿")
-    @Excel(name = "鎾ら攢鎿嶄綔鏃堕棿")
-    private Date revokeOptTime;
-
-    /**
-     * 閫�鍙锋椂闂�
-     */
-    @ApiModelProperty("閫�鍙锋椂闂�")
-    @Excel(name = "閫�鍙锋椂闂�")
-    private Date withdrawalTime;
-
-    /**
-     * 棰勭害鐘舵�佹爣蹇�(0:宸查绾� 1:宸叉寕鍙� 2:宸查��鍙� 3:宸插氨璇� -1:鐥呬汉鍙栨秷 -2:鍖婚櫌鍙栨秷 -3:鎺掔彮鍋滆瘖)
-     */
-    @ApiModelProperty("棰勭害鐘舵�佹爣蹇�(0:宸查绾� 1:宸叉寕鍙� 2:宸查��鍙� 3:宸插氨璇� -1:鐥呬汉鍙栨秷 -2:鍖婚櫌鍙栨秷 -3:鎺掔彮鍋滆瘖)")
-    @Excel(name = "棰勭害鐘舵�佹爣蹇�(0:宸查绾� 1:宸叉寕鍙� 2:宸查��鍙� 3:宸插氨璇� -1:鐥呬汉鍙栨秷 -2:鍖婚櫌鍙栨秷 -3:鎺掔彮鍋滆瘖)")
-    private Long scheduleStatusFlag;
-
-    /**
-     * 棰勭害澶囨敞璇存槑
-     */
-    @ApiModelProperty("棰勭害澶囨敞璇存槑")
-    @Excel(name = "棰勭害澶囨敞璇存槑")
-    private String scheduleMemoDesc;
-
-    /**
-     * 棰勭害鍑瘉鍙风爜
-     */
-    @ApiModelProperty("棰勭害鍑瘉鍙风爜")
-    @Excel(name = "棰勭害鍑瘉鍙风爜")
-    private String scheduleCredenceNum;
-
-    /**
-     * 棰勮灏辫瘖鏃堕棿
-     */
-    @ApiModelProperty("棰勮灏辫瘖鏃堕棿")
-    @Excel(name = "棰勮灏辫瘖鏃堕棿")
-    private String registTimeRange;
-
-    /**
-     * 鍏蜂綋鏄庣粏琛ㄦ槑缁嗗簭鍙�
-     */
-    @ApiModelProperty("鍏蜂綋鏄庣粏琛ㄦ槑缁嗗簭鍙�")
-    @Excel(name = "鍏蜂綋鏄庣粏琛ㄦ槑缁嗗簭鍙�")
-    private String scheduleDetailSn;
-
-    /**
-     * 灏辫瘖鏃堕棿
-     */
-    @ApiModelProperty("灏辫瘖鏃堕棿")
-    @Excel(name = "灏辫瘖鏃堕棿")
-    @SerializedName("treatDate")
-    private Date treatDate;
-
-    /**
-     * 灏辫瘖鍖荤敓缂栫爜
-     */
-    @ApiModelProperty("灏辫瘖鍖荤敓缂栫爜")
-    @Excel(name = "灏辫瘖鍖荤敓缂栫爜")
-    private String treatDoctCode;
-
-    /**
-     * 灏辫瘖鍖荤敓鍚嶇О
-     */
-    @ApiModelProperty("灏辫瘖鍖荤敓鍚嶇О")
-    @Excel(name = "灏辫瘖鍖荤敓鍚嶇О")
-    private String treatDoctName;
-
-    /**
-     * 棰勭害娓犻亾缂栫爜
-     */
-    @ApiModelProperty("棰勭害娓犻亾缂栫爜")
-    @Excel(name = "棰勭害娓犻亾缂栫爜")
-    private String regWayCode;
-
-    /**
-     * 棰勭害娓犻亾
-     */
-    @ApiModelProperty("棰勭害娓犻亾")
-    @Excel(name = "棰勭害娓犻亾")
-    private String regWay;
-
-    /**
-     * 棰勭害绯荤粺缂栫爜
-     */
-    @ApiModelProperty("棰勭害绯荤粺缂栫爜")
-    @Excel(name = "棰勭害绯荤粺缂栫爜")
-    private String regSystemWayCode;
-
-    /**
-     * 棰勭害绯荤粺
-     */
-    @ApiModelProperty("棰勭害绯荤粺")
-    @Excel(name = "棰勭害绯荤粺")
-    private String regSystemWay;
-
-    /**
-     * 鍒濊瘖澶嶈瘖鍒ゅ埆锛�0鍒濊瘖 1澶嶈瘖锛�
-     */
-    @ApiModelProperty("鍒濊瘖澶嶈瘖鍒ゅ埆锛�0鍒濊瘖 1澶嶈瘖锛�")
-    @Excel(name = "鍒濊瘖澶嶈瘖鍒ゅ埆", readConverterExp = "0=鍒濊瘖,1=澶嶈瘖")
-    private Long visitFlag;
-
-    /**
-     * 鐭俊鍙戦�佹搷浣滀汉id
-     */
-    @ApiModelProperty("鐭俊鍙戦�佹搷浣滀汉id")
-    @Excel(name = "鐭俊鍙戦�佹搷浣滀汉id")
-    private String senderId;
-
-    /**
-     * 鐭俊鍙戦�佹搷浣滀汉濮撳悕
-     */
-    @ApiModelProperty("鐭俊鍙戦�佹搷浣滀汉濮撳悕")
-    @Excel(name = "鐭俊鍙戦�佹搷浣滀汉濮撳悕")
-    private String senderName;
-
-    /**
-     * 鐭俊鍙戦�佹椂闂�
-     */
-    @ApiModelProperty("鐭俊鍙戦�佹椂闂�")
-    @Excel(name = "鐭俊鍙戦�佹椂闂�")
-    private Date sendTime;
-
-}
-
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSLTDCommonVO.java b/smartor/src/main/java/com/smartor/domain/ServiceSLTDCommonVO.java
deleted file mode 100644
index a2dc35e..0000000
--- a/smartor/src/main/java/com/smartor/domain/ServiceSLTDCommonVO.java
+++ /dev/null
@@ -1,49 +0,0 @@
-package com.smartor.domain;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-@ApiModel(value = "ServiceSLTDCommonVO", description = "鐪佺珛鍚屽痉鍏叡瀛楁")
-@Data
-public class ServiceSLTDCommonVO {
-    @ApiModelProperty(value = "鏈烘瀯ID 鏈烘瀯鍞竴缂栧彿")
-    private String orgId;
-
-    @ApiModelProperty(value = "鏈烘瀯鍚嶇О 鏈烘瀯鍚嶇О")
-    private String orgName;
-
-    @ApiModelProperty(value = "闄㈠尯ID 闄㈠尯鍞竴缂栧彿")
-    private String campusId;
-
-    @ApiModelProperty(value = "闄㈠尯鍚嶇О 闄㈠尯鍚嶇О")
-    private String campusName;
-
-    @ApiModelProperty(value = "鐥呭尯ID 鐥呭尯鍞竴缂栧彿")
-    private String areaId;
-
-    @ApiModelProperty(value = "鐥呭尯鍚嶇О 鐥呭尯鍚嶇О")
-    private String areaName;
-
-    @ApiModelProperty(value = "绉戝ID 绉戝鍞竴缂栧彿")
-    private String deptId;
-
-    @ApiModelProperty(value = "绉戝鍚嶇О 绉戝鍚嶇О")
-    private String deptName;
-
-    @ApiModelProperty(value = "灏辫瘖璁板綍ID  鎮h�呭崟娆″氨璇婂敮涓�璁板綍ID")
-    private String healthcareRecordId;
-
-    @ApiModelProperty(value = "灏辫瘖娴佹按鍙�  鎮h�呭崟娆″氨璇婂敮涓�涓氬姟娴佹按鍙�")
-    private String healthcareRecordNo;
-
-    @ApiModelProperty(value = "鐥呭巻鍙�  鎮h�呴櫌鍐呭崱鍙凤紝鏈烘瀯鍐呭敮涓�")
-    private String medicalRecordNo;
-
-    @ApiModelProperty(value = "灏辫瘖鍗″彿  鎮h�呭綋娆″氨璇婂嚟璇佸彿")
-    private String medicalCardNo;
-
-    @ApiModelProperty(value = "鎮h�呮。妗圛D 鎮h�呴櫌鍐呭敮涓�缂栫爜")
-    private String patientId;
-
-}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSLTDContactsResDTO.java b/smartor/src/main/java/com/smartor/domain/ServiceSLTDContactsResDTO.java
deleted file mode 100644
index 7e0057e..0000000
--- a/smartor/src/main/java/com/smartor/domain/ServiceSLTDContactsResDTO.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.smartor.domain;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-@ApiModel(value = "ServiceSLTDContactsResDTO", description = "鐪佺珛鍚屽痉鑱旂郴浜哄搷搴斾俊鎭�")
-@Data
-public class ServiceSLTDContactsResDTO {
-    @ApiModelProperty(value = "鏈烘瀯ID 鏈烘瀯鍞竴缂栧彿")
-    private String orgId;
-
-    @ApiModelProperty(value = "鑱旂郴浜哄鍚�")
-    private String name;
-
-
-    @ApiModelProperty(value = "鑱旂郴浜哄叧绯荤紪鐮�")
-    private String relationshipCode;
-
-    @ApiModelProperty(value = "鑱旂郴浜哄叧绯诲悕绉�")
-    private String relationship;
-
-    @ApiModelProperty(value = "鑱旂郴浜鸿仈绯绘柟寮�")
-    private String telecom;
-
-    @ApiModelProperty(value = "鑱旂郴浜哄湴鍧�")
-    private String currentAddress;
-}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSLTDDeptReqVO.java b/smartor/src/main/java/com/smartor/domain/ServiceSLTDDeptReqVO.java
deleted file mode 100644
index adcadef..0000000
--- a/smartor/src/main/java/com/smartor/domain/ServiceSLTDDeptReqVO.java
+++ /dev/null
@@ -1,48 +0,0 @@
-package com.smartor.domain;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-@ApiModel(value = "ServiceSLTDCommonReqVO", description = "鐪佺珛鍚屽痉鍑虹瀹ょ梾鍖鸿姹備俊鎭�")
-@Data
-public class ServiceSLTDDeptReqVO {
-    @ApiModelProperty(value = "鏈烘瀯ID 鏈烘瀯鍞竴缂栧彿")
-    private String orgId;
-
-    @ApiModelProperty(value = "闄㈠尯ID")
-    private List<Long> campusIds;
-
-    @ApiModelProperty(value = "鏈烘瀯瀛︾锛屽瓧鍏竎ode")
-    private String orgSubjectCode;
-
-
-    @ApiModelProperty(value = "鍥介檯瀛︾锛屽瓧鍏竎ode ")
-    private String subjectCode;
-
-    @ApiModelProperty(value = "绉戝鍚嶇О妯$硦鍖归厤")
-    private Long searchText;
-
-    @ApiModelProperty(value = "閮ㄩ棬缁村害:  201-浜轰簨  202-涓氬姟  涓嶄紶-鍏ㄩ儴")
-    private Long deptDimensions;
-
-
-    @ApiModelProperty(value = "鏈嶅姟鑼冨洿  锛� 鎬ヨ瘖-emergency 鍖绘妧-medicalTechnology  闂ㄨ瘖-outpatient 浣忛櫌-hospitalization 浣撴-physicalExamination" +
-            "鎵嬫湳-operation 鑽埧-drugRoom  鑽簱-drugWarehouse 鏉愭枡搴�-materialWarehouse   鎶㈡晳-rescue  鐣欒-observation 闈欓厤-venousConfig")
-    private List<String> serviceScopes;
-
-
-    @ApiModelProperty(value = "鏄惁鏄梾鍖�: 0-涓嶆槸 1-鏄�")
-    private Integer inpatientArea;
-
-    @ApiModelProperty(value = "鍋滅敤鐘舵�� : 1-鏈仠鐢� 0-鍋滅敤 涓嶄紶-鍏ㄩ儴")
-    private Integer status;
-
-
-    @ApiModelProperty(value = "閮ㄩ棬绫诲瀷锛� FH0132.01-鍖荤枟   FH0132.02-鏁欏  FH0132.03-绉戠爺  FH0132.04-琛屾斂  FH0132.05-鍚庡嫟 FH0132.06-鍏朵粬")
-    private String deptType;
-
-
-}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSLTDDiagnosisResDTO.java b/smartor/src/main/java/com/smartor/domain/ServiceSLTDDiagnosisResDTO.java
deleted file mode 100644
index c4be426..0000000
--- a/smartor/src/main/java/com/smartor/domain/ServiceSLTDDiagnosisResDTO.java
+++ /dev/null
@@ -1,28 +0,0 @@
-package com.smartor.domain;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-@ApiModel(value = "ServiceSLTDDiagnosisResDTO", description = "鐪佺珛鍚屽痉璇婃柇鍝嶅簲淇℃伅")
-@Data
-public class ServiceSLTDDiagnosisResDTO {
-
-    @ApiModelProperty(value = "鑱旂郴浜哄鍚�")
-    private String name;
-
-    @ApiModelProperty(value = "璇婃柇icd缂栫爜")
-    private String diagnosisDictCode;
-
-    @ApiModelProperty(value = "璇婃柇鍚嶇О")
-    private String diagnosisDictName;
-
-    @ApiModelProperty(value = " 璇婃柇绫诲埆    FH0176.01-鍏ラ櫌璇婃柇  FH0176.02-鍒濇璇婃柇x0;\n" + "    FH0176.03-淇璇婃柇\n" + "    FH0176.04-琛ュ厖璇婃柇\n" + "    FH0176.05-鍑洪櫌璇婃柇\n" + "    FH0176.06-涓绘不璇婃柇")
-    private String diagnosisCategory;
-
-    @ApiModelProperty(value = "璇婃柇绫诲瀷  1-涓尰璇婃柇  2-瑗垮尰璇婃柇")
-    private Integer recordType;
-
-    @ApiModelProperty(value = "鏄惁涓昏瘖鏂�   1-涓昏瘖鏂� 0-闈炰富璇婃柇")
-    private Integer isMainDiagnosis;
-}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospReqVO.java b/smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospReqVO.java
deleted file mode 100644
index 2e82db5..0000000
--- a/smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospReqVO.java
+++ /dev/null
@@ -1,92 +0,0 @@
-package com.smartor.domain;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-@ApiModel(value = "ServiceSLTDCommonReqVO", description = "鐪佺珛鍚屽痉鍑哄叆闄㈣姹備俊鎭�")
-@Data
-public class ServiceSLTDInhospReqVO {
-    @ApiModelProperty(value = "鏈烘瀯ID 鏈烘瀯鍞竴缂栧彿")
-    private String orgId;
-
-    @ApiModelProperty(value = "闄㈠尯ID")
-    private Long campusId;
-
-    @ApiModelProperty(value = "褰撳墠椤�")
-    private Long current;
-
-    @ApiModelProperty(value = "姣忛〉鏁伴噺")
-    private Long size;
-
-    @ApiModelProperty(value = "鎮h�呭鍚�   蹇呭~涓�涓�")
-    private String patientName;
-
-
-    @ApiModelProperty(value = "韬唤璇佸彿   蹇呭~涓�涓�")
-    private String idCardNo;
-
-    @ApiModelProperty(value = "鐥呭尯id 蹇呭~涓�涓�")
-    private Long areaId;
-
-    @ApiModelProperty(value = "绉戝ID 蹇呭~涓�涓�")
-    private Long deptId;
-
-    @ApiModelProperty(value = "绉戝ID闆嗗悎")
-    private List<Long> deptIdList;
-
-    @ApiModelProperty(value = "璇婄枟璁板綍鍙� 蹇呭~涓�涓�")
-    private String healthcareRecordNo;
-
-    @ApiModelProperty(value = "璇婄枟璁板綍鍙烽泦鍚�")
-    private List<String> healthcareRecordNoList;
-
-    @ApiModelProperty(value = "鐥呭巻鍙� 蹇呭~涓�涓�")
-    private String medicalRecordNo;
-
-    @ApiModelProperty(value = "璇婄枟璁板綍Id 蹇呭~涓�涓�")
-    private Long healthcareRecordId;
-
-    @ApiModelProperty(value = "璇婄枟璁板綍ID闆嗗悎")
-    private List<Long> idList;
-
-    @ApiModelProperty(value = "灏辫瘖鍗″彿 蹇呭~涓�涓�")
-    private String medicalCardNo;
-
-    @ApiModelProperty(value = "鍏ラ櫌鏃堕棿-寮�濮嬫椂闂�")
-    private String startHeadTime;
-
-    @ApiModelProperty(value = "鍏ラ櫌鏃堕棿-缁撴潫鏃堕棿 yyyy-MM-dd")
-    private String startTailTime;
-
-    @ApiModelProperty(value = "鍑洪櫌鏃堕棿-寮�濮嬫椂闂� yyyy-MM-dd")
-    private String preOutHospitalHeadDate;
-
-    @ApiModelProperty(value = "鍑洪櫌鏃堕棿-缁撴潫鏃堕棿 yyyy-MM-dd")
-    private String preOutHospitalTailDate;
-
-    @ApiModelProperty(value = "灏辫瘖鏃堕棿-寮�濮嬫椂闂� :   闂ㄨ瘖璇婄枟璁板綍涓哄彿婧愭椂闂�  浣忛櫌璇婄枟璁板綍涓哄叆闄㈢櫥璁版椂闂� yyyy-MM-dd 鎴� yyyy-MM-dd HH:mm:ss锛堥棬鎬ヨ瘖澧為噺閲囬泦绮剧‘鍒扮锛�")
-    private String encounterTimeStart;
-
-    @ApiModelProperty(value = "灏辫瘖鏃堕棿-缁撴潫鏃堕棿 yyyy-MM-dd 鎴� yyyy-MM-dd HH:mm:ss锛堥棬鎬ヨ瘖澧為噺閲囬泦绮剧‘鍒扮锛�")
-    private String encounterTimeEnd;
-
-    @ApiModelProperty(value = "鍑洪櫌缁撶畻鏃堕棿-寮�濮嬫椂闂� yyyy-MM-dd")
-    private String outHospitalSettleHeadDate;
-
-    @ApiModelProperty(value = "鍑洪櫌缁撶畻鏃堕棿-缁撴潫鏃堕棿 yyyy-MM-dd")
-    private String outHospitalSettleTailDate;
-
-    @ApiModelProperty(value = "璇婄枟绫诲瀷锛� FH0108.01-闂ㄨ瘖  FH0108.02-浣忛櫌   FH0108.03-鎬ヨ瘖  FH0108.04-鐣欒" + "FH0108.05-鎶㈡晳FH0108.06-闂ㄨ瘖浣撴   FH0108.07-浣忛櫌浣撴")
-    private List<String> healthcareRecordTypeList;
-
-    @ApiModelProperty(value = "璇婄枟鐘舵��  鍙傝�冨�煎煙鏂囨。2.6")
-    private List<String> statusList;
-
-    @ApiModelProperty(value = "鏄惁鍙栨渶杩戜竴娆¤瘖鐤椾俊鎭�  榛樿涓篺alse")
-    private Boolean recently;
-
-}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospResDTO.java b/smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospResDTO.java
deleted file mode 100644
index 629ae54..0000000
--- a/smartor/src/main/java/com/smartor/domain/ServiceSLTDInhospResDTO.java
+++ /dev/null
@@ -1,230 +0,0 @@
-package com.smartor.domain;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.List;
-
-@ApiModel(value = "ServiceSLTDCommonReqDTO", description = "鐪佺珛鍚屽痉鍑哄叆闄㈠搷搴斾俊鎭�")
-@Data
-public class ServiceSLTDInhospResDTO {
-    @ApiModelProperty(value = "鏈烘瀯ID 鏈烘瀯鍞竴缂栧彿")
-    private String orgId;
-
-    @ApiModelProperty(value = "鏈烘瀯ID 鏈烘瀯鍞竴缂栧彿")
-    private String campusId;
-
-    @ApiModelProperty(value = "璇婄枟璁板綍id  鎮h�呮瘡娆″氨璇婇兘涓嶇浉鍚�")
-    private Long healthcareRecordId;
-
-    @ApiModelProperty(value = "璇婄枟璁板綍鍙� 鎮h�呮瘡娆″氨璇婇兘涓嶇浉鍚�")
-    private String healthcareRecordNo;
-
-    @ApiModelProperty(value = "鎮h�卛d 鎮h�呮瘡娆″氨璇婇兘鐩稿悓")
-    private Long patientId;
-
-    @ApiModelProperty(value = "鎮h�呭悕绉�")
-    private String patientName;
-
-    @ApiModelProperty(value = "鎷奸煶")
-    private String pinyin;
-
-    @ApiModelProperty(value = "姘戞棌")
-    private String nation;
-
-    @ApiModelProperty(value = "灞呮皯韬唤璇佸彿")
-    private String idCardNo;
-
-    @ApiModelProperty(value = "璇婄枟娆℃暟")
-    private Integer healthcareRecordTimes;
-
-    @ApiModelProperty(value = "浣忛櫌娆℃暟")
-    private Integer hospitalizationNumber;
-
-    @ApiModelProperty(value = "灏辫瘖鍗d")
-    private Long medicalCardId;
-
-    @ApiModelProperty(value = "灏辫瘖鍗$被鍨�")
-    private String medicalCardType;
-
-    @ApiModelProperty(value = "灏辫瘖鍗$被鍨嬪悕绉�")
-    private String medicalCardTypeName;
-
-    @ApiModelProperty(value = "灏辫瘖鍗″彿")
-    private String medicalCardNo;
-
-    @ApiModelProperty(value = "鐥呭巻鍙�  鎮h�呮瘡娆″氨璇婇兘鐩稿悓")
-    private String medicalRecordNo;
-
-    @ApiModelProperty(value = "鎬у埆鎻忚堪")
-    private String gender;
-
-    @ApiModelProperty(value = "鎬у埆缂栫爜  鎬у埆缂栫爜瀛楀吀:GB/T2261.1.0-鏈煡鐨勬�у埆\n" + "    GB/T2261.1.1-鐢穃n" + "    GB/T2261.1.2-濂砛n" + "    GB/T2261.1.9-鏈鏄庣殑鎬у埆")
-    private String genderCode;
-
-    @ApiModelProperty(value = "骞撮緞")
-    private String age;
-
-    @ApiModelProperty(value = "鍦板潃")
-    private String address;
-
-    @ApiModelProperty(value = "鐢熸棩")
-    private String birthday;
-
-    @ApiModelProperty(value = "鎵嬫満鍙�")
-    private String phone;
-
-    @ApiModelProperty(value = "鐥呭尯id")
-    private Long areaId;
-
-    @ApiModelProperty(value = "鐥呭尯鍚嶇О")
-    private String areaName;
-
-    @ApiModelProperty(value = "鎴块棿id")
-    private Long roomId;
-
-    @ApiModelProperty(value = "鎴垮彿")
-    private String roomNumber;
-
-    @ApiModelProperty(value = "搴婁綅id")
-    private Long bedId;
-
-    @ApiModelProperty(value = "搴婂彿")
-    private String bedNumber;
-
-    @ApiModelProperty(value = "鎶ょ悊绾у埆")
-    private String nursingLevel;
-
-    @ApiModelProperty(value = "鍏ラ櫌鐧昏鏃堕棿")
-    private String encounterTime;
-
-    @ApiModelProperty(value = "鍏ラ櫌鏃堕棿")
-    private String startTime;
-
-    @ApiModelProperty(value = "鍑洪櫌鏃堕棿")
-    private String preOutHospitalDate;
-
-    @ApiModelProperty(value = "缁撶畻鏃堕棿")
-    private String outHospitalSettleDate;
-
-    @ApiModelProperty(value = "璇婃柇缂栫爜:  鏈灏辫瘖鎮h�呮墍鏈夎瘖鏂搴旂殑icd缂栫爜锛岄�氳繃鈥溿�佲�濆垎闅�")
-    private String diagnosisCode;
-
-    @ApiModelProperty(value = "璇婃柇鍚嶇О 鏈灏辫瘖鎮h�呮墍鏈夎瘖鏂悕绉帮紝閫氳繃鈥溿�佲�濆垎闅�")
-    private String diagnosisName;
-
-    @ApiModelProperty(value = "璇婄枟鐘舵�� 鍙傝�冨�煎煙鏂囨。2.6")
-    private String healthcareRecordStatus;
-
-    @ApiModelProperty(value = "璇婄枟绫诲瀷:  FH0108.01-闂ㄨ瘖\n" + "    FH0108.02-浣忛櫌\n" + "    FH0108.03-鎬ヨ瘖\n" + "    FH0108.04-鐣欒\n" + "    FH0108.05-鎶㈡晳FH0108.06-闂ㄨ瘖浣撴\n" + "    FH0108.07-浣忛櫌浣撴")
-    private String healthcareType;
-
-    @ApiModelProperty(value = "绉戝id")
-    private Long deptId;
-
-    @ApiModelProperty(value = "绉戝鍚嶇О")
-    private String deptName;
-
-    @ApiModelProperty(value = "鍖荤敓id")
-    private Long doctorId;
-
-    @ApiModelProperty(value = "鍖荤敓濮撳悕")
-    private String doctorName;
-
-    @ApiModelProperty(value = "璇婄枟鍛ㄦ湡ID")
-    private Long healthcarePeriodId;
-
-    @ApiModelProperty(value = "鏈�鏂颁竴娆″叆闄㈡椂闂�  涓庡垱寤烘椂闂翠竴鑷�")
-    private String lastEncounterTime;
-
-    @ApiModelProperty(value = "涓荤鎶ゅ+ID")
-    private Long chiefNurseId;
-
-    @ApiModelProperty(value = "涓荤鎶ゅ+鍚嶇О")
-    private String chiefNurseName;
-
-    @ApiModelProperty(value = "璐圭敤绫诲埆")
-    private String costCategoryName;
-
-    @ApiModelProperty(value = "璐圭敤绫诲埆code")
-    private String costCategoryCode;
-
-    @ApiModelProperty(value = "璐圭敤鎬ц川")
-    private String costNatureName;
-
-    @ApiModelProperty(value = "璐圭敤鎬ц川code")
-    private String costNatureCode;
-
-    @ApiModelProperty(value = "鏂囧寲绋嬪害缂栫爜")
-    private String educationCode;
-
-    @ApiModelProperty(value = "鏂囧寲绋嬪害鎻忚堪")
-    private String education;
-
-    @ApiModelProperty(value = "鏄惁鏂扮敓鍎�")
-    private Boolean neonatal;
-
-    @ApiModelProperty(value = "濠氬Щ鐘跺喌缂栫爜")
-    private String marriageCode;
-
-    @ApiModelProperty(value = "濠氬Щ鐘跺喌鎻忚堪")
-    private String marriage;
-
-    @ApiModelProperty(value = "鑱屼笟鎻忚堪")
-    private String occupationType;
-
-    @ApiModelProperty(value = "鑱屼笟缂栫爜")
-    private String occupationTypeCode;
-
-    @ApiModelProperty(value = "澶嶈瘖鐘舵��   0-鍚�,1-鏄�")
-    private Integer furtherConsultationStatus;
-
-    @ApiModelProperty(value = "绫嶈疮")
-    private String nativePlace;
-
-
-    @ApiModelProperty(value = "鎵嬬幆鍙�")
-    private String wristband;
-
-    @ApiModelProperty(value = "鍖荤枟绫诲瀷")
-    private String medicalType;
-
-    @ApiModelProperty(value = "鍖荤枟绫诲瀷鍚嶇О")
-    private String medicalTypeName;
-
-    @ApiModelProperty(value = "鍖荤敓缁処D")
-    private Long doctorGroupId;
-
-    @ApiModelProperty(value = "鍖荤敓缁勫悕绉�")
-    private String doctorGroupName;
-
-    @ApiModelProperty(value = "鍏ラ櫌璇婃柇缂栫爜")
-    private String admissionDiagnosisCode;
-
-    @ApiModelProperty(value = "鍏ラ櫌璇婃柇鍚嶇О")
-    private String admissionDiagnosisName;
-
-    @ApiModelProperty(value = "璐圭敤閲戦")
-    private Double billAmount;
-
-    @ApiModelProperty(value = "鐥呭巻鏂囦欢鐘舵��")
-    private Integer medicalRecordFileStatus;
-
-    @ApiModelProperty(value = "灏辫瘖鏉ユ簮ID")
-    private String encounterSourceId;
-
-    @ApiModelProperty(value = "涓昏鍑洪櫌璇婃柇")
-    private ServiceSLTDDiagnosisResDTO mainDischargeDiagnosis;
-
-
-
-    @ApiModelProperty(value = "鑱旂郴浜哄垪琛�")
-    private List<ServiceSLTDContactsResDTO> residentContactInfos;
-
-    @ApiModelProperty(value = "璇婃柇鍒楄〃")
-    private List<ServiceSLTDDiagnosisResDTO> diagnosisList;
-
-    @ApiModelProperty(value = "璇婃柇鍒楄〃")
-    private List<ServiceSLTDMedicalRecordResDTO> medicalRecordDataList;
-}
diff --git a/smartor/src/main/java/com/smartor/domain/ServiceSLTDMedicalRecordResDTO.java b/smartor/src/main/java/com/smartor/domain/ServiceSLTDMedicalRecordResDTO.java
deleted file mode 100644
index cd3b763..0000000
--- a/smartor/src/main/java/com/smartor/domain/ServiceSLTDMedicalRecordResDTO.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package com.smartor.domain;
-
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-@ApiModel(value = "ServiceSLTDMedicalRecordResDTO", description = "鐪佺珛鍚屽痉鐥呭巻淇℃伅鍝嶅簲淇℃伅")
-@Data
-public class ServiceSLTDMedicalRecordResDTO {
-
-    @ApiModelProperty(value = "鐥呭巻鍊�:  DE04.01.119.00-涓昏瘔\n" + "DE02.10.071.00-鐜扮梾鍙瞈n" + "DE02.10.099.00-鏃㈠線鍙瞈n" + "DE04.10.258.00-浣撴牸妫�鏌n" + "DE02.10.097.00-涓汉鍙瞈n" + "DE02.10.098.00-濠氳偛鍙瞈n" + "DE02.10.103.00-瀹舵棌鍙瞈n" + "DE02.10.022.00-杩囨晱鍙�")
-    private String code;
-
-    @ApiModelProperty(value = "鐥呭巻鍐呭")
-    private String content;
-
-}
diff --git a/smartor/src/main/java/com/smartor/domain/ThiedInhospCheckInfo.java b/smartor/src/main/java/com/smartor/domain/ThiedInhospCheckInfo.java
deleted file mode 100644
index 9de1a2f..0000000
--- a/smartor/src/main/java/com/smartor/domain/ThiedInhospCheckInfo.java
+++ /dev/null
@@ -1,71 +0,0 @@
-package com.smartor.domain;
-
-
-import com.ruoyi.common.annotation.Excel;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * 绗笁鏂瑰巶鍟嗕綇闄㈡鏌ヤ俊鎭�
- *
- * @author ruoyi
- * @date 2024-9-02
- */
-@Data
-@ApiModel("绗笁鏂瑰巶鍟嗗嚭銆佸叆闄俊鎭�")
-public class ThiedInhospCheckInfo {
-
-    private String hospitalId;//	闄㈠尯ID
-    private String patIndex;//	鐥呬汉涓荤储寮�
-    private String patId;//	灏辫瘖ID
-    private String reqCard;//	鐢宠鍗曞彿
-    private String patNo;//	灏辫瘖鍙�
-    private String patType;//	鐥呬汉绫诲瀷
-    private String patName;//	鐥呬汉濮撳悕
-    private String patSex;//	鎬у埆
-    private String patBirth;//	鍑虹敓鏃ユ湡
-    private String patAge;//	鐥呬汉骞撮緞
-    private String patAgeUnit;//	鐥呬汉骞撮緞鍗曚綅
-    private String chargeType;//	鏀惰垂绫诲瀷浠g爜
-    private String patDiag;//	涓村簥璇婃柇
-    private String patDiagIcd;//	璇婃柇ICD10浠g爜
-    private String patAddress;//	鐥呬汉鑱旂郴鍦板潃
-    private String patNation;//	鐥呬汉鍥界睄
-    private String patIdCardNo;//	鐥呬汉韬唤璇佸彿
-    private String patPhone;//	鐥呬汉鑱旂郴鐢佃瘽
-    private String patHeight;//	鐥呬汉韬珮
-    private String patWeight;//	鐥呬汉浣撻噸
-    private String patWardId;//	鐥呬汉鐥呭尯
-    private String patBedNo;//	搴婂彿
-    private String reqDeptId;//	寮�鍗曠瀹D
-    private String reqDeptName;//	寮�鍗曠瀹ゅ悕绉�
-    private String reqDocId;//	鐢宠鍖荤敓ID
-    private String reqDocName;//	鐢宠鍖荤敓濮撳悕
-    private String reqDocComm;//	鍖荤敓澶囨敞
-    private String staffNum;//	鐢宠鍖荤敓宸ュ彿
-    private String reqTime;//	鐢宠鏃堕棿
-    private String printUser;//	鎵撳嵃鑰�
-    private String printTime;//	鎵撳嵃鏃堕棿
-    private String sampleUser;//	閲囨牱鑰�
-    private String sampleTime;//	閲囨牱鏃堕棿
-    private String sendUsder;//	浜ゆ帴鎶ゅ+
-    private String sendTime;//	绉讳氦缁欐姢澹椂闂�
-    private String emerFlag;//	鍔犳�ユ爣蹇�
-    private String sampleTypeId;//	鏍锋湰绫诲瀷ID
-    private String sampleType;//	鏍囨湰绫诲瀷鍚嶇О
-    private String performDeptID;//	鎵ц绉戝ID
-    private String performDeptName;//	鎵ц绉戝鍚嶇О
-    private String requestId;//	鐢宠鍗曞敮涓�ID
-    private String reqItemCode;//	鐢宠椤圭洰浠g爜
-    private String reqItemName;//	鐢宠椤圭洰鍚嶇О
-    private String itemPrice;//	鐢宠椤圭洰鍗曚环
-    private String qty;//	鐢宠椤圭洰鏁伴噺
-    private String chargeFlag;//	璁′环鏍囧織
-    private String detailId;//	鐢宠鏄庣粏鍞竴ID
-    private String itemTypeCode;//	璇婄枟椤圭洰鍒嗙被
-    private String itemClassCode;//	璇婄枟椤圭洰澶х被
-    private String orderId;//	鐥呬汉鍖诲槺ID
-
-}
-
diff --git a/smartor/src/main/java/com/smartor/domain/ThiedInhospInfo.java b/smartor/src/main/java/com/smartor/domain/ThiedInhospInfo.java
deleted file mode 100644
index e50a3b2..0000000
--- a/smartor/src/main/java/com/smartor/domain/ThiedInhospInfo.java
+++ /dev/null
@@ -1,469 +0,0 @@
-package com.smartor.domain;
-
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
-import com.ruoyi.common.annotation.Excel;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-import java.util.Date;
-import java.util.List;
-
-/**
- * 绗笁鏂瑰巶鍟嗗嚭銆佸叆闄俊鎭�
- *
- * @author ruoyi
- * @date 2024-9-02
- */
-@Data
-@ApiModel("绗笁鏂瑰巶鍟嗗嚭銆佸叆闄俊鎭�")
-public class ThiedInhospInfo {
-
-    /**
-     * 鏁版嵁绫诲瀷
-     */
-    @ApiModelProperty("鐥呬汉涓荤储寮�")
-    @Excel(name = "鐥呬汉涓荤储寮�")
-    private String patiIndex;
-
-    /**
-     * 鎮h�呭鍚�
-     */
-    @ApiModelProperty("鎮h�呭鍚�")
-    @Excel(name = "鎮h�呭鍚�")
-    private String patiRecordName;
-
-    private String patiRecordId;
-
-
-    private List Education;
-
-
-    /**
-     * 鎶ゅ+ID
-     */
-    @ApiModelProperty(value = "鎶ゅ+ID")
-    private String nurseId;
-
-    /**
-     * 鎶ゅ+濮撳悕
-     */
-    @ApiModelProperty(value = "鎶ゅ+濮撳悕")
-    private String nurseName;
-
-    /**
-     * 鎮h�呭鍚�
-     */
-    @ApiModelProperty("鎮h�呭鍚�")
-    @Excel(name = "鎮h�呭鍚�")
-    private String currDeptCode;
-
-    private String admissDeptCode;
-
-    /**
-     * 鐥呬汉浠嬭川搴忓彿
-     */
-    @ApiModelProperty("鐥呬汉浠嬭川搴忓彿")
-    @Excel(name = "鐥呬汉浠嬭川搴忓彿")
-    private String patiMediaId1;
-
-    /**
-     * 鐥呬汉浠嬭川鍙风爜
-     */
-    @ApiModelProperty("灏辫瘖鍗″彿")
-    @Excel(name = "灏辫瘖鍗″彿")
-    private String patiMediaNo;
-
-    /**
-     * 鐥呬汉浣忛櫌搴忓彿
-     */
-    @ApiModelProperty("鐥呬汉浣忛櫌搴忓彿")
-    @Excel(name = "鐥呬汉浣忛櫌搴忓彿")
-    private String inpatientId1;
-
-    /**
-     * 鎬у埆
-     */
-    @ApiModelProperty("鎬у埆")
-    @Excel(name = "鎬у埆")
-    private String patiRecordGender;
-
-    /**
-     * 骞撮緞
-     */
-    @ApiModelProperty("骞撮緞")
-    @Excel(name = "骞撮緞")
-    private String age;
-
-    /**
-     * 韬唤璇佸彿
-     */
-    @ApiModelProperty("韬唤璇佸彿")
-    @Excel(name = "韬唤璇佸彿")
-    private String patiIdCardNo;
-
-    /**
-     * 鍏ラ櫌鍗曞彿
-     */
-    @ApiModelProperty("鍏ラ櫌鍗曞彿")
-    @Excel(name = "鍏ラ櫌鍗曞彿")
-    private String admitFormId;
-
-    /**
-     * 寤鸿棰勪氦閲戦
-     */
-    @ApiModelProperty("寤鸿棰勪氦閲戦")
-    @Excel(name = "寤鸿棰勪氦閲戦")
-    private String suggestAmount;
-
-    /**
-     * 灏辫瘖鍗″彿
-     */
-    @ApiModelProperty("灏辫瘖鍗″彿")
-    @Excel(name = "灏辫瘖鍗″彿")
-    private String patiMediaId;
-
-    /**
-     * 鐥呬汉绫诲埆搴忓彿
-     */
-    @ApiModelProperty("鐥呬汉绫诲埆搴忓彿")
-    @Excel(name = "鐥呬汉绫诲埆搴忓彿")
-    private String patiTypeId1;
-
-    /**
-     * 鐥呬汉绫诲埆鍚嶇О
-     */
-    @ApiModelProperty("鐥呬汉绫诲埆鍚嶇О")
-    @Excel(name = "鐥呬汉绫诲埆鍚嶇О")
-    private String patiTypeName1;
-
-    /**
-     * 鍖讳繚绫诲瀷
-     */
-    @ApiModelProperty("鍖讳繚绫诲瀷")
-    @Excel(name = "鍖讳繚绫诲瀷")
-    private String patiTypeId;
-
-    /**
-     * 鏁版嵁绫诲瀷
-     */
-    @ApiModelProperty("鍖讳繚绫诲瀷鍚嶇О")
-    @Excel(name = "鍖讳繚绫诲瀷鍚嶇О")
-    private String patiTypeName;
-
-    /**
-     * 浣忛櫌鐘舵��
-     * 1-灏氭湭鍏ョ锛�2-宸茬粡鍏ョ锛�3-宸查鍑洪櫌锛�4-宸插嚭闄紱
-     */
-    @ApiModelProperty("浣忛櫌鐘舵��")
-    @Excel(name = "浣忛櫌鐘舵��")
-    private String currStatus;
-
-    /**
-     * 鏁版嵁绫诲瀷
-     */
-    @ApiModelProperty("闄㈠尯ID")
-    @Excel(name = "闄㈠尯ID")
-    private String areaId;
-
-    /**
-     * 鍏ラ櫌鐥呭尯ID
-     */
-    @ApiModelProperty("鍏ラ櫌鐥呭尯ID")
-    @Excel(name = "鍏ラ櫌鐥呭尯ID")
-    private String admissWardId;
-
-    /**
-     * 鍏ラ櫌鐥呭尯鍚嶇О
-     */
-    @ApiModelProperty("鍏ラ櫌鐥呭尯鍚嶇О")
-    @Excel(name = "鍏ラ櫌鐥呭尯鍚嶇О")
-    private String admissWardName;
-
-    private String admissWardCode;
-
-    /**
-     * 鍏ラ櫌绉戝ID
-     */
-    @ApiModelProperty("鍏ラ櫌绉戝ID")
-    @Excel(name = "鍏ラ櫌绉戝ID")
-    private String admissDeptId;
-
-    /**
-     * 鍏ラ櫌绉戝鍚嶇О
-     */
-    @ApiModelProperty("鍏ラ櫌绉戝鍚嶇О")
-    @Excel(name = "鍏ラ櫌绉戝鍚嶇О")
-    private String admissDeptName;
-
-    /**
-     * 鍏ラ櫌搴婁綅Id
-     */
-    @ApiModelProperty("鍏ラ櫌搴婁綅Id")
-    @Excel(name = "鍏ラ櫌搴婁綅Id")
-    private String admissBedId;
-
-    /**
-     * 鍏ラ櫌搴婁綅搴忓彿
-     */
-    @ApiModelProperty("鍏ラ櫌搴婁綅搴忓彿")
-    @Excel(name = "鍏ラ櫌搴婁綅搴忓彿")
-    private String admissBedNo;
-
-    /**
-     * 褰撳墠鐥呭尯ID
-     */
-    @ApiModelProperty("褰撳墠鐥呭尯ID")
-    @Excel(name = "褰撳墠鐥呭尯ID")
-    private String currWardId;
-
-    /**
-     * 褰撳墠鐥呭尯ID
-     */
-    @ApiModelProperty("褰撳墠鐥呭尯ID")
-    @Excel(name = "褰撳墠鐥呭尯ID")
-    private String currWardCode;
-
-    /**
-     * 褰撳墠鐥呭尯鍚嶇О
-     */
-    @ApiModelProperty("褰撳墠鐥呭尯鍚嶇О")
-    @Excel(name = "褰撳墠鐥呭尯鍚嶇О")
-    private String currWardName;
-
-    /**
-     * 褰撳墠绉戝ID
-     */
-    @ApiModelProperty("褰撳墠绉戝ID")
-    @Excel(name = "褰撳墠绉戝ID")
-    private String currDeptId;
-
-    /**
-     * 褰撳墠绉戝鍚嶇О
-     */
-    @ApiModelProperty("褰撳墠绉戝鍚嶇О")
-    @Excel(name = "褰撳墠绉戝鍚嶇О")
-    private String currDeptName;
-
-    /**
-     * 褰撳墠搴婁綅搴忓彿
-     */
-    @ApiModelProperty("褰撳墠搴婁綅搴忓彿")
-    @Excel(name = "褰撳墠搴婁綅搴忓彿")
-    private String currBedNo1;
-
-    /**
-     * 褰撳墠搴婁綅ID
-     */
-    @ApiModelProperty("褰撳墠搴婁綅ID")
-    @Excel(name = "褰撳墠搴婁綅ID")
-    private String currBedId;
-
-    /**
-     * 浣忛櫌鍙�
-     */
-    @ApiModelProperty("浣忛櫌鍙�")
-    @Excel(name = "浣忛櫌鍙�")
-    private String inpatientId;
-
-    /**
-     * 搴婂彿
-     */
-    @ApiModelProperty("搴婂彿")
-    @Excel(name = "搴婂彿")
-    private String currBedNo;
-
-    /**
-     * 鍏ラ櫌鏃堕棿
-     */
-    @ApiModelProperty("鍏ラ櫌鏃堕棿")
-    @Excel(name = "鍏ラ櫌鏃堕棿")
-    private String admissDate;
-
-    /**
-     * 寮�鍗曞尰鐢�
-     */
-    @ApiModelProperty("寮�鍗曞尰鐢�")
-    @Excel(name = "寮�鍗曞尰鐢�")
-    private String DocName;
-
-    /**
-     * 涓绘不鍖诲笀
-     */
-    @ApiModelProperty("涓绘不鍖诲笀")
-    @Excel(name = "涓绘不鍖诲笀")
-    private String doctName;
-    /**
-     * 涓绘不鍖诲笀
-     */
-    @ApiModelProperty("涓绘不鍖诲笀")
-    @Excel(name = "涓绘不鍖诲笀")
-    private String doctId;
-
-    /**
-     * 璇婃柇ID
-     */
-    @ApiModelProperty("璇婃柇ID")
-    @Excel(name = "璇婃柇ID")
-    private String diagId;
-
-    /**
-     * 璇婃柇ICD10鐮�
-     */
-    @ApiModelProperty("璇婃柇ICD10鐮�")
-    @Excel(name = "璇婃柇ICD10鐮�")
-    private String diagIcd10;
-
-
-    /**
-     * 璇婃柇鍚嶇О
-     */
-    @ApiModelProperty("璇婃柇鍚嶇О")
-    @Excel(name = "璇婃柇鍚嶇О")
-    private String diagName;
-    /**
-     * 鑱旂郴浜�
-     */
-    @ApiModelProperty("鑱旂郴鍦板潃")
-    @Excel(name = "鑱旂郴鍦板潃")
-    private String contactPersonAddr;
-    /**
-     * 鑱旂郴浜�
-     */
-    @ApiModelProperty("鑱旂郴浜�")
-    @Excel(name = "鑱旂郴浜�")
-    private String contactPersonName;
-
-    /**
-     * 鑱旂郴浜虹數璇�
-     */
-    @ApiModelProperty("鑱旂郴浜虹數璇�")
-    @Excel(name = "鑱旂郴浜虹數璇�")
-    private String contactPersonPhone;
-
-    /**
-     * 鏁版嵁绫诲瀷
-     */
-    @ApiModelProperty("鍥界睄")
-    @Excel(name = "鍥界睄")
-    private String PatiNationality;
-
-    private String NationalityAddr;
-
-    private String patiNatureId;
-
-    //骞撮緞
-    private String treateAge;
-    //骞撮緞鍗曚綅
-    private String treatAgeunit;
-    private String patiNatureName;
-
-
-    /**
-     * 鏁版嵁绫诲瀷
-     */
-    @ApiModelProperty("鍥界睄")
-    @Excel(name = "鍥界睄")
-    private String patNatureId;
-    private String PatNation;
-
-
-    /**
-     * 姘戞棌
-     */
-    @ApiModelProperty("姘戞棌")
-    @Excel(name = "姘戞棌")
-    private String patiNation;
-    /**
-     * 鏁版嵁绫诲瀷
-     */
-    @ApiModelProperty("鑱屼笟")
-    @Excel(name = "鑱屼笟")
-    private String ProfessionId;
-
-    /**
-     * 濠氬Щ鐘舵��
-     */
-    @ApiModelProperty("濠氬Щ鐘舵��")
-    @Excel(name = "濠氬Щ鐘舵��")
-    private String PatiMaritalStatus;
-
-    /**
-     * 鐜颁綇鍦板潃
-     */
-    @JsonIgnoreProperties(ignoreUnknown = true)
-    @ApiModelProperty("鐜颁綇鍦板潃")
-    @Excel(name = "鐜颁綇鍦板潃")
-    private String patiHomeAddr;
-
-    private String patiHomePhone;
-
-    /**
-     * 鑱旂郴鐢佃瘽
-     */
-    @ApiModelProperty("鑱旂郴鐢佃瘽")
-    @Excel(name = "鑱旂郴鐢佃瘽")
-    private String companyTelNum;
-
-    /**
-     * 鏁版嵁绫诲瀷
-     */
-    @ApiModelProperty("鍑虹敓鏃ユ湡")
-    @Excel(name = "鍑虹敓鏃ユ湡")
-    private String patiBirthday;
-
-    /**
-     * 浣忛櫌娆℃暟
-     */
-    @ApiModelProperty("浣忛櫌娆℃暟")
-    @Excel(name = "浣忛櫌娆℃暟")
-    private String inhospitalTimes;
-
-    /**
-     * 鍑洪櫌鏂瑰紡搴忓彿
-     */
-    @ApiModelProperty("鍑洪櫌鏂瑰紡搴忓彿")
-    @Excel(name = "鍑洪櫌鏂瑰紡搴忓彿   1.娌绘剤  2.濂借浆   3.鏈剤   4.姝讳骸   5.鍏跺畠")
-    private String outWayId;
-
-    /**
-     * 鍑洪櫌鏂瑰紡鍚嶇О
-     */
-    @ApiModelProperty("鍑洪櫌鏂瑰紡鍚嶇О")
-    @Excel(name = "鍑洪櫌鏂瑰紡鍚嶇О")
-    private String outWayName;
-
-    /**
-     * 浣忛櫌鎬昏垂鐢�
-     */
-    @ApiModelProperty("浣忛櫌鎬昏垂鐢�")
-    @Excel(name = "浣忛櫌鎬昏垂鐢�")
-    private String totalAmount;
-
-    /**
-     * 棰勫鍑洪櫌鏃ユ湡
-     */
-    @ApiModelProperty("棰勫鍑洪櫌鏃ユ湡")
-    @Excel(name = "棰勫鍑洪櫌鏃ユ湡")
-    private String preoutDate;
-
-    /**
-     * 缁撹处鏃ユ湡
-     */
-    @ApiModelProperty("缁撹处鏃ユ湡")
-    @Excel(name = "缁撹处鏃ユ湡")
-    private String cashDate;
-
-    /**
-     * 鐥呬汉鍑洪櫌鏃ユ湡
-     */
-    @ApiModelProperty("鐥呬汉鍑洪櫌鏃ユ湡")
-    @Excel(name = "鐥呬汉鍑洪櫌鏃ユ湡")
-    private String outDate;
-    private String RelationShip;
-
-
-}
-
diff --git a/smartor/src/main/java/com/smartor/domain/ThiedOutHospCheckInfo.java b/smartor/src/main/java/com/smartor/domain/ThiedOutHospCheckInfo.java
deleted file mode 100644
index 0c61d7e..0000000
--- a/smartor/src/main/java/com/smartor/domain/ThiedOutHospCheckInfo.java
+++ /dev/null
@@ -1,74 +0,0 @@
-package com.smartor.domain;
-
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-
-/**
- * 绗笁鏂瑰巶鍟嗛棬璇婃鏌ヤ俊鎭�
- *
- * @author ruoyi
- * @date 2024-9-02
- */
-@Data
-@ApiModel("绗笁鏂瑰巶鍟嗛棬璇婁俊鎭�")
-public class ThiedOutHospCheckInfo {
-
-    private String hospitalId;//	闄㈠尯ID
-    private String patIndex;//	鐥呬汉涓荤储寮�
-    private String patId;//	浣忛櫌ID
-    private String patNo;//	浣忛櫌鍙�
-    private String reqCard;//	鐢宠鍗曞彿
-    private String patType;//	鐥呬汉绫诲瀷
-    private String patName;//	鐥呬汉濮撳悕
-    private String patSex;//	鎬у埆
-    private String patBirth;//	鍑虹敓鏃ユ湡
-    private String patAge;//	鐥呬汉骞撮緞
-    private String patAgeUnit;//	鐥呬汉骞撮緞鍗曚綅
-    private String chargeType;//	鏀惰垂绫诲瀷浠g爜
-    private String patDiag;//	涓村簥璇婃柇
-    private String patDiagIcd;//	璇婃柇ICD10浠g爜
-    private String patAddress;//	鐥呬汉鑱旂郴鍦板潃
-    private String patNation;//	鐥呬汉鍥界睄
-    private String patIdCardNo;//	鐥呬汉韬唤璇佸彿
-    private String patPhone;//	鐥呬汉鑱旂郴鐢佃瘽
-    private String patHeight;//	鐥呬汉韬珮
-    private String patWeight;//	鐥呬汉浣撻噸
-    private String patWardId;//鐥呬汉鐥呭尯ID
-    private String patWardName;//	鐥呬汉鐥呭尯鍚嶇О
-    private String patDeptId;//	鐥呬汉绉戝ID
-    private String patDeptName;//鐥呬汉绉戝鍚嶇О
-    private String patBedNo;//	搴婂彿
-    private String reqDeptId;//	寮�鍗曠瀹D
-    private String reqDeptName;//;//	寮�鍗曠瀹ゅ悕绉�
-    private String reqDocId;//	鐢宠鍖荤敓ID
-    private String reqDocName;//	鐢宠鍖荤敓濮撳悕
-    private String reqDocComm;//	鍖荤敓澶囨敞
-    private String staffNum;//	鐢宠鍖荤敓宸ュ彿
-    private String reqTime;//	鐢宠鏃堕棿
-    private String printUser;//	鎵撳嵃鑰�
-    private String printTime;//	鎵撳嵃鏃堕棿
-    private String sampleUser;//	閲囨牱鑰�
-    private String sampleTime;//	閲囨牱鏃堕棿
-    private String sendUsder;//	浜ゆ帴鎶ゅ+
-    private String sendTime;//	绉讳氦缁欐姢澹椂闂�
-    private String emerFlag;//	鍔犳�ユ爣蹇�
-    private String sampleTypeId;//	鏍囨湰绫诲瀷ID
-    private String sampleType;//	鏍囨湰绫诲瀷鍚嶇О
-    private String performDeptID;//	鎵ц绉戝ID
-    private String performDeptName;//	鎵ц绉戝鍚嶇О
-    private String requestId;//	鐢宠鍗曞敮涓�ID
-    private String reqItemCode;//	鐢宠椤圭洰浠g爜
-    private String reqItemName;//	鐢宠椤圭洰鍚嶇О
-    private String itemPrice;//	鐢宠椤圭洰鍗曚环
-    private String qty;//	鐢宠椤圭洰鏁伴噺
-    private String chargeFlag;//	璁′环鏍囧織
-    private String detailId;//	鐢宠鏄庣粏鍞竴ID
-    private String itemTypeCode;//	璇婄枟椤圭洰鍒嗙被
-    private String itemClassCode;//	璇婄枟椤圭洰澶х被
-    private String orderId;//	鐥呬汉鍖诲槺ID
-    private String admissTimes;//	浣忛櫌娆℃暟
-    private String entryTime;//	鍏ラ櫌鏃堕棿
-
-}
-
diff --git a/smartor/src/main/java/com/smartor/domain/ThiedOutHospInfo.java b/smartor/src/main/java/com/smartor/domain/ThiedOutHospInfo.java
deleted file mode 100644
index abf69a2..0000000
--- a/smartor/src/main/java/com/smartor/domain/ThiedOutHospInfo.java
+++ /dev/null
@@ -1,121 +0,0 @@
-package com.smartor.domain;
-
-
-import io.swagger.annotations.ApiModel;
-import lombok.Data;
-
-/**
- * 绗笁鏂瑰巶鍟嗛棬璇婁俊鎭�
- *
- * @author ruoyi
- * @date 2024-9-02
- */
-@Data
-@ApiModel("绗笁鏂瑰巶鍟嗛棬璇婁俊鎭�")
-public class ThiedOutHospInfo {
-
-    private String del;      //鍒犻櫎鏍囧織
-    private String creator;         //	鍒涘缓鑰�
-    private String createTime;      //鍒涘缓鏃堕棿
-    private String updater;     //	鏇存柊鑰�
-    private String updateTime;//鏇存柊鏃堕棿
-    private String treatID; //	鐥呬汉灏辫瘖搴忓彿
-    private String orgCode;//缁勭粐鏈烘瀯浠g爜
-    private String orgName;//缁勭粐鏈烘瀯鍚嶇О
-    private String treatDate;//	鐥呬汉灏辫瘖鏃ユ湡
-    private String departmentID;//	灏辫瘖绉戝浠g爜
-    private String hisDepartmentID;//	灏辫瘖绉戝浠g爜
-    private String departmentName;//	灏辫瘖绉戝鍚嶇О
-    private String doctorID;//	灏辫瘖鍖荤敓搴忓彿
-    private String doctorNum;//灏辫瘖鍖荤敓宸ュ彿
-    private String hisDoctorID;//灏辫瘖鍖荤敓搴忓彿
-    private String doctorName;//	灏辫瘖鍖荤敓鍚嶇О
-    private String patiRecordID;//鐥呬汉妗f搴忓彿
-    private String patiMediaID;//	鐥呬汉浠嬭川搴忓彿
-    private String patiMediaNum;//	鐥呬汉浠嬭川鍙风爜
-    private String patiTypeID;//	鐥呬汉绫诲埆搴忓彿
-    private String patiTypeName;//	鐥呬汉绫诲埆鍚嶇О
-    private String patiNatureID;//	鐥呬汉鎬ц川搴忓彿
-    private String patiNatureName;//	鐥呬汉鎬ц川鍚嶇О
-    private String patiName;//	鐥呬汉妗f濮撳悕
-    private String patiIndex;//	鐥呬汉涓荤储寮�
-    private String patiAge;//	灏辫瘖鐥呬汉骞撮緞
-    private String patiAgeUnit;//	鐥呬汉骞撮緞鍗曚綅
-    private String patiBirthday;//	鐥呬汉鍑虹敓鏃ユ湡
-    private String patiAddr;//	鐥呬汉浣忓潃
-    private String patiPhone;//	鐥呬汉鑱旂郴鐢佃瘽
-    private String patiSex;//	鐥呬汉妗f鎬у埆
-    private String patiIDCardno;//	鐥呬汉韬唤璇佸彿
-    private String patiSourceID;//鐥呬汉鏉ユ簮id
-    private String patiSource;//鐥呬汉鏉ユ簮
-    private String patiCompany;//	鐥呬汉鍗曚綅
-    private String specialPati;//	鐗规畩鐥呬汉绫诲瀷
-    private String treatStatus;//	鐥呬汉灏辫瘖鐘舵��
-    private String treatTimes;//	鐥呬汉灏辫瘖娆℃暟
-    private String visitFlag;//	鍒濊瘖澶嶈瘖鍒ゅ埆
-    private String regID;//	鎸傚彿璁板綍搴忓彿
-    private String goType;//	鐥呬汉灏辫瘖鍘诲悜
-    private String attackDate;//	鐥呬汉鍙戠梾鏃ユ湡
-    private String treatBeginDate;//灏辫瘖寮�濮嬫椂闂�
-    private String treatEndDate;//	灏辫瘖缁撴潫鏃堕棿
-    private String relateTreatID;//	瀵瑰簲灏辫瘖搴忓彿
-    private String treatChangeID;//	灏辫瘖鍙樺姩搴忓彿
-    private String infectious;//	浼犳煋鐥呯鍒ゅ埆
-    private String settleID;//缁撶畻绫诲埆搴忓彿
-    private String settleName;//	缁撶畻绫诲埆鍚嶇О
-    private String specialRemark;//	鐗规畩鐥呯
-    private String cycleID;//璇婄枟鍛ㄦ湡缂栫爜
-    private String transferID;//	杞瘖璁板綍搴忓彿
-    private String depositID;//	鐥呬汉浜ゆ搴忓彿
-    private String systemID;//绯荤粺妯″潡搴忓彿
-    private String operateType;//鎺ヨ瘖鎿嶄綔绫诲埆
-    private String emergency;//鏄惁鎬ヨ瘖鍒ゅ埆
-    private String emergencyRegisterID;//	鎬ヨ瘖鐧昏搴忓彿
-    private String doctorGroupID;//	鍖荤敓缁勫彿搴忓彿
-    private String doctorGroupName;//鍖荤敓缁勫彿鍚嶇О
-    private String interTreatID;//鎺ュ彛灏辫瘖搴忓彿
-    private String summaryTimes;//灏辫瘖灏忕粨娆℃暟
-    private String transportation;//浜ら�氬伐鍏�
-    private String evaluation;//璇勪及鍊�
-    private String diagIcd10;//璇婃柇ICD10
-    private String diagName;//璇婃柇鍚嶇О
-    private String nationCode;//姘戞棌缂栫爜
-    private String nation;//姘戞棌
-    private String citizenshipCode;//鍥界睄缂栫爜
-    private String citizenship;//鍥界睄
-    private String livingAddressCode;//	鐜颁綇鍧�缂栫爜
-    private String livingAddress;//	鐜颁綇鍧�
-    private String occupationCode;//浜虹兢鍒嗙被浠g爜
-    private String occupation;//	浜虹兢鍒嗙被
-    private String idcardTypeCode;//	璇佷欢绫诲瀷缂栫爜
-    private String idcardType;//	璇佷欢绫诲瀷
-    private String domicileCode;//	鎴风睄绫诲瀷缂栫爜
-    private String domicile;//	鎴风睄绫诲瀷
-    private String domicileAddressCode;//	鎴风睄缂栫爜
-    private String domicileAddress;//	鎴风睄
-    private String domicileAdrressDetails;//	鎴风睄璇︾粏鍦板潃
-    private String contacts;//	鑱旂郴浜�
-    private String contactsTel;//	鑱旂郴浜虹數璇�
-    private String mrCompletion;//	鐥呭巻瀹屾垚搴﹀瓧娈�
-    private String mrPrintFlag;//	鐥呭巻鎵撳嵃鏍囧織
-    private String syncFlag;//	灏辫瘖璁板綍鍚屾鏍囧織
-    private String patiHeight;//	韬珮
-    private String patiHeightUnit;//	韬珮鍗曚綅
-    private String patiWeight;//	浣撻噸
-    private String patiWeightUnit;//	浣撻噸鍗曚綅
-    private String zs;//	涓昏瘔
-    private String xbs;//	鐜扮梾鍙�
-    private String jws;//	鏃㈠線鍙�
-    private String breathe;//	鍛煎惛
-    private String breatheUnit;//	鍛煎惛鍗曚綅
-    private String ssy;//	鏀剁缉鍘�
-    private String ssyUnit;//	鏀剁缉鍘嬪崟浣�
-    private String szy;//	鑸掑紶鍘�
-    private String szyUnit;//	鑸掑紶鍘嬪崟浣�
-    private String temperature;//	浣撴俯
-    private String temperatureUnit;//	浣撴俯鍗曚綅
-    private String fzjc;//	杈呭姪妫�鏌�
-    private String tgjc;//	浣撴牸妫�鏌�
-
-}
-
diff --git a/smartor/src/main/java/com/smartor/mapper/HNGatherPatArchiveMapper.java b/smartor/src/main/java/com/smartor/mapper/HNGatherPatArchiveMapper.java
deleted file mode 100644
index 76b2bd9..0000000
--- a/smartor/src/main/java/com/smartor/mapper/HNGatherPatArchiveMapper.java
+++ /dev/null
@@ -1,103 +0,0 @@
-package com.smartor.mapper;
-
-import com.ruoyi.common.annotation.DataSource;
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.core.domain.entity.SysUserDept;
-import com.ruoyi.common.core.domain.entity.SysUserRole;
-import com.ruoyi.common.enums.DataSourceType;
-import com.smartor.domain.*;
-import com.ruoyi.outpatientvisit.domain.PatMedOuthosp;
-import com.ruoyi.inhospvisit.domain.PatMedInhosp;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-import com.ruoyi.common.core.domain.entity.PatArchive;
-
-/**
- * 娌冲崡閲囬泦鎮h�呬俊鎭疢apper鎺ュ彛
- *
- * @author smartor
- * @date 2025-07-09
- */
-@DataSource(value = DataSourceType.SLAVE)
-@Mapper
-public interface HNGatherPatArchiveMapper {
-
-    /**
-     * 鏌ヨ鎮h�呮。妗堝垪琛�
-     *
-     * @param patArchive 鎮h�呮。妗�
-     * @return 鎮h�呮。妗堥泦鍚�
-     */
-    public List<PatArchive> selectPatArchiveList(PatArchive patArchive);
-
-    /**
-     * 鐢ㄦ埛涓庤鑹蹭俊鎭�
-     *
-     * @param sysUser
-     * @return
-     */
-    public SysUserRole yhyjsxx(SysUser sysUser);
-
-    /**
-     * 鐢ㄦ埛涓庣瀹や俊鎭�
-     *
-     * @param sysUser
-     * @return
-     */
-    public SysUserDept yhyksxx(SysUser sysUser);
-
-    /**
-     * 鍑哄叆闄俊鎭�
-     *
-     * @param patMedInhosp
-     * @return
-     */
-    public List<PatMedInhosp> selectPatMedInhospList(PatMedInhosp patMedInhosp);
-
-    public Long selectPatMedInhospListCount(PatMedInhosp patMedInhosp);
-
-    List<PatArchive> selectPatArchiveListByLastId(@Param("lastRowNumber") long lastRowNumber, @Param("ps") int ps);
-
-    List<PatMedInhosp> selectPatMedInhospListByLastId(@Param("lastRowNumber") long lastRowNumber, @Param("ps") int ps);
-
-    public Long selectPatArchiveCount(PatMedInhosp patMedInhosp);
-
-    /**
-     * 闂ㄦ�ヨ瘖淇℃伅
-     *
-     * @param patMedOuthosp
-     * @return
-     */
-    public List<PatMedOuthosp> selectPatMedOuthospList(PatMedOuthosp patMedOuthosp);
-
-
-    /**
-     * /**
-     * 鏌ヨ鐤剧梾鍒楄〃
-     *
-     * @param icd10 鐤剧梾
-     * @return 鐤剧梾闆嗗悎
-     */
-    public List<Icd10> selectIcd10List(Icd10 icd10);
-
-    /**
-     * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃
-     *
-     * @param sysUser 鐢ㄦ埛淇℃伅
-     * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
-     */
-    public List<SysUser> selectUserList(SysUser sysUser);
-
-    /**
-     * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁
-     *
-     * @param dept 閮ㄩ棬淇℃伅
-     * @return 閮ㄩ棬淇℃伅闆嗗悎
-     */
-    public List<SysDept> selectDeptList(SysDept dept);
-
-
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/Icd10Mapper.java b/smartor/src/main/java/com/smartor/mapper/Icd10Mapper.java
deleted file mode 100644
index 23730e2..0000000
--- a/smartor/src/main/java/com/smartor/mapper/Icd10Mapper.java
+++ /dev/null
@@ -1,88 +0,0 @@
-package com.smartor.mapper;
-
-import com.smartor.domain.Icd10;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 鐤剧梾Mapper鎺ュ彛
- *
- * @author ruoyi
- * @date 2023-12-21
- */
-@Mapper
-public interface Icd10Mapper {
-    /**
-     * 鏌ヨ鐤剧梾
-     *
-     * @param icdid 鐤剧梾涓婚敭
-     * @return 鐤剧梾
-     */
-    public Icd10 selectIcd10ByIcdid(Long icdid);
-
-    /**
-     * 鏌ヨ鐤剧梾鍒楄〃
-     *
-     * @param icd10 鐤剧梾
-     * @return 鐤剧梾闆嗗悎
-     */
-    public List<Icd10> selectIcd10List(Icd10 icd10);
-
-    /**
-     * 鏌ヨ鐤剧梾鍒楄〃
-     *
-     * @param icd10 鐤剧梾
-     * @return 鐤剧梾闆嗗悎
-     */
-    public List<Icd10> exactQueryIcd10List(Icd10 icd10);
-
-    /**
-     * 鏂板鐤剧梾
-     *
-     * @param icd10 鐤剧梾
-     * @return 缁撴灉
-     */
-    public int insertIcd10(Icd10 icd10);
-
-    /**
-     * 鎵归噺鏂板鐤剧梾
-     *
-     * @param icd10s 鐤剧梾闆嗗悎
-     * @return 缁撴灉
-     */
-    public int batchIcd10(List<Icd10> icd10s);
-
-    /**
-     * 鎵归噺鏌ヨ宸插瓨鍦ㄧ殑 icdcode锛堢敤浜庡幓閲嶏級
-     *
-     * @param icdcodes icdcode闆嗗悎
-     * @return 宸插瓨鍦ㄧ殑 icdcode 闆嗗悎
-     */
-    public List<String> selectExistingIcdcodes(@Param("icdnames") List<String> icdnames);
-
-    /**
-     * 淇敼鐤剧梾
-     *
-     * @param icd10 鐤剧梾
-     * @return 缁撴灉
-     */
-    public int updateIcd10(Icd10 icd10);
-
-    /**
-     * 鍒犻櫎鐤剧梾
-     *
-     * @param icdid 鐤剧梾涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteIcd10ByIcdid(Long icdid);
-
-    /**
-     * 鎵归噺鍒犻櫎鐤剧梾
-     *
-     * @param icdids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteIcd10ByIcdids(Long[] icdids);
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/MedicationDoseInfoMapper.java b/smartor/src/main/java/com/smartor/mapper/MedicationDoseInfoMapper.java
deleted file mode 100644
index 98f0b74..0000000
--- a/smartor/src/main/java/com/smartor/mapper/MedicationDoseInfoMapper.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.smartor.mapper;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Mapper;
-import com.smartor.domain.MedicationDoseInfo;
-
-/**
- * 鑽搧鍓傞噺淇℃伅Mapper鎺ュ彛
- *
- * @author lihu
- * @date 2026-07-17
- */
-@Mapper
-public interface MedicationDoseInfoMapper
-{
-    /**
-     * 鏌ヨ鑽搧鍓傞噺淇℃伅
-     *
-     * @param id 鑽搧鍓傞噺淇℃伅涓婚敭
-     * @return 鑽搧鍓傞噺淇℃伅
-     */
-    public MedicationDoseInfo selectMedicationDoseInfoById(Long id);
-
-    /**
-     * 鏌ヨ鑽搧鍓傞噺淇℃伅鍒楄〃
-     *
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 鑽搧鍓傞噺淇℃伅闆嗗悎
-     */
-    public List<MedicationDoseInfo> selectMedicationDoseInfoList(MedicationDoseInfo medicationDoseInfo);
-
-    /**
-     * 鏂板鑽搧鍓傞噺淇℃伅
-     *
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 缁撴灉
-     */
-    public int insertMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo);
-
-    /**
-     * 淇敼鑽搧鍓傞噺淇℃伅
-     *
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 缁撴灉
-     */
-    public int updateMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo);
-
-    /**
-     * 鍒犻櫎鑽搧鍓傞噺淇℃伅
-     *
-     * @param id 鑽搧鍓傞噺淇℃伅涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteMedicationDoseInfoById(Long id);
-
-    /**
-     * 鎵归噺鍒犻櫎鑽搧鍓傞噺淇℃伅
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteMedicationDoseInfoByIds(Long[] ids);
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/MedicationItemMapper.java b/smartor/src/main/java/com/smartor/mapper/MedicationItemMapper.java
deleted file mode 100644
index e09c3a9..0000000
--- a/smartor/src/main/java/com/smartor/mapper/MedicationItemMapper.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.smartor.mapper;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Mapper;
-import com.smartor.domain.MedicationItem;
-
-/**
- * 鑽搧淇℃伅Mapper鎺ュ彛
- *
- * @author lihu
- * @date 2026-07-17
- */
-@Mapper
-public interface MedicationItemMapper
-{
-    /**
-     * 鏌ヨ鑽搧淇℃伅
-     *
-     * @param id 鑽搧淇℃伅涓婚敭
-     * @return 鑽搧淇℃伅
-     */
-    public MedicationItem selectMedicationItemById(Long id);
-
-    /**
-     * 鏌ヨ鑽搧淇℃伅鍒楄〃
-     *
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 鑽搧淇℃伅闆嗗悎
-     */
-    public List<MedicationItem> selectMedicationItemList(MedicationItem medicationItem);
-
-    /**
-     * 鏂板鑽搧淇℃伅
-     *
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 缁撴灉
-     */
-    public int insertMedicationItem(MedicationItem medicationItem);
-
-    /**
-     * 淇敼鑽搧淇℃伅
-     *
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 缁撴灉
-     */
-    public int updateMedicationItem(MedicationItem medicationItem);
-
-    /**
-     * 鍒犻櫎鑽搧淇℃伅
-     *
-     * @param id 鑽搧淇℃伅涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteMedicationItemById(Long id);
-
-    /**
-     * 鎵归噺鍒犻櫎鑽搧淇℃伅
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteMedicationItemByIds(Long[] ids);
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/ServiceAppointRecordMapper.java b/smartor/src/main/java/com/smartor/mapper/ServiceAppointRecordMapper.java
deleted file mode 100644
index 7d51d2c..0000000
--- a/smartor/src/main/java/com/smartor/mapper/ServiceAppointRecordMapper.java
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.smartor.mapper;
-
-import java.util.List;
-import org.apache.ibatis.annotations.Mapper;
-import com.smartor.domain.ServiceAppointRecord;
-
-/**
- * 棰勭害璁板綍Mapper鎺ュ彛
- *
- * @author lihu
- * @date 2026-07-06
- */
-@Mapper
-public interface ServiceAppointRecordMapper
-{
-    /**
-     * 鏌ヨ棰勭害璁板綍
-     *
-     * @param id 棰勭害璁板綍涓婚敭
-     * @return 棰勭害璁板綍
-     */
-    public ServiceAppointRecord selectServiceAppointRecordById(Long id);
-
-    /**
-     * 鏌ヨ棰勭害璁板綍鍒楄〃
-     *
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 棰勭害璁板綍闆嗗悎
-     */
-    public List<ServiceAppointRecord> selectServiceAppointRecordList(ServiceAppointRecord serviceAppointRecord);
-
-    /**
-     * 鏂板棰勭害璁板綍
-     *
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 缁撴灉
-     */
-    public int insertServiceAppointRecord(ServiceAppointRecord serviceAppointRecord);
-
-    /**
-     * 淇敼棰勭害璁板綍
-     *
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 缁撴灉
-     */
-    public int updateServiceAppointRecord(ServiceAppointRecord serviceAppointRecord);
-
-    /**
-     * 鍒犻櫎棰勭害璁板綍
-     *
-     * @param id 棰勭害璁板綍涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteServiceAppointRecordById(Long id);
-
-    /**
-     * 鎵归噺鍒犻櫎棰勭害璁板綍
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteServiceAppointRecordByIds(Long[] ids);
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskPreachformMapper.java b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskPreachformMapper.java
deleted file mode 100644
index c561a63..0000000
--- a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskPreachformMapper.java
+++ /dev/null
@@ -1,117 +0,0 @@
-package com.smartor.mapper;
-
-import java.util.List;
-
-import com.ruoyi.task.domain.ServiceSubtask;
-import com.ruoyi.task.domain.ServiceSubtaskPreachform;
-
-/**
- * 闅忚瀛愪换鍔°�屾墽琛屾柟寮忔槑缁嗐�嶏紙{@code service_subtask_preachform}锛夆�斺�� <b>杩囨浮鎺ュ彛</b>銆�
- *
- * <h3>鈿狅笍 鏈帴鍙e凡涓嶅啀鏄� MyBatis Mapper</h3>
- * 杩欏紶琛ㄧ殑褰掑睘妯″潡鏄� {@code ruoyi-inhospvisit}銆傛寜銆屽悇妯″潡鐙崰鑷繁鐨勬暟鎹闂�嶅師鍒欙紝
- * 璇ヨ〃鐨勮鍐欏凡鏀跺彛鍒拌妯″潡鐨� {@code com.ruoyi.common.core.service.PreachformApi}锛�
- * <ul>
- *   <li><b>鏈帴鍙e凡鍘绘帀 {@code @Mapper} 娉ㄨВ</b>锛岄厤濂楃殑
- *       {@code mapper/smartor/ServiceSubtaskPreachformMapper.xml} <b>涔熷凡鍒犻櫎</b>
- *       鈥斺�� 鍚屼竴涓〃涓嶈兘鍐嶆湁涓ゅ SQL锛堟敼涓�杈瑰氨涓庡彟涓�杈规紓绉伙級锛�</li>
- *   <li>鐢� {@link com.smartor.mapper.impl.ServiceSubtaskPreachformMapperBridge}
- *       瀹炵幇锛岄�愭柟娉曞鎵樺埌妯″潡 API锛�</li>
- *   <li>淇濈暀鏈帴鍙f槸涓轰簡璁�<b>11 涓皟鐢ㄦ枃浠堕浂鏀瑰姩</b>锛堝畠浠敞鍏ョ殑浠嶆槸杩欎釜绫诲瀷锛夈��</li>
- * </ul>
- *
- * <h3>鈿狅笍 鍘绘帀 {@code @Mapper} 娉ㄨВ骞�<b>涓嶈兘</b>璁╁畠娉ㄩ攢</h3>
- * {@code RuoYiApplication} 涓婂啓鐨勬槸 {@code @MapperScan(value = "com.smartor.mapper")}
- * 鈥斺��<b>鎸夊寘鎵弿</b>锛屼笌娉ㄨВ鏃犲叧銆傚洜姝ゆ湰鎺ュ彛浠嶄細琚敞鍐屾垚涓�涓�
- * <b>绌虹殑 MyBatis 浠g悊 Bean</b>锛堝悕瀛楀氨鍙� {@code serviceSubtaskPreachformMapper}锛夛紝
- * 鑰岃皟鐢ㄦ柟瀛楁鍚嶆伆濂戒篃鏄畠锛孲pring 澶氬�欓�夋椂浼氭寜鍚嶅瓧鍛戒腑杩欎釜绌轰唬鐞嗭紝
- * 璋冪敤鍗虫姏 {@code BindingException: Invalid bound statement (not found)}銆�
- * <p>
- * 鐩墠鐢� {@code ServiceSubtaskPreachformMapperBridge} 涓婄殑 {@code @Primary} 鍏滀綇
- * 锛坧rimary 鍒ゅ畾鏃╀簬鎸夊悕瀛楀洖閫�锛夛紝<b>閭d釜娉ㄨВ涓嶈兘鍒�</b>銆�
- * <p>
- * 瑕佺湡姝f秷闄よ繖涓┖浠g悊锛屽彧鑳戒簩鑰呬箣涓�锛�
- * <ul>
- *   <li>鏀剁揣鎵弿锛歿@code @MapperScan(value = "com.smartor.mapper", annotationClass = Mapper.class)}锛�
- *       骞剁粰 smartor 閲� 27 涓紡鏍� {@code @Mapper} 鐨勮�� Mapper 琛ヤ笂娉ㄨВ锛�</li>
- *   <li>鎴栨妸鏈帴鍙gЩ鍑� {@code com.smartor.mapper} 鍖咃紙璇ユ壂鎻忔槸閫掑綊鐨勶紝瀛愬寘鏃犳晥锛夈��</li>
- * </ul>
- *
- * <h3>灏嗘潵鍔ㄤ綔</h3>
- * 璋冪敤鏂归�愭鏀逛负鐩存帴娉ㄥ叆 {@code PreachformApi} 鍚庯紝鏈帴鍙d笌 Bridge 鍗冲彲鏁翠綋鍒犻櫎銆�
- * 鏂颁唬鐮�<b>璇风洿鎺ユ敞鍏� {@code PreachformApi}</b>锛屼笉瑕佸啀渚濊禆鏈帴鍙c��
- *
- * @deprecated 鐢� {@code com.ruoyi.common.core.service.PreachformApi} 浠f浛銆�
- *         淇濈暀浠呬负鍏煎鏃㈡湁璋冪敤鏂癸紝鏂颁唬鐮佷笉瑕佷娇鐢ㄣ��
- */
-@Deprecated
-public interface ServiceSubtaskPreachformMapper
-{
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆�
-     */
-    public ServiceSubtaskPreachform selectServiceSubtaskPreachformById(Long id);
-
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
-     *
-     * @param serviceSubtaskPreachform 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆戦泦鍚�
-     */
-    public List<ServiceSubtaskPreachform> selectServiceSubtaskPreachformList(ServiceSubtaskPreachform serviceSubtaskPreachform);
-
-    /**
-     * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param serviceSubtaskPreachform 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    public int insertServiceSubtaskPreachform(ServiceSubtaskPreachform serviceSubtaskPreachform);
-
-    /**
-     * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param serviceSubtaskPreachform 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    public int updateServiceSubtaskPreachform(ServiceSubtaskPreachform serviceSubtaskPreachform);
-
-    public int updateSSPByCondition(ServiceSubtaskPreachform serviceSubtaskPreachform);
-
-    /**
-     * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 缁撴灉
-     */
-    public int deleteServiceSubtaskPreachformById(Long id);
-
-    /**
-     * 鏍规嵁subid鍒犻櫎璇ュ瓙浠诲姟鐨勬墍鏈夊彂閫佹柟寮�
-     * @param subIds
-     * @return
-     */
-    public int deleteServiceSubtaskPreachformBySubid(Long subIds);
-
-
-
-    /**
-     * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteServiceSubtaskPreachformByIds(Long[] ids);
-
-    /**
-     * 鏍规嵁taskid鏌ヨ鍒楄〃
-     *
-     * @param subtask
-     * @return 闆嗗悎
-     */
-    public List<ServiceSubtaskPreachform> selectBySubtask(ServiceSubtask subtask);
-
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskRecordMapper.java b/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskRecordMapper.java
deleted file mode 100644
index 0a12208..0000000
--- a/smartor/src/main/java/com/smartor/mapper/ServiceSubtaskRecordMapper.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.smartor.mapper;
-
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-import com.ruoyi.task.domain.ServiceSubtaskRecord;
-
-/**
- * 銆愯濉啓鍔熻兘鍚嶇О銆慚apper鎺ュ彛
- *
- * @author ruoyi
- * @date 2024-07-01
- */
-@Mapper
-public interface ServiceSubtaskRecordMapper {
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆�
-     */
-    public ServiceSubtaskRecord selectServiceSubtaskRecordById(Long id);
-
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆戦泦鍚�
-     */
-    public List<ServiceSubtaskRecord> selectServiceSubtaskRecordList(ServiceSubtaskRecord serviceSubtaskRecord);
-
-    /**
-     * 鎸� subtask_id 鍒楄〃鎵归噺鏌ヨ闅忚璁板綍锛屾秷闄+1
-     */
-    public List<ServiceSubtaskRecord> selectServiceSubtaskRecordBySubtaskIds(List<Long> subtaskIds);
-
-    /**
-     * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    public int insertServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord);
-
-    /**
-     * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    public int updateServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord);
-
-    /**
-     * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 缁撴灉
-     */
-    public int deleteServiceSubtaskRecordById(Long id);
-
-    /**
-     * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteServiceSubtaskRecordByIds(Long[] ids);
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/SysDept2Mapper.java b/smartor/src/main/java/com/smartor/mapper/SysDept2Mapper.java
deleted file mode 100644
index ae80c8e..0000000
--- a/smartor/src/main/java/com/smartor/mapper/SysDept2Mapper.java
+++ /dev/null
@@ -1,132 +0,0 @@
-package com.smartor.mapper;
-
-import com.ruoyi.common.core.domain.entity.SysDept;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 閮ㄩ棬绠$悊 鏁版嵁灞�
- *
- * @author ruoyi
- */
-@Mapper
-public interface SysDept2Mapper {
-    /**
-     * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁
-     *
-     * @param dept 閮ㄩ棬淇℃伅
-     * @return 閮ㄩ棬淇℃伅闆嗗悎
-     */
-    public List<SysDept> selectDeptList(SysDept dept);
-
-    /**
-     * 鏍规嵁瑙掕壊ID鏌ヨ閮ㄩ棬鏍戜俊鎭�
-     *
-     * @param roleId            瑙掕壊ID
-     * @param deptCheckStrictly 閮ㄩ棬鏍戦�夋嫨椤规槸鍚﹀叧鑱旀樉绀�
-     * @return 閫変腑閮ㄩ棬鍒楄〃
-     */
-    public List<Long> selectDeptListByRoleId(@Param("roleId") Long roleId, @Param("deptCheckStrictly") boolean deptCheckStrictly);
-
-    /**
-     * 鏍规嵁閮ㄩ棬ID鏌ヨ淇℃伅
-     *
-     * @param deptId 閮ㄩ棬ID
-     * @return 閮ㄩ棬淇℃伅
-     */
-    public SysDept selectDeptById(Long deptId);
-
-    public SysDept selectDeptByCode(@Param("deptCode")String deptCode,@Param("orgid")String orgid);
-
-    public SysDept selectDeptByCodeAndCampus(@Param("deptCode")String deptCode,@Param("orgid")String orgid,@Param("campusid")String campusid);
-
-    /**
-     * 鏍规嵁ID鏌ヨ鎵�鏈夊瓙閮ㄩ棬
-     *
-     * @param deptId 閮ㄩ棬ID
-     * @return 閮ㄩ棬鍒楄〃
-     */
-    public List<SysDept> selectChildrenDeptById(Long deptId);
-
-    /**
-     * 鏍规嵁ID鏌ヨ鎵�鏈夊瓙閮ㄩ棬锛堟甯哥姸鎬侊級
-     *
-     * @param deptId 閮ㄩ棬ID
-     * @return 瀛愰儴闂ㄦ暟
-     */
-    public int selectNormalChildrenDeptById(Long deptId);
-
-    /**
-     * 鏄惁瀛樺湪瀛愯妭鐐�
-     *
-     * @param deptId 閮ㄩ棬ID
-     * @return 缁撴灉
-     */
-    public int hasChildByDeptId(Long deptId);
-
-    /**
-     * 鏌ヨ閮ㄩ棬鏄惁瀛樺湪鐢ㄦ埛
-     *
-     * @param deptId 閮ㄩ棬ID
-     * @return 缁撴灉
-     */
-    public int checkDeptExistUser(Long deptId);
-
-    /**
-     * 鏍¢獙閮ㄩ棬鍚嶇О鏄惁鍞竴
-     *
-     * @param deptName 閮ㄩ棬鍚嶇О
-     * @param parentId 鐖堕儴闂↖D
-     * @return 缁撴灉
-     */
-    public SysDept checkDeptNameUnique(@Param("deptName") String deptName, @Param("parentId") Long parentId);
-
-    /**
-     * 鏂板閮ㄩ棬淇℃伅
-     *
-     * @param dept 閮ㄩ棬淇℃伅
-     * @return 缁撴灉
-     */
-    public int insertDept(SysDept dept);
-
-    /**
-     * 鎵归噺鏂板閮ㄩ棬淇℃伅
-     *
-     * @param depts 閮ㄩ棬淇℃伅
-     * @return 缁撴灉
-     */
-    public int batchDept(List<SysDept> depts);
-
-    /**
-     * 淇敼閮ㄩ棬淇℃伅
-     *
-     * @param dept 閮ㄩ棬淇℃伅
-     * @return 缁撴灉
-     */
-    public int updateDept(SysDept dept);
-
-    /**
-     * 淇敼鎵�鍦ㄩ儴闂ㄦ甯哥姸鎬�
-     *
-     * @param deptIds 閮ㄩ棬ID缁�
-     */
-    public void updateDeptStatusNormal(Long[] deptIds);
-
-    /**
-     * 淇敼瀛愬厓绱犲叧绯�
-     *
-     * @param depts 瀛愬厓绱�
-     * @return 缁撴灉
-     */
-    public int updateDeptChildren(@Param("depts") List<SysDept> depts);
-
-    /**
-     * 鍒犻櫎閮ㄩ棬绠$悊淇℃伅
-     *
-     * @param deptId 閮ㄩ棬ID
-     * @return 缁撴灉
-     */
-    public int deleteDeptById(Long deptId);
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/SysUser2Mapper.java b/smartor/src/main/java/com/smartor/mapper/SysUser2Mapper.java
deleted file mode 100644
index 684c797..0000000
--- a/smartor/src/main/java/com/smartor/mapper/SysUser2Mapper.java
+++ /dev/null
@@ -1,137 +0,0 @@
-package com.smartor.mapper;
-
-import com.ruoyi.common.core.domain.entity.SysUser;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 鐢ㄦ埛琛� 鏁版嵁灞�
- *
- * @author ruoyi
- */
-@Mapper
-public interface SysUser2Mapper {
-    /**
-     * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃
-     *
-     * @param sysUser 鐢ㄦ埛淇℃伅
-     * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
-     */
-    public List<SysUser> selectUserList(SysUser sysUser);
-
-    /**
-     * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ宸查厤鐢ㄦ埛瑙掕壊鍒楄〃
-     *
-     * @param user 鐢ㄦ埛淇℃伅
-     * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
-     */
-    public List<SysUser> selectAllocatedList(SysUser user);
-
-    /**
-     * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鏈垎閰嶇敤鎴疯鑹插垪琛�
-     *
-     * @param user 鐢ㄦ埛淇℃伅
-     * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
-     */
-    public List<SysUser> selectUnallocatedList(SysUser user);
-
-    /**
-     * 閫氳繃鐢ㄦ埛鍚嶆煡璇㈢敤鎴�
-     *
-     * @param userName 鐢ㄦ埛鍚�
-     * @return 鐢ㄦ埛瀵硅薄淇℃伅
-     */
-    public SysUser selectUserByUserName(String userName);
-
-    /**
-     * 閫氳繃鐢ㄦ埛ID鏌ヨ鐢ㄦ埛
-     *
-     * @param userId 鐢ㄦ埛ID
-     * @return 鐢ㄦ埛瀵硅薄淇℃伅
-     */
-    public SysUser selectUserById(Long userId);
-
-    /**
-     * 鏂板鐢ㄦ埛淇℃伅
-     *
-     * @param user 鐢ㄦ埛淇℃伅
-     * @return 缁撴灉
-     */
-    public int insertUser(SysUser user);
-
-    /**
-     * 鎵归噺鏂板鐢ㄦ埛淇℃伅
-     *
-     * @param user 鐢ㄦ埛淇℃伅
-     * @return 缁撴灉
-     */
-    public int batchUser(List<SysUser> users);
-
-    /**
-     * 淇敼鐢ㄦ埛淇℃伅
-     *
-     * @param user 鐢ㄦ埛淇℃伅
-     * @return 缁撴灉
-     */
-    public int updateUser(SysUser user);
-
-    /**
-     * 淇敼鐢ㄦ埛澶村儚
-     *
-     * @param userName 鐢ㄦ埛鍚�
-     * @param avatar   澶村儚鍦板潃
-     * @return 缁撴灉
-     */
-    public int updateUserAvatar(@Param("userName") String userName, @Param("avatar") String avatar);
-
-    /**
-     * 閲嶇疆鐢ㄦ埛瀵嗙爜
-     *
-     * @param userName 鐢ㄦ埛鍚�
-     * @param password 瀵嗙爜
-     * @return 缁撴灉
-     */
-    public int resetUserPwd(@Param("userName") String userName, @Param("password") String password);
-
-    /**
-     * 閫氳繃鐢ㄦ埛ID鍒犻櫎鐢ㄦ埛
-     *
-     * @param userId 鐢ㄦ埛ID
-     * @return 缁撴灉
-     */
-    public int deleteUserById(Long userId);
-
-    /**
-     * 鎵归噺鍒犻櫎鐢ㄦ埛淇℃伅
-     *
-     * @param userIds 闇�瑕佸垹闄ょ殑鐢ㄦ埛ID
-     * @return 缁撴灉
-     */
-    public int deleteUserByIds(Long[] userIds);
-
-    /**
-     * 鏍¢獙鐢ㄦ埛鍚嶇О鏄惁鍞竴
-     *
-     * @param userName 鐢ㄦ埛鍚嶇О
-     * @return 缁撴灉
-     */
-    public SysUser checkUserNameUnique(String userName);
-
-    /**
-     * 鏍¢獙鎵嬫満鍙风爜鏄惁鍞竴
-     *
-     * @param phonenumber 鎵嬫満鍙风爜
-     * @return 缁撴灉
-     */
-    public SysUser checkPhoneUnique(String phonenumber);
-
-    /**
-     * 鏍¢獙email鏄惁鍞竴
-     *
-     * @param email 鐢ㄦ埛閭
-     * @return 缁撴灉
-     */
-    public SysUser checkEmailUnique(String email);
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/SysUserDeptMapper.java b/smartor/src/main/java/com/smartor/mapper/SysUserDeptMapper.java
deleted file mode 100644
index 9b04895..0000000
--- a/smartor/src/main/java/com/smartor/mapper/SysUserDeptMapper.java
+++ /dev/null
@@ -1,76 +0,0 @@
-package com.smartor.mapper;
-
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.domain.entity.SysUserDept;
-import org.apache.ibatis.annotations.Mapper;
-
-import java.util.List;
-
-/**
- * 銆愯濉啓鍔熻兘鍚嶇О銆慚apper鎺ュ彛
- *
- * @author lihu
- * @date 2024-08-29
- */
-@Mapper
-public interface SysUserDeptMapper {
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆�
-     */
-    public SysUserDept selectSysUserDeptById(Long id);
-
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
-     *
-     * @param sysUserDept 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆戦泦鍚�
-     */
-    public List<SysUserDept> selectSysUserDeptList(SysUserDept sysUserDept);
-
-    /**
-     * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param sysUserDept 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    public int insertSysUserDept(SysUserDept sysUserDept);
-
-    /**
-     * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param sysUserDept 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    public int updateSysUserDept(SysUserDept sysUserDept);
-
-    /**
-     * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 缁撴灉
-     */
-    public int deleteSysUserDeptById(Long id);
-
-    /**
-     * 鏍规嵁鐢ㄦ埛ID鏌ヨ閮ㄩ棬淇℃伅
-     *
-     * @param id
-     * @return
-     */
-    public List<SysDept> selectDeptListByUserId(Long id);
-
-    /**
-     * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteSysUserDeptByIds(Long[] ids);
-
-    public int deleteSysUserDeptByCode(SysUserDept sysUserDept);
-
-    public int updateSysUserDeptForSync(SysUserDept sysUserDept);
-}
diff --git a/smartor/src/main/java/com/smartor/mapper/SysUserRole2Mapper.java b/smartor/src/main/java/com/smartor/mapper/SysUserRole2Mapper.java
deleted file mode 100644
index cc9d9a8..0000000
--- a/smartor/src/main/java/com/smartor/mapper/SysUserRole2Mapper.java
+++ /dev/null
@@ -1,66 +0,0 @@
-package com.smartor.mapper;
-
-import com.ruoyi.common.core.domain.entity.SysUserRole;
-import org.apache.ibatis.annotations.Mapper;
-import org.apache.ibatis.annotations.Param;
-
-import java.util.List;
-
-/**
- * 鐢ㄦ埛涓庤鑹插叧鑱旇〃 鏁版嵁灞�
- *
- * @author ruoyi
- */
-@Mapper
-public interface SysUserRole2Mapper {
-    /**
-     * 閫氳繃鐢ㄦ埛ID鍒犻櫎鐢ㄦ埛鍜岃鑹插叧鑱�
-     *
-     * @param userId 鐢ㄦ埛ID
-     * @return 缁撴灉
-     */
-    public int deleteUserRoleByUserId(Long userId);
-
-    /**
-     * 鎵归噺鍒犻櫎鐢ㄦ埛鍜岃鑹插叧鑱�
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑鏁版嵁ID
-     * @return 缁撴灉
-     */
-    public int deleteUserRole(Long[] ids);
-
-    /**
-     * 閫氳繃瑙掕壊ID鏌ヨ瑙掕壊浣跨敤鏁伴噺
-     *
-     * @param roleId 瑙掕壊ID
-     * @return 缁撴灉
-     */
-    public int countUserRoleByRoleId(Long roleId);
-
-    public SysUserRole selectUserRoleByRoleIdAndUserId(@Param("roleId") Long roleId, @Param("userId") Long userId);
-
-    /**
-     * 鎵归噺鏂板鐢ㄦ埛瑙掕壊淇℃伅
-     *
-     * @param userRoleList 鐢ㄦ埛瑙掕壊鍒楄〃
-     * @return 缁撴灉
-     */
-    public int batchUserRole(List<SysUserRole> userRoleList);
-
-    /**
-     * 鍒犻櫎鐢ㄦ埛鍜岃鑹插叧鑱斾俊鎭�
-     *
-     * @param userRole 鐢ㄦ埛鍜岃鑹插叧鑱斾俊鎭�
-     * @return 缁撴灉
-     */
-    public int deleteUserRoleInfo(SysUserRole userRole);
-
-    /**
-     * 鎵归噺鍙栨秷鎺堟潈鐢ㄦ埛瑙掕壊
-     *
-     * @param roleId  瑙掕壊ID
-     * @param userIds 闇�瑕佸垹闄ょ殑鐢ㄦ埛鏁版嵁ID
-     * @return 缁撴灉
-     */
-    public int deleteUserRoleInfos(@Param("roleId") Long roleId, @Param("userIds") Long[] userIds);
-}
diff --git a/smartor/src/main/java/com/smartor/service/IHNGatherPatArchiveService.java b/smartor/src/main/java/com/smartor/service/IHNGatherPatArchiveService.java
deleted file mode 100644
index e0decd8..0000000
--- a/smartor/src/main/java/com/smartor/service/IHNGatherPatArchiveService.java
+++ /dev/null
@@ -1,78 +0,0 @@
-package com.smartor.service;
-
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.smartor.domain.*;
-import com.ruoyi.outpatientvisit.domain.PatMedOuthosp;
-import com.ruoyi.inhospvisit.domain.PatMedInhosp;
-import org.springframework.web.multipart.MultipartFile;
-
-import java.util.List;
-import com.ruoyi.common.core.domain.entity.PatArchive;
-
-/**
- * 娌冲崡閲囬泦鎮h�呬俊鎭帴鍙�
- *
- * @author smartor
- * @date 2023-03-04
- */
-public interface IHNGatherPatArchiveService {
-
-    /**
-     * 鏌ヨ鎮h�呮。妗堝垪琛�
-     *
-     * @param patArchive 鎮h�呮。妗�
-     * @return 鎮h�呮。妗堥泦鍚�
-     */
-    public List<PatArchive> selectPatArchiveList(PatArchive patArchive);
-
-    /**
-     * 鍑哄叆闄俊鎭�
-     *
-     * @param patMedInhosp
-     * @return
-     */
-    public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp);
-
-    /**
-     * 娌冲崡鏁版嵁閲囬泦
-     *
-     * @param patMedInhosp
-     * @return
-     */
-    public Boolean hnDataGather(HnDataGatherVO patMedInhosp);
-
-    /**
-     * 闂ㄦ�ヨ瘖淇℃伅
-     *
-     * @param patMedOuthosp
-     * @return
-     */
-    public Integer selectPatMedOuthospList(PatMedOuthosp patMedOuthosp);
-
-
-    /**
-     * 鏌ヨ鐤剧梾鍒楄〃
-     *
-     * @param icd10 鐤剧梾
-     * @return 鐤剧梾闆嗗悎
-     */
-    public Integer selectIcd10List(Icd10 icd10);
-
-    /**
-     * 鏍规嵁鏉′欢鍒嗛〉鏌ヨ鐢ㄦ埛鍒楄〃
-     *
-     * @param sysUser 鐢ㄦ埛淇℃伅
-     * @return 鐢ㄦ埛淇℃伅闆嗗悎淇℃伅
-     */
-    public Integer selectUserList(SysUser sysUser);
-
-    /**
-     * 鏌ヨ閮ㄩ棬绠$悊鏁版嵁
-     *
-     * @param dept 閮ㄩ棬淇℃伅
-     * @return 閮ㄩ棬淇℃伅闆嗗悎
-     */
-    public Integer selectDeptList(SysDept dept);
-
-}
diff --git a/smartor/src/main/java/com/smartor/service/IIcd10Service.java b/smartor/src/main/java/com/smartor/service/IIcd10Service.java
deleted file mode 100644
index 4e3f0e4..0000000
--- a/smartor/src/main/java/com/smartor/service/IIcd10Service.java
+++ /dev/null
@@ -1,68 +0,0 @@
-package com.smartor.service;
-
-import com.smartor.domain.Icd10;
-
-import java.util.List;
-
-/**
- * 鐤剧梾Service鎺ュ彛
- *
- * @author ruoyi
- * @date 2023-12-21
- */
-public interface IIcd10Service {
-    /**
-     * 鏌ヨ鐤剧梾
-     *
-     * @param icdid 鐤剧梾涓婚敭
-     * @return 鐤剧梾
-     */
-    public Icd10 selectIcd10ByIcdid(Long icdid);
-
-    /**
-     * 鏌ヨ鐤剧梾鍒楄〃
-     *
-     * @param icd10 鐤剧梾
-     * @return 鐤剧梾闆嗗悎
-     */
-    public List<Icd10> selectIcd10List(Icd10 icd10);
-
-    /**
-     * 鏂板鐤剧梾
-     *
-     * @param icd10 鐤剧梾
-     * @return 缁撴灉
-     */
-    public int insertIcd10(Icd10 icd10);
-
-    /**
-     * 淇敼鐤剧梾
-     *
-     * @param icd10 鐤剧梾
-     * @return 缁撴灉
-     */
-    public int updateIcd10(Icd10 icd10);
-
-    /**
-     * 鎵归噺鍒犻櫎鐤剧梾
-     *
-     * @param icdids 闇�瑕佸垹闄ょ殑鐤剧梾涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteIcd10ByIcdids(Long[] icdids);
-
-    /**
-     * 鍒犻櫎鐤剧梾淇℃伅
-     *
-     * @param icdid 鐤剧梾涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteIcd10ByIcdid(Long icdid);
-
-    /**
-     * 浠庤繙绋嬫帴鍙o紙鏉ユ湭鏉ワ級鍒嗛〉鎷夊彇骞跺閲忓啓鍏� icd10 琛�
-     *
-     * @return 鏂板鏉℃暟
-     */
-    public int queryAddIcd10();
-}
diff --git a/smartor/src/main/java/com/smartor/service/IIvrTaskVisitResultService.java b/smartor/src/main/java/com/smartor/service/IIvrTaskVisitResultService.java
index fa24e7c..6a83844 100644
--- a/smartor/src/main/java/com/smartor/service/IIvrTaskVisitResultService.java
+++ b/smartor/src/main/java/com/smartor/service/IIvrTaskVisitResultService.java
@@ -51,12 +51,4 @@
      * @return 缁撴灉
      */
     public int deleteIvrTaskVisitResultByIds(Long[] ids);
-
-    /**
-     * 鍒犻櫎浠诲姟闅忚缁撴灉淇℃伅
-     *
-     * @param id 浠诲姟闅忚缁撴灉涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteIvrTaskVisitResultById(Long id);
 }
diff --git a/smartor/src/main/java/com/smartor/service/IMedicationDoseInfoService.java b/smartor/src/main/java/com/smartor/service/IMedicationDoseInfoService.java
deleted file mode 100644
index df2d12c..0000000
--- a/smartor/src/main/java/com/smartor/service/IMedicationDoseInfoService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.smartor.service;
-
-import java.util.List;
-import com.smartor.domain.MedicationDoseInfo;
-
-/**
- * 鑽搧鍓傞噺淇℃伅Service鎺ュ彛
- * 
- * @author lihu
- * @date 2026-07-17
- */
-public interface IMedicationDoseInfoService 
-{
-    /**
-     * 鏌ヨ鑽搧鍓傞噺淇℃伅
-     * 
-     * @param id 鑽搧鍓傞噺淇℃伅涓婚敭
-     * @return 鑽搧鍓傞噺淇℃伅
-     */
-    public MedicationDoseInfo selectMedicationDoseInfoById(Long id);
-
-    /**
-     * 鏌ヨ鑽搧鍓傞噺淇℃伅鍒楄〃
-     * 
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 鑽搧鍓傞噺淇℃伅闆嗗悎
-     */
-    public List<MedicationDoseInfo> selectMedicationDoseInfoList(MedicationDoseInfo medicationDoseInfo);
-
-    /**
-     * 鏂板鑽搧鍓傞噺淇℃伅
-     * 
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 缁撴灉
-     */
-    public int insertMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo);
-
-    /**
-     * 淇敼鑽搧鍓傞噺淇℃伅
-     * 
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 缁撴灉
-     */
-    public int updateMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo);
-
-    /**
-     * 鎵归噺鍒犻櫎鑽搧鍓傞噺淇℃伅
-     * 
-     * @param ids 闇�瑕佸垹闄ょ殑鑽搧鍓傞噺淇℃伅涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteMedicationDoseInfoByIds(Long[] ids);
-
-    /**
-     * 鍒犻櫎鑽搧鍓傞噺淇℃伅淇℃伅
-     * 
-     * @param id 鑽搧鍓傞噺淇℃伅涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteMedicationDoseInfoById(Long id);
-}
diff --git a/smartor/src/main/java/com/smartor/service/IMedicationItemService.java b/smartor/src/main/java/com/smartor/service/IMedicationItemService.java
deleted file mode 100644
index b33da4d..0000000
--- a/smartor/src/main/java/com/smartor/service/IMedicationItemService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.smartor.service;
-
-import java.util.List;
-import com.smartor.domain.MedicationItem;
-
-/**
- * 鑽搧淇℃伅Service鎺ュ彛
- * 
- * @author lihu
- * @date 2026-07-17
- */
-public interface IMedicationItemService 
-{
-    /**
-     * 鏌ヨ鑽搧淇℃伅
-     * 
-     * @param id 鑽搧淇℃伅涓婚敭
-     * @return 鑽搧淇℃伅
-     */
-    public MedicationItem selectMedicationItemById(Long id);
-
-    /**
-     * 鏌ヨ鑽搧淇℃伅鍒楄〃
-     * 
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 鑽搧淇℃伅闆嗗悎
-     */
-    public List<MedicationItem> selectMedicationItemList(MedicationItem medicationItem);
-
-    /**
-     * 鏂板鑽搧淇℃伅
-     * 
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 缁撴灉
-     */
-    public int insertMedicationItem(MedicationItem medicationItem);
-
-    /**
-     * 淇敼鑽搧淇℃伅
-     * 
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 缁撴灉
-     */
-    public int updateMedicationItem(MedicationItem medicationItem);
-
-    /**
-     * 鎵归噺鍒犻櫎鑽搧淇℃伅
-     * 
-     * @param ids 闇�瑕佸垹闄ょ殑鑽搧淇℃伅涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteMedicationItemByIds(Long[] ids);
-
-    /**
-     * 鍒犻櫎鑽搧淇℃伅淇℃伅
-     * 
-     * @param id 鑽搧淇℃伅涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteMedicationItemById(Long id);
-}
diff --git a/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java b/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
index 2ef4a0d..0dad6d2 100644
--- a/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
+++ b/smartor/src/main/java/com/smartor/service/IPatMedInhospService.java
@@ -1,16 +1,10 @@
 package com.smartor.service;
 
-import com.ruoyi.common.core.domain.AjaxResult;
-import com.ruoyi.common.core.page.TableDataInfo;
 import com.ruoyi.common.core.service.dto.PatMedReq;
 import com.ruoyi.common.core.service.dto.PatMedRes;
 import com.smartor.domain.*;
 import com.ruoyi.inhospvisit.domain.PatMedInhospDTO;
-import org.springframework.web.bind.annotation.RequestBody;
-
 import java.util.List;
-import java.util.Map;
-
 import com.ruoyi.inhospvisit.domain.PatMedInhospVO;
 import com.ruoyi.inhospvisit.domain.PatMedInhosp;
 import com.ruoyi.common.core.domain.entity.PatArchive;
@@ -23,13 +17,6 @@
  * @date 2023-03-04
  */
 public interface IPatMedInhospService {
-    /**
-     * 鏌ヨ鎮h�呬綇闄㈣褰�
-     *
-     * @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
-     * @return 鎮h�呬綇闄㈣褰�
-     */
-    public PatMedInhosp selectPatMedInhospByInhospid(Long inhospid);
 
     public List<PatMedInhosp> selectPatMedInhosp(PatMedInhosp patMedInhosp);
 
@@ -53,8 +40,6 @@
 
     public PatMedInhosp getDeptCodeByPatId(PatMedInhosp patMedInhosp);
 
-    public PatMedRes selectPatMedInhospListCount(PatMedReq patMedReq);
-
     /**
      * 鏂板鎮h�呬綇闄㈣褰�
      *
@@ -72,40 +57,6 @@
     public int updatePatMedInhosp(PatMedInhosp patMedInhosp);
 
     /**
-     * 鎵归噺鍒犻櫎鎮h�呬綇闄㈣褰�
-     *
-     * @param inhospids 闇�瑕佸垹闄ょ殑鎮h�呬綇闄㈣褰曚富閿泦鍚�
-     * @return 缁撴灉
-     */
-    public int deletePatMedInhospByInhospids(Long[] inhospids);
-
-    /**
-     * 鍒犻櫎鎮h�呬綇闄㈣褰曚俊鎭�
-     *
-     * @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
-     * @return 缁撴灉
-     */
-    public int deletePatMedInhospByInhospid(Long inhospid);
-
-    public int deletePatMedInhospByInhospno(String inhospno);
-
-    /**
-     * 澶勭悊浠巋is鍙栨潵鐨勫嚭闄㈡暟鎹�
-     *
-     * @param
-     * @return 缁撴灉
-     */
-    public int dealOutHospInfo(String config);
-
-    /**
-     * 澶勭悊浠巋is鍙栨潵鐨勫嚭闄㈡暟鎹� 浠诲姟缁勭敓鎴�
-     *
-     * @param
-     * @return 缁撴灉
-     */
-    public int dealOutHospInfoBySchedule(String config);
-
-    /**
      * 鑾峰彇鍑洪櫌锛屼綇闄紝闂ㄨ瘖鏈嶅姟浜烘
      *
      * @param patMedReq
@@ -121,65 +72,5 @@
      */
     public List<PatMedInhosp> getDocAndPat(PatMedInhosp patMedInhosp);
 
-    /**
-     * 澶勭悊浠巋is鍙栨潵鐨勬墜鏈俊鎭�
-     *
-     * @param
-     * @return 缁撴灉
-     */
-    public void addOperationSubTask(String config);
-
     public ServiceSubtask boxedServiceSubtask(ServiceTask serviceTask, PatMedInhosp patMedInhosp1, PatArchive patArchive, String config, Integer type);
-
-    // ==========================================================================
-    // 鍑哄叆闄㈤殢璁挎ā鍧楀寲锛堢涓�鎵癸級鈥斺�� 渚� VisitTaskCreateApiBridge / OtherVisitApiBridge 澶嶇敤鐨勮繃娓″叆鍙�
-    //
-    // 鈿狅笍 杩� 3 涓柟娉曟槸<b>鍒绘剰鏂板</b>鐨勮繃娓℃湡鍏ュ彛锛堢函杞彂锛岄浂涓氬姟閫昏緫锛夛紝
-    //    涓嶆槸璇姞銆佷篃涓嶈"椤烘墜鍒犳帀"锛�
-    //      路 runOperationVisit(config)              鈥斺�� 璁� OtherVisitApiBridge 鏈変釜"闅忚鑳藉姏"褰㈢姸鐨勫叆鍙�
-    //      路 persistSubtask(subtask)                鈥斺�� 璁� VisitTaskCreateApiBridge 鏈夊敮涓�鐨勮惤搴撳叆鍙�
-    //      路 selectPendingDeptPatientsForVisit()    鈥斺�� 璁� PatMedInhospController 鍒囧埌鏂板叆鍙e悗
-    //                                                  浠嶈兘鎶婂垪琛ㄤ氦缁欓櫌澶�/闂ㄨ瘖鍚堝苟
-    //    鐢� sql/_probe/verify_step16_service_restore.py 涓� audit_worktree_changes.py 鐧昏鎶婂叧銆�
-    // ==========================================================================
-
-    /**
-     * 銆愯繃娓℃湡鐢ㄣ�戞墜鏈殢璁挎壂鎻忋��
-     * <p>
-     * 涓� {@link #addOperationSubTask(String)} <b>瀹屽叏绛変环</b>锛堟湰鏂规硶灏辨槸杞彂鍒板畠锛夛紝
-     * 瀛樺湪鐨勫敮涓�鐞嗙敱鏄粰 {@code OtherVisitApiBridge} 涓�涓�"鐪嬭捣鏉ュ睘浜庨殢璁胯兘鍔�"鐨勫叆鍙o紝
-     * 璁╂墜鏈殢璁垮皢鏉ユ惉鍘� {@code ruoyi-othervisit} 鏃跺彧鎹㈠疄鐜版柟銆�
-     * <p>
-     * 娉ㄦ剰锛歿@code addOperationSubTask} <b>涓嶈兘鍒�</b> 鈥斺�� 瀹冭
-     * {@code PatMedInhospController#addOperationSubTask}锛圲RL 涓嶅彉锛夌洿鎺ヨ皟鐢ㄣ��
-     *
-     * @param config {@code sys_config: visit.early.day}
-     * @return 澶勭悊鐨勬墜鏈褰曟暟
-     */
-    int runOperationVisit(String config);
-
-    /**
-     * 銆愯繃娓℃湡鐢ㄣ�戞妸銆岀瀹ょ淮搴︽湭澶勭悊鐨勫湪闄㈡偅鑰呫�嶅垪琛ㄨ鍑烘潵銆�
-     * <p>
-     * 渚� {@code PatMedInhospController#dealOutHospInfo}锛圲RL 涓嶅彉锛夊湪鍒囨崲鍒版柊鍏ュ彛鍚�
-     * 浠嶈兘鎶婂垪琛ㄤ氦缁� {@code IPatMedOuthospService} 鍋�"闄㈠闂ㄨ瘖 + 鍦ㄩ櫌"鍚堝苟銆�
-     * <p>
-     * 鏉′欢涓庡師 {@code dealOutHospInfo} 鐨勭涓�娈垫煡璇�<b>瀹屽叏涓�鑷�</b>锛�
-     * {@code deptcheck_flag='0'} + {@code inhospstate='1'} + {@code fuflag='1'}銆�
-     * 瀹炵幇鏄函杞彂锛坽@code selectPatMedInhospList}锛夛紝闆堕�昏緫鏀瑰姩銆�
-     *
-     * @return 绉戝缁村害鏈鐞嗙殑鍦ㄩ櫌鎮h��
-     */
-    List<PatMedInhosp> selectPendingDeptPatientsForVisit();
-
-    /**
-     * 銆愯繃娓℃湡鐢ㄣ�戞妸涓�鏉″凡缁勮濂界殑瀛愪换鍔¤惤搴撱��
-     * <p>
-     * 鍗曠嫭鎶藉嚭鏉ョ殑鐞嗙敱锛氳 {@code VisitTaskCreateApiBridge} 鏈変竴涓彲鎺х殑鍐欏叆鍙o紝
-     * 渚夸簬"鎼縼鍓嶅悗閫愯绛変环"鐨勬帰閽堟瘮瀵癸紱灏嗘潵銆岄殢璁夸换鍔″垱寤烘ā鍧椼�嶆帴绠℃椂鏇挎崲瀹炵幇鏂广��
-     *
-     * @param serviceSubtask 宸茬粍瑁呭ソ鐨勫瓙浠诲姟锛堣皟鐢ㄦ柟璐熻矗濉叏瀛楁锛�
-     * @return true = 钀藉簱鎴愬姛
-     */
-    boolean persistSubtask(ServiceSubtask serviceSubtask);
 }
diff --git a/smartor/src/main/java/com/smartor/service/IServiceAppointRecordService.java b/smartor/src/main/java/com/smartor/service/IServiceAppointRecordService.java
deleted file mode 100644
index c4c929f..0000000
--- a/smartor/src/main/java/com/smartor/service/IServiceAppointRecordService.java
+++ /dev/null
@@ -1,61 +0,0 @@
-package com.smartor.service;
-
-import java.util.List;
-import com.smartor.domain.ServiceAppointRecord;
-
-/**
- * 棰勭害璁板綍Service鎺ュ彛
- * 
- * @author lihu
- * @date 2026-07-06
- */
-public interface IServiceAppointRecordService 
-{
-    /**
-     * 鏌ヨ棰勭害璁板綍
-     * 
-     * @param id 棰勭害璁板綍涓婚敭
-     * @return 棰勭害璁板綍
-     */
-    public ServiceAppointRecord selectServiceAppointRecordById(Long id);
-
-    /**
-     * 鏌ヨ棰勭害璁板綍鍒楄〃
-     * 
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 棰勭害璁板綍闆嗗悎
-     */
-    public List<ServiceAppointRecord> selectServiceAppointRecordList(ServiceAppointRecord serviceAppointRecord);
-
-    /**
-     * 鏂板棰勭害璁板綍
-     * 
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 缁撴灉
-     */
-    public int insertServiceAppointRecord(ServiceAppointRecord serviceAppointRecord);
-
-    /**
-     * 淇敼棰勭害璁板綍
-     * 
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 缁撴灉
-     */
-    public int updateServiceAppointRecord(ServiceAppointRecord serviceAppointRecord);
-
-    /**
-     * 鎵归噺鍒犻櫎棰勭害璁板綍
-     * 
-     * @param ids 闇�瑕佸垹闄ょ殑棰勭害璁板綍涓婚敭闆嗗悎
-     * @return 缁撴灉
-     */
-    public int deleteServiceAppointRecordByIds(Long[] ids);
-
-    /**
-     * 鍒犻櫎棰勭害璁板綍淇℃伅
-     * 
-     * @param id 棰勭害璁板綍涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteServiceAppointRecordById(Long id);
-}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceSLTDHealthcareRecordService.java b/smartor/src/main/java/com/smartor/service/IServiceSLTDHealthcareRecordService.java
deleted file mode 100644
index d5d2f62..0000000
--- a/smartor/src/main/java/com/smartor/service/IServiceSLTDHealthcareRecordService.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package com.smartor.service;
-
-import afu.org.checkerframework.checker.oigj.qual.O;
-import com.ruoyi.common.core.service.dto.InhospPositionRecord;
-import com.smartor.domain.MedicationItem;
-import com.smartor.domain.ServiceSLTDDeptReqVO;
-import com.smartor.domain.ServiceSLTDInhospReqVO;
-import com.smartor.domain.ServiceSLTDInhospResDTO;
-
-import java.util.List;
-import java.util.Map;
-
-/**
- * 鐪佺珛鍚屽痉鍋ュ悍璁板綍鏌ヨService鎺ュ彛
- *
- * @author smartor
- * @date 2025-08-14
- */
-public interface IServiceSLTDHealthcareRecordService {
-
-    /**
-     * 閲囬泦鍦ㄩ櫌鎮h�呭嚭鍏ラ櫌銆侀棬鎬ヨ瘖淇℃伅
-     *
-     * @param reqVO 鏌ヨ璇锋眰鍙傛暟
-     * @return 鍋ュ悍璁板綍鍒楄〃
-     * 鍙傝��
-     * {
-     * "orgId": 20001001,
-     * "campusIds": 30001002,
-     * "startHeadTime":"2025-08-14",
-     * "startTailTime":"2025-08-14",
-     * "healthcareRecordTypeList":["FH0108.01"],
-     * "subjectCode": null,
-     * "healthcareRecordNo":null,
-     * "orgSubjectCode": null,
-     * "deptDimensions": null,
-     * "serviceScopes": null,
-     * "inpatientArea": null,
-     * "status": null
-     * }
-     */
-    List<ServiceSLTDInhospResDTO> queryHealthcareRecordList(ServiceSLTDInhospReqVO reqVO);
-
-    /**
-     * 閲囬泦鍦ㄩ櫌鎮h�呯敤鑽俊鎭�
-     *
-     * @param reqVO 鏌ヨ璇锋眰鍙傛暟
-     * @return 瀹為檯鑾峰彇鍒扮殑鑽搧鏁版嵁鏉℃暟
-     */
-    Integer queryMedicationItemList(ServiceSLTDInhospReqVO reqVO);
-
-    /**
-     * 閲囬泦鍖婚櫌鐢ㄦ埛淇℃伅
-     *
-     * @param reqVO
-     * @return 鍙傝��
-     * {
-     * "orgId": 20001001,
-     * "campusId": 30001002,
-     * "unitIds": null,
-     * "relationType": null,
-     * "searchText": null,
-     * "status": 1
-     * }
-     */
-    Boolean queryHospUserInfoList(ServiceSLTDInhospReqVO reqVO);
-
-    /**
-     * 閲囬泦绉戝鐥呭尯淇℃伅
-     *
-     * @param serviceSLTDDeptReqVO
-     * @return 鍙傝��
-     * {
-     * "orgId": 20001001,
-     * "campusIds": 30001002,
-     * "unitIds": null,
-     * "relationType": null,
-     * "searchText": null,
-     * "status": 1
-     * }
-     */
-    Boolean queryDeptWardAreaInfoList(ServiceSLTDDeptReqVO serviceSLTDDeptReqVO);
-
-    /**
-     * 鏌ヨ鍗曚釜鍦ㄩ櫌鎮h�呯殑<b>褰撳墠</b>绉戝 / 鐥呭尯 / 搴婁綅
-     * 锛堜笌鍏ラ櫌閲囬泦鍚屼竴涓帴鍙� {@code dtcQueryHealthcareRecordList}锛岀敤 {@code healthcareRecordNo} 鍗曟煡锛夈��
-     * <p>
-     * 鈿狅笍 <b>鍙彇鏁帮紝涓嶈惤搴�</b>锛氱敱璋冪敤鏂癸紙鏁版嵁閲囬泦妯″潡鐨�"鍦ㄩ櫌淇℃伅鍒锋柊"锛夎嚜宸变笌
-     * {@code pat_med_inhosp} 姣斿銆傚彇鏁板け璐ワ紙鏃犲搷搴� / 闈� 200锛�<b>鎶� RuntimeException</b>锛�
-     * 涓嶇敤绌哄垪琛ㄥ啋鍏�"璇ユ偅鑰呭凡涓嶅湪闄�"銆�
-     * <p>
-     * 鍏ュ弬绾﹀畾锛歿@code orgId} + {@code campusId} + {@code statusList=["FH0109.24"]} +
-     * {@code healthcareRecordNo}銆倇@code statusList} 鐢� HIS 渚ц繃婊ゆ帀宸插嚭闄�/棰勫嚭闄㈢殑璁板綍锛�
-     * 鍥犳<b>杩斿洖绌哄垪琛ㄥ嵆琛ㄧず"褰撳墠涓嶅湪鍏ラ櫌鐘舵��"</b>銆�
-     *
-     * @param reqVO 瑙佷笂
-     * @return 褰撳墠浣嶇疆璁板綍锛涚┖鍒楄〃 = 璇ユ偅鑰呭綋鍓嶄笉鍦�"鍏ラ櫌"鐘舵��
-     */
-    List<InhospPositionRecord> queryInhospPosition(ServiceSLTDInhospReqVO reqVO);
-
-
-}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceSubtaskRecordService.java b/smartor/src/main/java/com/smartor/service/IServiceSubtaskRecordService.java
deleted file mode 100644
index 53aac40..0000000
--- a/smartor/src/main/java/com/smartor/service/IServiceSubtaskRecordService.java
+++ /dev/null
@@ -1,67 +0,0 @@
-package com.smartor.service;
-
-
-import java.util.List;
-import com.ruoyi.task.domain.ServiceSubtaskRecord;
-
-/**
- * 銆愯濉啓鍔熻兘鍚嶇О銆慡ervice鎺ュ彛
- *
- * @author ruoyi
- * @date 2024-07-01
- */
-public interface IServiceSubtaskRecordService
-{
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆�
-     */
-    public ServiceSubtaskRecord selectServiceSubtaskRecordById(Long id);
-
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆戦泦鍚�
-     */
-    public List<ServiceSubtaskRecord> selectServiceSubtaskRecordList(ServiceSubtaskRecord serviceSubtaskRecord);
-
-    /**
-     * 鎸� subtask_id 鍒楄〃鎵归噺鏌ヨ锛岀粨鏋滅敤 Map<subtaskId, records> 缁撴瀯杩斿洖
-     */
-    public java.util.Map<Long, List<ServiceSubtaskRecord>> selectRecordMapBySubtaskIds(List<Long> subtaskIds);
-
-    /**
-     * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    public int insertServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord);
-
-    /**
-     * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    public int updateServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord);
-
-    /**
-     * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑銆愯濉啓鍔熻兘鍚嶇О銆戜富閿泦鍚�
-     * @return 缁撴灉
-     */
-    public int deleteServiceSubtaskRecordByIds(Long[] ids);
-
-    /**
-     * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆戜俊鎭�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 缁撴灉
-     */
-    public int deleteServiceSubtaskRecordById(Long id);
-}
diff --git a/smartor/src/main/java/com/smartor/service/IServiceTaskRuleService.java b/smartor/src/main/java/com/smartor/service/IServiceTaskRuleService.java
index ac43459..c1e2b69 100644
--- a/smartor/src/main/java/com/smartor/service/IServiceTaskRuleService.java
+++ b/smartor/src/main/java/com/smartor/service/IServiceTaskRuleService.java
@@ -50,12 +50,4 @@
      * @return 缁撴灉
      */
     public int deleteServiceTaskRuleByIds(Long[] ids);
-
-    /**
-     * 鍒犻櫎浠诲姟鎵ц瑙勫垯淇℃伅
-     * 
-     * @param id 浠诲姟鎵ц瑙勫垯涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteServiceTaskRuleById(Long id);
 }
diff --git a/smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java b/smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java
index 82ed5c9..b57ee84 100644
--- a/smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java
+++ b/smartor/src/main/java/com/smartor/service/ISvyLibTemplateScriptService.java
@@ -54,15 +54,6 @@
      * @return 缁撴灉
      */
     public int deleteSvyLibTemplateScriptByTopicids(Long[] topicids);
-
-    /**
-     * 鍒犻櫎妯℃澘闂嵎棰樼洰淇℃伅
-     *
-     * @param topicid 妯℃澘闂嵎棰樼洰涓婚敭
-     * @return 缁撴灉
-     */
-    public int deleteSvyLibTemplateScriptByTopicid(Long topicid);
-
     /**
      * 鏍规嵁闂id缁熻閫夐」
      *
diff --git a/smartor/src/main/java/com/smartor/service/IXHGatherPatArchiveService.java b/smartor/src/main/java/com/smartor/service/IXHGatherPatArchiveService.java
deleted file mode 100644
index a901bd5..0000000
--- a/smartor/src/main/java/com/smartor/service/IXHGatherPatArchiveService.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.smartor.service;
-
-import java.time.LocalDateTime;
-
-/**
- * 娌冲崡閲囬泦鎮h�呬俊鎭帴鍙�
- *
- * @author smartor
- * @date 2023-03-04
- */
-public interface IXHGatherPatArchiveService {
-
-    /**
-     * 娌冲崡鏁版嵁閲囬泦
-     *
-     * @param patMedInhosp
-     * @return
-     */
-    public void getInHospDataGather(String cry, LocalDateTime startTime, LocalDateTime endTime);
-
-    /**
-     * 鑾峰彇棰勭害鍋滆瘖璁板綍淇℃伅
-     *
-     * @param cry       鍑哄叆闄㈢被鍨嬶細0-鍏ラ櫌锛�1-鍑洪櫌 2,棰勭害璁板綍
-     * @param startTime 寮�濮嬫椂闂�
-     * @param endTime   缁撴潫鏃堕棿
-     */
-    public void getAppointRecordInfo(String cry, LocalDateTime startTime, LocalDateTime endTime);
-
-
-}
diff --git a/smartor/src/main/java/com/smartor/service/PersonWorkbenchService.java b/smartor/src/main/java/com/smartor/service/PersonWorkbenchService.java
index d37bd7a..63c0c14 100644
--- a/smartor/src/main/java/com/smartor/service/PersonWorkbenchService.java
+++ b/smartor/src/main/java/com/smartor/service/PersonWorkbenchService.java
@@ -1,7 +1,7 @@
 package com.smartor.service;
 
 import com.ruoyi.template.domain.BaseTag;
-import com.smartor.domain.PerSonWorkbenchDto;
+import com.ruoyi.patarchive.domain.PerSonWorkbenchDto;
 
 import java.util.List;
 
diff --git a/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java
deleted file mode 100644
index 3ec5262..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/HNGatherPatArchiveServiceImpl.java
+++ /dev/null
@@ -1,287 +0,0 @@
-package com.smartor.service.impl;
-
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.core.domain.entity.SysUserDept;
-import com.ruoyi.common.core.domain.entity.SysUserRole;
-import com.ruoyi.common.utils.StringUtils;
-import com.smartor.domain.*;
-import com.ruoyi.outpatientvisit.domain.PatMedOuthosp;
-import com.ruoyi.inhospvisit.api.InhospVisitFacade;
-import com.ruoyi.inhospvisit.domain.PatMedInhosp;
-import com.smartor.mapper.*;
-import com.ruoyi.outpatientvisit.mapper.PatMedOuthospMapper;
-import com.smartor.service.IHNGatherPatArchiveService;
-import com.smartor.service.IPatMedOuthospService;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-import org.springframework.stereotype.Service;
-
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.ZoneId;
-import java.util.*;
-import com.ruoyi.common.core.domain.entity.PatArchive;
-
-/**
- * 鎮h�呮。妗圫ervice涓氬姟灞傚鐞�
- *
- * @author smartor
- * @date 2023-03-04
- */
-@Slf4j
-@Service
-public class HNGatherPatArchiveServiceImpl implements IHNGatherPatArchiveService {
-    @Autowired
-    private HNGatherPatArchiveMapper hnGatherPatArchiveMapper;
-
-    @Autowired
-    private SysUser2Mapper sysUser2Mapper;
-
-    @Autowired
-    private SysUserRole2Mapper sysUserRoleMapper;
-
-    @Autowired
-    private SysDept2Mapper sysDept2Mapper;
-
-    @Autowired
-    private SysUserDeptMapper sysUserDeptMapper;
-
-    @Autowired
-    private Icd10Mapper icd10Mapper;
-
-    @Autowired
-    private PatMedOuthospMapper patMedOuthospMapper;
-
-    @Autowired
-    private InhospVisitFacade inhospVisitFacade;
-
-    @Autowired
-    private PatArchiveMapper patArchiveMapper;
-
-    @Autowired
-    private IPatMedOuthospService patMedOuthospService;
-
-    @Autowired
-    private ShardingMapper shardingMapper;
-
-    private static final long SHARDING_THRESHOLD = 5_000_000L;
-    private static final String PAT_ARCHIVE_TABLE = "pat_archive";
-    private static final String PAT_MED_INHOSP_TABLE = "pat_med_inhosp";
-
-
-    @Override
-    public List<PatArchive> selectPatArchiveList(PatArchive patArchive) {
-        return hnGatherPatArchiveMapper.selectPatArchiveList(patArchive);
-    }
-
-//    @Override
-//    public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp) {
-//        // 寮傛鎵ц鏁翠釜鏁版嵁鍚屾浠诲姟
-//        taskExecutor.execute(() -> {
-//            log.info("寮�濮嬫墽琛屾暟鎹悓姝ヤ换鍔�...");
-//            syncPatArchivesInOrder(); // 鍏堝悓姝ユ偅鑰�
-//            syncPatMedInhosp();       // 鍐嶅悓姝ュ嚭鍏ラ櫌
-//            log.info("鏁版嵁鍚屾浠诲姟鎻愪氦瀹屾瘯銆�");
-//        });
-//        return 0; // 杩斿洖0琛ㄧず浠诲姟宸叉彁浜ゅ埌鍚庡彴鎵ц
-//    }
-
-
-    @Override
-    public Integer selectPatMedInhospList(PatMedInhosp patMedInhosp) {
-        List<PatMedInhosp> patMedInhospList = hnGatherPatArchiveMapper.selectPatMedInhospList(patMedInhosp);
-        for (PatMedInhosp pm : patMedInhospList) {
-            PatArchive patArchive = new PatArchive();
-            patArchive.setPatientno(pm.getPatno());
-            List<PatArchive> patArchives = hnGatherPatArchiveMapper.selectPatArchiveList(patArchive);
-            if (CollectionUtils.isEmpty(patArchives)) {
-                //绌轰簡鐩存帴涓㈡帀
-                continue;
-            }
-            PatArchive pa = new PatArchive();
-            pa.setPatientno(patArchives.get(0).getPatientno());
-            List<PatArchive> patArchives1 = patArchiveMapper.selectPatArchiveList(pa);
-            if (CollectionUtils.isNotEmpty(patArchives1)) {
-                pm.setPatid(patArchives1.get(0).getId());
-            } else {
-                patArchiveMapper.insertPatArchiveSingle(patArchives.get(0));
-                pm.setPatid(patArchives.get(0).getId());
-            }
-            if (!Objects.isNull(patMedInhosp.getStartInHospTime()) && !Objects.isNull(patMedInhosp.getEndInHospTime())) {
-                //鍏ラ櫌
-                pm.setInhospstate("0");
-                pm.setCreateTime(new Date());
-                inhospVisitFacade.insertPatMedInhosp(pm);
-            } else if (!Objects.isNull(patMedInhosp.getStartOutHospTime()) && !Objects.isNull(patMedInhosp.getEndOutHospTime())) {
-                //鍑洪櫌
-                pm.setInhospstate("1");
-                pm.setUpdateTime(new Date());
-                PatMedInhosp pmi = new PatMedInhosp();
-                pmi.setSerialnum(pm.getSerialnum());
-                List<PatMedInhosp> patMedInhospList1 = inhospVisitFacade.selectPatMedInhospList(pmi);
-                if (CollectionUtils.isEmpty(patMedInhospList1)) {
-                    pm.setCreateTime(new Date());
-                    inhospVisitFacade.insertPatMedInhosp(pm);
-                } else {
-                    pm.setInhospid(patMedInhospList1.get(0).getInhospid());
-                    inhospVisitFacade.updatePatMedInhosp(pm);
-                }
-
-            }
-        }
-        return 0;
-    }
-
-    @Override
-    public Boolean hnDataGather(HnDataGatherVO hnDataGatherVO) {
-
-        LocalDate startDate = hnDataGatherVO.getStartTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
-        LocalDate endDate = hnDataGatherVO.getEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDate();
-
-        Integer po = null;
-        // 寰幆澶勭悊姣忎竴澶�
-        for (LocalDate currentDate = startDate; !currentDate.isAfter(endDate); currentDate = currentDate.plusDays(1)) {
-            PatMedInhosp dailyCondition = new PatMedInhosp();
-            //澶勭悊鍏ラ櫌
-            LocalDateTime dayStart = currentDate.atStartOfDay();
-            LocalDateTime dayEnd = currentDate.atTime(23, 59, 59);
-            dailyCondition.setStartInHospTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant()));
-            dailyCondition.setEndInHospTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant()));
-            selectPatMedInhospList(dailyCondition);
-
-            //澶勭悊鍑洪櫌
-            dailyCondition.setStartInHospTime(null);
-            dailyCondition.setEndInHospTime(null);
-            dailyCondition.setStartOutHospTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant()));
-            dailyCondition.setEndOutHospTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant()));
-            selectPatMedInhospList(dailyCondition);
-
-            //澶勭悊闂ㄨ瘖
-            PatMedOuthosp patMedOuthosp = new PatMedOuthosp();
-            patMedOuthosp.setBeginTime(Date.from(dayStart.atZone(ZoneId.systemDefault()).toInstant()));
-            patMedOuthosp.setEndTime(Date.from(dayEnd.atZone(ZoneId.systemDefault()).toInstant()));
-            selectPatMedOuthospList(patMedOuthosp);
-        }
-        return true;
-    }
-
-
-    @Override
-    public Integer selectPatMedOuthospList(PatMedOuthosp patMedOuthosp) {
-        List<PatMedOuthosp> patMedOuthosps = hnGatherPatArchiveMapper.selectPatMedOuthospList(patMedOuthosp);
-        log.info("selectPatMedOuthospList鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", patMedOuthosps.size());
-        Integer i = null;
-        for (PatMedOuthosp patMedOuthosp1 : patMedOuthosps) {
-            //鑾峰彇鎮h�呭熀鏈俊鎭�
-            PatArchive patArchive = new PatArchive();
-            patArchive.setPatientno(patMedOuthosp1.getPatno());
-            List<PatArchive> patArchives = hnGatherPatArchiveMapper.selectPatArchiveList(patArchive);
-
-            //鏍规嵁patno鍒ゆ柇鏈湴鎮h�呭熀鏈俊鎭槸鍚﹀瓨鍦�
-            PatArchive pa = new PatArchive();
-            pa.setPatientno(patMedOuthosp1.getPatno());
-            List<PatArchive> patArchives1 = patArchiveMapper.selectPatArchiveList(pa);
-            if (CollectionUtils.isNotEmpty(patArchives1)) {
-                patMedOuthosp1.setPatid(patArchives1.get(0).getId());
-            } else {
-                if (CollectionUtils.isEmpty(patArchives)) {
-                    continue;
-                }
-                patArchiveMapper.insertPatArchiveSingle(patArchives.get(0));
-                patMedOuthosp1.setPatid(patArchives.get(0).getId());
-            }
-            i = patMedOuthospService.insertPatMedOuthosp(patMedOuthosp1);
-        }
-
-        return i;
-    }
-
-    @Override
-    public Integer selectIcd10List(Icd10 icd10) {
-        List<Icd10> icd10s = hnGatherPatArchiveMapper.selectIcd10List(icd10);
-        log.info("selectIcd10List鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", icd10s.size());
-        int i = icd10Mapper.batchIcd10(icd10s);
-        return i;
-    }
-
-    @Override
-    public Integer selectUserList(SysUser sysUser) {
-        List<SysUser> sysUserList = hnGatherPatArchiveMapper.selectUserList(sysUser);
-        if (CollectionUtils.isEmpty(sysUserList)) return null;
-
-
-        log.info("sysUserList鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", sysUserList.size());
-        int i = sysUser2Mapper.batchUser(sysUserList);
-        for (SysUser sysUser1 : sysUserList) {
-            log.info("sysUser1鐨処D涓猴細{}", sysUser1.getUserId());
-            log.info("sysUser1鐨凥ISUSERID涓猴細{}", sysUser1.getHisUserId());
-            //鏂板鐢ㄦ埛涓庤鑹�
-            SysUserRole yhyjsxx = hnGatherPatArchiveMapper.yhyjsxx(sysUser1);
-            if (yhyjsxx == null) continue;
-            yhyjsxx.setUserId(sysUser1.getUserId());
-            List<SysUserRole> userRoleList = new ArrayList<>();
-            userRoleList.add(yhyjsxx);
-            sysUserRoleMapper.batchUserRole(userRoleList);
-
-            //鏂板鐢ㄦ埛涓庨儴闂�
-            if (StringUtils.isEmpty(sysUser1.getHisUserId())) continue;
-            SysUserDept sysUserDept = hnGatherPatArchiveMapper.yhyksxx(sysUser1);
-            if (Objects.isNull(sysUserDept) || sysUserDept.getDeptId() == null) continue;
-            SysDept dept = new SysDept();
-            dept.setHisDeptId(sysUserDept.getDeptId().toString());
-            List<SysDept> sysDepts = sysDept2Mapper.selectDeptList(dept);
-            if (CollectionUtils.isNotEmpty(sysDepts)) {
-                sysUserDept.setDeptId(sysDepts.get(0).getDeptId());
-                sysUserDept.setDeptCode(sysDepts.get(0).getDeptCode());
-            }
-            sysUserDept.setUserId(sysUser1.getUserId());
-            sysUserDeptMapper.insertSysUserDept(sysUserDept);
-
-        }
-
-        return i;
-    }
-
-    @Override
-    public Integer selectDeptList(SysDept dept) {
-        List<SysDept> sysDepts = hnGatherPatArchiveMapper.selectDeptList(dept);
-        log.info("selectDeptList鐨勯噰闆嗗埌鐨勬暟閲忎负锛歿}", sysDepts.size());
-        int i = 0;
-        if (CollectionUtils.isNotEmpty(sysDepts)) i = sysDept2Mapper.batchDept(sysDepts);
-        return i;
-    }
-
-
-    /**
-     * 妫�鏌ュ苟鎵ц鍒嗚〃鐨勬牳蹇冩柟娉�
-     *
-     * @param tableName 瑕佹鏌ョ殑琛ㄥ悕
-     */
-    private synchronized void checkAndShard(String tableName) {
-        long currentCount = shardingMapper.getTableCount(tableName);
-
-        if (currentCount >= SHARDING_THRESHOLD) {
-            log.warn("琛� '{}' 宸茶揪鍒板垎琛ㄩ槇鍊� {}锛屽噯澶囨墽琛屽垎琛ㄦ搷浣�...", tableName, SHARDING_THRESHOLD);
-
-            String newTableName = tableName + "_" + java.time.LocalDate.now().format(java.time.format.DateTimeFormatter.ofPattern("yyyy_MM"));
-            Long maxId = shardingMapper.getMaxId(tableName);
-            if (maxId == null) maxId = 0L;
-
-            shardingMapper.renameTable(tableName, newTableName);
-            log.info("宸插皢琛� '{}' 閲嶅懡鍚嶄负 '{}'", tableName, newTableName);
-
-            shardingMapper.createLikeTable(tableName, newTableName);
-            log.info("宸插垱寤烘柊琛� '{}'", tableName);
-
-            shardingMapper.setAutoIncrement(tableName, maxId + 1);
-            log.info("宸茶缃柊琛� '{}' 鐨勮嚜澧濱D璧峰鍊间负 {}", tableName, maxId + 1);
-
-            log.info("琛� '{}' 鐨勫垎琛ㄦ搷浣滃畬鎴愶紒", tableName);
-        }
-    }
-}
-
-
diff --git a/smartor/src/main/java/com/smartor/service/impl/Icd10ServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/Icd10ServiceImpl.java
deleted file mode 100644
index 5b2d4a9..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/Icd10ServiceImpl.java
+++ /dev/null
@@ -1,261 +0,0 @@
-package com.smartor.service.impl;
-
-import com.alibaba.fastjson2.JSON;
-import com.alibaba.fastjson2.JSONArray;
-import com.alibaba.fastjson2.JSONObject;
-import com.google.gson.Gson;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.http.HttpUtils;
-import com.smartor.domain.Icd10;
-import com.smartor.mapper.Icd10Mapper;
-import com.smartor.service.IIcd10Service;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.stereotype.Service;
-
-import java.util.*;
-import java.util.stream.Collectors;
-
-/**
- * 鐤剧梾Service涓氬姟灞傚鐞�
- *
- * @author ruoyi
- * @date 2023-12-21
- */
-@Slf4j
-@Service
-public class Icd10ServiceImpl implements IIcd10Service {
-
-    @Autowired
-    private Icd10Mapper icd10Mapper;
-
-    @Value("${sltd_pub_path}")
-    private String sltdPubPath;
-
-    @Value("${lwl_app_key}")
-    private String APP_KEY;
-
-    /**
-     * 鍥哄畾 orgId
-     */
-    private static final long ORG_ID = 20001001L;
-    /**
-     * 姣忛〉鎷夊彇鏉℃暟锛堟帴鍙f渶澶у厑璁� 1000锛�
-     */
-    private static final int PAGE_SIZE = 1000;
-    /**
-     * 鎵归噺鍐欏叆鍗曟壒鏈�澶ф潯鏁�
-     */
-    private static final int BATCH_SIZE = 500;
-
-    /**
-     * 鏌ヨ鐤剧梾
-     *
-     * @param icdid 鐤剧梾涓婚敭
-     * @return 鐤剧梾
-     */
-    @Override
-    public Icd10 selectIcd10ByIcdid(Long icdid) {
-        return icd10Mapper.selectIcd10ByIcdid(icdid);
-    }
-
-    /**
-     * 鏌ヨ鐤剧梾鍒楄〃
-     *
-     * @param icd10 鐤剧梾
-     * @return 鐤剧梾
-     */
-    @Override
-    public List<Icd10> selectIcd10List(Icd10 icd10) {
-        return icd10Mapper.selectIcd10List(icd10);
-    }
-
-    /**
-     * 鏂板鐤剧梾
-     *
-     * @param icd10 鐤剧梾
-     * @return 缁撴灉
-     */
-    @Override
-    public int insertIcd10(Icd10 icd10) {
-        icd10.setCreateTime(DateUtils.getNowDate());
-        return icd10Mapper.insertIcd10(icd10);
-    }
-
-    /**
-     * 淇敼鐤剧梾
-     *
-     * @param icd10 鐤剧梾
-     * @return 缁撴灉
-     */
-    @Override
-    public int updateIcd10(Icd10 icd10) {
-        icd10.setUpdateTime(DateUtils.getNowDate());
-        return icd10Mapper.updateIcd10(icd10);
-    }
-
-    /**
-     * 鎵归噺鍒犻櫎鐤剧梾
-     *
-     * @param icdids 闇�瑕佸垹闄ょ殑鐤剧梾涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteIcd10ByIcdids(Long[] icdids) {
-        return icd10Mapper.deleteIcd10ByIcdids(icdids);
-    }
-
-    /**
-     * 鍒犻櫎鐤剧梾淇℃伅
-     *
-     * @param icdid 鐤剧梾涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteIcd10ByIcdid(Long icdid) {
-        return icd10Mapper.deleteIcd10ByIcdid(icdid);
-    }
-
-    /**
-     * 浠庤繙绋嬫帴鍙o紙鏉ユ湭鏉ワ級鍒嗛〉鎷夊彇骞跺閲忓啓鍏� icd10 琛ㄣ��
-     * <p>
-     * 浼樺寲瑕佺偣锛�
-     * 1. 姣忛〉鏈�澶ф媺鍙� 1000 鏉★紝鍑忓皯璇锋眰娆℃暟銆�
-     * 2. 姣忛〉鎶婂綋鍓嶉〉鎵�鏈� icdcode 鐢ㄤ竴鏉� IN SQL 涓�娆℃壒閲忔煡搴擄紝閬垮厤寰幆 N 娆″崟鏉℃煡璇€��
-     * 3. 灏嗕笉瀛樺湪鐨勮褰曟敹闆嗗悗鍒嗘壒锛堟瘡鎵� 500 鏉★級鎵归噺鎻掑叆銆�
-     * </p>
-     *
-     * @return 鏈杩愯鏂板鎬绘潯鏁�
-     */
-    @Override
-    public int queryAddIcd10() {
-        int totalInserted = 0;
-        long current = 1;
-        long totalPages = 1; // 棣栨寰幆鍓嶅厛鎵ц涓�娆�
-
-        log.info("[寮�濮媇 浠庢潵鏈潵鎷夊彇 ICD10 澧為噺鏁版嵁锛宱rgId={}", ORG_ID);
-
-        do {
-            // 鏋勫缓璇锋眰浣�
-            Map<String, Object> requestBody = new HashMap<>();
-            requestBody.put("orgId", ORG_ID);
-            requestBody.put("searchText", "");
-            requestBody.put("size", PAGE_SIZE);
-            requestBody.put("current", current);
-
-            String responseStr;
-            try {
-                Map<String, String> headers = buildRequestHeaders();
-                responseStr = HttpUtils.sendPostByHeader(sltdPubPath + "/hbos-thirdparty-integration/standard/base/dtc/pageDiagnosisDict", new Gson().toJson(requestBody), headers);
-
-            } catch (Exception e) {
-                log.error("[绗瑊}椤礭 璇锋眰鏉ユ湭鏉ユ帴鍙eけ璐�", current, e);
-                break;
-            }
-
-            if (responseStr == null || responseStr.isEmpty()) {
-                log.warn("[绗瑊}椤礭 鎺ュ彛杩斿洖绌猴紝鍋滄閲囬泦", current);
-                break;
-            }
-
-            JSONObject resp = JSON.parseObject(responseStr);
-            if (resp == null || !Boolean.TRUE.equals(resp.getBoolean("success"))) {
-                log.error("[绗瑊}椤礭 鎺ュ彛杩斿洖澶辫触锛歿}", current, responseStr);
-                break;
-            }
-
-            JSONObject data = resp.getJSONObject("data");
-            if (data == null) {
-                break;
-            }
-
-            // 璁$畻鎬婚〉鏁�
-            long total = data.getLongValue("total");
-            long pageSize = data.getLongValue("size");
-            if (pageSize <= 0) {
-                break;
-            }
-            totalPages = (total + pageSize - 1) / pageSize;
-
-            JSONArray records = data.getJSONArray("records");
-            if (records == null || records.isEmpty()) {
-                break;
-            }
-
-            log.info("[绗瑊}/{}椤礭 鑾峰彇 {} 鏉¤褰曪紝鎬粄}鏉�", current, totalPages, records.size(), total);
-
-            // 瑙f瀽褰撳墠椤垫暟鎹�
-            List<String> pageNames = new ArrayList<>();
-            List<Icd10> pageList = new ArrayList<>();
-            for (int i = 0; i < records.size(); i++) {
-                JSONObject rec = records.getJSONObject(i);
-                String icdCode = rec.getString("icdCode");
-                if (icdCode == null || icdCode.isEmpty()) {
-                    continue;
-                }
-                String icdName = StringUtils.isEmpty(rec.getString("name")) ? null : rec.getString("name").trim();
-                if (icdName == null || icdName.isEmpty()) {
-                    continue;
-                }
-                pageNames.add(icdName);
-
-                Icd10 icd10 = new Icd10();
-                icd10.setIcdcode(icdCode);
-                icd10.setIcdname(icdName);
-                icd10.setIcdpym(rec.getString("pinyin"));
-                icd10.setHisIcdid(rec.getString("his_icdid"));
-                icd10.setOrgid(String.valueOf(ORG_ID));
-                icd10.setDelFlag("0");
-                icd10.setCreateTime(DateUtils.getNowDate());
-                pageList.add(icd10);
-            }
-
-            if (pageNames.isEmpty()) {
-                current++;
-                continue;
-            }
-
-            // 涓�娆� IN 鏌ュ簱锛岃幏鍙栧凡瀛樺湪鐨� icdname锛堟牳蹇冨幓閲嶄紭鍖栫偣锛夊崡鍗庨檮涓�鐨刬cdname涓嶄細閲嶅锛宨cd10code浼氶噸澶�
-            Set<String> existingNames = new HashSet<>(icd10Mapper.selectExistingIcdcodes(pageNames));
-
-            // 杩囨护鍑轰笉瀛樺湪鐨勮褰�
-            List<Icd10> newList = pageList.stream().filter(item -> !existingNames.contains(item.getIcdname())).collect(Collectors.toList());
-
-            log.info("[绗瑊}/{}椤礭 褰撳墠椤靛叡 {} 鏉★紝宸插瓨鍦� {} 鏉★紝闇�鏂板叆搴� {} 鏉�", current, totalPages, pageList.size(), existingNames.size(), newList.size());
-
-            // 鍒嗘壒鎵归噺鎻掑叆
-            int inserted = batchInsert(newList);
-            totalInserted += inserted;
-
-            current++;
-        } while (current <= totalPages);
-
-        log.info("[瀹屾垚] ICD10 澧為噺閲囬泦缁撴潫锛屾湰娆″叡鏂板 {} 鏉�", totalInserted);
-        return totalInserted;
-    }
-
-    /**
-     * 鍒嗘壒鎵归噺鎻掑叆锛屾瘡鎵规渶澶� BATCH_SIZE 鏉�
-     */
-    private int batchInsert(List<Icd10> list) {
-        if (list == null || list.isEmpty()) {
-            return 0;
-        }
-        int total = 0;
-        int size = list.size();
-        for (int start = 0; start < size; start += BATCH_SIZE) {
-            int end = Math.min(start + BATCH_SIZE, size);
-            total += icd10Mapper.batchIcd10(list.subList(start, end));
-        }
-        return total;
-    }
-
-    private Map<String, String> buildRequestHeaders() {
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", "application/json");
-        headers.put("app-key", APP_KEY);
-        return headers;
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/service/impl/IvrTaskVisitResultServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/IvrTaskVisitResultServiceImpl.java
index 76bdb2e..a674dfe 100644
--- a/smartor/src/main/java/com/smartor/service/impl/IvrTaskVisitResultServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/IvrTaskVisitResultServiceImpl.java
@@ -77,14 +77,4 @@
         return ivrTaskVisitResultMapper.deleteIvrTaskVisitResultByIds(ids);
     }
 
-    /**
-     * 鍒犻櫎浠诲姟闅忚缁撴灉淇℃伅
-     *
-     * @param id 浠诲姟闅忚缁撴灉涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteIvrTaskVisitResultById(Long id) {
-        return ivrTaskVisitResultMapper.deleteIvrTaskVisitResultById(id);
-    }
 }
diff --git a/smartor/src/main/java/com/smartor/service/impl/MedicationDoseInfoServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/MedicationDoseInfoServiceImpl.java
deleted file mode 100644
index 0f14ea0..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/MedicationDoseInfoServiceImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.smartor.service.impl;
-
-import java.util.List;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.smartor.mapper.MedicationDoseInfoMapper;
-import com.smartor.domain.MedicationDoseInfo;
-import com.smartor.service.IMedicationDoseInfoService;
-
-/**
- * 鑽搧鍓傞噺淇℃伅Service涓氬姟灞傚鐞�
- * 
- * @author lihu
- * @date 2026-07-17
- */
-@Service
-public class MedicationDoseInfoServiceImpl implements IMedicationDoseInfoService 
-{
-    @Autowired
-    private MedicationDoseInfoMapper medicationDoseInfoMapper;
-
-    /**
-     * 鏌ヨ鑽搧鍓傞噺淇℃伅
-     * 
-     * @param id 鑽搧鍓傞噺淇℃伅涓婚敭
-     * @return 鑽搧鍓傞噺淇℃伅
-     */
-    @Override
-    public MedicationDoseInfo selectMedicationDoseInfoById(Long id)
-    {
-        return medicationDoseInfoMapper.selectMedicationDoseInfoById(id);
-    }
-
-    /**
-     * 鏌ヨ鑽搧鍓傞噺淇℃伅鍒楄〃
-     * 
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 鑽搧鍓傞噺淇℃伅
-     */
-    @Override
-    public List<MedicationDoseInfo> selectMedicationDoseInfoList(MedicationDoseInfo medicationDoseInfo)
-    {
-        return medicationDoseInfoMapper.selectMedicationDoseInfoList(medicationDoseInfo);
-    }
-
-    /**
-     * 鏂板鑽搧鍓傞噺淇℃伅
-     * 
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 缁撴灉
-     */
-    @Override
-    public int insertMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo)
-    {
-        medicationDoseInfo.setCreateTime(DateUtils.getNowDate());
-        return medicationDoseInfoMapper.insertMedicationDoseInfo(medicationDoseInfo);
-    }
-
-    /**
-     * 淇敼鑽搧鍓傞噺淇℃伅
-     * 
-     * @param medicationDoseInfo 鑽搧鍓傞噺淇℃伅
-     * @return 缁撴灉
-     */
-    @Override
-    public int updateMedicationDoseInfo(MedicationDoseInfo medicationDoseInfo)
-    {
-        medicationDoseInfo.setUpdateTime(DateUtils.getNowDate());
-        return medicationDoseInfoMapper.updateMedicationDoseInfo(medicationDoseInfo);
-    }
-
-    /**
-     * 鎵归噺鍒犻櫎鑽搧鍓傞噺淇℃伅
-     * 
-     * @param ids 闇�瑕佸垹闄ょ殑鑽搧鍓傞噺淇℃伅涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteMedicationDoseInfoByIds(Long[] ids)
-    {
-        return medicationDoseInfoMapper.deleteMedicationDoseInfoByIds(ids);
-    }
-
-    /**
-     * 鍒犻櫎鑽搧鍓傞噺淇℃伅淇℃伅
-     * 
-     * @param id 鑽搧鍓傞噺淇℃伅涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteMedicationDoseInfoById(Long id)
-    {
-        return medicationDoseInfoMapper.deleteMedicationDoseInfoById(id);
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/service/impl/MedicationItemServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/MedicationItemServiceImpl.java
deleted file mode 100644
index bf1e1aa..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/MedicationItemServiceImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.smartor.service.impl;
-
-import java.util.List;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.smartor.mapper.MedicationItemMapper;
-import com.smartor.domain.MedicationItem;
-import com.smartor.service.IMedicationItemService;
-
-/**
- * 鑽搧淇℃伅Service涓氬姟灞傚鐞�
- * 
- * @author lihu
- * @date 2026-07-17
- */
-@Service
-public class MedicationItemServiceImpl implements IMedicationItemService 
-{
-    @Autowired
-    private MedicationItemMapper medicationItemMapper;
-
-    /**
-     * 鏌ヨ鑽搧淇℃伅
-     * 
-     * @param id 鑽搧淇℃伅涓婚敭
-     * @return 鑽搧淇℃伅
-     */
-    @Override
-    public MedicationItem selectMedicationItemById(Long id)
-    {
-        return medicationItemMapper.selectMedicationItemById(id);
-    }
-
-    /**
-     * 鏌ヨ鑽搧淇℃伅鍒楄〃
-     * 
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 鑽搧淇℃伅
-     */
-    @Override
-    public List<MedicationItem> selectMedicationItemList(MedicationItem medicationItem)
-    {
-        return medicationItemMapper.selectMedicationItemList(medicationItem);
-    }
-
-    /**
-     * 鏂板鑽搧淇℃伅
-     * 
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 缁撴灉
-     */
-    @Override
-    public int insertMedicationItem(MedicationItem medicationItem)
-    {
-        medicationItem.setCreateTime(DateUtils.getNowDate());
-        return medicationItemMapper.insertMedicationItem(medicationItem);
-    }
-
-    /**
-     * 淇敼鑽搧淇℃伅
-     * 
-     * @param medicationItem 鑽搧淇℃伅
-     * @return 缁撴灉
-     */
-    @Override
-    public int updateMedicationItem(MedicationItem medicationItem)
-    {
-        medicationItem.setUpdateTime(DateUtils.getNowDate());
-        return medicationItemMapper.updateMedicationItem(medicationItem);
-    }
-
-    /**
-     * 鎵归噺鍒犻櫎鑽搧淇℃伅
-     * 
-     * @param ids 闇�瑕佸垹闄ょ殑鑽搧淇℃伅涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteMedicationItemByIds(Long[] ids)
-    {
-        return medicationItemMapper.deleteMedicationItemByIds(ids);
-    }
-
-    /**
-     * 鍒犻櫎鑽搧淇℃伅淇℃伅
-     * 
-     * @param id 鑽搧淇℃伅涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteMedicationItemById(Long id)
-    {
-        return medicationItemMapper.deleteMedicationItemById(id);
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
index 3aa700e..6c08431 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PatMedInhospServiceImpl.java
@@ -5,13 +5,10 @@
 import com.fasterxml.jackson.core.JsonProcessingException;
 import com.fasterxml.jackson.core.type.TypeReference;
 import com.fasterxml.jackson.databind.ObjectMapper;
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.service.IConfigService;
 import com.ruoyi.common.core.service.dto.PatMedReq;
 import com.ruoyi.common.core.service.dto.PatMedRes;
 import com.ruoyi.common.utils.DateUtils;
 import com.ruoyi.common.utils.DtoConversionUtils;
-import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.smartor.domain.*;
 import com.ruoyi.inhospvisit.domain.PatMedInhospDTO;
@@ -24,12 +21,9 @@
 import org.springframework.stereotype.Service;
 import org.springframework.util.ObjectUtils;
 
-import java.io.IOException;
 import java.time.Instant;
 import java.time.temporal.ChronoUnit;
 import java.util.*;
-import java.util.stream.Collectors;
-
 import com.ruoyi.othervisit.domain.PatMedOperationItem;
 import com.ruoyi.inhospvisit.domain.PatMedInhospVO;
 import com.ruoyi.inhospvisit.domain.PatMedInhosp;
@@ -39,7 +33,6 @@
 import com.ruoyi.task.domain.ServiceTask;
 import com.ruoyi.task.domain.ServiceTaskdept;
 import com.ruoyi.task.domain.ServiceTaskdiag;
-import com.ruoyi.task.domain.ServiceTaskmedical;
 import com.ruoyi.task.domain.ServiceTaskoper;
 import com.ruoyi.task.domain.ServiceTaskRule;
 import com.ruoyi.task.domain.ServiceTaskSchedule;
@@ -48,13 +41,16 @@
 import com.ruoyi.task.mapper.ServiceTaskdeptMapper;
 import com.ruoyi.task.mapper.ServiceTaskdiagMapper;
 import com.ruoyi.task.mapper.ServiceTaskMapper;
-import com.ruoyi.task.mapper.ServiceTaskmedicalMapper;
 import com.ruoyi.task.mapper.ServiceTaskoperMapper;
 import com.ruoyi.task.mapper.ServiceTaskRuleMapper;
 import com.ruoyi.task.mapper.ServiceTaskScheduleDetailMapper;
 import com.ruoyi.task.mapper.ServiceTaskScheduleMapper;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
 import com.ruoyi.task.common.ScheduleSubtaskBuilder;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
+import com.ruoyi.patarchive.domain.PatArchiveImport;
+import com.ruoyi.patarchive.mapper.PatArchiveImportMapper;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
 /**
  * 鎮h�呬綇闄㈣褰昐ervice涓氬姟灞傚鐞�
  *
@@ -64,6 +60,7 @@
 @Slf4j
 @Service
 public class PatMedInhospServiceImpl implements IPatMedInhospService {
+
     @Autowired
     private InhospVisitFacade inhospVisitFacade;
 
@@ -89,14 +86,10 @@
     @Autowired
     private ServiceSubtaskPreachformMapper serviceSubtaskPreachformMapper;
     @Autowired
-    private ServiceTaskmedicalMapper serviceTaskmedicalMapper;
-    @Autowired
     private ServiceTaskRuleMapper serviceTaskRuleMapper;
 
     @Value("${spring.profiles.active}")
     private String active;
-    @Autowired
-    private IConfigService iSysConfigService;
     @Autowired
     private ServiceTaskScheduleMapper serviceTaskScheduleMapper;
 
@@ -104,18 +97,6 @@
     private ScheduleSubtaskBuilder scheduleSubtaskBuilder;
     @Autowired
     private ServiceTaskScheduleDetailMapper serviceTaskScheduleDetailMapper;
-
-
-    /**
-     * 鏌ヨ鎮h�呬綇闄㈣褰�
-     *
-     * @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
-     * @return 鎮h�呬綇闄㈣褰�
-     */
-    @Override
-    public PatMedInhosp selectPatMedInhospByInhospid(Long inhospid) {
-        return inhospVisitFacade.selectPatMedInhospByInhospid(inhospid);
-    }
 
     @Override
     public List<PatMedInhosp> selectPatMedInhosp(PatMedInhosp patMedInhosp) {
@@ -267,20 +248,6 @@
     }
 
     /**
-     * 鏌ヨ鍑哄叆闄汉娆�
-     *
-     * @param patMedReq
-     * @return
-     */
-    @Override
-    public PatMedRes selectPatMedInhospListCount(PatMedReq patMedReq) {
-        PatMedRes patMedRes = null;
-        // 鑾峰彇褰撳墠鐧婚檰浜虹殑閮ㄩ棬鏉冮檺
-        patMedRes = inhospVisitFacade.selectPatMedInhospCount(patMedReq);
-        return patMedRes;
-    }
-
-    /**
      * 鏂板鎮h�呬綇闄㈣褰�
      *
      * @param patMedInhosp 鎮h�呬綇闄㈣褰�
@@ -304,333 +271,6 @@
         patMedInhosp.setUpdateTime(DateUtils.getNowDate());
         return inhospVisitFacade.updatePatMedInhosp(patMedInhosp);
     }
-
-    /**
-     * 鎵归噺鍒犻櫎鎮h�呬綇闄㈣褰�
-     *
-     * @param inhospids 闇�瑕佸垹闄ょ殑鎮h�呬綇闄㈣褰曚富閿�
-     * @return 缁撴灉
-     */
-    @Override
-    public int deletePatMedInhospByInhospids(Long[] inhospids) {
-        return inhospVisitFacade.deletePatMedInhospByInhospids(inhospids);
-    }
-
-    /**
-     * 鍒犻櫎鎮h�呬綇闄㈣褰曚俊鎭�
-     *
-     * @param inhospid 鎮h�呬綇闄㈣褰曚富閿�
-     * @return 缁撴灉
-     */
-    @Override
-    public int deletePatMedInhospByInhospid(Long inhospid) {
-        return inhospVisitFacade.deletePatMedInhospByInhospid(inhospid);
-    }
-
-    /**
-     * 鍒犻櫎鎮h�呬綇闄㈣褰曚俊鎭�
-     *
-     * @param inhospno 鎮h�呬綇闄㈢紪鐮�
-     * @return 缁撴灉
-     */
-    @Override
-    public int deletePatMedInhospByInhospno(String inhospno) {
-        return inhospVisitFacade.deletePatMedInhospByInhospno(inhospno);
-    }
-
-    @Override
-    public int dealOutHospInfo(String config) {
-        PatMedInhosp pmks = new PatMedInhosp();
-        pmks.setDeptcheckFlag("0");
-        pmks.setInhospstate("1");
-        pmks.setFuflag("1");
-        List<PatMedInhosp> patMedInhosps = inhospVisitFacade.selectPatMedInhospList(pmks);
-
-        //1.鍏ラ櫌瀹f暀
-        String helibrarySwitch = iSysConfigService.selectConfigByKey("in.helibrary.switch");
-        if (StringUtils.isNotEmpty(helibrarySwitch) && "2".equals(helibrarySwitch)) {
-
-            //1.1 绉戝
-            for (PatMedInhosp patMedInhosp1 : patMedInhosps) {
-                //鑾峰彇鎮h�呬俊鎭�
-                PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp1.getPatid());
-                if (Objects.isNull(patArchive)) {
-                    patMedInhosp1.setInDeptcheckFlag("2");
-                    patMedInhosp1.setLongTaskReason("鎮h�呭熀鏈俊鎭负绌�");
-                    inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-                    continue;
-                }
-                try {
-                    //鏍规嵁鎮h�呮墍鍦ㄧ瀹わ紝鑾峰彇璇ョ瀹ょ殑鍏ラ櫌闀挎湡瀹f暀浠诲姟
-                    ServiceTaskdept serviceTaskdept = new ServiceTaskdept();
-                    serviceTaskdept.setLongtask(1L);
-                    serviceTaskdept.setDeptCode(patMedInhosp1.getDeptcode());
-                    serviceTaskdept.setDeptType("1");
-                    serviceTaskdept.setServiceType("17");
-                    serviceTaskdept.setOrgid(patMedInhosp1.getOrgid());
-                    List<ServiceTaskdept> serviceTaskdepts = serviceTaskdeptMapper.selectServiceTaskdeptList(serviceTaskdept);
-                    //濡傛灉閮ㄩ棬妯℃澘涓虹┖锛堝皢deptIsNull璁剧疆涓簍rue锛�
-                    if (CollectionUtils.isEmpty(serviceTaskdepts) || serviceTaskdepts.size() == 0) {
-                        PatMedInhosp patMedInhosp = inhospVisitFacade.selectPatMedInhospByInhospid(patMedInhosp1.getInhospid());
-                        patMedInhosp1.setInDeptcheckFlag("2");
-                        patMedInhosp1.setLongTaskReason(StringUtils.isNotEmpty(patMedInhosp.getLongTaskReason()) ? patMedInhosp.getLongTaskReason() + "璇ユ偅鑰呮墍鍦ㄧ瀹ゆ湭閰嶇疆鍏ラ櫌闀挎湡瀹f暀浠诲姟;" : "璇ユ偅鑰呮墍鍦ㄧ瀹ゆ湭閰嶇疆鍏ラ櫌闀挎湡瀹f暀浠诲姟;");
-                        inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-                    } else {
-                        for (ServiceTaskdept serviceTaskdept1 : serviceTaskdepts) {
-                            writeInSubTask(serviceTaskdept1.getTaskId(), true, patMedInhosp1, patArchive, 4, config);
-                        }
-                    }
-
-                } catch (Exception e) {
-                    log.error("浜哄憳鍏ラ櫌绉戝澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
-                    patMedInhosp1.setInDeptcheckFlag("2");
-                    patMedInhosp1.setLongTaskReason("浜哄憳鍏ラ櫌绉戝澶勭悊鍑哄紓甯镐簡");
-                    inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-                }
-            }
-
-
-            //1.2 鐥呭尯
-            pmks.setInDeptcheckFlag(null);
-            pmks.setInWardcheckFlag("0");
-            pmks.setDeptcheckFlag(null);
-            List<PatMedInhosp> inPatMedInhospsWard = inhospVisitFacade.selectPatMedInhospList(pmks);
-            for (PatMedInhosp patMedInhosp1 : inPatMedInhospsWard) {
-                //鑾峰彇鎮h�呬俊鎭�
-                PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp1.getPatid());
-                if (Objects.isNull(patArchive)) {
-                    patMedInhosp1.setInDeptcheckFlag("2");
-                    patMedInhosp1.setLongTaskReason("鎮h�呭熀鏈俊鎭负绌�");
-                    inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-                    continue;
-                }
-                //鏍规嵁鎮h�呮墍鍦ㄧ梾鍖猴紝鑾峰彇璇ョ梾鍖虹殑鍏ラ櫌闀挎湡瀹f暀浠诲姟锛堜細鍑虹幇涓�涓棶棰橈紝绉戝鍜岀梾鍖哄彂鐨勫悓涓�涓ā鏉匡級
-                ServiceTaskdept serviceTaskWard = new ServiceTaskdept();
-                serviceTaskWard.setLongtask(1L);
-                serviceTaskWard.setDeptCode(patMedInhosp1.getHospitaldistrictcode());
-                serviceTaskWard.setDeptType("2");
-                serviceTaskWard.setServiceType("17");
-                serviceTaskWard.setOrgid(patMedInhosp1.getOrgid());
-                List<ServiceTaskdept> serviceTaskWardList = serviceTaskdeptMapper.selectServiceTaskdeptList(serviceTaskWard);
-                //濡傛灉閮ㄩ棬妯℃澘涓虹┖锛堝皢deptIsNull璁剧疆涓簍rue锛�
-                if (CollectionUtils.isEmpty(serviceTaskWardList) || serviceTaskWardList.size() == 0) {
-                    PatMedInhosp patMedInhosp = inhospVisitFacade.selectPatMedInhospByInhospid(patMedInhosp1.getInhospid());
-                    patMedInhosp1.setInDeptcheckFlag("2");
-                    patMedInhosp1.setLongTaskReason(patMedInhosp.getLongTaskReason() + "璇ユ偅鑰呮墍鍦ㄧ梾鍖烘湭閰嶇疆鍏ラ櫌闀挎湡瀹f暀浠诲姟;");
-                    inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-                } else {
-                    for (ServiceTaskdept serviceTaskdept1 : serviceTaskWardList) {
-                        writeInSubTask(serviceTaskdept1.getTaskId(), true, patMedInhosp1, patArchive, 5, config);
-                    }
-                }
-            }
-        }
-
-        //2.鑽搧瀹f暀(鐪佺珛鍚屽痉鐨勯渶姹傦紝鍏跺畠鍦版柟娌℃彁)
-        if (active.equals("sltd")) {
-            for (PatMedInhosp patMedInhosp : patMedInhosps) {
-                String medicalCode = patMedInhosp.getMedicalCode();
-                if (StringUtils.isNotEmpty(medicalCode)) {
-                    String[] split = medicalCode.split(",");
-                    // 闃插尽鎬х紪绋嬶細纭繚 medicalCompany 鍜� medicalName 涓嶄负 null
-                    String medicalCompanyStr = patMedInhosp.getMedicalCompany() != null ? patMedInhosp.getMedicalCompany() : "";
-                    String medicalNameStr = patMedInhosp.getMedicalName() != null ? patMedInhosp.getMedicalName() : "";
-                    String[] medicalCompanyArray = medicalCompanyStr.split(",");
-                    String[] medicalNameArray = medicalNameStr.split(",");
-
-                    for (int i = 0; i < split.length; i++) {
-                        ServiceTaskmedical serviceTaskmedical = new ServiceTaskmedical();
-                        //鎷胯嵂鍝佺紪鐮佸拰鍏徃鍘绘煡
-                        serviceTaskmedical.setMedicalCode(split[i]);
-                        // 闃叉涓嬫爣瓒婄晫锛氬鏋滄暟缁勯暱搴︿笉涓�鑷达紝鍙栨渶灏忛暱搴�
-                        if (i < medicalCompanyArray.length) {
-                            serviceTaskmedical.setMedicalCompany(medicalCompanyArray[i]);
-                        } else {
-                            log.warn("銆愯嵂鍝佸鏁欍�戣嵂鍝佺紪鐮亄}瀵瑰簲鐨勫叕鍙镐俊鎭笅鏍囪秺鐣岋紝medicalCompany 鏁扮粍闀垮害={}, 褰撳墠绱㈠紩={}", split[i], medicalCompanyArray.length, i);
-                            serviceTaskmedical.setMedicalName(""); // 瓒婄晫鏃惰缃负绌�
-                        }
-                        List<ServiceTaskmedical> serviceTaskmedicals = serviceTaskmedicalMapper.selectServiceTaskmedicalList(serviceTaskmedical);
-                        if (CollectionUtils.isNotEmpty(serviceTaskmedicals)) {
-                            PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp.getPatid());
-                            // check=true锛岃 writeInSubTask 鍐呴儴鍋氬幓閲嶆牎楠�
-                            writeInSubTask(serviceTaskmedicals.get(0).getTaskId(), true, patMedInhosp, patArchive, 0, config);
-                        }
-                        //鏌ヤ笉鍒扮殑鑽搧灏辨槸涓嶉渶瑕佸鏁欑殑锛屽氨涓嶇浜�
-                    }
-                }
-            }
-        }
-        //3.鍑洪櫌闅忚 - 鍩轰簬瑙勫垯鐨勪换鍔$敓鎴�
-        // 鑾峰彇鎵�鏈夐渶瑕佸鐞嗙殑鍑洪櫌鎮h�咃紙绉戝缁村害鏈鐞嗭級
-
-        addSubTaskByRule(config, patMedInhosps);
-        if (!active.equals("xh")) {
-            addOperationSubTask(config);
-        }
-
-
-        //鑾峰彇鏈鐞嗗湪闄㈢殑鏁版嵁(濡傛灉鍒氬垰鍑洪櫌鐨勬偅鑰呮暟鎹殑鍑洪櫌鏃堕棿,鍦ㄤ笅闈㈡煡璇㈠嚭鐨勫叆闄㈡椂闂翠箣鍓�,閭d箣鍓嶇殑鍑洪櫌鎮h�呯殑鏁版嵁,涔熷緱鍋滄帀,鍥犱负鍙堝叆闄簡)
-        PatMedInhosp patMedInhosp = new PatMedInhosp();
-        patMedInhosp.setDeptcheckFlag("0");
-        patMedInhosp.setInhospstate("0");
-        List<PatMedInhosp> patMedInhospList = inhospVisitFacade.selectPatMedInhospList(patMedInhosp);
-        if (CollectionUtils.isNotEmpty(patMedInhospList) && patMedInhospList.size() > 0) {
-            dealInHospInfo(patMedInhospList);
-        }
-        return 1;
-    }
-
-    /**
-     * 浠诲姟缁勯殢璁�
-     *
-     * @param config
-     * @return
-     */
-    public int dealOutHospInfoBySchedule(String config) {
-
-        ServiceTask serviceTaskVo = new ServiceTask();
-        serviceTaskVo.setLongTask(1);
-        serviceTaskVo.setAppltype("5");
-        List<ServiceTask> serviceTasks = serviceTaskMapper.selectServiceTaskList(serviceTaskVo);
-
-        if (CollectionUtils.isNotEmpty(serviceTasks)) {
-            for (ServiceTask serviceTask : serviceTasks) {
-                if (!ObjectUtils.isEmpty(serviceTask.getTaskid())) {
-                    ServiceTaskSchedule serviceTaskSchedule = new ServiceTaskSchedule();
-                    ServiceTaskSchedule taskSchedule = new ServiceTaskSchedule();
-                    taskSchedule.setTaskid(serviceTask.getTaskid());
-                    List<ServiceTaskSchedule> serviceTaskSchedules = serviceTaskScheduleMapper.selectServiceTaskScheduleList(taskSchedule);
-                    if (CollectionUtils.isNotEmpty(serviceTaskSchedules)) {
-                        serviceTaskSchedule = serviceTaskSchedules.get(0);
-                        String deptCodes = serviceTaskSchedule.getDeptCodes();
-                        String wardCodes = serviceTaskSchedule.getWardCodes();
-                        String icd10Codes = serviceTaskSchedule.getIcd10Codes();
-                        String opLevelCodes = serviceTaskSchedule.getOplevelCodes();
-
-                        List<String> icd10CodeList = new ArrayList<>();
-                        List<String> opLevelCodeList = new ArrayList<>();
-                        List<String> deptCodeList = new ArrayList<>();
-                        List<String> wardCodeList = new ArrayList<>();
-
-                        /**
-                         * 闅忚绫诲瀷(1-绉戝锛�2-鐥呭尯锛�3-鐤剧梾 4-鍏ラ櫌绉戝 5-鍏ラ櫌鐥呭尯 6-鎵嬫湳)
-                         */
-                        Integer type = 1;
-                        if (StringUtils.isNotEmpty(deptCodes)) {
-                            type = 1;
-                            deptCodeList = new ArrayList<>(Arrays.asList(deptCodes.split(",")));
-                        }
-                        if (StringUtils.isNotEmpty(wardCodes)) {
-                            type = 2;
-                            wardCodeList = new ArrayList<>(Arrays.asList(wardCodes.split(",")));
-                        }
-                        if (StringUtils.isNotEmpty(icd10Codes)) {
-                            type = 3;
-                            icd10CodeList = new ArrayList<>(Arrays.asList(icd10Codes.split(",")));
-                        }
-                        if (StringUtils.isNotEmpty(opLevelCodes)) {
-                            type = 6;
-                            opLevelCodeList = new ArrayList<>(Arrays.asList(opLevelCodes.split(",")));
-                        }
-                        //闈炴墜鏈鐞嗘柟寮�
-                        if (type != 6) {
-                            PatMedInhosp patMedInhospVo = new PatMedInhosp();
-                            patMedInhospVo.setScheduleCheckFlag("0");
-                            patMedInhospVo.setInhospstate("1");
-                            patMedInhospVo.setFuflag("1");
-//                            patMedInhospVo.setDeptcodeList(deptCodeList);
-                            patMedInhospVo.setLeaveldeptcodes(deptCodeList);
-                            patMedInhospVo.setLeavehospitaldistrictcodes(wardCodeList);
-                            patMedInhospVo.setIcd10codeList(icd10CodeList);
-                            List<PatMedInhosp> patList = inhospVisitFacade.selectPatMedInhospList(patMedInhospVo);
-                            log.info("dealOutHospInfoBySchedule 浠诲姟缁勯殢璁�, taskid = {}, 鎵弿鎮h�呬汉鏁� {}", serviceTask.getTaskid(), patList.size());
-
-                            for (PatMedInhosp patMedInhosp : patList) {
-                                ServiceTaskScheduleDetail scheduleDetailVo = new ServiceTaskScheduleDetail();
-                                scheduleDetailVo.setTaskid(serviceTask.getTaskid());
-                                scheduleDetailVo.setScheduleid(serviceTaskSchedule.getId());
-                                List<ServiceTaskScheduleDetail> serviceTaskScheduleDetails = serviceTaskScheduleDetailMapper.selectServiceTaskScheduleDetailList(scheduleDetailVo);
-
-                                PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp.getPatid());
-                                if (Objects.isNull(patArchive)) {
-                                    continue;
-                                }
-                                //灏佽serviceSubtask
-
-                                ServiceSubtask serviceSubtask = boxedServiceSubtask(serviceTask, patMedInhosp, patArchive, config, type);
-                                List<Map<String, Object>> preachformList = new ArrayList<>();
-                                if (StringUtils.isNotEmpty(serviceTask.getPreachformDesc())) {
-                                    try {
-                                        ObjectMapper objectMapper = new ObjectMapper();
-                                        preachformList = objectMapper.readValue(serviceTask.getPreachformDesc(), List.class);
-                                    } catch (Exception e) {
-                                        log.error("浠诲姟缁刾reachformDesc瑙f瀽澶辫触,taskid={},inhospid={}", serviceTask.getTaskid(), patMedInhosp.getInhospid());
-                                    }
-                                }
-                                scheduleSubtaskBuilder.buildSubtasksForPatient(serviceTask, serviceTaskSchedule, serviceTaskScheduleDetails, serviceSubtask, preachformList);
-                                //缃杞撼鍏ユ爣璁帮紝閬垮厤涓嬫鎵弿閲嶅鐢熸垚锛堝悗缁疆娆$敱 rollTaskGroupCycle 璐熻矗锛�
-                                PatMedInhosp flagUpd = new PatMedInhosp();
-                                flagUpd.setInhospid(patMedInhosp.getInhospid());
-                                flagUpd.setScheduleCheckFlag("1");
-                                inhospVisitFacade.updatePatMedInhosp(flagUpd);
-                            }
-                        } else {
-                            //浠诲姟缁� - 鎵嬫湳闅忚
-                            if (CollectionUtils.isNotEmpty(opLevelCodeList)) {
-                                PatMedOperationItem pmoi = new PatMedOperationItem();
-                                //鑾峰彇闇�瑕佸嚭闄㈢柧鐥呴殢璁匡紝鏈鐞嗙殑鏁版嵁
-                                pmoi.setOpercheckFlag("0");
-                                pmoi.setMainFlag("1");
-                                pmoi.setDeptCodes(deptCodeList);
-                                pmoi.setWardCodes(wardCodeList);
-                                pmoi.setOpLevelCodes(opLevelCodeList);
-
-                                //姣忔鏌ヨ鍙煡鏈�澶х殑鎵嬫湳绛夌骇璁板綍
-                                List<PatMedOperationItem> patMedOperationItems = otherVisitFacade.selectOperationItemListMaxLevel(pmoi);
-                                for (PatMedOperationItem patMedOperationItem : patMedOperationItems) {
-                                    PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedOperationItem.getPatid());
-                                    if (Objects.isNull(patArchive)) {
-                                        continue;
-                                    }
-                                    PatMedInhosp patMedInhospVo = new PatMedInhosp();
-                                    patMedInhospVo.setPatid((patMedOperationItem.getPatid()));
-                                    patMedInhospVo.setScheduleCheckFlag("0");
-                                    patMedInhospVo.setInhospstate("1");
-                                    patMedInhospVo.setFuflag("1");
-                                    List<PatMedInhosp> patMedInhospList = inhospVisitFacade.selectPatMedInhospList(patMedInhospVo);
-                                    if (CollectionUtils.isNotEmpty(patMedInhospList)) {
-                                        ServiceTaskScheduleDetail scheduleDetailVo = new ServiceTaskScheduleDetail();
-                                        scheduleDetailVo.setTaskid(serviceTask.getTaskid());
-                                        scheduleDetailVo.setScheduleid(serviceTaskSchedule.getId());
-                                        List<ServiceTaskScheduleDetail> serviceTaskScheduleDetails = serviceTaskScheduleDetailMapper.selectServiceTaskScheduleDetailList(scheduleDetailVo);
-                                        //灏佽serviceSubtask
-                                        ServiceSubtask serviceSubtask = boxedServiceSubtaskForOp(serviceTask, patMedInhospList.get(0), patMedOperationItem, patArchive, config);
-                                        List<Map<String, Object>> preachformList = new ArrayList<>();
-                                        if (StringUtils.isNotEmpty(serviceTask.getPreachformDesc())) {
-                                            try {
-                                                ObjectMapper objectMapper = new ObjectMapper();
-                                                preachformList = objectMapper.readValue(serviceTask.getPreachformDesc(), List.class);
-                                            } catch (Exception e) {
-                                                log.error("浠诲姟缁�(鎵嬫湳)preachformDesc瑙f瀽澶辫触,taskid={}", serviceTask.getTaskid());
-                                            }
-                                        }
-                                        scheduleSubtaskBuilder.buildSubtasksForPatient(serviceTask, serviceTaskSchedule, serviceTaskScheduleDetails, serviceSubtask, preachformList);
-                                        //缃杞撼鍏ユ爣璁帮紝閬垮厤閲嶅鐢熸垚
-                                        PatMedInhosp flagUpd = new PatMedInhosp();
-                                        flagUpd.setInhospid(patMedInhospList.get(0).getInhospid());
-                                        flagUpd.setScheduleCheckFlag("1");
-                                        inhospVisitFacade.updatePatMedInhosp(flagUpd);
-                                    }
-                                }
-                            }
-                        }
-                    }
-                }
-            }
-        }
-        return 1;
-    }
-
 
     /**
      * 鑾峰彇鍑洪櫌锛屼綇闄紝闂ㄨ瘖鏈嶅姟浜烘
@@ -1376,297 +1016,6 @@
         }
     }
 
-    @Override
-    public void addOperationSubTask(String config) {
-        //            鎵嬫湳闅忚
-        PatMedOperationItem pmoi = new PatMedOperationItem();
-        //鑾峰彇闇�瑕佸嚭闄㈡墜鏈殢璁匡紝鏈鐞嗙殑鏁版嵁
-        if(!active.equals("hzszlyy")){
-            pmoi.setInhospstate("1");
-        }
-        pmoi.setOpercheckFlag("0");
-        pmoi.setMainFlag("1");
-
-        //姣忔鏌ヨ鍙煡鏈�澶х殑鎵嬫湳绛夌骇璁板綍
-        List<PatMedOperationItem> patMedOperationItems = otherVisitFacade.selectOperationItemListMaxLevel(pmoi);
-        log.info("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌鎵嬫湳鎮h�呬俊鎭細{}", CollectionUtils.isNotEmpty(patMedOperationItems) ? patMedOperationItems.size() : null);
-
-        for (PatMedOperationItem opItem : patMedOperationItems) {
-
-            try {
-                if (StringUtils.isEmpty(opItem.getOplevelcode())) {
-                    continue;
-                }
-                // 鏍规嵁鎮h�呯殑鐤剧梾锛岃幏鍙栬鐤剧梾鐨勯暱鏈熶换鍔�
-                List<ServiceTaskoper> serviceTaskopersDept = new ArrayList<>();
-                if(StringUtils.isNotEmpty(opItem.getLeaveldeptcode())){
-                    ServiceTaskoper serviceTaskoper1 = new ServiceTaskoper();
-                    serviceTaskoper1.setLongtask(1L);
-                    serviceTaskoper1.setOrgid(opItem.getOrgid());
-                    serviceTaskoper1.setOplevelcode(opItem.getOplevelcode());
-                    serviceTaskoper1.setDeptCode(opItem.getLeaveldeptcode());
-                    serviceTaskopersDept = serviceTaskoperMapper.selectServiceTaskoperList(serviceTaskoper1);
-                }
-
-
-                List<ServiceTaskoper> serviceTaskopersWard = new ArrayList<>();
-                if(StringUtils.isNotEmpty(opItem.getLeavehospitaldistrictcode())){
-                    ServiceTaskoper serviceTaskoper2 = new ServiceTaskoper();
-                    serviceTaskoper2.setLongtask(1L);
-                    serviceTaskoper2.setOrgid(opItem.getOrgid());
-                    serviceTaskoper2.setOplevelcode(opItem.getOplevelcode());
-                    serviceTaskoper2.setWardCode(opItem.getLeavehospitaldistrictcode());
-                    serviceTaskopersWard = serviceTaskoperMapper.selectServiceTaskoperList(serviceTaskoper2);
-                }
-
-
-                List<ServiceTaskoper> serviceTaskopers = new ArrayList<>();
-                serviceTaskopers.addAll(serviceTaskopersDept);
-                serviceTaskopers.addAll(serviceTaskopersWard);
-                //濡傛灉閮ㄩ棬妯℃澘涓虹┖锛堝皢deptIsNull璁剧疆涓簍rue锛�
-                if (CollectionUtils.isEmpty(serviceTaskopers) || serviceTaskopers.size() == 0) {
-                    PatMedOperationItem patMedOperationItem = otherVisitFacade.selectOperationItemById(opItem.getId());
-                    patMedOperationItem.setOpercheckFlag("2");
-                    patMedOperationItem.setLongTaskReason("鎵�鎮g殑鎵嬫湳鏈厤缃暱鏈熶换鍔�;");
-                    patMedOperationItem.setUpdateTime(new Date());
-                    otherVisitFacade.updateOperationItem(patMedOperationItem);
-                } else {
-                    for (ServiceTaskoper serviceTaskoper : serviceTaskopers) {
-                        writeInSubTaskForOp(serviceTaskoper.getTaskId(), true, opItem, config);
-                    }
-                }
-
-            } catch (Exception e) {
-                e.printStackTrace();
-                log.error("浜哄憳鎵嬫湳澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
-                opItem.setUpdateTime(new Date());
-                opItem.setOpercheckFlag("2");
-                opItem.setLongTaskReason("浜哄憳鎵嬫湳澶勭悊寮傚父");
-                otherVisitFacade.updateOperationItem(opItem);
-            }
-        }
-    }
-
-    private void addIcd10SubTask(String config) {
-        PatMedInhosp pmjb = new PatMedInhosp();
-        //鑾峰彇闇�瑕佸嚭闄㈢柧鐥呴殢璁匡紝鏈鐞嗙殑鏁版嵁
-        pmjb.setDiagcheckFlag("0");
-        pmjb.setInhospstate("1");
-        pmjb.setFuflag("1");
-        List<PatMedInhosp> patMedInhospJBs = inhospVisitFacade.selectPatMedInhospList(pmjb);
-        log.info("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌鐤剧梾鎮h�呬俊鎭細{}", CollectionUtils.isNotEmpty(patMedInhospJBs) ? patMedInhospJBs.size() : null);
-        for (PatMedInhosp patMedInhosp1 : patMedInhospJBs) {
-            String tagname = inhospVisitFacade.getTagnameBypatid(patMedInhosp1.getPatid());
-            patMedInhosp1.setTagname(tagname);
-        }
-
-        for (PatMedInhosp pmiJB : patMedInhospJBs) {
-            //鑾峰彇鎮h�呬俊鎭�
-            PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(pmiJB.getPatid());
-            if (Objects.isNull(patArchive)) {
-                pmiJB.setDiagcheckFlag("2");
-                pmiJB.setLongTaskReason("鎮h�呭熀鏈俊鎭负绌�");
-                inhospVisitFacade.updatePatMedInhosp(pmiJB);
-                continue;
-            }
-            try {
-                String errorIcd = null;
-                if (StringUtils.isEmpty(pmiJB.getLeaveicd10code())) {
-                    continue;
-                }
-                // 鏍规嵁鎮h�呯殑鐤剧梾锛岃幏鍙栬鐤剧梾鐨勯暱鏈熶换鍔�
-                ServiceTaskdiag serviceTaskdiag = new ServiceTaskdiag();
-                serviceTaskdiag.setLongtask(1L);
-//                serviceTaskdiag.setServiceType("2");
-                if (active.equals("nhfy")) {
-                    //鍗楀崕闄勪竴鐨刬cd10code鏈夐噸澶嶏紝鎵�浠ョ敤涓昏瘖鏂悕绉板幓鏌ヨ
-                    serviceTaskdiag.setIcd10name(pmiJB.getLeavediagname());
-                    if (StringUtils.isEmpty(pmiJB.getLeavediagname())) {
-                        errorIcd = "璇ユ偅鑰呬富璇婃柇鍚嶇О涓虹┖;";
-                    }
-                } else {
-                    serviceTaskdiag.setIcd10code(pmiJB.getLeaveicd10code());
-                    if (StringUtils.isEmpty(pmiJB.getLeaveicd10code())) {
-                        errorIcd = "璇ユ偅鑰呬富璇婃柇ICD10鐮佷负绌�;";
-                    }
-                }
-                serviceTaskdiag.setOrgid(pmiJB.getOrgid());
-                List<ServiceTaskdiag> serviceTaskdiags = serviceTaskdiagMapper.selectServiceTaskdiagListByIcdName(serviceTaskdiag);
-
-                //濡傛灉閮ㄩ棬妯℃澘涓虹┖锛堝皢deptIsNull璁剧疆涓簍rue锛�
-                if (StringUtils.isNotEmpty(errorIcd)) {
-                    PatMedInhosp patMedInhosp = inhospVisitFacade.selectPatMedInhospByInhospid(pmiJB.getInhospid());
-                    pmiJB.setDiagcheckFlag("2");
-                    pmiJB.setLongTaskReason(StringUtils.isNotEmpty(patMedInhosp.getLongTaskReason()) ? patMedInhosp.getLongTaskReason() + errorIcd : errorIcd);
-                    inhospVisitFacade.updatePatMedInhosp(pmiJB);
-                } else if (CollectionUtils.isEmpty(serviceTaskdiags)) {
-                    errorIcd = "璇ユ偅鑰呮墍鎮g柧鐥呮湭閰嶇疆闀挎湡浠诲姟;";
-                    PatMedInhosp patMedInhosp = inhospVisitFacade.selectPatMedInhospByInhospid(pmiJB.getInhospid());
-                    pmiJB.setDiagcheckFlag("2");
-                    pmiJB.setLongTaskReason(StringUtils.isNotEmpty(patMedInhosp.getLongTaskReason()) ? patMedInhosp.getLongTaskReason() + errorIcd : errorIcd);
-                    inhospVisitFacade.updatePatMedInhosp(pmiJB);
-                } else {
-                    int flag = 0;
-                    for (ServiceTaskdiag serviceTaskdept1 : serviceTaskdiags) {
-                        //蹇呴』绉戝鎴栫梾鍖鸿兘鍖归厤涓�,鎵嶅彲浠ョ敤杩欎釜鐤剧梾鍒涘缓瀛愪换鍔★紙涓昏澶勭悊涓�涓柧鐥呭湪澶氫釜鐥呭尯鎴栫瀹ゅ嚭鐜帮級
-                        if (StringUtils.isNotEmpty(serviceTaskdept1.getDeptCode()) && serviceTaskdept1.getDeptCode().equals(pmiJB.getLeaveldeptcode())) {
-                            writeInSubTask(serviceTaskdept1.getTaskId(), true, pmiJB, patArchive, 3, config);
-                            flag = 1;
-                        } else if (StringUtils.isNotEmpty(serviceTaskdept1.getWardCode()) && serviceTaskdept1.getWardCode().equals(pmiJB.getLeavehospitaldistrictcode())) {
-                            writeInSubTask(serviceTaskdept1.getTaskId(), true, pmiJB, patArchive, 3, config);
-                            flag = 1;
-                        }
-                    }
-                    if (flag == 0) {
-                        log.error("璇ョ瀹ゆ垨鐥呭尯瀵逛簬鎮h�呮墍鎮g柧鐥呮湭閰嶇疆闀挎湡浠诲姟,鎮h�咃細{}", pmiJB.getInhospid());
-                        errorIcd = "璇ョ瀹ゆ垨鐥呭尯瀵逛簬鎮h�呮墍鎮g柧鐥呮湭閰嶇疆闀挎湡浠诲姟;";
-                        PatMedInhosp patMedInhosp = inhospVisitFacade.selectPatMedInhospByInhospid(pmiJB.getInhospid());
-                        pmiJB.setDiagcheckFlag("2");
-                        pmiJB.setLongTaskReason(StringUtils.isNotEmpty(patMedInhosp.getLongTaskReason()) ? patMedInhosp.getLongTaskReason() + errorIcd : errorIcd);
-                        inhospVisitFacade.updatePatMedInhosp(pmiJB);
-                    }
-
-                }
-
-            } catch (Exception e) {
-                e.printStackTrace();
-                log.error("浜哄憳鐤剧梾澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
-                pmiJB.setDiagcheckFlag("2");
-                pmiJB.setLongTaskReason("浜哄憳鐤剧梾澶勭悊寮傚父");
-                inhospVisitFacade.updatePatMedInhosp(pmiJB);
-            }
-        }
-    }
-
-    private void addWardSubTask(String config) {
-        PatMedInhosp pmbq = new PatMedInhosp();
-        //鑾峰彇闇�瑕佸嚭闄㈤儴闂ㄩ殢璁匡紝鏈鐞嗙殑鏁版嵁
-        pmbq.setWardcheckFlag("0");
-        pmbq.setInhospstate("1");
-        pmbq.setFuflag("1");
-        List<PatMedInhosp> patMedInhospBQs = inhospVisitFacade.selectPatMedInhospList(pmbq);
-        log.info("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌鐥呭尯鎮h�呬俊鎭細{}", CollectionUtils.isNotEmpty(patMedInhospBQs) ? patMedInhospBQs.size() : null);
-        for (PatMedInhosp patMedInhosp1 : patMedInhospBQs) {
-            String tagname = inhospVisitFacade.getTagnameBypatid(patMedInhosp1.getPatid());
-            patMedInhosp1.setTagname(tagname);
-        }
-
-        //鐥呭尯鏁版嵁澶勭悊
-        for (PatMedInhosp pmiBQ1 : patMedInhospBQs) {
-            if ("1".equals(pmiBQ1.getLeavehospitaldistrictcode()) && pmiBQ1.getDiagcheckFlag().equals("1")) {
-                pmiBQ1.setWardcheckFlag("2");
-                pmiBQ1.setLongTaskReason("鏍规嵁浜ゅ弶鐢熸垚闅忚浠诲姟瑙勫垯锛岀梾鍖轰换鍔″彲浠ヤ笉鐢ㄧ敓鎴�");
-                inhospVisitFacade.updatePatMedInhosp(pmiBQ1);
-                continue;
-            }
-
-            //鑾峰彇鎮h�呬俊鎭�
-            PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(pmiBQ1.getPatid());
-            if (Objects.isNull(patArchive)) {
-                pmiBQ1.setWardcheckFlag("2");
-                pmiBQ1.setLongTaskReason("鎮h�呭熀鏈俊鎭负绌�");
-                inhospVisitFacade.updatePatMedInhosp(pmiBQ1);
-                continue;
-            }
-            try {
-                String errorreason = null;
-                List<ServiceTaskdept> serviceTaskdeptList = null;
-                if (!StringUtils.isEmpty(pmiBQ1.getLeavehospitaldistrictcode())) {
-                    ServiceTaskdept serviceTaskdept = new ServiceTaskdept();
-                    serviceTaskdept.setLongtask(1L);
-                    serviceTaskdept.setDeptCode(pmiBQ1.getLeavehospitaldistrictcode());
-                    serviceTaskdept.setDeptType("2");
-                    serviceTaskdept.setServiceType("2");
-                    serviceTaskdept.setOrgid(pmiBQ1.getOrgid());
-                    serviceTaskdeptList = serviceTaskdeptMapper.selectServiceTaskdeptList(serviceTaskdept);
-                    if (CollectionUtils.isEmpty(serviceTaskdeptList)) {
-                        errorreason = "璇ユ偅鑰呮墍鍦ㄧ梾鍖烘湭閰嶇疆闀挎湡浠诲姟;";
-                    }
-                } else {
-                    errorreason = "绂婚櫌鐥呭尯涓虹┖;";
-                }
-                //濡傛灉閮ㄩ棬妯℃澘涓虹┖锛堝皢deptIsNull璁剧疆涓簍rue锛�
-                if (StringUtils.isNotEmpty(errorreason)) {
-                    PatMedInhosp patMedInhosp = inhospVisitFacade.selectPatMedInhospByInhospid(pmiBQ1.getInhospid());
-                    pmiBQ1.setWardcheckFlag("2");
-                    pmiBQ1.setLongTaskReason(StringUtils.isNotEmpty(patMedInhosp.getLongTaskReason()) ? patMedInhosp.getLongTaskReason() + errorreason : errorreason);
-                    inhospVisitFacade.updatePatMedInhosp(pmiBQ1);
-                } else {
-                    for (ServiceTaskdept serviceTaskdept1 : serviceTaskdeptList) {
-                        writeInSubTask(serviceTaskdept1.getTaskId(), true, pmiBQ1, patArchive, 2, config);
-                    }
-                }
-
-            } catch (Exception e) {
-                e.printStackTrace();
-                log.error("浜哄憳鐥呭尯澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
-                pmiBQ1.setWardcheckFlag("2");
-                pmiBQ1.setLongTaskReason("浜哄憳鐥呭尯澶勭悊寮傚父");
-                inhospVisitFacade.updatePatMedInhosp(pmiBQ1);
-            }
-        }
-    }
-
-    private void addDeptSubTask(String config) {
-        //鑾峰彇闇�瑕佸嚭闄㈤儴闂ㄩ殢璁匡紝鏈鐞嗙殑鏁版嵁
-        PatMedInhosp pmks = new PatMedInhosp();
-        pmks.setDeptcheckFlag("0");
-        pmks.setInhospstate("1");
-        pmks.setFuflag("1");
-        List<PatMedInhosp> patMedInhosps = inhospVisitFacade.selectPatMedInhospList(pmks);
-        log.info("dealOutHospInfo闇�瑕佸鐞嗙殑鍑洪櫌閮ㄩ棬鎮h�呬俊鎭細{}", CollectionUtils.isNotEmpty(patMedInhosps) ? patMedInhosps.size() : null);
-        for (PatMedInhosp patMedInhosp1 : patMedInhosps) {
-            String tagname = inhospVisitFacade.getTagnameBypatid(patMedInhosp1.getPatid());
-            patMedInhosp1.setTagname(tagname);
-        }
-
-        //绉戝
-        for (PatMedInhosp patMedInhosp1 : patMedInhosps) {
-            if ("1".equals(patMedInhosp1.getLeavehospitaldistrictcode()) && patMedInhosp1.getDiagcheckFlag().equals("1")) {
-                patMedInhosp1.setDeptcheckFlag("2");
-                patMedInhosp1.setLongTaskReason("鏍规嵁浜ゅ弶鐢熸垚闅忚浠诲姟瑙勫垯锛岄儴闂ㄤ换鍔″彲浠ヤ笉鐢ㄧ敓鎴�");
-                inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-                continue;
-            }
-            //鑾峰彇鎮h�呬俊鎭�
-            PatArchive patArchive = patArchiveMapper.selectPatArchiveByPatid(patMedInhosp1.getPatid());
-            if (Objects.isNull(patArchive)) {
-                patMedInhosp1.setDeptcheckFlag("2");
-                patMedInhosp1.setLongTaskReason("鎮h�呭熀鏈俊鎭负绌�");
-                inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-                continue;
-            }
-            try {
-                //鏍规嵁鎮h�呮墍鍦ㄧ瀹わ紝鑾峰彇璇ョ瀹ょ殑闀挎湡浠诲姟
-                ServiceTaskdept serviceTaskdept = new ServiceTaskdept();
-                serviceTaskdept.setLongtask(1L);
-                serviceTaskdept.setDeptCode(patMedInhosp1.getLeaveldeptcode());
-                serviceTaskdept.setDeptType("1");
-                serviceTaskdept.setServiceType("2");
-                serviceTaskdept.setOrgid(patMedInhosp1.getOrgid());
-                List<ServiceTaskdept> serviceTaskdepts = serviceTaskdeptMapper.selectServiceTaskdeptList(serviceTaskdept);
-                //濡傛灉閮ㄩ棬妯℃澘涓虹┖锛堝皢deptIsNull璁剧疆涓簍rue锛�
-                if (CollectionUtils.isEmpty(serviceTaskdepts) || serviceTaskdepts.size() == 0) {
-                    PatMedInhosp patMedInhosp = inhospVisitFacade.selectPatMedInhospByInhospid(patMedInhosp1.getInhospid());
-                    patMedInhosp1.setDeptcheckFlag("2");
-                    patMedInhosp1.setLongTaskReason(patMedInhosp.getLongTaskReason() + "璇ユ偅鑰呮墍鍦ㄧ瀹ゆ湭閰嶇疆绂婚櫌闀挎湡浠诲姟;");
-                    inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-                } else {
-                    for (ServiceTaskdept serviceTaskdept1 : serviceTaskdepts) {
-                        writeInSubTask(serviceTaskdept1.getTaskId(), true, patMedInhosp1, patArchive, 1, config);
-                    }
-                }
-
-            } catch (Exception e) {
-                e.printStackTrace();
-                log.error("浜哄憳绉戝澶勭悊鍑哄紓甯镐簡锛歿}", e.getMessage());
-                patMedInhosp1.setDeptcheckFlag("2");
-                patMedInhosp1.setLongTaskReason("浜哄憳绉戝澶勭悊寮傚父");
-                inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
-            }
-        }
-    }
-
     /**
      * 缁熶竴鏇存柊pat_med_inhosp鐨刢heck_flag
      *
@@ -2016,49 +1365,6 @@
             inhospVisitFacade.updatePatMedInhosp(patMedInhosp1);
         }
         return generatedCount;
-    }
-
-    // ==========================================================================
-    // 鍑哄叆闄㈤殢璁挎ā鍧楀寲锛堢涓�鎵癸級鈥斺�� 3 涓繃娓℃湡鍏ュ彛锛堢函杞彂锛岄浂涓氬姟閫昏緫锛�
-    //
-    // 鈿狅笍 杩� 3 涓柟娉曟槸鍒绘剰鏂板鐨勶紝涓嶆槸璇姞锛�
-    //    瑙� IPatMedInhospService 閲屽悓鍚嶇殑鎺ュ彛澹版槑娉ㄩ噴锛屼互鍙�
-    //    sql/_probe/verify_step16_service_restore.py 鐨� expected_added 鏂█銆�
-    // ==========================================================================
-
-    /**
-     * 銆愯繃娓℃湡鐢ㄣ�戞墜鏈殢璁挎壂鎻� 鈥斺�� 涓� {@link #addOperationSubTask(String)} 瀹屽叏绛変环銆�
-     * <p>
-     * 鈿狅笍 {@code addOperationSubTask} 鍘熷疄鐜拌繑鍥� {@code void}锛屾墍浠ヨ繖閲屾寜"澶勭悊浜� 1 杞�"杩斿洖 1锛�
-     * 浠呯敤浜庢棩蹇楋紱<b>璋冪敤鏂逛笉寰椾緷璧栬杩斿洖鍊肩殑涓氬姟鍚箟</b>銆�
-     */
-    @Override
-    public int runOperationVisit(String config) {
-        addOperationSubTask(config);
-        return 1;
-    }
-
-    /**
-     * 銆愯繃娓℃湡鐢ㄣ�戠瀹ょ淮搴︽湭澶勭悊鐨勫湪闄㈡偅鑰呫��
-     * <p>
-     * 鏉′欢涓庡師 {@code dealOutHospInfo} 绗竴娈垫煡璇㈤�愬瓧涓�鑷达細
-     * {@code deptcheckFlag="0"} + {@code inhospstate="1"} + {@code fuflag="1"}銆�
-     */
-    @Override
-    public List<PatMedInhosp> selectPendingDeptPatientsForVisit() {
-        PatMedInhosp pmks = new PatMedInhosp();
-        pmks.setDeptcheckFlag("0");
-        pmks.setInhospstate("1");
-        pmks.setFuflag("1");
-        return inhospVisitFacade.selectPatMedInhospList(pmks);
-    }
-
-    /**
-     * 銆愯繃娓℃湡鐢ㄣ�戞妸涓�鏉″凡缁勮濂界殑瀛愪换鍔¤惤搴擄紙鍘� {@code serviceSubtaskMapper.insertServiceSubtask}锛夈��
-     */
-    @Override
-    public boolean persistSubtask(ServiceSubtask serviceSubtask) {
-        return serviceSubtaskMapper.insertServiceSubtask(serviceSubtask) == 1;
     }
 
 }
diff --git a/smartor/src/main/java/com/smartor/service/impl/PersonWorkbenchServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/PersonWorkbenchServiceImpl.java
index 8053514..53e8ae5 100644
--- a/smartor/src/main/java/com/smartor/service/impl/PersonWorkbenchServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/PersonWorkbenchServiceImpl.java
@@ -2,8 +2,8 @@
 
 import com.ruoyi.outpatientvisit.domain.PatMedOuthosp;
 import com.ruoyi.outpatientvisit.domain.PatMedOuthospQueryReq;
-import com.smartor.domain.PerSonWorkbenchDto;
-import com.smartor.mapper.PatArchiveOutMapper;
+import com.ruoyi.patarchive.domain.PerSonWorkbenchDto;
+import com.ruoyi.patarchive.mapper.PatArchiveOutMapper;
 import com.ruoyi.outpatientvisit.mapper.PatMedOuthospMapper;
 import com.smartor.service.PersonWorkbenchService;
 import org.springframework.beans.factory.annotation.Autowired;
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java
index 77cd697..25d53ec 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServicPhoneServiceImpl.java
@@ -16,7 +16,6 @@
 import com.ruoyi.system.domain.SysConfig;
 import com.ruoyi.system.mapper.SysConfigMapper;
 import com.ruoyi.system.service.ISysConfigService;
-import com.smartor.common.FtpService;
 import com.ruoyi.common.utils.PhoneUtils;
 import com.smartor.domain.*;
 import com.ruoyi.template.domain.VO.HeLibraryCountVO;
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceAppointRecordServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceAppointRecordServiceImpl.java
deleted file mode 100644
index 081ed87..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceAppointRecordServiceImpl.java
+++ /dev/null
@@ -1,96 +0,0 @@
-package com.smartor.service.impl;
-
-import java.util.List;
-import com.ruoyi.common.utils.DateUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-import com.smartor.mapper.ServiceAppointRecordMapper;
-import com.smartor.domain.ServiceAppointRecord;
-import com.smartor.service.IServiceAppointRecordService;
-
-/**
- * 棰勭害璁板綍Service涓氬姟灞傚鐞�
- * 
- * @author lihu
- * @date 2026-07-06
- */
-@Service
-public class ServiceAppointRecordServiceImpl implements IServiceAppointRecordService 
-{
-    @Autowired
-    private ServiceAppointRecordMapper serviceAppointRecordMapper;
-
-    /**
-     * 鏌ヨ棰勭害璁板綍
-     * 
-     * @param id 棰勭害璁板綍涓婚敭
-     * @return 棰勭害璁板綍
-     */
-    @Override
-    public ServiceAppointRecord selectServiceAppointRecordById(Long id)
-    {
-        return serviceAppointRecordMapper.selectServiceAppointRecordById(id);
-    }
-
-    /**
-     * 鏌ヨ棰勭害璁板綍鍒楄〃
-     * 
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 棰勭害璁板綍
-     */
-    @Override
-    public List<ServiceAppointRecord> selectServiceAppointRecordList(ServiceAppointRecord serviceAppointRecord)
-    {
-        return serviceAppointRecordMapper.selectServiceAppointRecordList(serviceAppointRecord);
-    }
-
-    /**
-     * 鏂板棰勭害璁板綍
-     * 
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 缁撴灉
-     */
-    @Override
-    public int insertServiceAppointRecord(ServiceAppointRecord serviceAppointRecord)
-    {
-        serviceAppointRecord.setCreateTime(DateUtils.getNowDate());
-        return serviceAppointRecordMapper.insertServiceAppointRecord(serviceAppointRecord);
-    }
-
-    /**
-     * 淇敼棰勭害璁板綍
-     * 
-     * @param serviceAppointRecord 棰勭害璁板綍
-     * @return 缁撴灉
-     */
-    @Override
-    public int updateServiceAppointRecord(ServiceAppointRecord serviceAppointRecord)
-    {
-        serviceAppointRecord.setUpdateTime(DateUtils.getNowDate());
-        return serviceAppointRecordMapper.updateServiceAppointRecord(serviceAppointRecord);
-    }
-
-    /**
-     * 鎵归噺鍒犻櫎棰勭害璁板綍
-     * 
-     * @param ids 闇�瑕佸垹闄ょ殑棰勭害璁板綍涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteServiceAppointRecordByIds(Long[] ids)
-    {
-        return serviceAppointRecordMapper.deleteServiceAppointRecordByIds(ids);
-    }
-
-    /**
-     * 鍒犻櫎棰勭害璁板綍淇℃伅
-     * 
-     * @param id 棰勭害璁板綍涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteServiceAppointRecordById(Long id)
-    {
-        return serviceAppointRecordMapper.deleteServiceAppointRecordById(id);
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
index b1395c7..b77772c 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -47,6 +47,13 @@
 import com.ruoyi.task.domain.entity.ServiceSubtaskEntity;
 import com.ruoyi.task.domain.ServiceSubtask;
 import com.ruoyi.task.mapper.ServiceSubtaskMapper;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
+import com.ruoyi.patarchive.mapper.PatArchivecontactMapper;
+import com.ruoyi.common.core.domain.entity.Icd10;
+import com.ruoyi.common.mapper.Icd10Mapper;
+import com.ruoyi.system.mapper.ext.SysUser2Mapper;
+import com.ruoyi.system.mapper.ext.SysDept2Mapper;
+import com.ruoyi.system.mapper.ext.SysUserDeptMapper;
 /**
  * 涓婚敭Service涓氬姟灞傚鐞�
  *
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSLTDHealthcareRecordServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSLTDHealthcareRecordServiceImpl.java
deleted file mode 100644
index 6fc6d50..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSLTDHealthcareRecordServiceImpl.java
+++ /dev/null
@@ -1,1811 +0,0 @@
-package com.smartor.service.impl;
-
-import com.fasterxml.jackson.core.JsonProcessingException;
-import com.fasterxml.jackson.databind.ObjectMapper;
-import com.google.gson.Gson;
-import com.google.gson.reflect.TypeToken;
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.core.domain.entity.SysUserDept;
-import com.ruoyi.common.core.domain.entity.SysUserRole;
-import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.core.service.dto.InhospPositionRecord;
-import com.smartor.common.enums.EmergencyLevelEnum;
-import com.smartor.common.enums.ImportFlagEnum;
-import com.ruoyi.common.utils.http.HttpUtils;
-import com.smartor.common.DistinctByProperty;
-import com.smartor.domain.*;
-import com.ruoyi.outpatientvisit.domain.PatMedOuthospError;
-import com.ruoyi.outpatientvisit.domain.PatMedOuthosp;
-import com.ruoyi.inhospvisit.api.InhospVisitFacade;
-import com.ruoyi.inhospvisit.domain.PatMedInhosp;
-import com.smartor.mapper.*;
-import com.ruoyi.outpatientvisit.mapper.PatMedOuthospErrorMapper;
-import com.smartor.service.IPatArchiveService;
-import com.smartor.service.IPatMedInhospService;
-import com.smartor.service.IPatMedOuthospService;
-import com.smartor.service.IServiceSLTDHealthcareRecordService;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.CollectionUtils;
-import org.apache.commons.lang3.ObjectUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
-import org.springframework.stereotype.Service;
-
-import java.lang.reflect.Type;
-import java.math.BigDecimal;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.util.*;
-import java.util.concurrent.TimeUnit;
-import java.util.function.Function;
-import java.util.stream.Collectors;
-import com.ruoyi.common.core.domain.entity.PatArchive;
-import com.ruoyi.task.domain.ServiceSubtask;
-import com.ruoyi.task.mapper.ServiceSubtaskMapper;
-import com.ruoyi.task.service.impl.ServiceSubtaskServiceImpl;
-
-@Slf4j
-@Service
-public class ServiceSLTDHealthcareRecordServiceImpl implements IServiceSLTDHealthcareRecordService {
-
-    private static final String DATE_FORMAT = "yyyy-MM-dd HH:mm:ss";
-
-    /**
-     * 鍦ㄩ櫌鎮h�呭綋鍓嶄綅缃煡璇㈠湴鍧�锛堢綉鍏虫牴璺緞 {@code sltd_pub_path} + 鍥哄畾鍚庣紑锛夈��
-     * <p>
-     * 涓�"鍏ラ櫌閲囬泦"鏄�<b>鍚屼竴涓帴鍙�</b>锛坽@code queryHealthcareRecordList} 鐢ㄧ殑涔熸槸瀹冿級锛�
-     * 鍖哄埆鍙槸鏈柟娉曟寜 {@code healthcareRecordNo} 鍗曟煡銆佸彧鍙栦綅缃瓧娈点�佷笉钀藉簱銆�
-     */
-    private static final String INHOSP_POSITION_PATH =
-            "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList";
-
-    /**
-     * 褰撳墠浣嶇疆鏌ヨ鐨勮繛鎺�/璇昏秴鏃讹細涓�杞鎸夋偅鑰呰皟鐢ㄥ嚑鍗冩锛�
-     * 涓嶈兘璁╀竴娆℃棤鍝嶅簲鎶婇噰闆嗙嚎绋嬫棤闄愭湡鎸備綇锛坽@code HttpUtils} 鑰佹柟娉曟病鏈夎秴鏃讹級
-     */
-    private static final int INHOSP_POSITION_CONNECT_TIMEOUT_MS = 5000;
-
-    private static final int INHOSP_POSITION_READ_TIMEOUT_MS = 15000;
-
-    @Autowired
-    private IPatArchiveService patArchiveService;
-
-    @Autowired
-    private IPatMedInhospService patMedInhospService;
-
-    @Autowired
-    private IPatMedOuthospService patMedOuthospService;
-
-    @Autowired
-    private SysUser2Mapper sysUser2Mapper;
-
-    @Autowired
-    private SysDept2Mapper sysDeptMapper;
-
-    @Autowired
-    private SysUserDeptMapper sysUserDeptMapper;
-
-    @Autowired
-    private SysUserRole2Mapper sysUserRoleMapper;
-
-    @Autowired
-    private MedicationItemMapper medicationItemMapper;
-
-    @Autowired
-    private MedicationDoseInfoMapper medicationDoseInfoMapper;
-
-    @Autowired
-    private RedisTemplate<String, String> redisTemplate;
-
-    @Value("${sltd_pub_path}")
-    private String sltdPubPath;
-
-    @Value("${userPwd}")
-    private String userPwd;
-
-    @Value("${lwl_app_key}")
-    private String APP_KEY;
-
-
-    @Value("${spring.profiles.active}")
-    private String active;
-    @Autowired
-    private ServiceSubtaskServiceImpl serviceSubtaskServiceImpl;
-    @Autowired
-    private ServiceSubtaskMapper serviceSubtaskMapper;
-    @Autowired
-    private InhospVisitFacade inhospVisitFacade;
-
-    @Autowired
-    private PatMedOuthospErrorMapper patMedOuthospErrorMapper;
-
-    @Override
-    public List<ServiceSLTDInhospResDTO> queryHealthcareRecordList(ServiceSLTDInhospReqVO reqVO) {
-        try {
-            Map<String, Object> requestParams = buildRequestParams(reqVO);
-            Map<String, String> headers = buildRequestHeaders();
-            log.info("璇锋眰鍙傛暟鍑洪櫌鏁版嵁鍦板潃锛歿},appKey:{}", sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList", APP_KEY);
-            String result = null;
-            if (reqVO.getSize() == null && reqVO.getCurrent() == null)
-                result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcQueryHealthcareRecordList", new Gson().toJson(requestParams), headers);
-            else
-                result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/healthcareRecord/dtcPageHealthcareRecordList", new Gson().toJson(requestParams), headers);
-            log.info("queryHealthcareRecordList--result杩斿洖鐨勭粨鏋滃�硷細{}", result == null ? "绌哄��" : "鏈夊��");
-
-            String cry = determineCry(reqVO);
-            log.info("cry鐨勫�间负锛歿}", cry);
-            List<ServiceSLTDInhospResDTO> serviceSLTDInhospResDTOS = parseResponseData(result, CollectionUtils.isNotEmpty(reqVO.getStatusList()) ? reqVO.getStatusList() : reqVO.getHealthcareRecordTypeList(), cry, reqVO.getCampusId() != null ? reqVO.getCampusId().toString() : null);
-            log.info("serviceSLTDInhospResDTOS鏄惁杩斿洖鐨勬湁鍊硷細{}", CollectionUtils.isNotEmpty(serviceSLTDInhospResDTOS) ? "鏈�" : "娌℃湁");
-            return serviceSLTDInhospResDTOS;
-        } catch (Exception e) {
-            log.error("銆恞ueryHealthcareRecordList銆戣皟鐢ㄧ渷绔嬪悓寰峰仴搴疯褰曟煡璇㈡帴鍙e紓甯革紝璇锋眰鍙傛暟锛歿}", reqVO, e);
-            throw new RuntimeException("璋冪敤鐪佺珛鍚屽痉鍋ュ悍璁板綍鏌ヨ鎺ュ彛澶辫触:" + e.getMessage());
-        }
-    }
-
-    @Override
-    /**
-     * 鏌ヨ鑽搧淇℃伅鍒楄〃
-     * @return 杩斿洖瀹為檯鑾峰彇鍒扮殑鑽搧鏁版嵁鏉℃暟锛屽鏋滃嚭閿欏垯杩斿洖 null
-     */ public Integer queryMedicationItemList(ServiceSLTDInhospReqVO reqVO) {
-        try {
-            Map<String, Object> requestParams = buildRequestParams(reqVO);
-            Map<String, String> headers = buildRequestHeaders();
-            log.info("璇锋眰鍙傝嵂鍝佷俊鎭湴鍧�锛歿},appKey:{}", sltdPubPath + "/hbos-thirdparty-integration/standard/base/mc/service/medication/queryMedicationInfoPage", APP_KEY);
-            String result = HttpUtils.sendPostByHeader(sltdPubPath + "/hbos-thirdparty-integration/standard/base/mc/service/medication/queryMedicationInfoPage", new Gson().toJson(requestParams), headers);
-            List<Map<String, Object>> dataList = getDataList(result, 2);
-            log.info("銆恞ueryMedicationItemList銆戝叡鑾峰彇鍒皗}鏉¤嵂鍝佹暟鎹�", dataList.size());
-            int successCount = 0;
-            int failCount = 0;
-            for (Map<String, Object> dataItem : dataList) {
-                try {
-                    MedicationItem medicationItem = convertToMedication(dataItem);
-                    log.info("鍑嗗鎻掑叆鑽搧鏁版嵁锛歩temName={}, itemCode={}", medicationItem.getItemName(), medicationItem.getItemCode());
-                    medicationItem.setCreateTime(new Date());
-                    medicationItemMapper.insertMedicationItem(medicationItem);
-
-                    // 濡傛灉鎻掑叆鎴愬姛涓旇繑鍥炰簡鑷 ID锛屽垯鎻掑叆瀛愯〃
-                    if (medicationItem.getId() != null) {
-                        List<MedicationDoseInfo> doseInfoList = medicationItem.getDoseInfoList();
-                        if (CollectionUtils.isNotEmpty(doseInfoList)) {
-                            for (MedicationDoseInfo doseInfo : doseInfoList) {
-                                try {
-                                    doseInfo.setMedicationItemId(medicationItem.getId());
-                                    medicationDoseInfoMapper.insertMedicationDoseInfo(doseInfo);
-                                    log.debug("鎻掑叆鍓傞噺淇℃伅鎴愬姛锛歩temId={}, doseUnit={}", medicationItem.getId(), doseInfo.getDoseUnit());
-                                } catch (Exception e) {
-                                    log.warn("鎻掑叆鍓傞噺淇℃伅澶辫触锛歩temId={}, doseUnit={}, 閿欒:{}", medicationItem.getId(), doseInfo.getDoseUnit(), e.getMessage(), e);
-                                    failCount++;
-                                }
-                            }
-                        }
-                    }
-                    successCount++;
-                    log.info("鉁� 鑽搧鏁版嵁鎻掑叆鎴愬姛锛歿}", medicationItem.getItemName());
-                } catch (Exception e) {
-                    log.warn("銆恞ueryMedicationItemList銆戝崟鏉¤嵂鍝佹暟鎹彃鍏ュけ璐ワ細itemName={}, itemCode={}, 閿欒:{}", dataItem.get("itemName"), dataItem.get("itemCode"), e.getMessage(), e);
-                    failCount++;
-                    // 缁х画澶勭悊涓嬩竴鏉℃暟鎹紝涓嶄腑鏂暣涓惊鐜�
-                }
-            }
-            log.info("銆恞ueryMedicationItemList銆戞壒閲忔彃鍏ュ畬鎴愶紝鎬绘暟:{}, 鎴愬姛:{}, 澶辫触:{}", dataList.size(), successCount, failCount);
-            // 杩斿洖瀹為檯鑾峰彇鍒扮殑鑽搧鏁版嵁鏉℃暟锛岀敤浜庡垎椤靛垽鏂槸鍚﹁繕鏈夋洿澶氭暟鎹�
-            return dataList.size();
-        } catch (Exception e) {
-            log.error("銆恞ueryMedicationItemList銆戣皟鐢ㄧ渷绔嬪悓寰疯嵂鍝佷俊鎭煡璇㈡帴鍙e紓甯革紝璇锋眰鍙傛暟锛歿}", reqVO, e);
-            throw new RuntimeException(e);
-        }
-    }
-
-
-    /**
-     * 閲囬泦绉戝鐥呭尯淇℃伅
-     *
-     * @param serviceSLTDDeptReqVO
-     * @return 鍙傝��
-     * {
-     * "orgId": 20001001,
-     * "campusIds": 30001002,
-     * "unitIds": null,
-     * "relationType": null,
-     * "searchText": null,
-     * "status": 1
-     * }
-     */
-    @Override
-    public Boolean queryDeptWardAreaInfoList(ServiceSLTDDeptReqVO serviceSLTDDeptReqVO) {
-        log.info("銆恞ueryDeptWardAreaInfoList銆戝紑濮嬭皟鐢ㄧ渷绔嬪悓寰风瀹ょ梾鍖烘煡璇㈡帴鍙o紝璇锋眰鍙傛暟锛歿}", serviceSLTDDeptReqVO);
-        try {
-            Map<String, Object> params = new HashMap<>();
-            if (serviceSLTDDeptReqVO.getOrgId() != null) {
-                params.put("orgId", Long.parseLong(serviceSLTDDeptReqVO.getOrgId()));
-            }
-            if (serviceSLTDDeptReqVO.getCampusIds() != null) {
-                params.put("campusIds", serviceSLTDDeptReqVO.getCampusIds());
-            }
-            params.put("subjectCode", serviceSLTDDeptReqVO.getSubjectCode());
-            params.put("orgSubjectCode", serviceSLTDDeptReqVO.getOrgSubjectCode());
-
-            params.put("deptDimensions", serviceSLTDDeptReqVO.getDeptDimensions());
-
-            params.put("serviceScopes", serviceSLTDDeptReqVO.getServiceScopes());
-            params.put("inpatientArea", serviceSLTDDeptReqVO.getInpatientArea());
-            params.put("status", serviceSLTDDeptReqVO.getStatus());
-
-
-            Map<String, String> headers = buildRequestHeaders();
-            String result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/dept/queryDeptList", new Gson().toJson(params), headers);
-            log.info("銆恞ueryDeptWardAreaInfoList銆戞帴鍙e搷搴旂粨鏋滐細{}", StringUtils.isEmpty(result) ? "绌虹殑" : "涓嶇┖");
-            List<Map<String, Object>> dataList = getDataList(result, 1);
-            log.info("-----------dataList鎺ュ彛鍝嶅簲缁撴灉锛歿}", dataList.size());
-            for (Map<String, Object> dataItem : dataList) {
-                SysDept sysDept = new SysDept();
-                sysDept.setOrgid("" + getLongValue(dataItem, "orgId"));
-                sysDept.setCampusid("" + getLongValue(dataItem, "campusId"));
-                sysDept.setHisDeptId("" + getLongValue(dataItem, "deptId"));
-                sysDept.setHisParentId(getStringValue(dataItem, "parentDeptId"));
-                //閫氳繃his鐨勭埗绉戝ID鍘绘壘鍒扮瀹D,濉厖parentId
-                if (StringUtils.isNotEmpty(getStringValue(dataItem, "parentDeptId"))) {
-                    SysDept sd = new SysDept();
-                    sd.setHisDeptId(getStringValue(dataItem, "parentDeptId"));
-                    sd.setOrgid(getStringValue(dataItem, "orgId"));
-                    List<SysDept> sysDepts = sysDeptMapper.selectDeptList(sd);
-                    if (CollectionUtils.isNotEmpty(sysDepts)) {
-                        SysDept sysDept1 = sysDepts.get(0);
-                        sysDept.setParentId(sysDept1.getDeptId());
-                        sysDept.setParentName(sysDept1.getDeptName());
-                    }
-                }
-                sysDept.setDeptName(getStringValue(dataItem, "deptName"));
-                Integer inpatientArea = getIntegerValue(dataItem, "inpatientArea");
-                if (inpatientArea != null && inpatientArea == 0) sysDept.setDeptType("1");
-                else if (inpatientArea != null && inpatientArea == 1) sysDept.setDeptType("2");
-                sysDept.setLeader("");
-                Integer status = getIntegerValue(dataItem, "status");
-                if (status != null & status == 0) sysDept.setStatus("1");
-                if (status != null & status == 1) sysDept.setStatus("0");
-                sysDept.setType("");
-                sysDept.setDeptCode("" + getLongValue(dataItem, "deptId"));
-                sysDept.setCreateBy(null);
-                sysDept.setCreateTime(new Date());
-                sysDept.setUpdateTime(new Date());
-                sysDept.setUpdateBy(null);
-
-                // 鎸� deptCode + orgid + campusid 鏌ラ噸锛岄伩鍏嶈法闄㈠尯绉戝閲嶅
-                SysDept sysDept1 = sysDeptMapper.selectDeptByCodeAndCampus(sysDept.getDeptCode(), sysDept.getOrgid(), sysDept.getCampusid());
-                if (Objects.isNull(sysDept1)) {
-                    try {
-                        int i = sysDeptMapper.insertDept(sysDept);
-                        log.info("ServiceExternalServiceImpl---addDeptInfo鏄惁鏂板鎴愬姛锛歿}", i);
-                    } catch (org.springframework.dao.DuplicateKeyException e) {
-                        log.warn("銆恞ueryDeptWardAreaInfoList銆戠瀹ゅ凡瀛樺湪(骞跺彂鎻掑叆)锛岃烦杩囷細deptCode={}, orgid={}, campusid={}", sysDept.getDeptCode(), sysDept.getOrgid(), sysDept.getCampusid());
-                    }
-                } else {
-                    sysDept.setDeptId(sysDept1.getDeptId());
-                    int i = sysDeptMapper.updateDept(sysDept);
-                    log.info("ServiceExternalServiceImpl---addDeptInfo鏄惁淇敼鎴愬姛04锛歿}", i);
-                }
-            }
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-        return true;
-    }
-
-
-    /**
-     * 閲囬泦鍖婚櫌鐢ㄦ埛淇℃伅
-     *
-     * @param reqVO
-     * @return
-     */
-    @Override
-    public Boolean queryHospUserInfoList(ServiceSLTDInhospReqVO reqVO) {
-        Map<String, Object> requestParams = buildRequestParams(reqVO);
-        Map<String, String> headers = buildRequestHeaders();
-        String result = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/staff/queryStaffList", new Gson().toJson(requestParams), headers);
-        log.info("銆恞ueryHealthcareRecordList銆戞帴鍙e搷搴旂粨鏋滄槸鍚︽湁鍊硷細{}", StringUtils.isEmpty(result) ? "娌″��" : "鏈夊��");
-        List<Map<String, Object>> dataList = getDataList(result, 1);
-        for (Map<String, Object> dataItem : dataList) {
-            SysUser sysUser = new SysUser();
-            if (StringUtils.isEmpty(getStringValue(dataItem, "accountNo"))) {
-                continue;
-            }
-            sysUser.setUserName(getStringValue(dataItem, "accountNo"));
-            sysUser.setNickName(getStringValue(dataItem, "name"));
-            List diagnosisObjList = (List<?>) dataItem.get("qualifications");
-            if (CollectionUtils.isNotEmpty(diagnosisObjList)) {
-                for (Object diagnosis : diagnosisObjList) {
-                    if (diagnosis instanceof Map) {
-                        Map<String, Object> diagnosisMap = (Map<String, Object>) diagnosis;
-                        String professionalTitleName = getStringValue(diagnosisMap, "professionalTitleName");
-                        if (professionalTitleName.contains("鍖诲笀")) {
-                            sysUser.setUserType("鍖荤敓");
-                        }
-                        if (professionalTitleName.contains("鎶�")) {
-                            sysUser.setUserType("鎶ゅ+");
-                        }
-                        sysUser.setTitle(getStringValue(diagnosisMap, "professionalTitleName"));
-                    }
-                }
-            }
-            //濡傛灉鐢ㄦ埛鐨勬偅鑰呰寖鍥翠负绌猴紝鍒欓粯璁や负0
-            if (StringUtils.isEmpty(sysUser.getSearchscope())) sysUser.setSearchscope("0");
-            sysUser.setPhonenumber(getStringValue(dataItem, "telephone"));
-            sysUser.setUserCode(getStringValue(dataItem, "jobNumber"));
-            //璁剧疆鎬у埆
-            String genderName = getStringValue(dataItem, "genderName");
-            if ("鐢�".equals(genderName)) sysUser.setSex("0");
-            else if ("濂�".equals(genderName)) sysUser.setSex("1");
-            else sysUser.setSex("2");
-
-            sysUser.setCreateTime(new Date());
-            sysUser.setUpdateTime(new Date());
-            sysUser.setUpdateBy("admin");
-            sysUser.setCreateBy("admin");
-            sysUser.setOrgid("" + getLongValue(dataItem, "orgId"));
-            BCryptPasswordEncoder passwordEncoder = new BCryptPasswordEncoder();
-            sysUser.setPassword(passwordEncoder.encode(userPwd));
-            SysUser sysUser1 = sysUser2Mapper.selectUserByUserName(sysUser.getUserName());
-            if (ObjectUtils.isNotEmpty(sysUser1)) {
-                //宸插瓨鍦細鐢变汉宸ョ淮鎶ょ殑瀛楁鏄笉闇�瑕佹洿鏂扮殑锛宱rgid/campusid淇濈暀鍘熷�间笉瑕嗙洊
-                sysUser.setSearchscope(null);
-                sysUser.setPassword(null);
-                sysUser.setUserId(sysUser1.getUserId());
-                sysUser.setOrgid(null);
-                sysUser.setCampusid(null);
-                sysUser2Mapper.updateUser(sysUser);
-            } else {
-                try {
-                    sysUser2Mapper.insertUser(sysUser);
-                } catch (org.springframework.dao.DuplicateKeyException e) {
-                    //骞跺彂鎻掑叆鍦烘櫙锛氶噸鏂版煡璇㈣幏鍙栧凡瀛樺湪璁板綍锛岄伩鍏嶉噸澶�
-                    log.warn("銆恞ueryHospUserInfoList銆戠敤鎴峰凡瀛樺湪(骞跺彂鎻掑叆)锛岃烦杩囷細userName={}", sysUser.getUserName());
-                    SysUser existingUser = sysUser2Mapper.selectUserByUserName(sysUser.getUserName());
-                    if (ObjectUtils.isNotEmpty(existingUser)) {
-                        sysUser.setUserId(existingUser.getUserId());
-                    }
-                }
-            }
-
-            // 澶勭悊鐢ㄦ埛涓庨儴闂ㄧ殑鍏崇郴
-            List businessDepts = (List<?>) dataItem.get("businessDepts");
-            if (CollectionUtils.isNotEmpty(businessDepts)) {
-                List<List<String>> deptInfoList = new ArrayList<>();
-                List<List<String>> hospInfoList = new ArrayList<>();
-                log.info("------businessDepts鏄惁鏈夊�硷細{}", businessDepts.size());
-                for (Object businessDept : businessDepts) {
-                    if (businessDept instanceof Map) {
-                        Map<String, Object> businessDeptMap = (Map<String, Object>) businessDept;
-                        log.info("------businessDeptMap鏄惁鏈夊�硷細{}", businessDeptMap);
-                        String hisDeptId = getStringValue(businessDeptMap, "deptId");
-                        log.info("------hisDeptId鏄惁鏈夊�硷細{}, reqVO.getOrgId()鐨勫�间负:{}", hisDeptId, reqVO.getCampusId());
-                        //鍦ㄨ繖閲岋紝hisDeptId灏辨槸deptCode锛屾寜闄㈠尯+鏈烘瀯鏌ョ瀹わ紝閬垮厤璺ㄩ櫌鍖烘煡閿�
-                        SysDept sysDept = sysDeptMapper.selectDeptByCodeAndCampus(hisDeptId, reqVO.getOrgId(), reqVO.getCampusId() != null ? reqVO.getCampusId().toString() : null);
-                        log.info("------hisDeptId鏄惁鏈夊�硷細{}, reqVO.getCampusId()鐨勫�间负:{}", hisDeptId, reqVO.getCampusId());
-                        if (Objects.isNull(sysDept)) continue;
-                        SysUserDept sysUserDept = new SysUserDept();
-                        sysUserDept.setUserId(sysUser.getUserId());
-                        sysUserDept.setDeptType(sysDept.getDeptType());
-                        sysUserDept.setDeptId(sysDept.getDeptId());
-                        sysUserDept.setDeptCode(sysDept.getDeptCode());
-                        sysUserDept.setDeptName(sysDept.getDeptName());
-                        sysUserDept.setOrgid(sysDept.getOrgid());
-                        sysUserDept.setCreateTime(new Date());
-                        sysUserDept.setDelFlag(0L);
-
-                        //鍒ゆ柇涓�涓嬬敤鎴�-閮ㄩ棬鍏崇郴鏄笉鏄凡缁忓瓨鍦ㄤ簡锛堟棤璁烘柊鐢ㄦ埛杩樻槸鑰佺敤鎴烽兘闇�瑕佸幓閲嶏級
-                        if (ObjectUtils.isNotEmpty(sysUser.getUserId()) && ObjectUtils.isNotEmpty(sysDept)) {
-                            SysUserDept sud = new SysUserDept();
-                            sud.setUserId(sysUser.getUserId());
-                            sud.setDeptId(sysDept.getDeptId());
-                            sud.setOrgid(sysDept.getOrgid());
-                            List<SysUserDept> sysUserDepts = sysUserDeptMapper.selectSysUserDeptList(sud);
-                            if (CollectionUtils.isNotEmpty(sysUserDepts)) {
-                                sysUserDept.setId(sysUserDepts.get(0).getId());
-                                sysUserDeptMapper.updateSysUserDept(sysUserDept);
-                            } else {
-                                sysUserDeptMapper.insertSysUserDept(sysUserDept);
-                            }
-                        }
-                        if (StringUtils.isNotEmpty(sysDept.getDeptType()) && sysDept.getDeptType().equals("1")) {
-                            hospInfoList.add(Arrays.asList(sysDept.getDeptCode()));
-                        } else if (StringUtils.isNotEmpty(sysDept.getDeptType()) && sysDept.getDeptType().equals("2")) {
-                            deptInfoList.add(Arrays.asList(sysDept.getDeptCode()));
-                        }
-                    }
-                }
-                //灏嗛儴闂ㄦ垜鐥呭尯鏀惧埌鎸囧畾瀛楁涓�
-                Gson gson = new Gson();
-                sysUser.setHospInfo(gson.toJson(hospInfoList));
-                sysUser.setDeptInfo(gson.toJson(deptInfoList));
-                sysUser2Mapper.updateUser(sysUser);
-            }
-
-            //璁剧疆涓�涓粯璁よ鑹诧紙鍖荤敓瑙掕壊锛�
-            List<SysUserRole> userRoleList = new ArrayList();
-            SysUserRole sur = new SysUserRole();
-            sur.setUserId(sysUser.getUserId());
-            sur.setRoleId(4L);
-            sur.setOrgid(sysUser.getOrgid());
-
-            //鍏堟煡璇竴涓嬶紝鏄惁瀛樺湪
-            SysUserRole sysUserRole = sysUserRoleMapper.selectUserRoleByRoleIdAndUserId(4L, sysUser.getUserId());
-            if (ObjectUtils.isNotEmpty(sysUserRole)) continue;
-
-            userRoleList.add(sur);
-            sysUserRoleMapper.batchUserRole(userRoleList);
-        }
-
-        return true;
-    }
-
-    @Override
-    public List<InhospPositionRecord> queryInhospPosition(ServiceSLTDInhospReqVO reqVO) {
-        // 涓�"鍏ラ櫌閲囬泦"鍏辩敤鍚屼竴濂楀叆鍙傛瀯閫狅細orgId + campusIds + statusList + healthcareRecordNo
-        Map<String, Object> requestParams = buildRequestParams(reqVO);
-        Map<String, String> headers = buildRequestHeaders();
-        String url = sltdPubPath + INHOSP_POSITION_PATH;
-        String result = HttpUtils.sendPostByHeader(url, new Gson().toJson(requestParams), headers,
-                INHOSP_POSITION_CONNECT_TIMEOUT_MS, INHOSP_POSITION_READ_TIMEOUT_MS);
-        if (StringUtils.isEmpty(result)) {
-            // sendPostByHeader 鎶婂紓甯稿悶鎺夊悗杩斿洖绌轰覆锛氳繖閲岀粷涓嶈兘褰撴垚"璇ユ偅鑰呭凡涓嶅湪闄�"锛�
-            // 鍚﹀垯鎺ュ彛鏁翠綋涓嶅彲鐢ㄦ椂浼氳璁版垚"鍑犲崈涓偅鑰呴兘鍑洪櫌浜�"锛屼笌鐪熺浉鍙嶃��
-            throw new RuntimeException("鏌ヨ鍦ㄩ櫌鎮h�呭綋鍓嶄綅缃帴鍙f棤鍝嶅簲锛宧ealthcareRecordNo=" + reqVO.getHealthcareRecordNo());
-        }
-        // getDataList 鍦ㄨ繑鍥炵爜闈� 200 鏃舵姏 RuntimeException锛沝ata 涓� []锛堣鎮h�呭凡涓嶅湪鍏ラ櫌鐘舵�侊級鏃惰繑鍥炵┖鍒楄〃
-        List<Map<String, Object>> dataList = getDataList(result, 1);
-        List<InhospPositionRecord> records = new ArrayList<>(dataList.size());
-        for (Map<String, Object> dataItem : dataList) {
-            records.add(convertToInhospPosition(dataItem));
-        }
-        return records;
-    }
-
-    /**
-     * 鍋ュ悍璁板綍 JSON 鈫� 濂戠害 DTO 鐨勯�愬瓧娈垫惉杩愶紙鍙彇"褰撳墠浣嶇疆"瑕佺敤鐨勫瓧娈碉級銆�
-     * <p>
-     * 涓�寰嬭蛋 {@code getStringValue} / {@code getLongValue}锛氭帴鍙e绌哄�煎彲鑳借繑鍥� {@code null}銆�
-     * {@code ""} 鐢氳嚦缂哄瓧娈碉紝鐩存帴璁� Gson 鍙嶅簭鍒楀寲鍒� Long 瀛楁浼氬湪绌轰覆涓婃姏 NumberFormatException銆�
-     */
-    private InhospPositionRecord convertToInhospPosition(Map<String, Object> dataItem) {
-        InhospPositionRecord record = new InhospPositionRecord();
-        record.setHealthcareRecordNo(getStringValue(dataItem, "healthcareRecordNo"));
-        record.setPatientName(getStringValue(dataItem, "patientName"));
-        record.setDeptId(getLongValue(dataItem, "deptId"));
-        record.setDeptName(getStringValue(dataItem, "deptName"));
-        record.setAreaId(getLongValue(dataItem, "areaId"));
-        record.setAreaName(getStringValue(dataItem, "areaName"));
-        record.setBedNumber(getStringValue(dataItem, "bedNumber"));
-        record.setHealthcareRecordStatus(getStringValue(dataItem, "healthcareRecordStatus"));
-        return record;
-    }
-
-    private String determineCry(ServiceSLTDInhospReqVO reqVO) {
-        if (CollectionUtils.isEmpty(reqVO.getStatusList()) && CollectionUtils.isEmpty(reqVO.getHealthcareRecordTypeList()))
-            return null;
-        if (reqVO.getStatusList() != null) {
-            if (reqVO.getStatusList().contains("FH0109.24")) {
-                //鍏ラ櫌
-                return "0";
-            } else if (reqVO.getStatusList().contains("FH0109.27")) {
-                //鍑洪櫌
-                return "1";
-            } else if (reqVO.getStatusList().contains("FH0109.22") || reqVO.getStatusList().contains("FH0109.23") || reqVO.getStatusList().contains("FH0109.53")) {
-                //棰勫叆闄�
-                return "3";
-            }
-        }
-        if (reqVO.getHealthcareRecordTypeList() != null) {
-            if (reqVO.getHealthcareRecordTypeList().contains("FH0108.03") || reqVO.getHealthcareRecordTypeList().contains("FH0108.01")) {
-                //闂ㄦ�ヨ瘖
-                return "4";
-            }
-        }
-        return null;
-    }
-
-    private Map<String, Object> buildRequestParams(ServiceSLTDInhospReqVO reqVO) {
-        Map<String, Object> params = new HashMap<>();
-        if (reqVO.getOrgId() != null) {
-            params.put("orgId", Long.parseLong(reqVO.getOrgId()));
-        }
-        if (reqVO.getCampusId() != null) {
-            params.put("campusIds", reqVO.getCampusId());
-        }
-        if (reqVO.getStartHeadTime() != null) {
-            params.put("startHeadTime", reqVO.getStartHeadTime());
-        }
-        if (reqVO.getStartTailTime() != null) {
-            params.put("startTailTime", reqVO.getStartTailTime());
-        }
-        if (reqVO.getEncounterTimeStart() != null) {
-            params.put("encounterTimeStart", reqVO.getEncounterTimeStart());
-        }
-        if (reqVO.getEncounterTimeEnd() != null) {
-            params.put("encounterTimeEnd", reqVO.getEncounterTimeEnd());
-        }
-        if (reqVO.getPreOutHospitalHeadDate() != null) {
-            params.put("preOutHospitalHeadDate", reqVO.getPreOutHospitalHeadDate());
-        }
-        if (reqVO.getPreOutHospitalTailDate() != null) {
-            params.put("preOutHospitalTailDate", reqVO.getPreOutHospitalTailDate());
-        }
-        if (reqVO.getHealthcareRecordTypeList() != null && !reqVO.getHealthcareRecordTypeList().isEmpty()) {
-            params.put("healthcareRecordTypeList", reqVO.getHealthcareRecordTypeList());
-        }
-        if (reqVO.getStatusList() != null && !reqVO.getStatusList().isEmpty()) {
-            params.put("statusList", reqVO.getStatusList());
-        }
-        params.put("subjectCode", reqVO.getPatientName());
-        params.put("healthcareRecordNo", reqVO.getHealthcareRecordNo());
-        params.put("orgSubjectCode", reqVO.getIdCardNo());
-        if (reqVO.getDeptIdList() != null && !reqVO.getDeptIdList().isEmpty()) {
-            params.put("deptDimensions", reqVO.getDeptIdList());
-        }
-        params.put("serviceScopes", null);
-        params.put("inpatientArea", null);
-//        params.put("status", reqVO.getStatusList() != null && !reqVO.getStatusList().isEmpty() ? reqVO.getStatusList().get(0) : null);
-        params.put("status", null);
-        // 鍒嗛〉鍙傛暟锛堥棬鎬ヨ瘖鍒嗛〉閲囬泦鏃朵娇鐢級
-        if (reqVO.getCurrent() != null) {
-            params.put("current", reqVO.getCurrent());
-        }
-        if (reqVO.getSize() != null) {
-            params.put("size", reqVO.getSize());
-        }
-        return params;
-    }
-
-    private Map<String, String> buildRequestHeaders() {
-        Map<String, String> headers = new HashMap<>();
-        headers.put("Content-Type", "application/json");
-        headers.put("app-key", APP_KEY);
-        return headers;
-    }
-
-    private List<ServiceSLTDInhospResDTO> parseResponseData(String result, List<String> types, String cry, String campusId) {
-        try {
-            List<Map<String, Object>> dataList = getDataList(result, cry.equals("4") ? 2 : 1);
-            log.info("銆恜arseResponseData銆戞垚鍔熻В鏋恉ataList:{}鏉″仴搴疯褰曟暟鎹�", dataList.size());
-            if (dataList.size() >= 1500) {
-                // 鏉ユ湭鏉ユ帴鍙e崟娆′笂闄� 1500 鏉★細鍒拌繖閲岃鏄庢湰椤靛緢鍙兘宸茶鎴柇銆�
-                // 閲囬泦缂栨帓浼氭寜杩斿洖鏉℃暟浜屽垎閲嶉噰锛岃繖閲岀暀涓�鏉� error 渚夸簬浜嬪悗鏍稿
-                log.error("銆恜arseResponseData銆戞帴鍙e崟娆¤繑鍥炲凡杈� 1500 鏉′笂闄愶紝鏁版嵁鍙兘琚埅鏂細cry={}锛宼ypes={}", cry, types);
-            }
-            List<ServiceSLTDInhospResDTO> resultList = new ArrayList<>();
-            for (Map<String, Object> dataItem : dataList) {
-                try {
-                    resultList.add(convertToDTO(dataItem));
-                } catch (Exception e) {
-                    // 鍗曟潯鏁版嵁杞崲澶辫触涓嶅啀璁╂暣椤靛け璐ワ細鍐欓敊璇〃浜ょ粰浜哄伐澶勭悊锛屽叾浣欒褰曠収甯稿叆搴�
-                    saveOuthospError(dataItem, "CONVERT", e.getMessage(), new Gson().toJson(dataItem), e);
-                }
-            }
-            log.info("銆恜arseResponseData銆戞垚鍔熻В鏋恟esultList:{}鏉″仴搴疯褰曟暟鎹�", resultList.size());
-
-            processResultList(resultList, types, cry, campusId);
-            return resultList;
-        } catch (Exception e) {
-            log.error("銆恜arseResponseData銆戣В鏋愬搷搴旀暟鎹紓甯革紝鍝嶅簲鍐呭锛歿}", result, e);
-            throw new RuntimeException("瑙f瀽鍝嶅簲鏁版嵁澶辫触", e);
-        }
-    }
-
-    /**
-     * 瑙f瀽鎺ュ彛杩斿洖鏁版嵁
-     *
-     * @param result 鎺ュ彛杩斿洖鏁版嵁
-     * @param flag   1浠h〃锛屾暟缁勫湪data閲岋紝2浠h〃鏁扮粍鍦╠ata/records閲�
-     * @return 瑙f瀽鍚庣殑鏁版嵁鍒楄〃
-     */
-
-    public List<Map<String, Object>> getDataList(String result, Integer flag) {
-        Gson gson = new Gson();
-        Type mapType = new TypeToken<Map<String, Object>>() {
-        }.getType();
-        Map<String, Object> responseMap = gson.fromJson(result, mapType);
-        log.info("銆恜arseResponseData銆戞帴鍙h繑鍥炴暟鎹殑responseMap锛歿}", Objects.isNull(responseMap) ? "绌虹殑" : "鏈夊��");
-        Number codeNum = (Number) responseMap.get("code");
-        String code = BigDecimal.valueOf(codeNum.longValue()).toPlainString();
-        if (StringUtils.isEmpty(code) || !code.equals("200")) {
-            log.error("銆恜arseResponseData銆戞帴鍙h繑鍥炲け璐ワ紝鍝嶅簲鐮侊細{}锛屽搷搴斿唴瀹癸細{}", code, result);
-            throw new RuntimeException("鎺ュ彛璋冪敤澶辫触锛屽搷搴旂爜锛�" + code);
-        }
-
-        Object dataObj = responseMap.get("data");
-        if (flag == 1) {
-            dataObj = responseMap.get("data");
-        } else if (flag == 2) {
-            //闂ㄦ�ヨ瘖鐨勫垎椤垫暟鎹槸鍦╮ecords涓�
-            dataObj = ((Map<String, Object>) responseMap.get("data")).get("records");
-            log.info("銆恜arseResponseData銆戞帴鍙h繑鍥炴暟鎹殑dataObj锛歿}", Objects.isNull(dataObj) ? "绌虹殑" : "鏈夊��");
-        }
-        if (dataObj == null) {
-            log.info("銆恜arseResponseData銆戞帴鍙h繑鍥炴暟鎹负绌�");
-            return new ArrayList<>();
-        }
-
-        // 鍏煎data涓烘暟缁勬垨瀵硅薄涓ょ鎯呭喌锛氭帴鍙f甯告椂data涓篬{...}]鏁扮粍锛�
-        // 寮傚父鎴栫┖鏁版嵁鏃跺彲鑳借繑鍥瀧}瀵硅薄锛岀洿鎺ユ寜List瑙f瀽浼氭姏JsonSyntaxException
-        List<Map<String, Object>> dataList;
-        if (dataObj instanceof List) {
-            String dataJson = gson.toJson(dataObj);
-            Type listType = new TypeToken<List<Map<String, Object>>>() {
-            }.getType();
-            dataList = gson.fromJson(dataJson, listType);
-        } else {
-            log.info("銆恜arseResponseData銆戞帴鍙h繑鍥瀌ata涓嶆槸鏁扮粍锛岃�屾槸瀵硅薄绫诲瀷锛宒ata鍐呭锛歿}", gson.toJson(dataObj));
-            return new ArrayList<>();
-        }
-
-        // 浣跨敤 Set 鍘婚噸锛岀‘淇濇病鏈夐噸澶嶇殑鏁版嵁
-        Set<Map<String, Object>> uniqueDataSet = new HashSet<>(dataList);
-        dataList = new ArrayList<>(uniqueDataSet);
-        return dataList;
-    }
-
-    private void processResultList(List<ServiceSLTDInhospResDTO> resultList, List<String> types, String cry, String campusId) {
-        // 闂ㄨ瘖(FH0108.01)鍜屾�ヨ瘖(FH0108.03)鍦ㄤ笟鍔′笂鏄悓涓�绫绘暟鎹紝鍏辩敤鍚屼竴涓� resultList銆�
-        // 鑻� types 鍚屾椂鍖呭惈涓よ�咃紝outHospitalDate 浼氳璋冪敤涓ゆ瀵艰嚧閲嶅鍏ュ簱銆�
-        // 鍥犳鍙 types 涓惈鏈変换鎰忎竴涓棬鎬ヨ瘖绫诲瀷锛屽氨鍙鐞嗕竴娆°��
-        boolean outpProcessed = false;
-        for (String type : types) {
-            switch (type) {
-                case "FH0108.01":
-                case "FH0108.03":
-                    if (!outpProcessed) {
-                        log.info("銆恜arseResponseData銆戣В鏋愰棬鎬ヨ瘖鏁版嵁锛宼ypes={}", types);
-                        outHospitalDate(resultList);
-                        outpProcessed = true;
-                    } else {
-                        log.info("銆恜arseResponseData銆戦棬鎬ヨ瘖鏁版嵁宸插鐞嗭紝璺宠繃 type={}", type);
-                    }
-                    break;
-                case "FH0109.24":
-                    log.info("銆恜arseResponseData銆戣В鏋愪綇闄㈡暟鎹�");
-                    inHospitalDate(resultList, cry);
-                    break;
-                case "FH0109.22":
-                    log.info("銆恜arseResponseData銆戣В鏋愰浣忛櫌鏁版嵁");
-                    inHospitalDate(resultList, cry);
-                    break;
-                case "FH0109.23":
-                    log.info("銆恜arseResponseData銆戣В鏋愰浣忛櫌锛堝緟瀹夊簥锛夋暟鎹�");
-                    inHospitalDate(resultList, cry);
-                    break;
-                case "FH0109.27":
-                    log.info("銆恜arseResponseData銆戣В鏋愬嚭闄㈡暟鎹�");
-                    inHospitalDate(resultList, cry);
-                    break;
-                case "FH0109.53":
-                    log.info("銆恜arseResponseData銆戣В鏋愰浣忛櫌锛堝叾浠栵級鏁版嵁");
-                    inHospitalDate(resultList, cry);
-                    break;
-                default:
-                    log.warn("銆恜arseResponseData銆戞湭鐭ョ殑鏁版嵁绫诲瀷锛歿}", type);
-                    break;
-            }
-        }
-    }
-
-    private Boolean outHospitalDate(List<ServiceSLTDInhospResDTO> resultList) {
-        // 闂ㄦ�ヨ瘖鍦� HIS 渚у彧鑳芥寜澶╂煡锛岄噰闆嗕换鍔℃瘡鍗婂皬鏃堕兘浼氭妸褰撳ぉ涓婁竾涓瘖鐤楄褰曢噸鏂版媺涓�閬嶏紝
-        // 鍏朵腑缁濆ぇ澶氭暟涓婁竴杞凡缁忓叆搴撱�傝繖閲屽厛鏁撮〉鎵归噺鏌ラ噸锛屾妸宸插叆搴撶殑鐩存帴璺宠繃锛�
-        // 鍙鏂板璁板綍鍋�"妗f澶勭悊 + 鍏ュ簱"锛屽惁鍒欐瘡鏉¢噸澶嶆暟鎹兘瑕佽蛋涓�閬�
-        // Redis鍔犻攣 + 妗f鏌ラ噸 + 妗f鏇存柊 + countBySerialnum + insert锛屼竴涓囨潯灏辨槸鍑犱竾娆� SQL锛屽崐灏忔椂璺戜笉瀹屻��
-        Set<String> pageSerialnums = new HashSet<>();
-        List<ServiceSLTDInhospResDTO> uniqueList = new ArrayList<>();
-        List<ServiceSLTDInhospResDTO> noSerialnumList = new ArrayList<>();
-        Map<String, List<String>> serialnumsByDate = new LinkedHashMap<>();
-        for (ServiceSLTDInhospResDTO dto : resultList) {
-            if (Objects.isNull(dto)) {
-                continue;
-            }
-            String serialnum = dto.getHealthcareRecordNo();
-            if (StringUtils.isEmpty(serialnum)) {
-                // 娌℃湁璇婄枟璁板綍鍙峰氨娌℃硶鏌ラ噸锛屼繚鎸佸師鏈夎涓虹収甯稿鐞嗭紙鍏ュ簱鐜妭杩樹細鍐嶅厹涓�娆★級
-                log.warn("銆恛utHospitalDate銆戣瘖鐤楄褰曞彿涓虹┖锛屾棤娉曟煡閲嶏紝鎸夋柊澧炲鐞嗭細patientName={}", dto.getPatientName());
-                noSerialnumList.add(dto);
-                continue;
-            }
-            if (!pageSerialnums.add(serialnum)) {
-                // 鍚屼竴椤靛唴閲嶅鐨勮褰曪紝鍙鐞嗕竴鏉�
-                continue;
-            }
-            uniqueList.add(dto);
-            // 鎸夊氨璇婃棩鏈熷垎缁勶紙璺ㄩ浂鐐规椂鏈�澶氫袱涓棩鏈燂級锛屼繚璇佹煡閲嶇殑鍒嗚〃鍜屽叆搴撴椂鍒嗚〃璺敱涓�鑷�
-            String admitDateStr = formatAdmitDate(dto.getLastEncounterTime());
-            serialnumsByDate.computeIfAbsent(admitDateStr == null ? "" : admitDateStr, k -> new ArrayList<>()).add(serialnum);
-        }
-
-        // 涓�娆� SQL 鏌ュ嚭杩欎竴椤甸噷宸茬粡鍏ュ簱鐨� serialnum锛堝彇浠i�愭潯 countBySerialnum锛�
-        Set<String> existingSerialnums = new HashSet<>();
-        for (Map.Entry<String, List<String>> entry : serialnumsByDate.entrySet()) {
-            try {
-                existingSerialnums.addAll(patMedOuthospService.selectExistingSerialnums(entry.getKey(), entry.getValue()));
-            } catch (Exception e) {
-                // 鎵归噺鏌ラ噸澶辫触涓嶅奖鍝嶆纭�э細涓嬮潰鍏ュ簱鏃舵瘡鏉¤繕浼氬啀鏌ヤ竴娆¢噸锛屽彧鏄參涓�浜�
-                log.error("銆恛utHospitalDate銆戞壒閲忔煡閲嶅け璐ワ紝閫�鍖栦负閫愭潯鏌ラ噸锛屽氨璇婃棩鏈燂細{}", entry.getKey(), e);
-            }
-        }
-
-        List<PatMedOuthosp> batchList = new ArrayList<>();
-        int existSkipCount = 0;
-        for (ServiceSLTDInhospResDTO dto : uniqueList) {
-            if (existingSerialnums.contains(dto.getHealthcareRecordNo())) {
-                existSkipCount++;
-                continue;
-            }
-            PatMedOuthosp patMedOuthosp = buildNewOuthosp(dto);
-            if (patMedOuthosp != null) {
-                batchList.add(patMedOuthosp);
-            }
-        }
-        for (ServiceSLTDInhospResDTO dto : noSerialnumList) {
-            PatMedOuthosp patMedOuthosp = buildNewOuthosp(dto);
-            if (patMedOuthosp != null) {
-                batchList.add(patMedOuthosp);
-            }
-        }
-        log.info("銆恛utHospitalDate銆戞湰椤祘}鏉★紝鍘婚噸鍚巤}鏉★紝宸插叆搴撹烦杩噞}鏉★紝寰呭叆搴搟}鏉�",
-                resultList.size(), uniqueList.size(), existSkipCount, batchList.size());
-
-        // 鎵归噺鎻掑叆锛岃嚜鍔ㄥ拷鐣ラ噸澶�
-        if (CollectionUtils.isNotEmpty(batchList)) {
-            //杩欓噷鐢ㄨ嚜鍔ㄥ拷鐣ラ噸澶嶄細鏈夐棶棰橈紝濡傛灉琛ㄩ噸鏂板缓锛宻erialnum绱㈠紩浼氫涪澶便�傚氨鏃犳硶鍘婚噸锛屾墍浠ヨ繕鏄渶瑕佸唴瀛橀噷鍘婚噸
-            batchList = DistinctByProperty.distinctByProperty(batchList, PatMedOuthosp::getSerialnum);
-            int insertCount = 0;
-            int skipCount = 0;
-            List<String> failSerialnums = new ArrayList<>();
-            for (PatMedOuthosp patMedOuthosp : batchList) {
-                try {
-                    int inserted = patMedOuthospService.insertPatMedOuthosp(patMedOuthosp);
-                    if (inserted > 0) {
-                        insertCount += inserted;
-                    } else {
-                        // 杩斿洖0琛ㄧず宸插瓨鍦紙閲嶅閲囬泦锛夋垨灏辫瘖鏃堕棿涓虹┖锛屽睘浜庢甯歌烦杩囷紝涓嶇畻澶辫触
-                        skipCount++;
-                    }
-                } catch (Exception e) {
-                    // 鍗曟潯鍏ュ簱澶辫触涓嶅啀涓柇閲囬泦锛氳惤閿欒琛ㄤ氦缁欎汉宸ュ鐞嗭紝閲囬泦鏂偣鐓у父鎺ㄨ繘
-                    failSerialnums.add(patMedOuthosp.getSerialnum());
-                    saveOuthospError(null, patMedOuthosp, "INSERT", e.getMessage(), new Gson().toJson(patMedOuthosp), e);
-                }
-            }
-            log.info("鎵归噺鎻掑叆闂ㄦ�ヨ瘖璁板綍锛屾�绘暟锛歿}, 瀹為檯鎻掑叆锛歿}, 璺宠繃锛堝凡瀛樺湪/鏃犲氨璇婃椂闂达級锛歿}, 钀介敊璇〃锛歿}",
-                    batchList.size(), insertCount, skipCount, failSerialnums.size());
-
-            if (!failSerialnums.isEmpty()) {
-                // 澶辫触鏄庣粏宸查�愭潯鍐欒繘 pat_med_outhosp_error锛岃繖閲屽彧鎻愮ず锛屼笉鍐嶆姏寮傚父闃绘柇閲囬泦
-                log.error("闂ㄦ�ヨ瘖璁板綍鍏ュ簱澶辫触 {} 鏉★紝宸插啓鍏� pat_med_outhosp_error 绛変汉宸ュ鐞嗭紝serialnum锛歿}",
-                        failSerialnums.size(), failSerialnums);
-            }
-        }
-        return true;
-    }
-
-    /**
-     * 澶勭悊鍗曟潯鏂板璁板綍鐨勬偅鑰呮。妗堝苟鏋勫缓闂ㄦ�ヨ瘖璁板綍锛�
-     * 澶辫触鏃跺啓閿欒琛ㄤ氦缁欎汉宸ュ鐞嗗苟杩斿洖 null锛屼笉褰卞搷鍚屼竴椤甸噷鍏朵粬璁板綍
-     */
-    private PatMedOuthosp buildNewOuthosp(ServiceSLTDInhospResDTO dto) {
-        try {
-            PatArchive patArchive = processPatientArchive(dto);
-            return buildPatMedOuthosp(dto, patArchive);
-        } catch (Exception e) {
-            saveOuthospError(dto, null, "ARCHIVE", e.getMessage(), new Gson().toJson(dto), e);
-            return null;
-        }
-    }
-
-    /** 閲囬泦澶辫触鐨勫師濮嬭褰曟潵鑷帴鍙h繑鍥炵殑 Map锛堟暟鎹浆鎹㈠け璐ユ椂杩樻病鏈� DTO锛� */
-    private void saveOuthospError(Map<String, Object> dataItem, String errorType, String errorMsg,
-                                  String rawData, Throwable cause) {
-        PatMedOuthospError error = new PatMedOuthospError();
-        error.setSerialnum(getStringValue(dataItem, "healthcareRecordNo"));
-        error.setOuthospno(getStringValue(dataItem, "healthcareRecordNo"));
-        error.setPatname(getStringValue(dataItem, "patientName"));
-        error.setPatno(getStringValue(dataItem, "medicalRecordNo"));
-        error.setCampusid(getStringValue(dataItem, "campusId"));
-        error.setOrgid(getStringValue(dataItem, "orgId"));
-        doSaveOuthospError(error, errorType, errorMsg, rawData, cause);
-    }
-
-    /** 閲囬泦澶辫触鐨勫師濮嬭褰曟潵鑷� DTO / 寰呭叆搴撶殑 PatMedOuthosp */
-    private void saveOuthospError(ServiceSLTDInhospResDTO dto, PatMedOuthosp patMedOuthosp, String errorType,
-                                  String errorMsg, String rawData, Throwable cause) {
-        PatMedOuthospError error = new PatMedOuthospError();
-        if (dto != null) {
-            error.setSerialnum(dto.getHealthcareRecordNo());
-            error.setOuthospno(dto.getHealthcareRecordNo());
-            error.setPatname(dto.getPatientName());
-            error.setPatno(dto.getMedicalRecordNo());
-            error.setCampusid(dto.getCampusId());
-            error.setOrgid(dto.getOrgId());
-            error.setAdmitdate(parseDate(dto.getLastEncounterTime()));
-        }
-        if (patMedOuthosp != null) {
-            if (StringUtils.isEmpty(error.getSerialnum())) {
-                error.setSerialnum(patMedOuthosp.getSerialnum());
-            }
-            error.setOuthospno(patMedOuthosp.getOuthospno());
-            error.setPatname(patMedOuthosp.getPatname());
-            error.setPatno(patMedOuthosp.getPatno());
-            error.setCampusid(patMedOuthosp.getCampusid());
-            error.setOrgid(patMedOuthosp.getOrgid());
-            error.setAdmitdate(patMedOuthosp.getAdmitdate());
-        }
-        doSaveOuthospError(error, errorType, errorMsg, rawData, cause);
-    }
-
-    /**
-     * 鍐欓棬鎬ヨ瘖閲囬泦澶辫触璁板綍琛紝浜ょ粰浜哄伐澶勭悊銆�
-     * 杩欓噷鍏滀綇涓�鍒囧紓甯革細杩為敊璇〃閮藉啓涓嶈繘鍘绘椂鍙墦鏃ュ織锛堝甫鍘熷鏁版嵁锛夛紝缁濅笉鍥犱负鍐欓敊璇〃澶辫触鑰屼腑鏂噰闆�
-     */
-    private void doSaveOuthospError(PatMedOuthospError error, String errorType, String errorMsg,
-                                    String rawData, Throwable cause) {
-        error.setErrorType(errorType);
-        error.setErrorMsg(truncate(errorMsg == null || errorMsg.isEmpty() ? String.valueOf(cause) : errorMsg, 1000));
-        error.setRawData(rawData);
-        error.setFailCount(1);
-        error.setHandleStatus("0");
-        error.setGatherDate(new SimpleDateFormat("yyyy-MM-dd").format(new Date()));
-        error.setCreateTime(DateUtils.getNowDate());
-        try {
-            patMedOuthospErrorMapper.insertPatMedOuthospError(error);
-            log.error("銆愰棬鎬ヨ瘖閲囬泦銆憑} 澶辫触锛屽凡鍐欏叆 pat_med_outhosp_error 绛変汉宸ュ鐞嗭紝serialnum={}锛屾偅鑰�={}锛屽師鍥�={}",
-                    errorType, error.getSerialnum(), error.getPatname(), error.getErrorMsg(), cause);
-        } catch (Exception ex) {
-            log.error("銆愰棬鎬ヨ瘖閲囬泦銆憑} 澶辫触锛屼笖鍐欏叆閿欒琛ㄤ篃澶辫触锛宻erialnum={}锛屽師濮嬫暟鎹細{}",
-                    errorType, error.getSerialnum(), rawData, ex);
-        }
-    }
-
-    /** 鎴柇瓒呴暱鏂囨湰锛岄伩鍏嶈秴鍑洪敊璇〃瀛楁闀垮害瀵艰嚧钀借〃澶辫触 */
-    private String truncate(String text, int maxLength) {
-        if (text == null) {
-            return null;
-        }
-        return text.length() <= maxLength ? text : text.substring(0, maxLength);
-    }
-
-    private PatMedOuthosp buildPatMedOuthosp(ServiceSLTDInhospResDTO dto, PatArchive patArchive) {
-        PatMedOuthosp patMedOuthosp = new PatMedOuthosp();
-        patMedOuthosp.setOuthospno(dto.getHealthcareRecordNo());
-        patMedOuthosp.setSerialnum(dto.getHealthcareRecordNo());
-        patMedOuthosp.setPatid(patArchive.getId());
-        patMedOuthosp.setPatname(patArchive.getName());
-        patMedOuthosp.setPatno(patArchive.getPatientno());
-        patMedOuthosp.setDeptcode("" + dto.getDeptId());
-        patMedOuthosp.setDeptname(dto.getDeptName());
-        patMedOuthosp.setDiagname(dto.getDiagnosisName());
-        patMedOuthosp.setIcd10code(dto.getDiagnosisCode());
-        patMedOuthosp.setDrcode("" + dto.getDoctorId());
-        patMedOuthosp.setDrname(dto.getDoctorName());
-        patMedOuthosp.setAdmitdate(parseDate(dto.getLastEncounterTime()));
-        patMedOuthosp.setSchemestatus(1L);
-        patMedOuthosp.setMainsuit(dto.getDiagnosisName());
-        patMedOuthosp.setHpi(null);
-        patMedOuthosp.setCreateTime(new Date());
-        patMedOuthosp.setOrgid(dto.getOrgId());
-        patMedOuthosp.setCampusid(dto.getCampusId());
-        patMedOuthosp.setFuflag("1");
-        if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1"))
-            patMedOuthosp.setFuflag("0");
-        return patMedOuthosp;
-    }
-
-    private Date parseDate(String dateStr) {
-        if (StringUtils.isEmpty(dateStr)) {
-            return null;
-        }
-        try {
-            return new SimpleDateFormat(DATE_FORMAT).parse(dateStr);
-        } catch (ParseException e) {
-            log.warn("銆恜arseDate銆戣В鏋愭棩鏈熷け璐ワ細{}", dateStr, e);
-            return null;
-        }
-    }
-
-    /**
-     * 鍙栧氨璇婃棩鏈熺殑 yyyy-MM-dd 閮ㄥ垎锛屼笌 buildPatMedOuthosp 閲岀殑 admitdate 淇濇寔瀹屽叏涓�鑷寸殑瑙f瀽瑙勫垯锛�
-     * 淇濊瘉鎵归噺鏌ラ噸鐢ㄧ殑鍒嗚〃鍜屽叆搴撴椂璺敱鍒扮殑鍒嗚〃鏄悓涓�寮�
-     */
-    private String formatAdmitDate(String lastEncounterTime) {
-        Date admitDate = parseDate(lastEncounterTime);
-        if (admitDate == null) {
-            return null;
-        }
-        return new SimpleDateFormat("yyyy-MM-dd").format(admitDate);
-    }
-
-    private Boolean inHospitalDate(List<ServiceSLTDInhospResDTO> resultList, String cry) {
-        int failCount = 0;
-        for (ServiceSLTDInhospResDTO dto : resultList) {
-            if (Objects.isNull(dto)) continue;
-            try {
-                PatArchive patArchive = processPatientArchive(dto);
-                processPatientInhospInfo(dto, patArchive, cry);
-            } catch (Exception e) {
-                failCount++;
-                log.error("銆恑nHospitalDate銆戝崟鏉¤褰曞鐞嗗け璐ワ紝宸茶烦杩囩户缁噰闆嗐�俿tate={}, serialnum={}, patname={}, patno={}, orgid={}, campusId={}",
-                        cry, dto.getHealthcareRecordNo(), dto.getPatientName(), dto.getMedicalRecordNo(),
-                        dto.getOrgId(), dto.getCampusId(), e);
-            }
-        }
-        if (failCount > 0) {
-            log.warn("銆恑nHospitalDate銆戞湰椤靛叡{}鏉★紝澶辫触{}鏉″凡璺宠繃锛屽叾浣檣}鏉″鐞嗗畬鎴愶紝state={}",
-                    resultList.size(), failCount, resultList.size() - failCount, cry);
-        }
-        return true;
-    }
-
-    private void processPatientInhospInfo(ServiceSLTDInhospResDTO dto, PatArchive patArchive, String cry) {
-        PatMedInhosp patMedInhosp = buildPatientInhospInfo(dto, patArchive, cry);
-        PatMedInhosp queryInhosp = new PatMedInhosp();
-        queryInhosp.setPatno(StringUtils.trim(patArchive.getPatientno()));
-        queryInhosp.setSerialnum(StringUtils.trim(patMedInhosp.getSerialnum()));
-        queryInhosp.setOrgid(StringUtils.trim(dto.getOrgId()));
-        queryInhosp.setInhospstate(cry);
-//        log.info("----------------杩欓噷鐨勫叆鍙備负锛歿},{}", queryInhosp.getPatno(), queryInhosp.getSerialnum());
-        List<PatMedInhosp> existingInhosps = patMedInhospService.selectPatMedInhosp(queryInhosp);
-
-        if (cry.equals("0")) {
-            //鍏ラ櫌鏁版嵁澶勭悊
-            if (CollectionUtils.isEmpty(existingInhosps)) {
-                //濡傛灉涓虹┖锛岃鍏堝垽鏂紝棰勫叆闄㈡槸鍚︽湁鍊硷紝鏈夊�肩殑璇濆垯鏇存柊
-                queryInhosp.setInhospstate("3");
-                List<PatMedInhosp> patMedInhospList = patMedInhospService.selectPatMedInhosp(queryInhosp);
-                if (CollectionUtils.isNotEmpty(patMedInhospList)) {
-                    //濡傛灉棰勫叆闄笉涓虹┖锛屽垯杩涜淇敼锛堥鍏ラ櫌鈫掑叆闄級
-                    patMedInhosp.setInhospid(patMedInhospList.get(0).getInhospid());
-                    patMedInhospService.updatePatMedInhosp(patMedInhosp);
-                    log.info("鐢遍鍏ラ櫌鏇存柊涓哄叆闄細serialnum={}", patMedInhosp.getSerialnum());
-                } else {
-                    //濡傛灉鍑洪櫌涓嶄负绌猴紝鍒欎笉杩涜澶勭悊
-                    queryInhosp.setInhospstate("1");
-                    patMedInhospList = patMedInhospService.selectPatMedInhosp(queryInhosp);
-                    if (CollectionUtils.isNotEmpty(patMedInhospList)) {
-                        //濡傛灉涓嶄负绌猴紝鍒欏皢鍏ラ櫌鏃堕棿杩涜鏇存柊
-                        PatMedInhosp pmOut = patMedInhospList.get(0);
-                        //鏈鍏ラ櫌鏁版嵁锛堣繖閲� existingInhosps 蹇呬负绌猴紝鍙� existingInhosps.get(0) 浼氫笅鏍囪秺鐣岋級
-                        PatMedInhosp pmIn = patMedInhosp;
-                        pmOut.setStarttime(pmIn.getStarttime());
-                        pmOut.setUpdateTime(new Date());
-                        patMedInhospService.updatePatMedInhosp(pmOut);
-                        //鐪佺珛鍚屽痉闇�瑕佸皢寮�濮嬫棩鏈熶笌鍏ラ櫌鏃ユ湡鐩哥瓑鐨勪换鍔★紝鏀规垚涓嶆墽琛�
-                        try {
-                            if ("sltd".equals(active) && DateUtils.isSameDay(pmOut.getStarttime(), pmIn.getEndtime())) {
-                                ServiceSubtask serviceSubtask = new ServiceSubtask();
-                                serviceSubtask.setInhospid(pmOut.getInhospid());
-                                serviceSubtask.setSendstate(4L);
-                                serviceSubtaskMapper.updateServiceSubtaskByCondition(serviceSubtask);
-                            }
-                            //閫氳繃鍏ラ櫌鏃堕棿锛屽拰鎮h�呯殑缂栧彿鍘绘煡涓�涓嬪嚭闄㈡椂闂达紝鏄惁瀛樺湪锛屽鏋滃瓨鍦紝鍒欒鎮h�呮槸鍐嶅叆闄㈢殑锛岄渶瑕佹敼鎴愪笉鎵ц
-                            //鍑洪櫌鏃堕棿鍙瘮杈冨埌澶╋紝涓嶆瘮杈冩椂鍒嗙
-                            if (pmIn.getStarttime() != null) {
-                                Date dayStart = DateUtils.truncate(pmIn.getStarttime(), Calendar.DAY_OF_MONTH);
-                                Date dayEnd = DateUtils.addDays(dayStart, 1);
-                                List<PatMedInhosp> outInhosps = inhospVisitFacade.selectOutInhospByPatnoAndOutDate(
-                                        StringUtils.trim(pmIn.getPatno()), dayStart, dayEnd);
-                                if (CollectionUtils.isNotEmpty(outInhosps)) {
-                                    //瀛樺湪鍑洪櫌璁板綍锛岃鏄庤鎮h�呮槸鍐嶅叆闄紝鎶婁笂涓�娆″嚭闄骇鐢熺殑瀛愪换鍔℃敼鎴愪笉鎵ц
-                                    ServiceSubtask outSubtask = new ServiceSubtask();
-                                    outSubtask.setInhospid(outInhosps.get(0).getInhospid());
-                                    outSubtask.setSendstate(4L);
-                                    outSubtask.setRemark("鎮h�呭啀鍏ラ櫌");
-                                    outSubtask.setUpdateTime(new Date());
-                                    serviceSubtaskMapper.updateServiceSubtaskByCondition(outSubtask);
-                                    log.info("鎮h�呭啀鍏ラ櫌锛屽皢涓婃鍑洪櫌璁板綍鐨勫瓙浠诲姟鏀逛负涓嶆墽琛岋細patno={}, 鍑洪櫌inhospid={}, 鍑洪櫌鏃堕棿={}, 鏈鍏ラ櫌鏃堕棿={}",
-                                            pmIn.getPatno(), outInhosps.get(0).getInhospid(), outInhosps.get(0).getEndtime(), pmIn.getStarttime());
-                                }
-                            }
-
-                        } catch (Exception e) {
-                            log.error("灏嗗嚭闄㈡椂闂寸瓑浜庡叆闄㈡椂闂寸殑inhospid鐨勪换鍔℃洿鏂板け璐ヤ簡, inhospid={}", pmOut.getInhospid(), e);
-                        }
-                        return;
-                    }
-                }
-
-                //濡傛灉閮戒负绌猴紝鍒欒繘琛屾柊澧�
-                if (CollectionUtils.isEmpty(patMedInhospList)) {
-                    try {
-                        patMedInhospService.insertPatMedInhosp(patMedInhosp);
-                    } catch (org.springframework.dao.DuplicateKeyException e) {
-                        log.warn("鍏ラ櫌璁板綍宸插瓨鍦紝璺宠繃锛歴erialnum={}, orgid={}, state={}", patMedInhosp.getSerialnum(), patMedInhosp.getOrgid(), patMedInhosp.getInhospstate());
-                    }
-                }
-            }
-
-        } else if (cry.equals("1")) {
-            // 鍑洪櫌鏁版嵁澶勭悊
-            if (CollectionUtils.isNotEmpty(existingInhosps)) {
-                // 宸插瓨鍦ㄥ嚭闄㈣褰曪紝鐩存帴鏇存柊锛堜繚鎸佹渶鏂版暟鎹級
-                patMedInhosp.setInhospid(existingInhosps.get(0).getInhospid());
-                patMedInhospService.updatePatMedInhosp(patMedInhosp);
-                log.info("鍑洪櫌璁板綍宸插瓨鍦紝鎵ц鏇存柊锛歴erialnum={}, orgid={}", patMedInhosp.getSerialnum(), patMedInhosp.getOrgid());
-            } else {
-                // 涓嶅瓨鍦ㄥ嚭闄㈣褰曪紝鍏堟煡棰勫叆闄紙state=3锛夛紝鍐嶆煡鍏ラ櫌锛坰tate=0锛�
-                queryInhosp.setInhospstate("3");
-//                log.info("-----鏌ヨ棰勫叆闄㈣褰曪紝鍏ュ弬涓猴細{}", queryInhosp);
-                List<PatMedInhosp> patMedInhospList = patMedInhospService.selectPatMedInhosp(queryInhosp);
-                log.info("----棰勫叆闄㈡煡璇㈢粨鏋滐細{}", CollectionUtils.isEmpty(patMedInhospList) ? "绌�" : patMedInhospList.get(0).getSerialnum());
-                if (CollectionUtils.isNotEmpty(patMedInhospList)) {
-                    // 瀛樺湪棰勫叆闄㈣褰曪紝鏇存柊涓哄嚭闄㈢姸鎬�
-                    patMedInhosp.setInhospid(patMedInhospList.get(0).getInhospid());
-                    patMedInhospService.updatePatMedInhosp(patMedInhosp);
-                    log.info("鐢遍鍏ラ櫌鏇存柊涓哄嚭闄細serialnum={}", patMedInhosp.getSerialnum());
-                } else {
-                    // 鍐嶆煡鍏ラ櫌璁板綍锛坰tate=0锛�
-                    queryInhosp.setInhospstate("0");
-                    patMedInhospList = patMedInhospService.selectPatMedInhosp(queryInhosp);
-                    log.debug("鍏ラ櫌鏌ヨ缁撴灉锛歿}", CollectionUtils.isEmpty(patMedInhospList) ? "绌�" : patMedInhospList.size());
-                    if (CollectionUtils.isNotEmpty(patMedInhospList)) {
-                        // 瀛樺湪鍏ラ櫌璁板綍锛屾洿鏂颁负鍑洪櫌鐘舵��
-                        patMedInhosp.setInhospid(patMedInhospList.get(0).getInhospid());
-                        patMedInhospService.updatePatMedInhosp(patMedInhosp);
-                        log.info("鐢卞叆闄㈡洿鏂颁负鍑洪櫌锛歴erialnum={}", patMedInhosp.getSerialnum());
-                    } else {
-                        // 棰勫叆闄㈠拰鍏ラ櫌鍧囦笉瀛樺湪锛岀洿鎺ユ柊澧炲嚭闄㈣褰�
-                        try {
-                            patMedInhospService.insertPatMedInhosp(patMedInhosp);
-                            log.info("鏂板鍑洪櫌璁板綍锛歴erialnum={}", patMedInhosp.getSerialnum());
-                        } catch (org.springframework.dao.DuplicateKeyException e) {
-                            log.warn("鍑洪櫌璁板綍宸插瓨鍦紝璺宠繃锛歴erialnum={}, orgid={}, state={}", patMedInhosp.getSerialnum(), patMedInhosp.getOrgid(), patMedInhosp.getInhospstate());
-                        }
-                    }
-                }
-            }
-        } else if ("3".equals(cry)) {
-            //棰勫叆闄㈡暟鎹鐞嗭細浠讳竴鐘舵�佸瓨鍦ㄥ垯涓嶆柊澧烇紱閮戒笉瀛樺湪鎵嶆柊澧�
-            String serialnum = patMedInhosp.getSerialnum() == null ? "" : patMedInhosp.getSerialnum().trim();
-            String orgid = patMedInhosp.getOrgid() == null ? "" : patMedInhosp.getOrgid().trim();
-            String state = patMedInhosp.getInhospstate() == null ? "" : patMedInhosp.getInhospstate();
-            String lockKey = "inhosp:lock:" + serialnum + ":" + orgid + ":" + state;
-
-            Boolean locked = false;
-            try {
-                locked = redisTemplate.opsForValue().setIfAbsent(lockKey, "1", 10, TimeUnit.SECONDS);
-            } catch (Exception e) {
-                log.warn("Redis閿佽幏鍙栧け璐ワ紝闄嶇骇涓虹洿鎺ユ彃鍏ワ細{}", e.getMessage());
-                locked = null; // 鏍囪Redis涓嶅彲鐢�
-            }
-
-            if (locked == null || Boolean.TRUE.equals(locked)) {
-                try {
-                    queryInhosp.setInhospstate(null);
-                    queryInhosp.setSchemestatus(null);
-                    queryInhosp.setPatno(null);
-                    List<PatMedInhosp> patMedInhospList3 = patMedInhospService.selectPatMedInhosp(queryInhosp);
-                    if (CollectionUtils.isEmpty(patMedInhospList3)) {
-                        try {
-                            //鑾峰彇涓�涓嬪叆闄㈢敵璇峰崟
-                            //鏍规嵁 encounterSourceId 鑾峰彇 importanceFlagCode   emergencyLevelCode
-                            if (active.equals("sltd")) {
-                                Map<String, String> applyInfo = hospitalizedApply(dto.getEncounterSourceId(), dto.getOrgId());
-                                if (ObjectUtils.isNotEmpty(applyInfo)) {
-                                    patMedInhosp.setImportanceFlagCode(applyInfo.get("importanceFlagCode"));
-                                    patMedInhosp.setEmergencyLevelCode(applyInfo.get("emergencyLevelCode"));
-                                }
-                            }
-                            patMedInhospService.insertPatMedInhosp(patMedInhosp);
-                            log.debug("鎴愬姛鎻掑叆棰勫叆闄㈣褰曪細serialnum={}", patMedInhosp.getSerialnum());
-                        } catch (Exception e) {
-                            log.warn("棰勫叆闄㈣褰曟彃鍏ュけ璐ワ紙鍙兘宸插瓨鍦級锛歴erialnum={}, orgid={}, state={}, 閿欒锛歿}", patMedInhosp.getSerialnum(), patMedInhosp.getOrgid(), patMedInhosp.getInhospstate(), e.getMessage());
-                        }
-                    }
-                } finally {
-                    if (Boolean.TRUE.equals(locked)) {
-                        try {
-                            redisTemplate.delete(lockKey);
-                        } catch (Exception e) {
-                            log.warn("Redis閿侀噴鏀惧け璐ワ細{}", e.getMessage());
-                        }
-                    }
-                }
-            } else {
-                log.debug("棰勫叆闄㈣褰曟鍦ㄨ鍏朵粬绾跨▼澶勭悊锛岃烦杩囷細serialnum={}", patMedInhosp.getSerialnum());
-            }
-        }
-    }
-
-    private PatMedInhosp buildPatientInhospInfo(ServiceSLTDInhospResDTO dto, PatArchive patArchive, String cry) {
-        log.info("----------------buildPatientInhospInfo杩欓噷杩涙潵浜嗗悧锛焮}", cry);
-        PatMedInhosp patMedInhosp = new PatMedInhosp();
-        patMedInhosp.setPatid(patArchive.getId());
-        patMedInhosp.setPatno(patArchive.getPatientno());
-        patMedInhosp.setPatname(patArchive.getName());
-        patMedInhosp.setNurseId(dto.getChiefNurseId() == null ? "" : dto.getChiefNurseId().toString());
-        patMedInhosp.setNurseName(dto.getChiefNurseName());
-        patMedInhosp.setSerialnum(dto.getHealthcareRecordNo());
-        patMedInhosp.setInhospno(dto.getHealthcareRecordNo());
-        patMedInhosp.setFuflag("1");
-
-        if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1"))
-            patMedInhosp.setFuflag("0");
-        if ("0".equals(cry)) {
-            patMedInhosp.setInhospstate("0");
-            if (CollectionUtils.isNotEmpty(dto.getDiagnosisList()) && dto.getDiagnosisList().size() > 0) {
-                for (ServiceSLTDDiagnosisResDTO diagnosis : dto.getDiagnosisList()) {
-                    if (diagnosis.getIsMainDiagnosis() == 1) {
-                        patMedInhosp.setDiagname(diagnosis.getDiagnosisDictName() == null ? "" : diagnosis.getDiagnosisDictName());
-                        patMedInhosp.setIcd10code(diagnosis.getDiagnosisDictCode() == null ? "" : diagnosis.getDiagnosisDictCode());
-                    }
-                }
-            }
-        }
-        if ("1".equals(cry)) {
-            patMedInhosp.setInhospstate("1");
-            ServiceSLTDDiagnosisResDTO mainDischargeDiagnosis = dto.getMainDischargeDiagnosis();
-//            log.info("-----------mainDischargeDiagnosis鐨勫�兼湁浜嗗悧?{}", mainDischargeDiagnosis);
-            if (!Objects.isNull(mainDischargeDiagnosis)) {
-                if (mainDischargeDiagnosis.getIsMainDiagnosis() == 1) {
-                    patMedInhosp.setLeavediagname(StringUtils.defaultString(mainDischargeDiagnosis.getDiagnosisDictName(), ""));
-                    patMedInhosp.setLeaveicd10code(StringUtils.defaultString(mainDischargeDiagnosis.getDiagnosisDictCode(), ""));
-                }
-            }
-        }
-        if ("3".equals(cry)) {
-            patMedInhosp.setInhospstate("3");
-            if (CollectionUtils.isNotEmpty(dto.getDiagnosisList()) && dto.getDiagnosisList().size() > 0) {
-                for (ServiceSLTDDiagnosisResDTO diagnosis : dto.getDiagnosisList()) {
-                    if (diagnosis.getIsMainDiagnosis() == 1) {
-                        patMedInhosp.setDiagname(diagnosis.getDiagnosisDictName() == null ? "" : diagnosis.getDiagnosisDictName());
-                        patMedInhosp.setIcd10code(diagnosis.getDiagnosisDictCode() == null ? "" : diagnosis.getDiagnosisDictCode());
-                    }
-                }
-            }
-        }
-        patMedInhosp.setHospitalcode(dto.getOrgId());
-        patMedInhosp.setBedNo(dto.getBedNumber());
-        patMedInhosp.setStarttime(parseDate(dto.getStartTime()));
-        patMedInhosp.setEndtime(parseDate(dto.getPreOutHospitalDate()));
-
-        if ("1".equals(cry)) {
-            setDischargeInfo(patMedInhosp, dto);
-        } else {
-            setAdmissionInfo(patMedInhosp, dto);
-            patMedInhosp.setEncounterSourceId(dto.getEncounterSourceId() == null ? "" : dto.getEncounterSourceId());
-            if (StringUtils.isNotEmpty(dto.getEncounterSourceId()) && active.equals("sltd")) {
-                //鏍规嵁 encounterSourceId 鑾峰彇 importanceFlagCode   emergencyLevelCode
-                Map<String, String> applyInfo = hospitalizedApply(dto.getEncounterSourceId(), dto.getOrgId());
-                if (!Objects.isNull(applyInfo)) {
-                    patMedInhosp.setImportanceFlagCode(applyInfo.get("importanceFlagCode"));
-                    patMedInhosp.setEmergencyLevelCode(applyInfo.get("emergencyLevelCode"));
-                }
-            }
-        }
-
-        patMedInhosp.setDrname(dto.getDoctorName());
-        patMedInhosp.setDrcode("" + dto.getDoctorId());
-        patMedInhosp.setSchemestatus("0".equals(cry) ? 1L : 2L);
-        patMedInhosp.setDelFlag("0");
-        patMedInhosp.setOrgid(dto.getOrgId());
-        patMedInhosp.setCampusid(dto.getCampusId());
-        if (StringUtils.isNotEmpty(dto.getHealthcareRecordStatus()) && dto.getHealthcareRecordStatus().equals("FH0109.25"))
-            patMedInhosp.setRemark("棰勫嚭闄�");
-        if (active.equals("nhfy") && dto.getAreaId() != null && dto.getAreaId().toString().equals("40003483") && StringUtils.isNotEmpty(patMedInhosp.getPatname())) {
-            //鍗楀崕闄勪竴鐨勪骇绉戯紝瑕佹眰涓嶇敓鎴愨�滀箣瀛愩�佷箣濂炽�佷箣濠粹�濈殑闅忚浠诲姟
-            if (patMedInhosp.getPatname().contains("涔嬪瓙") || patMedInhosp.getPatname().contains("涔嬪コ") || patMedInhosp.getPatname().contains("涔嬪┐")) {
-                patMedInhosp.setDeptcheckFlag("3");
-                patMedInhosp.setWardcheckFlag("3");
-                patMedInhosp.setDiagcheckFlag("3");
-                patMedInhosp.setRemark(patMedInhosp.getRemark() + ";涓嶇敓鎴愪箣瀛愩�佷箣濂炽�佷箣濠撮棶鍗�");
-            }
-        }
-
-        //鐩墠鍙湁鐪佺珛鍚屽痉
-        if (active.equals("sltd")) {
-            Map<String, String> drugInfoMap = queryMedicalOrders(dto);
-            if (drugInfoMap != null && !drugInfoMap.isEmpty()) {
-                patMedInhosp.setMedicalName(drugInfoMap.get("drugItemNames"));
-                patMedInhosp.setMedicalCode(drugInfoMap.get("drugItemIds"));
-                patMedInhosp.setMedicalCompany(drugInfoMap.get("drugManufacturerNames"));
-                log.info("鑾峰彇鑽搧淇℃伅鎴愬姛锛氬悕绉�={}, 缂栫爜={}, 鍘傚={}", drugInfoMap.get("drugItemNames"), drugInfoMap.get("drugItemIds"), drugInfoMap.get("drugManufacturerNames"));
-            }
-        }
-        return patMedInhosp;
-    }
-
-    /**
-     * 鏌ヨ鍖诲槺淇℃伅骞舵嫾鎺ヨ嵂鍝佷俊鎭�
-     *
-     * @param dto 鍋ュ悍璁板綍璇锋眰瀵硅薄
-     * @return 杩斿洖鍖呭惈涓変釜瀛楁 Map锛�
-     * - drugItemNames: 鑽搧鍚嶇О鍒楄〃锛堥�楀彿鍒嗛殧锛�
-     * - drugItemIds: 鑽搧缂栫爜鍒楄〃锛堥�楀彿鍒嗛殧锛�
-     * - drugManufacturerNames: 鑽搧鍘傚鍒楄〃锛堥�楀彿鍒嗛殧锛�
-     * <p>
-     * 瑙勫垯锛�
-     * 1. 涓変釜瀛楁椤哄簭浣嶇疆淇濇寔涓�鑷�
-     * 2. 濡傛灉涓変釜瀛楁閮戒负绌猴紝鍒欒烦杩囪璁板綍
-     * 3. 濡傛灉鑷冲皯鏈変竴涓瓧娈垫湁鍊硷紝鍒欏叾浠栦袱涓负绌虹敤绌哄瓧绗︿覆浠f浛
-     */
-    private Map<String, String> queryMedicalOrders(ServiceSLTDInhospResDTO dto) {
-        Map<String, String> result = new HashMap<>();
-        List<String> itemNames = new ArrayList<>();
-        List<String> itemIds = new ArrayList<>();
-        List<String> manufacturerNames = new ArrayList<>();
-
-        try {
-            // 鑾峰彇鎮h�呯殑鍖诲槺淇℃伅
-            Map<String, Object> medicineInfoReq = new HashMap<>();
-            medicineInfoReq.put("orgId", dto.getOrgId());
-            medicineInfoReq.put("patientId", dto.getPatientId());
-            medicineInfoReq.put("campusId", dto.getCampusId());
-            medicineInfoReq.put("medicalRecordNo", dto.getMedicalRecordNo());
-            log.info("銆恞ueryMedicalOrders銆戣姹傚弬鏁帮細{}", medicineInfoReq);
-            Map<String, String> headers = buildRequestHeaders();
-            String resultStr = HttpUtils.sendPostByHeader(sltdPubPath + "/osj/hbos-thirdparty-integration/standard/common/doctorOrder/queryDoctorOrderList", new Gson().toJson(medicineInfoReq), headers);
-
-            if (StringUtils.isEmpty(resultStr)) {
-                log.warn("銆恞ueryMedicalOrders銆戞帴鍙h繑鍥炰负绌猴紝patientId={}", dto.getPatientId());
-                return result;
-            }
-
-            // 瑙f瀽杩斿洖鏁版嵁
-            Gson gson = new Gson();
-            Type mapType = new TypeToken<Map<String, Object>>() {
-            }.getType();
-            Map<String, Object> responseMap = gson.fromJson(resultStr, mapType);
-
-            // 妫�鏌ヨ繑鍥炵爜
-            Object codeObj = responseMap.get("code");
-            if (codeObj != null) {
-                String code = BigDecimal.valueOf(((Number) codeObj).longValue()).toPlainString();
-                if (!"200".equals(code)) {
-                    log.error("銆恞ueryMedicalOrders銆戞帴鍙h繑鍥炲け璐ワ紝code={}, message={}", code, responseMap.get("message"));
-                    return null;
-                }
-            }
-
-            // 鑾峰彇 data 鏁扮粍
-            Object dataObj = responseMap.get("data");
-            if (dataObj instanceof List) {
-                List<?> dataList = (List<?>) dataObj;
-
-                // 閬嶅巻鍖诲槺鍒楄〃锛屾彁鍙栬嵂鍝佷俊鎭�
-                Set<String> processedItemIds = new HashSet<>(); // 鐢ㄤ簬鍘婚噸锛堝彧鏍规嵁 itemId 鍘婚噸锛�
-
-                for (Object item : dataList) {
-                    if (item instanceof Map) {
-                        Map<String, Object> itemMap = (Map<String, Object>) item;
-
-                        // 鍙鐞嗚嵂鍝佺浉鍏崇殑鍖诲槺锛坕temDomain 涓� FH0134.01 琛ㄧず鑽搧锛�
-                        Object itemDomainObj = itemMap.get("itemDomain");
-                        if (itemDomainObj == null || !"FH0134.01".equals(itemDomainObj.toString())) {
-                            continue;
-                        }
-
-                        // 鑾峰彇涓変釜瀛楁
-                        Object itemNameObj = itemMap.get("itemName");
-                        Object itemIdObj = itemMap.get("itemId");
-                        Object manufacturerNameObj = itemMap.get("manufacturerName");
-
-                        // 鍒ゆ柇鏄惁閮戒负绌�
-                        boolean allEmpty = (itemNameObj == null || StringUtils.isEmpty(itemNameObj.toString())) && (itemIdObj == null || StringUtils.isEmpty(itemIdObj.toString())) && (manufacturerNameObj == null || StringUtils.isEmpty(manufacturerNameObj.toString()));
-
-                        // 濡傛灉涓変釜閮戒负绌猴紝鍒欒烦杩�
-                        if (allEmpty) {
-                            continue;
-                        }
-
-                        // 鑷冲皯鏈変竴涓湁鍊硷紝澶勭悊姣忎釜瀛楁
-                        String itemName = (itemNameObj != null && StringUtils.isNotEmpty(itemNameObj.toString())) ? itemNameObj.toString() : "";
-
-                        // itemId 鐗规畩澶勭悊锛氶伩鍏嶇瀛﹁鏁版硶锛圙son 鍙兘灏嗘暟瀛楄В鏋愪负 Double锛�
-                        String itemId = "";
-                        if (itemIdObj != null && StringUtils.isNotEmpty(itemIdObj.toString())) {
-                            if (itemIdObj instanceof Number) {
-                                // 濡傛灉鏄暟鍊肩被鍨嬶紝杞崲涓烘暣鏁板瓧绗︿覆锛岄伩鍏嶇瀛﹁鏁版硶
-                                itemId = String.valueOf(((Number) itemIdObj).longValue());
-                            } else {
-                                itemId = itemIdObj.toString();
-                            }
-                        }
-
-                        String manufacturerName = (manufacturerNameObj != null && StringUtils.isNotEmpty(manufacturerNameObj.toString())) ? manufacturerNameObj.toString() : "";
-
-                        // 鍙牴鎹� itemId 鍘婚噸锛堝悓涓�缂栫爜鐨勮嵂鍝佸彧淇濈暀涓�涓級
-                        if (StringUtils.isNotEmpty(itemId)) {
-                            if (processedItemIds.contains(itemId)) {
-                                log.info("銆恞ueryMedicalOrders銆戣烦杩囬噸澶嶈嵂鍝侊紙鐩稿悓缂栫爜锛夛細鍚嶇О={}, 缂栫爜={}", itemName, itemId);
-                                continue;
-                            }
-                            processedItemIds.add(itemId);
-                        } else {
-                            // itemId 涓虹┖鏃讹紝浣跨敤 itemName 浣滀负鍘婚噸渚濇嵁
-                            if (processedItemIds.contains(itemName)) {
-                                log.info("銆恞ueryMedicalOrders銆戣烦杩囬噸澶嶈嵂鍝侊紙鐩稿悓鍚嶇О锛夛細鍚嶇О={}", itemName);
-                                continue;
-                            }
-                            processedItemIds.add(itemName);
-                        }
-
-                        // 娣诲姞鍒板垪琛�
-                        itemNames.add(itemName);
-                        itemIds.add(itemId);
-                        manufacturerNames.add(manufacturerName);
-
-                        log.info("銆恞ueryMedicalOrders銆戞彁鍙栬嵂鍝佷俊鎭細鍚嶇О={}, 缂栫爜={}, 鍘傚={}", itemName, itemId, manufacturerName);
-                    }
-                }
-            } else {
-                log.info("銆恞ueryMedicalOrders銆慸ata 涓嶆槸鏁扮粍绫诲瀷锛宲atientId={}", dto.getPatientId());
-            }
-
-            // 灏嗗垪琛ㄦ嫾鎺ユ垚閫楀彿鍒嗛殧鐨勫瓧绗︿覆
-            if (!itemNames.isEmpty()) {
-                result.put("drugItemNames", String.join(",", itemNames));
-                result.put("drugItemIds", String.join(",", itemIds));
-                result.put("drugManufacturerNames", String.join(",", manufacturerNames));
-            }
-
-            log.info("銆恞ueryMedicalOrders銆戞垚鍔熸彁鍙杮}鏉¤嵂鍝佷俊鎭紝patientId={}", itemNames.size(), dto.getPatientId());
-
-        } catch (Exception e) {
-            log.error("銆恞ueryMedicalOrders銆戞煡璇㈠尰鍢变俊鎭け璐ワ紝patientId={}", dto.getPatientId(), e);
-        }
-
-        return result;
-    }
-
-    private void setDischargeInfo(PatMedInhosp patMedInhosp, ServiceSLTDInhospResDTO dto) {
-        patMedInhosp.setLeaveldeptcode("" + dto.getDeptId());
-        patMedInhosp.setLeaveldeptname(dto.getDeptName());
-        patMedInhosp.setLeavediagname(dto.getMainDischargeDiagnosis() == null ? null : dto.getMainDischargeDiagnosis().getDiagnosisDictName());
-        patMedInhosp.setLeaveicd10code(dto.getMainDischargeDiagnosis() == null ? null : dto.getMainDischargeDiagnosis().getDiagnosisDictCode());
-        patMedInhosp.setOutWayId(null);
-        patMedInhosp.setOutWayName(null);
-        patMedInhosp.setLeavehospitaldistrictid("" + dto.getAreaId());
-        patMedInhosp.setLeavehospitaldistrictcode("" + dto.getAreaId());
-        patMedInhosp.setLeavehospitaldistrictname(dto.getAreaName());
-        patMedInhosp.setLeaveldeptid("" + dto.getDeptId());
-    }
-
-    private void setAdmissionInfo(PatMedInhosp patMedInhosp, ServiceSLTDInhospResDTO dto) {
-        patMedInhosp.setDeptcode("" + dto.getDeptId());
-        patMedInhosp.setDeptname(dto.getDeptName());
-        patMedInhosp.setDiagname(dto.getAdmissionDiagnosisName());
-        patMedInhosp.setIcd10code(dto.getAdmissionDiagnosisCode());
-        patMedInhosp.setHospitaldistrictid("" + dto.getAreaId());
-        patMedInhosp.setHospitaldistrictcode("" + dto.getAreaId());
-        patMedInhosp.setHospitaldistrictname(dto.getAreaName());
-    }
-
-    /**
-     * 鏍规嵁鍏ラ櫌鐢宠鍗旾D鏌ヨ鍏ラ櫌鐢宠鍗曡鎯�
-     * 鍙彁鍙� importanceFlagCode锛坕mportanceFlagCodeList閫楀彿鎷兼帴锛夊拰 emergencyLevelCode 涓や釜鍊�
-     */
-    private Map<String, String> hospitalizedApply(String encounterSourceId, String orgid) {
-        Map<String, String> applyInfo = new HashMap<>();
-        Map<String, String> headers = buildRequestHeaders();
-        log.info("闄㈢敵璇峰崟ID鏌ヨ鍏ラ櫌鐢宠鍗曪細{},appKey:{}", sltdPubPath + "/sf/hospitalizedApply/query", APP_KEY);
-        //璁剧疆鍏ュ弬
-        Map<String, Object> requestParams = new HashMap<>();
-        requestParams.put("applyId", encounterSourceId);
-        requestParams.put("orgId", orgid);
-
-        String result = null;
-        if (StringUtils.isNotEmpty(encounterSourceId) && StringUtils.isNotEmpty(orgid))
-            result = HttpUtils.sendPostByHeader(sltdPubPath + "/sf/hospitalizedApply/query", new Gson().toJson(requestParams), headers);
-
-        if (StringUtils.isEmpty(result)) {
-            log.error("銆恏ospitalizedApply銆戞帴鍙h繑鍥炰负绌猴紝applyId={}", encounterSourceId);
-            return applyInfo;
-        }
-        try {
-            Gson gson = new Gson();
-            Type mapType = new TypeToken<Map<String, Object>>() {
-            }.getType();
-            Map<String, Object> responseMap = gson.fromJson(result, mapType);
-            Object dataObj = responseMap == null ? null : responseMap.get("data");
-            if (dataObj instanceof Map) {
-                Map<String, Object> data = (Map<String, Object>) dataObj;
-                //閲嶈鎬ф爣璁扮紪鐮侊紝鎺ュ彛杩斿洖鏄暟缁勶紝闇�瑕佽浆鎹负瀛楀吀鍚嶇О
-                Object importanceFlagCodeListObj = data.get("importanceFlagCodeList");
-                if (importanceFlagCodeListObj instanceof List) {
-                    List<?> importanceFlagCodeList = (List<?>) importanceFlagCodeListObj;
-                    // 杩囨护鎺� null 鍊�
-                    List<String> nonNullList = importanceFlagCodeList.stream().filter(Objects::nonNull).map(Object::toString).filter(StringUtils::isNotEmpty).collect(Collectors.toList());
-
-                    if (!nonNullList.isEmpty()) {
-                        String importanceFlagLabel;
-                        if (nonNullList.size() == 1) {
-                            // 鍙湁涓�涓�硷紝鐩存帴閫氳繃鏋氫妇鑾峰彇鎻忚堪
-                            importanceFlagLabel = ImportFlagEnum.getDescByCode(nonNullList.get(0));
-                        } else {
-                            // 澶氫釜鍊硷紝鐢ㄩ�楀彿鎷兼帴鏋氫妇鎻忚堪
-                            StringBuilder labelBuilder = new StringBuilder();
-                            for (String code : nonNullList) {
-                                String label = ImportFlagEnum.getDescByCode(code);
-                                if (StringUtils.isNotEmpty(label)) {
-                                    labelBuilder.append(label).append(",");
-                                }
-                            }
-                            importanceFlagLabel = StringUtils.stripEnd(labelBuilder.toString(), ",");
-                        }
-
-                        if (StringUtils.isNotEmpty(importanceFlagLabel)) {
-                            applyInfo.put("importanceFlagCode", importanceFlagLabel);
-                        }
-                    }
-                }
-                //绱ф�ョ▼搴︾紪鐮侊紝閫氳繃鏋氫妇杞崲鎻忚堪
-                Object emergencyLevelCodeObj = data.get("emergencyLevelCode");
-                if (emergencyLevelCodeObj != null) {
-                    String emergencyLevelLabel = EmergencyLevelEnum.getDescByCode(emergencyLevelCodeObj.toString());
-                    if (StringUtils.isNotEmpty(emergencyLevelLabel)) {
-                        applyInfo.put("emergencyLevelCode", emergencyLevelLabel);
-                    }
-                }
-            } else {
-                log.error("銆恏ospitalizedApply銆戞帴鍙h繑鍥瀌ata涓嶆槸瀵硅薄锛宎pplyId={}锛宺esult锛歿}", encounterSourceId, result);
-            }
-        } catch (Exception e) {
-            log.error("銆恏ospitalizedApply銆戣В鏋愬叆闄㈢敵璇峰崟璇︽儏澶辫触锛宎pplyId={}", encounterSourceId, e);
-        }
-        log.info("銆恏ospitalizedApply銆慳pplyId={}锛宨mportanceFlagCode={}锛宔mergencyLevelCode={}", encounterSourceId, applyInfo.get("importanceFlagCode"), applyInfo.get("emergencyLevelCode"));
-        return applyInfo;
-    }
-
-    /**
-     * 澶勭悊鎮h�呮。妗堬紙鏂板鎴栨洿鏂帮級
-     * 浣跨敤 Redis 鍒嗗竷寮忛攣闃叉骞跺彂閲嶅鎻掑叆
-     */
-    private PatArchive processPatientArchive(ServiceSLTDInhospResDTO dto) {
-        // 鏋勫缓閿佺殑 key锛氬熀浜� patientno 鎴� idcardno
-        String lockKey = "pat_archive_lock:" + (StringUtils.isNotEmpty(dto.getMedicalRecordNo()) ? dto.getMedicalRecordNo() : dto.getIdCardNo());
-
-        // 灏濊瘯鑾峰彇鍒嗗竷寮忛攣锛屾渶澶氱瓑寰� 3 绉掞紝閿佸畾 10 绉掕嚜鍔ㄩ噴鏀�
-        Boolean lockAcquired = redisTemplate.opsForValue().setIfAbsent(lockKey, "1", 10, TimeUnit.SECONDS);
-
-        if (lockAcquired == null || !lockAcquired) {
-            log.warn("銆恜rocessPatientArchive銆戣幏鍙栧垎甯冨紡閿佸け璐ワ紝璺宠繃鏈澶勭悊锛堝叾浠栫嚎绋嬫鍦ㄥ鐞嗭級锛宲atientno={}", dto.getMedicalRecordNo());
-            // 绛夊緟涓�娈垫椂闂村悗閲嶈瘯鏌ヨ
-            try {
-                Thread.sleep(500);
-            } catch (InterruptedException e) {
-                Thread.currentThread().interrupt();
-            }
-        }
-
-        try {
-            return doProcessPatientArchive(dto);
-        } finally {
-            // 閲婃斁閿�
-            if (lockAcquired != null && lockAcquired) {
-                redisTemplate.delete(lockKey);
-            }
-        }
-    }
-
-    /**
-     * 瀹為檯鎵ц鎮h�呮。妗堝鐞嗛�昏緫
-     */
-    private PatArchive doProcessPatientArchive(ServiceSLTDInhospResDTO dto) {
-        List<PatArchive> existingArchives = null;
-        log.info("銆恜rocessPatientArchive銆戞柊澧炴偅鑰呮。妗堬紝鏌ヨ鍏ュ弬淇℃伅patientno:{}锛宨dcardno:{}", dto.getMedicalRecordNo(), dto.getIdCardNo());
-        // 绗竴姝ワ細鎸� patientno 绮剧‘鏌ラ噸锛堜笌鎻掑叆鏃朵娇鐢ㄧ殑 medicalRecordNo 涓�鑷达級
-        String patientno = StringUtils.isEmpty(dto.getMedicalRecordNo()) ? null : dto.getMedicalRecordNo();
-        if (StringUtils.isNotEmpty(patientno)) {
-            PatArchive queryByPatientNo = new PatArchive();
-            queryByPatientNo.setPatientno(patientno);
-            existingArchives = patArchiveService.selectPatArchiveList(queryByPatientNo);
-            log.debug("銆恜rocessPatientArchive銆戞寜patientno鏌ヨ锛宲atientno={}, 缁撴灉鏁伴噺={}", patientno, existingArchives.size());
-        }
-
-        // 绗簩姝ワ細鎸� patientno 鏌ヤ笉鍒版椂锛屾寜 idcardno 鏌ラ噸锛堝垎姝R锛岄伩鍏岮ND鏉′欢婕忔煡锛�
-        if (CollectionUtils.isEmpty(existingArchives) && StringUtils.isNotEmpty(dto.getIdCardNo())) {
-            PatArchive queryByIdCard = new PatArchive();
-            queryByIdCard.setIdcardno(dto.getIdCardNo().trim());
-            existingArchives = patArchiveService.selectPatArchiveList(queryByIdCard);
-            log.debug("銆恜rocessPatientArchive銆戞寜idcardno鏌ヨ锛宨dcardno={}, 缁撴灉鏁伴噺={}", dto.getIdCardNo(), existingArchives.size());
-        }
-
-        PatArchive patArchive = buildPatientArchive(dto);
-        log.info("銆恜rocessPatientArchive銆戞偅鑰呮。妗堟煡閲嶅畬鎴愶紝patientno={}, 鏄惁宸插瓨鍦�={}", patArchive.getPatientno(), CollectionUtils.isEmpty(existingArchives) ? "鍚�" : "鏄�(id=" + existingArchives.get(0).getId() + ")");
-
-        if (CollectionUtils.isEmpty(existingArchives)) {
-            try {
-                // 鏈�缁堢‘璁ゆ煡璇紙闃插尽鎬х紪绋嬶細闃叉Redis閿佸け鏁堢瓑鏋佺鎯呭喌锛�
-                PatArchive finalQuery = new PatArchive();
-                if (StringUtils.isNotEmpty(dto.getIdCardNo())) {
-                    finalQuery.setIdcardno(dto.getIdCardNo().trim());
-                }
-                if (StringUtils.isNotEmpty(dto.getMedicalRecordNo())) {
-                    finalQuery.setPatientno(dto.getMedicalRecordNo());
-                }
-
-                List<PatArchive> finalCheck = patArchiveService.selectPatArchiveList(finalQuery);
-                log.info("銆恜rocessPatientArchive銆戞渶缁堢‘璁ゆ煡璇紝patientno={}, idcardno={}, 缁撴灉鏁伴噺={}", dto.getMedicalRecordNo(), dto.getIdCardNo(), finalCheck.size());
-
-                if (CollectionUtils.isEmpty(finalCheck)) {
-                    patArchiveService.insertPatArchive(patArchive);
-                    log.info("銆恜rocessPatientArchive銆戔湏 鏂板鎮h�呮。妗堟垚鍔燂紝patientno={}, id={}", patArchive.getPatientno(), patArchive.getId());
-                } else {
-                    // 鍏朵粬绾跨▼宸茬粡鎻掑叆锛岀洿鎺ヤ娇鐢ㄥ凡鏈夎褰�
-                    existingArchives = finalCheck;
-                    patArchive.setId(existingArchives.get(0).getId());
-                    patArchive.setNotrequiredFlag(existingArchives.get(0).getNotrequiredFlag());
-                    patArchive.setNotrequiredreason(existingArchives.get(0).getNotrequiredreason());
-                    log.info("銆恜rocessPatientArchive銆戞。妗堝凡琚叾浠栫嚎绋嬪垱寤猴紝浣跨敤宸叉湁璁板綍锛宨d={}", patArchive.getId());
-                }
-            } catch (org.springframework.dao.DuplicateKeyException e) {
-                log.warn("銆恜rocessPatientArchive銆戞偅鑰呮。妗堝凡瀛樺湪(骞跺彂鎻掑叆寮傚父)锛岃烦杩囷細patientno={}, idcardno={}", patArchive.getPatientno(), patArchive.getIdcardno());
-                // 骞跺彂鎻掑叆鍦烘櫙锛岄噸鏂版煡璇㈣幏鍙栧凡瀛樺湪鐨勮褰�
-                PatArchive queryRetry = new PatArchive();
-                queryRetry.setPatientno(patArchive.getPatientno());
-                if (StringUtils.isNotEmpty(patArchive.getIdcardno())) {
-                    queryRetry.setIdcardno(patArchive.getIdcardno());
-                }
-                existingArchives = patArchiveService.selectPatArchiveList(queryRetry);
-                if (CollectionUtils.isNotEmpty(existingArchives)) {
-                    patArchive.setId(existingArchives.get(0).getId());
-                    patArchive.setNotrequiredFlag(existingArchives.get(0).getNotrequiredFlag());
-                    patArchive.setNotrequiredreason(existingArchives.get(0).getNotrequiredreason());
-                    log.info("銆恜rocessPatientArchive銆戜粠寮傚父鎭㈠锛岃幏鍙栧凡鏈夋。妗堬紝id={}", patArchive.getId());
-                }
-            }
-        } else {
-            patArchive.setId(existingArchives.get(0).getId());
-            patArchive.setNotrequiredFlag(existingArchives.get(0).getNotrequiredFlag());
-            patArchive.setNotrequiredreason(existingArchives.get(0).getNotrequiredreason());
-            patArchiveService.updateArchive(patArchive);
-            log.info("銆恜rocessPatientArchive銆戔湏 鏇存柊鎮h�呮。妗堬紝patientno={}, id={}", patArchive.getPatientno(), patArchive.getId());
-        }
-
-        return patArchive;
-    }
-
-    private PatArchive buildPatientArchive(ServiceSLTDInhospResDTO dto) {
-        PatArchive patArchive = new PatArchive();
-        patArchive.setPatientno(StringUtils.isEmpty(dto.getMedicalRecordNo()) ? null : dto.getMedicalRecordNo());
-        patArchive.setPatidHis(dto.getPatientId() == null ? null : String.valueOf(dto.getPatientId()));
-        patArchive.setIdcardno(StringUtils.isEmpty(dto.getIdCardNo()) ? "" + dto.getMedicalCardId() : dto.getIdCardNo().trim());
-        patArchive.setName(dto.getPatientName());
-        patArchive.setSourcefrom(2L);
-        patArchive.setPattype("2");
-        patArchive.setSex("鐢�".equals(dto.getGender()) ? 1L : 2L);
-        patArchive.setNation(dto.getNation());
-        patArchive.setNativePlace(dto.getNativePlace());
-        patArchive.setPlaceOfResidence(dto.getAddress());
-        patArchive.setBirthdate(parseDate(dto.getBirthday()));
-        patArchive.setTelcode(dto.getPhone());
-        if (CollectionUtils.isNotEmpty(dto.getResidentContactInfos())) {
-            patArchive.setRelativetelcode(dto.getResidentContactInfos().get(0).getTelecom());
-        }
-        patArchive.setDelFlag("0");
-        patArchive.setCreateTime(new Date());
-        patArchive.setUpdateTime(new Date());
-        patArchive.setOrgid("" + dto.getOrgId());
-        patArchive.setCampusid(dto.getCampusId());
-        return patArchive;
-    }
-
-    private ServiceSLTDInhospResDTO convertToDTO(Map<String, Object> dataItem) {
-        ServiceSLTDInhospResDTO dto = new ServiceSLTDInhospResDTO();
-        dto.setOrgId(getStringValue(dataItem, "orgId"));
-        dto.setCampusId(getStringValue(dataItem, "campusId"));
-        dto.setHealthcareRecordId(getLongValue(dataItem, "healthcareRecordId"));
-        dto.setHealthcareRecordNo(getStringValue(dataItem, "healthcareRecordNo"));
-        dto.setPatientId(getLongValue(dataItem, "patientId"));
-        dto.setPatientName(getStringValue(dataItem, "patientName"));
-        dto.setPinyin(getStringValue(dataItem, "pinyin"));
-        dto.setNation(getStringValue(dataItem, "nation"));
-        dto.setIdCardNo(getStringValue(dataItem, "idCardNo"));
-        dto.setHealthcareRecordTimes(getIntegerValue(dataItem, "healthcareRecordTimes"));
-        dto.setHospitalizationNumber(getIntegerValue(dataItem, "hospitalizationNumber"));
-        dto.setMedicalCardId(getLongValue(dataItem, "medicalCardId"));
-        dto.setMedicalCardType(getStringValue(dataItem, "medicalCardType"));
-        dto.setMedicalCardTypeName(getStringValue(dataItem, "medicalCardTypeName"));
-        dto.setMedicalCardNo(getStringValue(dataItem, "medicalCardNo"));
-        dto.setMedicalRecordNo(getStringValue(dataItem, "medicalRecordNo"));
-        dto.setGender(getStringValue(dataItem, "gender"));
-        dto.setGenderCode(getStringValue(dataItem, "genderCode"));
-        dto.setAge(getStringValue(dataItem, "age"));
-        dto.setBirthday(getStringValue(dataItem, "birthday"));
-        dto.setPhone(getStringValue(dataItem, "phone"));
-        dto.setEducation(getStringValue(dataItem, "education"));
-        dto.setEducationCode(getStringValue(dataItem, "educationCode"));
-        dto.setNeonatal(getBooleanValue(dataItem, "neonatal"));
-        dto.setMarriage(getStringValue(dataItem, "marriage"));
-        dto.setMarriageCode(getStringValue(dataItem, "marriageCode"));
-        dto.setOccupationType(getStringValue(dataItem, "occupationType"));
-        dto.setOccupationTypeCode(getStringValue(dataItem, "occupationTypeCode"));
-        dto.setNativePlace(getStringValue(dataItem, "nativePlace"));
-        dto.setAreaId(getLongValue(dataItem, "areaId"));
-        dto.setAreaName(getStringValue(dataItem, "areaName"));
-        dto.setRoomId(getLongValue(dataItem, "roomId"));
-        dto.setRoomNumber(getStringValue(dataItem, "roomNumber"));
-        dto.setBedId(getLongValue(dataItem, "bedId"));
-        dto.setBedNumber(getStringValue(dataItem, "bedNumber"));
-        dto.setEncounterTime(getStringValue(dataItem, "encounterTime"));
-        dto.setStartTime(getStringValue(dataItem, "startTime"));
-        dto.setPreOutHospitalDate(getStringValue(dataItem, "preOutHospitalDate"));
-        dto.setLastEncounterTime(getStringValue(dataItem, "lastEncounterTime"));
-        dto.setDiagnosisCode(getStringValue(dataItem, "diagnosisCode"));
-        dto.setDiagnosisName(getStringValue(dataItem, "diagnosisName"));
-        dto.setHealthcareRecordStatus(getStringValue(dataItem, "healthcareRecordStatus"));
-        dto.setHealthcareType(getStringValue(dataItem, "healthcareType"));
-        dto.setDeptId(getLongValue(dataItem, "deptId"));
-        dto.setDeptName(getStringValue(dataItem, "deptName"));
-        dto.setDoctorId(getLongValue(dataItem, "doctorId"));
-        dto.setDoctorName(getStringValue(dataItem, "doctorName"));
-        dto.setHealthcarePeriodId(getLongValue(dataItem, "healthcarePeriodId"));
-        dto.setChiefNurseId(getLongValue(dataItem, "chiefNurseId"));
-        dto.setChiefNurseName(getStringValue(dataItem, "chiefNurseName"));
-        dto.setCostCategoryName(getStringValue(dataItem, "costCategoryName"));
-        dto.setCostCategoryCode(getStringValue(dataItem, "costCategoryCode"));
-        dto.setCostNatureName(getStringValue(dataItem, "costNatureName"));
-        dto.setCostNatureCode(getStringValue(dataItem, "costNatureCode"));
-        dto.setEncounterSourceId(getStringValue(dataItem, "encounterSourceId"));
-        dto.setFurtherConsultationStatus(getIntegerValue(dataItem, "furtherConsultationStatus"));
-        Object mainDiagObj = dataItem.get("mainDischargeDiagnosis");
-        if (mainDiagObj instanceof Map) {
-            Map<String, Object> mainDiagMap = (Map<String, Object>) mainDiagObj;
-            ServiceSLTDDiagnosisResDTO mainDiag = new ServiceSLTDDiagnosisResDTO();
-            mainDiag.setDiagnosisDictCode(getStringValue(mainDiagMap, "diagnosisDictCode"));
-            mainDiag.setDiagnosisDictName(getStringValue(mainDiagMap, "diagnosisDictName"));
-            mainDiag.setDiagnosisCategory(getStringValue(mainDiagMap, "diagnosisCategory"));
-            mainDiag.setRecordType(getIntegerValue(mainDiagMap, "recordType"));
-            mainDiag.setIsMainDiagnosis(getIntegerValue(mainDiagMap, "isMainDiagnosis"));
-            dto.setMainDischargeDiagnosis(mainDiag);
-        }
-        Object contactsObj = dataItem.get("residentContactInfos");
-        if (contactsObj instanceof List) {
-            dto.setResidentContactInfos(parseContacts((List<?>) contactsObj));
-        }
-
-        Object diagnosisObj = dataItem.get("diagnosisList");
-        if (diagnosisObj instanceof List) {
-            dto.setDiagnosisList(parseDiagnosis((List<?>) diagnosisObj));
-        }
-
-        return dto;
-    }
-
-    private MedicationItem convertToMedication(Map<String, Object> dataItem) {
-        MedicationItem dto = new MedicationItem();
-        dto.setOrgId(getLongValue(dataItem, "orgId"));
-        dto.setIdentificationCode(getStringValue(dataItem, "identificationCode"));
-        dto.setWbm(getStringValue(dataItem, "wbm"));
-        dto.setMedicationCommonName(getStringValue(dataItem, "medicationCommonName"));
-        dto.setManufacturerName(getStringValue(dataItem, "manufacturerName"));
-        dto.setItemCode(getStringValue(dataItem, "itemCode"));
-        dto.setSmallLargePackageRatio(getLongValue(dataItem, "smallLargePackageRatio"));
-        dto.setRemark(getStringValue(dataItem, "remark"));
-        dto.setItemName(getStringValue(dataItem, "itemName"));
-        dto.setMedicationType(getStringValue(dataItem, "medicationType"));
-        Object mainDiagObj = dataItem.get("doseInfoList");
-        List<MedicationDoseInfo> doseInfoList = new ArrayList<>();
-        if (mainDiagObj instanceof List) {
-            List<Map<String, Object>> mainDiagList = (List<Map<String, Object>>) mainDiagObj;
-            for (Map<String, Object> mainDiagMap : mainDiagList) {
-                MedicationDoseInfo medicationDoseInfo = new MedicationDoseInfo();
-                medicationDoseInfo.setDoseSmallPackageRation(getBigDecimalValue(mainDiagMap, "doseSmallPackageRation"));
-                medicationDoseInfo.setDose(getLongValue(mainDiagMap, "dose"));
-                medicationDoseInfo.setDoseSmallPackageNum(getLongValue(mainDiagMap, "doseSmallPackageNum"));
-                medicationDoseInfo.setDoseUnit(getStringValue(mainDiagMap, "doseUnit"));
-                medicationDoseInfo.setDoseUnitType(getLongValue(mainDiagMap, "doseUnitType"));
-                doseInfoList.add(medicationDoseInfo);
-            }
-        }
-        dto.setDoseInfoList(doseInfoList);
-        dto.setAntimicrobialGradeCode(getStringValue(dataItem, "antimicrobialGradeCode"));
-        dto.setLicenseNumber(getStringValue(dataItem, "licenseNumber"));
-        dto.setDefaultUsageName(getStringValue(dataItem, "defaultUsageName"));
-        dto.setSpecialDrugsName(getStringValue(dataItem, "specialDrugsName"));
-        dto.setAntimicrobialGradeName(getStringValue(dataItem, "antimicrobialGradeName"));
-        dto.setCommonPinyin(getStringValue(dataItem, "commonPinyin"));
-        dto.setCommonWbm(getStringValue(dataItem, "commonWbm"));
-        dto.setManufacturerId(getLongValue(dataItem, "manufacturerId"));
-        dto.setDefaultUsageId(getLongValue(dataItem, "defaultUsageId"));
-        dto.setSpecification(getStringValue(dataItem, "specification"));
-        dto.setSmallPackageUnit(getStringValue(dataItem, "smallPackageUnit"));
-        dto.setItemId(getLongValue(dataItem, "itemId"));
-        dto.setSpecialDrugsCode(getStringValue(dataItem, "specialDrugsCode"));
-        dto.setPinyin(getStringValue(dataItem, "pinyin"));
-        dto.setDoseFormName(getStringValue(dataItem, "doseFormName"));
-        dto.setLargePackageUnit(getStringValue(dataItem, "largePackageUnit"));
-        dto.setRetailPrice(getBigDecimalValue(dataItem, "retailPrice"));
-        dto.setStatus(getLongValue(dataItem, "status"));
-        return dto;
-    }
-
-
-    private List<ServiceSLTDContactsResDTO> parseContacts(List<?> contactsList) {
-        List<ServiceSLTDContactsResDTO> contacts = new ArrayList<>();
-        for (Object contactObj : contactsList) {
-            if (contactObj instanceof Map) {
-                Map<String, Object> contactMap = (Map<String, Object>) contactObj;
-                ServiceSLTDContactsResDTO contact = new ServiceSLTDContactsResDTO();
-                contact.setName(getStringValue(contactMap, "name"));
-                contact.setRelationshipCode(getStringValue(contactMap, "relationshipCode"));
-                contact.setRelationship(getStringValue(contactMap, "relationship"));
-                contact.setTelecom(getStringValue(contactMap, "telecom"));
-                contact.setCurrentAddress(getStringValue(contactMap, "currentAddress"));
-                contacts.add(contact);
-            }
-        }
-        return contacts;
-    }
-
-    private List<ServiceSLTDDiagnosisResDTO> parseDiagnosis(List<?> diagnosisList) {
-        List<ServiceSLTDDiagnosisResDTO> diagnosis = new ArrayList<>();
-        for (Object diagnosisObj : diagnosisList) {
-            if (diagnosisObj instanceof Map) {
-                Map<String, Object> diagnosisMap = (Map<String, Object>) diagnosisObj;
-                ServiceSLTDDiagnosisResDTO diag = new ServiceSLTDDiagnosisResDTO();
-                diag.setDiagnosisDictCode(getStringValue(diagnosisMap, "diagnosisDictCode"));
-                diag.setDiagnosisDictName(getStringValue(diagnosisMap, "diagnosisDictName"));
-                diag.setDiagnosisCategory(getStringValue(diagnosisMap, "diagnosisCategory"));
-                diag.setRecordType(getIntegerValue(diagnosisMap, "recordType"));
-                diag.setIsMainDiagnosis(getIntegerValue(diagnosisMap, "isMainDiagnosis"));
-                diagnosis.add(diag);
-            }
-        }
-        return diagnosis;
-    }
-
-    private String getStringValue(Map<String, Object> map, String key) {
-        Object value = map.get(key);
-        if (value == null) {
-            return null;
-        }
-
-        // 鍙鐞嗘暟瀛楃被鍨嬶紝閬垮厤绉戝璁℃暟娉�
-        return value instanceof Number ? new BigDecimal(value.toString()).toPlainString() : value.toString();
-    }
-
-    private BigDecimal getBigDecimalValue(Map<String, Object> map, String key) {
-        Object value = map.get(key);
-        if (value == null) {
-            return null;
-        }
-
-        // 鍙鐞嗘暟瀛楃被鍨嬶紝閬垮厤绉戝璁℃暟娉�
-        return new BigDecimal(value.toString());
-    }
-
-    private Long getLongValue(Map<String, Object> map, String key) {
-        Object value = map.get(key);
-        if (value == null) return null;
-        if (value instanceof Number) {
-            return ((Number) value).longValue();
-        }
-        try {
-            return Long.parseLong(value.toString());
-        } catch (NumberFormatException e) {
-            return null;
-        }
-    }
-
-    private Integer getIntegerValue(Map<String, Object> map, String key) {
-        Object value = map.get(key);
-        if (value == null) return null;
-        if (value instanceof Number) {
-            return ((Number) value).intValue();
-        }
-        try {
-            return Integer.parseInt(value.toString());
-        } catch (NumberFormatException e) {
-            return null;
-        }
-    }
-
-    private Boolean getBooleanValue(Map<String, Object> map, String key) {
-        Object value = map.get(key);
-        if (value == null) return null;
-        if (value instanceof Boolean) {
-            return (Boolean) value;
-        }
-        return Boolean.parseBoolean(value.toString());
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
index 19130e6..b8368b4 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskAnswerServiceImpl.java
@@ -63,6 +63,8 @@
 import com.ruoyi.task.service.IServiceSubtaskDetailTraceService;
 import com.ruoyi.task.domain.ServiceSubtaskPreachform;
 import com.ruoyi.task.service.IServiceTaskService;
+import com.ruoyi.task.mapper.ServiceSubtaskPreachformMapper;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
 /**
  * 浠诲姟闂嵎闂閫夐」Service涓氬姟灞傚鐞�
  *
@@ -920,7 +922,8 @@
         Map<String, Object> map = new HashMap<>();
         if (serviceSubTaskQueryReq.getSubId() != null) {
             ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubTaskQueryReq.getSubId());
-            if (serviceSubtask.getSendstate() == 4L) {
+            // 浠诲姟鍙兘宸茶鍒犻櫎/鏌ヤ笉鍒帮紝sendstate 涔熷彲鑳戒负绌猴紝杩欓噷蹇呴』鍒ょ┖锛屽惁鍒欐媶绠变細 NPE
+            if (serviceSubtask != null && Long.valueOf(4L).equals(serviceSubtask.getSendstate())) {
                 log.info("鎮h�呭瓙浠诲姟ID涓猴細{}锛岀姸鎬佷负锛歿}", serviceSubTaskQueryReq.getSubId(), serviceSubtask.getSendstate());
                 throw new BaseException("璇ヤ换鍔′笉鎵ц");
             }
@@ -933,7 +936,7 @@
         //鑾峰彇涓婃鐨勯棶绛旂粨鏋�
         ServiceSubtask serviceSubtask = serviceSubtaskMapper.selectServiceSubtaskById(serviceSubTaskQueryReq.getSubId());
         map.put("upScriptResult", null);
-        map.put("templateName", serviceSubtask.getTemplatename());
+        map.put("templateName", serviceSubtask == null ? null : serviceSubtask.getTemplatename());
         map.put("upTaskName", null);
         if (ObjectUtils.isNotEmpty(serviceSubtask) && serviceSubtask.getUpid() != null) {
             Map<String, Object> scriptInfoByCondition2 = serviceTaskService.getScriptInfoByCondition(serviceSubTaskQueryReq.getTaskid(), serviceSubTaskQueryReq.getPatid(), serviceSubTaskQueryReq.getIsFinish(), serviceSubTaskQueryReq.getPatfrom(), serviceSubTaskQueryReq.getSubId());
@@ -951,7 +954,7 @@
     private Map<String, Object> getMap(Map<String, Object> scriptInfoByCondition, Long subid, Long patid) {
         Map<String, Object> map = new HashMap<>();
         if (ObjectUtils.isNotEmpty(scriptInfoByCondition) && ObjectUtils.isNotEmpty(scriptInfoByCondition.get("script"))) {
-            if (scriptInfoByCondition.get("type").equals("1")) {
+            if ("1".equals(scriptInfoByCondition.get("type"))) {
                 List<IvrTaskTemplateScriptVO> ivrTaskTemplateScriptVOS = (List<IvrTaskTemplateScriptVO>) scriptInfoByCondition.get("script");
                 // 鎵归噺鏌ヨ鎵�鏈夋槑缁嗭紝閬垮厤寰幆涓�愭潯鏌ユ暟鎹簱锛圢+1闂浼樺寲锛�
                 Map<Long, ServiceSubtaskDetail> detailMap = getScriptResultMap(subid, patid);
@@ -964,7 +967,7 @@
                 }
                 map.put("scriptResult", ivrTaskTemplateScriptVOS);
                 map.put("taskName", scriptInfoByCondition.get("taskName"));
-            } else if (scriptInfoByCondition.get("type").equals("2")) {
+            } else if ("2".equals(scriptInfoByCondition.get("type"))) {
                 List<SvyTaskTemplateScriptVO> svyTaskTemplateScriptVOList = (List) scriptInfoByCondition.get("script");
                 // 鎵归噺鏌ヨ鎵�鏈夋槑缁嗭紝閬垮厤寰幆涓�愭潯鏌ユ暟鎹簱锛圢+1闂浼樺寲锛�
                 Map<Long, ServiceSubtaskDetail> detailMap = getScriptResultMap(subid, patid);
@@ -980,7 +983,7 @@
                 }
                 map.put("scriptResult", svyTaskTemplateScriptVOList);
                 map.put("taskName", scriptInfoByCondition.get("taskName"));
-            } else if (scriptInfoByCondition.get("type").equals("3")) {
+            } else if ("3".equals(scriptInfoByCondition.get("type"))) {
                 //瀹f暀涓嶉渶瑕佹煡鐪�
                 List<HeLibrary> heLibraryList = (List) scriptInfoByCondition.get("script");
                 map.put("scriptResult", heLibraryList);
@@ -1220,6 +1223,8 @@
             //闈炴弧鎰忓害鎰忚寮傚父鑷姩濉叆绌�
             subtaskDetailTrace.setMatchedtext(stt != null ? stt.getOptioncontent() : svyTaskTemplateScriptVO.getIsMydException());
             subtaskDetailTrace.setAsrtext(stt != null ? stt.getOptioncontent() : svyTaskTemplateScriptVO.getIsMydException());
+            //琛ュ厖鎻忚堪锛堥�変簡"鍏朵粬/鏈夌棁鐘�"鏃跺~鐨勬枃瀛楋級涓�骞跺甫鍒� trace 琛�
+            subtaskDetailTrace.setAnswerps(serviceSubtaskDetail.getAnswerps());
             subtaskDetailTrace.setIsMydException(svyTaskTemplateScriptVO.getIsMydException());
 
             subtaskDetailTrace.setRecordpath(null);
@@ -1513,6 +1518,8 @@
             subtaskDetailTrace.setType(ivrLibaScriptAssort != null ? ivrLibaScriptAssort.getType() : null);
             subtaskDetailTrace.setScriptid(ivrTaskTemplateScriptVO.getId() == null ? ivrTaskTemplateScriptVO.getScriptID() : ivrTaskTemplateScriptVO.getId());
             subtaskDetailTrace.setAsrtext(ivrTaskTemplateScriptVO.getIvrtext());
+            //琛ュ厖鎻忚堪涓�骞跺甫鍒� trace 琛�
+            subtaskDetailTrace.setAnswerps(serviceSubtaskDetail.getAnswerps());
             subtaskDetailTrace.setRecordpath(null);
             subtaskDetailTrace.setPatid(selectServiceSubtaskList.get(0).getPatid());
             JSONObject patdescJson2 = new JSONObject();
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskRecordServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskRecordServiceImpl.java
deleted file mode 100644
index b63805f..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceSubtaskRecordServiceImpl.java
+++ /dev/null
@@ -1,102 +0,0 @@
-package com.smartor.service.impl;
-
-import com.ruoyi.common.utils.DateUtils;
-import com.smartor.mapper.ServiceSubtaskRecordMapper;
-import com.smartor.service.IServiceSubtaskRecordService;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.stereotype.Service;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Map;
-import java.util.stream.Collectors;
-import com.ruoyi.task.domain.ServiceSubtaskRecord;
-
-/**
- * 銆愯濉啓鍔熻兘鍚嶇О銆慡ervice涓氬姟灞傚鐞�
- *
- * @author ruoyi
- * @date 2024-07-01
- */
-@Service
-public class ServiceSubtaskRecordServiceImpl implements IServiceSubtaskRecordService {
-    @Autowired
-    private ServiceSubtaskRecordMapper serviceSubtaskRecordMapper;
-
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆�
-     */
-    @Override
-    public ServiceSubtaskRecord selectServiceSubtaskRecordById(Long id) {
-        return serviceSubtaskRecordMapper.selectServiceSubtaskRecordById(id);
-    }
-
-    /**
-     * 鏌ヨ銆愯濉啓鍔熻兘鍚嶇О銆戝垪琛�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 銆愯濉啓鍔熻兘鍚嶇О銆�
-     */
-    @Override
-    public List<ServiceSubtaskRecord> selectServiceSubtaskRecordList(ServiceSubtaskRecord serviceSubtaskRecord) {
-        return serviceSubtaskRecordMapper.selectServiceSubtaskRecordList(serviceSubtaskRecord);
-    }
-
-    @Override
-    public Map<Long, List<ServiceSubtaskRecord>> selectRecordMapBySubtaskIds(List<Long> subtaskIds) {
-        if (CollectionUtils.isEmpty(subtaskIds)) return new java.util.HashMap<>();
-        List<ServiceSubtaskRecord> all = serviceSubtaskRecordMapper.selectServiceSubtaskRecordBySubtaskIds(subtaskIds);
-        if (CollectionUtils.isEmpty(all)) return new java.util.HashMap<>();
-        return all.stream().collect(Collectors.groupingBy(ServiceSubtaskRecord::getSubtaskId));
-    }
-
-    /**
-     * 鏂板銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    @Override
-    public int insertServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord) {
-        serviceSubtaskRecord.setCreateTime(DateUtils.getNowDate());
-        return serviceSubtaskRecordMapper.insertServiceSubtaskRecord(serviceSubtaskRecord);
-    }
-
-    /**
-     * 淇敼銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param serviceSubtaskRecord 銆愯濉啓鍔熻兘鍚嶇О銆�
-     * @return 缁撴灉
-     */
-    @Override
-    public int updateServiceSubtaskRecord(ServiceSubtaskRecord serviceSubtaskRecord) {
-        serviceSubtaskRecord.setUpdateTime(DateUtils.getNowDate());
-        return serviceSubtaskRecordMapper.updateServiceSubtaskRecord(serviceSubtaskRecord);
-    }
-
-    /**
-     * 鎵归噺鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆�
-     *
-     * @param ids 闇�瑕佸垹闄ょ殑銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteServiceSubtaskRecordByIds(Long[] ids) {
-        return serviceSubtaskRecordMapper.deleteServiceSubtaskRecordByIds(ids);
-    }
-
-    /**
-     * 鍒犻櫎銆愯濉啓鍔熻兘鍚嶇О銆戜俊鎭�
-     *
-     * @param id 銆愯濉啓鍔熻兘鍚嶇О銆戜富閿�
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteServiceSubtaskRecordById(Long id) {
-        return serviceSubtaskRecordMapper.deleteServiceSubtaskRecordById(id);
-    }
-}
diff --git a/smartor/src/main/java/com/smartor/service/impl/ServiceTaskRuleServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/ServiceTaskRuleServiceImpl.java
index 13a40e0..1de2542 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceTaskRuleServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceTaskRuleServiceImpl.java
@@ -82,15 +82,4 @@
         return serviceTaskRuleMapper.deleteServiceTaskRuleByIds(ids);
     }
 
-    /**
-     * 鍒犻櫎浠诲姟鎵ц瑙勫垯淇℃伅
-     * 
-     * @param id 浠诲姟鎵ц瑙勫垯涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteServiceTaskRuleById(Long id)
-    {
-        return serviceTaskRuleMapper.deleteServiceTaskRuleById(id);
-    }
 }
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java
index 6496e4d..3947ded 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyLibTemplateScriptServiceImpl.java
@@ -102,18 +102,6 @@
         return svyLibTemplateScriptMapper.deleteSvyLibTemplateScriptByTopicids(topicids);
     }
 
-    /**
-     * 鍒犻櫎妯℃澘闂嵎棰樼洰淇℃伅
-     *
-     * @param topicid 妯℃澘闂嵎棰樼洰涓婚敭
-     * @return 缁撴灉
-     */
-    @Override
-    public int deleteSvyLibTemplateScriptByTopicid(Long topicid)
-    {
-        return svyLibTemplateScriptMapper.deleteSvyLibTemplateScriptByTopicid(topicid);
-    }
-
     public Map<Long, ServiceSubtaskScriptCount> countPatByScript(ServiceSubtaskCountReq serviceSubtaskCountReq)
     {
         Map<Long, ServiceSubtaskScriptCount> result = new HashMap<>();
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTaskServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTaskServiceImpl.java
index d9fd859..0d1e1ef 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyTaskServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskServiceImpl.java
@@ -28,6 +28,7 @@
 import com.smartor.mapper.SvyTaskMapper;
 import com.smartor.mapper.SvyTaskSingleMapper;
 import com.ruoyi.common.core.domain.entity.PatArchive;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
 /**
  * 缁煎悎闂嵎浠诲姟锛堜换鍔★級Service涓氬姟灞傚鐞�
  *
diff --git a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
index bfd0b92..6cc35e7 100644
--- a/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/SvyTaskSingleServiceImpl.java
@@ -13,7 +13,7 @@
 import com.smartor.common.LyraTokenUtil;
 import com.smartor.domain.*;
 import com.smartor.mapper.BaseOrganizationMapper;
-import com.smartor.mapper.PatArchiveMapper;
+import com.ruoyi.patarchive.mapper.PatArchiveMapper;
 import com.smartor.service.ISvyTaskSingleService;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections4.CollectionUtils;
diff --git a/smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java b/smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java
deleted file mode 100644
index 8c74c73..0000000
--- a/smartor/src/main/java/com/smartor/service/impl/XHGatherPatArchiveServiceImpl.java
+++ /dev/null
@@ -1,590 +0,0 @@
-package com.smartor.service.impl;
-
-import com.google.common.reflect.TypeToken;
-import com.google.gson.Gson;
-import com.google.gson.JsonArray;
-import com.google.gson.JsonElement;
-import com.google.gson.JsonObject;
-import com.ruoyi.common.core.domain.entity.SysDept;
-import com.ruoyi.common.core.domain.entity.SysUser;
-import com.ruoyi.common.core.domain.entity.SysUserDept;
-import com.ruoyi.common.core.domain.entity.SysUserRole;
-import com.ruoyi.common.utils.HttpUtil;
-import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.http.HttpUtils;
-import com.ruoyi.message.SendResult;
-import com.ruoyi.message.sms.SmsSendRequest;
-import com.ruoyi.message.sms.SmsSenderFactory;
-import com.ruoyi.system.domain.SysConfig;
-import com.ruoyi.system.mapper.SysConfigMapper;
-import com.smartor.domain.*;
-import com.ruoyi.inhospvisit.domain.PatMedInhosp;
-import com.smartor.mapper.*;
-import com.smartor.service.*;
-import lombok.extern.slf4j.Slf4j;
-import org.apache.commons.collections4.CollectionUtils;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
-import org.springframework.stereotype.Service;
-import org.springframework.transaction.annotation.Transactional;
-
-import java.io.File;
-import java.io.FileWriter;
-import java.lang.reflect.Type;
-import java.net.URLEncoder;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.time.ZoneId;
-import java.time.format.DateTimeFormatter;
-import java.util.*;
-import com.ruoyi.common.core.domain.entity.PatArchive;
-
-/**
- * 鏂板崕鏁版嵁閲囬泦澶勭悊
- *
- * @author smartor
- * @date 2023-03-04
- */
-@Slf4j
-@Service
-public class XHGatherPatArchiveServiceImpl implements IXHGatherPatArchiveService {
-
-    @Value("${hosp_info_url}")
-    private String hospInfoUrl;
-    @Autowired
-    IPatMedInhospService patMedInhospService;
-    @Autowired
-    IPatArchiveService patArchiveService;
-    @Autowired
-    IServiceAppointRecordService iServiceAppointRecordService;
-    @Autowired
-    private SysConfigMapper sysConfigMapper;
-
-    /**
-     * 娑堟伅鍙戦�佹柟宸ュ巶锛堢煭淇�/寰俊鍏紬鍙凤級锛屾浛浠e師鏉ョ洿鎺ユ敞鍏� xhsms* 閰嶇疆 + HttpUtils 鐨勫啓娉�
-     */
-    @Autowired
-    private SmsSenderFactory smsSenderFactory;
-
-
-    /**
-     * 鑾峰彇鎮h�呭嚭鍏ラ櫌淇℃伅
-     *
-     * @param cry       鍑哄叆闄㈢被鍨嬶細0-鍏ラ櫌锛�1-鍑洪櫌
-     * @param startTime 寮�濮嬫椂闂�
-     * @param endTime   缁撴潫鏃堕棿
-     */
-    @Transactional
-    public void getInHospDataGather(String cry, LocalDateTime startTime, LocalDateTime endTime) {
-        String typeName = "0".equals(cry) ? "鍏ラ櫌" : "鍑洪櫌";
-        log.info("銆恎etInHospInfo銆戝紑濮嬭幏鍙杮}鎮h�呬俊鎭紝鏃堕棿鑼冨洿锛歿} ~ {}", typeName, startTime, endTime);
-        long startTimeMillis = System.currentTimeMillis();
-
-        try {
-            // 绗竴姝ワ細鏋勫缓璇锋眰鍙傛暟骞惰皟鐢℉IS鎺ュ彛
-            List<ThiedInhospInfo> thiedInhospInfoList = fetchHisData(cry, startTime, endTime);
-
-            if (CollectionUtils.isEmpty(thiedInhospInfoList)) {
-                log.info("銆恎etInHospInfo銆憑}鎮h�呬俊鎭负绌猴紝璺宠繃澶勭悊", typeName);
-                return;
-            }
-
-            log.info("銆恎etInHospInfo銆戣幏鍙栧埌{}鏉}鎮h�呬俊鎭�", thiedInhospInfoList.size(), typeName);
-
-            // 绗簩姝ワ細淇濆瓨鍘熷鏁版嵁鍒版枃浠讹紙鐢ㄤ簬澶囦唤锛�
-            saveRawDataToFile(cry, thiedInhospInfoList);
-
-            // 绗笁姝ワ細澶勭悊鎮h�呮暟鎹�
-            processPatientData(thiedInhospInfoList, cry);
-
-            long endTimeMillis = System.currentTimeMillis();
-            log.info("銆恎etInHospInfo銆憑}鎮h�呬俊鎭鐞嗗畬鎴愶紝鑰楁椂锛歿}ms", typeName, endTimeMillis - startTimeMillis);
-
-        } catch (Exception e) {
-            log.error("銆恎etInHospInfo銆戣幏鍙杮}鎮h�呬俊鎭紓甯�", typeName, e);
-            throw new RuntimeException("鑾峰彇" + typeName + "鎮h�呬俊鎭け璐�", e);
-        }
-    }
-
-    /**
-     * 鑾峰彇棰勭害鍋滆瘖璁板綍淇℃伅
-     *
-     * @param cry       鍑哄叆闄㈢被鍨嬶細0-鍏ラ櫌锛�1-鍑洪櫌 2,棰勭害璁板綍
-     * @param startTime 寮�濮嬫椂闂�
-     * @param endTime   缁撴潫鏃堕棿
-     */
-    public void getAppointRecordInfo(String cry, LocalDateTime startTime, LocalDateTime endTime) {
-        log.info("銆恎etAppointRecordInfo銆戝紑濮嬭幏鍙栧彇棰勭害鍋滆瘖璁板綍淇℃伅锛屾椂闂磋寖鍥达細{} ~ {}", startTime, endTime);
-        long startTimeMillis = System.currentTimeMillis();
-
-        try {
-            // 绗竴姝ワ細鏋勫缓璇锋眰鍙傛暟骞惰皟鐢℉IS鎺ュ彛
-            List<ServiceAppointRecord> appointRecordFromHIS = getAppointRecordFromHIS(cry, startTime, endTime);
-
-            if (CollectionUtils.isEmpty(appointRecordFromHIS)) {
-                log.info("銆恎etAppointRecordInfo銆戣幏鍙栭绾﹀仠璇婅褰曚俊鎭负绌猴紝璺宠繃澶勭悊");
-                return;
-            }
-            log.info("銆恎etAppointRecordInfo銆戣幏鍙栭绾﹀仠璇婅褰曚俊鎭瘂}鏉�", appointRecordFromHIS.size());
-            SysConfig sysConfig = sysConfigMapper.checkConfigKeyUnique("yytz.sms.template");
-            if (sysConfig != null) {
-                String smsContemt = sysConfig.getConfigValue();
-                // 绗簩姝ワ細澶勭悊鍋滆瘖璁板綍淇℃伅
-                for (ServiceAppointRecord serviceAppointRecord : appointRecordFromHIS) {
-                    String replace = smsContemt.replace("${patFileName}", StringUtils.defaultString(serviceAppointRecord.getPatFileName())).replace("${registTimeRange}", StringUtils.defaultString(serviceAppointRecord.getRegistTimeRange())).replace("${registDeptName}", StringUtils.defaultString(serviceAppointRecord.getRegistDeptName())).replace("${treatDoctName}", StringUtils.defaultString(serviceAppointRecord.getTreatDoctName()));
-                    //鐭俊鍙戦�佸凡鏀跺彛鍒� ruoyi-message 妯″潡锛堟柊鍗庨�氶亾璧拌〃鍗曟ā寮忥紝涓庡師瀹炵幇涓�鑷达級
-                    SendResult sendResult = smsSenderFactory.send("xh",
-                            SmsSendRequest.of(serviceAppointRecord.getPatTel(), replace));
-                    if (sendResult.isOk()) {
-                        log.info("---澶勭悊鍋滆瘖璁板綍淇℃伅鍙戦�佹垚鍔�,鍏ュ弬涓�:{}", sendResult.getRawResponse());
-                        serviceAppointRecord.setSendTime(new Date());
-                        serviceAppointRecord.setSenderName("绯荤粺绠$悊鍛�");
-                        iServiceAppointRecordService.insertServiceAppointRecord(serviceAppointRecord);
-                    } else {
-                        log.info("澶勭悊鍋滆瘖璁板綍淇℃伅鍙戦�佸け璐�");
-                        iServiceAppointRecordService.insertServiceAppointRecord(serviceAppointRecord);
-                    }
-                }
-            }
-            long endTimeMillis = System.currentTimeMillis();
-            log.info("銆恎etAppointRecordInfo銆憑},棰勭害鍋滆瘖璁板綍淇℃伅澶勭悊瀹屾垚锛岃�楁椂锛歿}ms", endTimeMillis - startTimeMillis);
-
-        } catch (Exception e) {
-            log.error("銆恎etAppointRecordInfo銆戣幏鍙栭绾﹀仠璇婅褰曚俊鎭鐞嗗紓甯�", e);
-            throw new RuntimeException("鑾峰彇棰勭害鍋滆瘖璁板綍淇℃伅澶勭悊寮傚父", e);
-        }
-    }
-
-
-    /**
-     * 绗竴姝ワ細璋冪敤HIS鎺ュ彛鑾峰彇鏁版嵁
-     */
-    private List<ThiedInhospInfo> fetchHisData(String cry, LocalDateTime startTime, LocalDateTime endTime) {
-        try {
-            // 鏋勫缓璇锋眰鍙傛暟
-            Map<String, String> requestParams = buildRequestParams(cry, startTime, endTime);
-
-            // 鏋勫缓璇锋眰澶�
-            Map<String, String> headers = buildRequestHeaders(startTime);
-
-            // 鍙戦�丠TTP璇锋眰
-            String result = HttpUtils.sendPostByHeader(hospInfoUrl, new Gson().toJson(requestParams), headers);
-
-            // 瑙f瀽鍝嶅簲鏁版嵁
-            return parseResponseData(result);
-
-        } catch (Exception e) {
-            log.error("銆恌etchHisData銆戣皟鐢℉IS鎺ュ彛寮傚父", e);
-            throw e;
-        }
-    }
-
-
-    private List<ServiceAppointRecord> getAppointRecordFromHIS(String cry, LocalDateTime startTime, LocalDateTime endTime) {
-        try {
-            // 鏋勫缓璇锋眰鍙傛暟
-            Map<String, String> requestParams = buildRequestParams(cry, startTime, endTime);
-
-            // 鏋勫缓璇锋眰澶�
-            Map<String, String> headers = buildRequestHeaders(startTime);
-
-            // 鍙戦�丠TTP璇锋眰
-            log.info("銆恎etAppointRecordFromHIS銆戝彂閫丠TTP璇锋眰锛岃姹傚弬鏁帮細{},璇锋眰鍦板潃锛歿}", new Gson().toJson(requestParams), hospInfoUrl);
-            String result = HttpUtils.sendPostByHeader(hospInfoUrl, new Gson().toJson(requestParams), headers);
-
-            // 瑙f瀽鍝嶅簲鏁版嵁
-            return parseResponseData2(result);
-
-        } catch (Exception e) {
-            log.error("銆恌etchHisData銆戣皟鐢℉IS鎺ュ彛寮傚父", e);
-            throw e;
-        }
-    }
-
-
-    /**
-     * 绗簩姝ワ細淇濆瓨鍘熷鏁版嵁鍒版枃浠�
-     */
-    private void saveRawDataToFile(String cry, List<ThiedInhospInfo> dataList) {
-        try {
-            String typeName = "0".equals(cry) ? "鍏ラ櫌淇℃伅" : "鍑洪櫌淇℃伅";
-            String filename = typeName + "_" + System.currentTimeMillis() + ".json";
-            String filePath = "D:\\public\\HIS鏁版嵁閲囬泦\\" + filename;
-
-            File file = new File(filePath);
-            File parentDir = file.getParentFile();
-            if (!parentDir.exists()) {
-                parentDir.mkdirs();
-            }
-
-            if (!file.exists()) {
-                file.createNewFile();
-            }
-
-            // 灏嗘暟鎹啓鍏ユ枃浠�
-            try (FileWriter writer = new FileWriter(file)) {
-                writer.write(new Gson().toJson(dataList));
-            }
-
-            log.info("銆恠aveRawDataToFile銆戝師濮嬫暟鎹凡淇濆瓨鍒版枃浠讹細{}", filePath);
-
-        } catch (Exception e) {
-            log.error("銆恠aveRawDataToFile銆戜繚瀛樺師濮嬫暟鎹埌鏂囦欢寮傚父", e);
-            // 鏂囦欢淇濆瓨澶辫触涓嶅奖鍝嶄富娴佺▼锛屽彧璁板綍鏃ュ織
-        }
-    }
-
-    /**
-     * 绗笁姝ワ細澶勭悊鎮h�呮暟鎹�
-     */
-    private void processPatientData(List<ThiedInhospInfo> thiedInhospInfoList, String cry) {
-        int successCount = 0;
-        int skipCount = 0;
-        int errorCount = 0;
-
-        for (ThiedInhospInfo thiedInhospInfo : thiedInhospInfoList) {
-            try {
-                if (processSinglePatient(thiedInhospInfo, cry)) {
-                    successCount++;
-                } else {
-                    skipCount++;
-                }
-            } catch (Exception e) {
-                errorCount++;
-                log.error("銆恜rocessPatientData銆戝鐞嗘偅鑰呮暟鎹紓甯革紝鎮h�匢D锛歿}", thiedInhospInfo.getPatiMediaNo(), e);
-            }
-        }
-
-        log.info("銆恜rocessPatientData銆戞偅鑰呮暟鎹鐞嗗畬鎴愶紝鎴愬姛锛歿}锛岃烦杩囷細{}锛屽け璐ワ細{}", successCount, skipCount, errorCount);
-    }
-
-    /**
-     * 鏋勫缓璇锋眰澶�
-     */
-    private Map<String, String> buildRequestHeaders(LocalDateTime startTime) {
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S");
-        Map<String, String> header = new HashMap<>();
-//        header.put("x-hcsb-serviceno", "IS044056");
-        header.put("x-hcsb-serviceno", "IS002347");
-        header.put("x-hcsb-version", "2.0");
-        header.put("x-hcsb-sourcesyscode", "14");
-        header.put("x-hcsb-token", "ArGE2JnHtxG/Zx5nrnGY4eOfMUJGGJokAJHigG1BrCY=");
-        header.put("x-hcsb-msgdate", startTime.format(formatter));
-        return header;
-    }
-
-
-    /**
-     * 鏋勫缓璇锋眰鍙傛暟
-     */
-    private Map<String, String> buildRequestParams(String cry, LocalDateTime startTime, LocalDateTime endTime) {
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S");
-        Map<String, String> req = new HashMap<>();
-
-        if ("1".equals(cry)) {
-            // 鍑洪櫌鍙傛暟
-            req.put("cashStartDate", startTime.format(formatter));
-            req.put("cashEndDate", endTime.format(formatter));
-            req.put("currStatus", "4");
-        } else if ("0".equals(cry)) {
-            // 鍏ラ櫌鍙傛暟
-            req.put("admissStartDate", startTime.format(formatter));
-            req.put("admissEndDate", endTime.format(formatter));
-            req.put("currStatus", "2");
-        } else if ("2".equals(cry)) {
-            // 棰勭害璁板綍鏌ヨ
-            req.put("appointRegistDateBegin", startTime.format(formatter));
-            req.put("appointRegistDateEnd", endTime.format(formatter));
-            // 鎺掔彮鍋滆瘖 锛堥绾︾姸鎬佹爣蹇�(0:宸查绾�  1:宸叉寕鍙�  2:宸查��鍙�  3:宸插氨璇�  -1:鐥呬汉鍙栨秷  -2:鍖婚櫌鍙栨秷  -3:鎺掔彮鍋滆瘖)锛�
-            req.put("scheduleStatusFlag", "-3");
-        }
-
-        return req;
-    }
-
-    /**
-     * 瑙f瀽鍝嶅簲鏁版嵁
-     */
-    private List<ThiedInhospInfo> parseResponseData(String result) {
-        try {
-            Gson gson = new Gson();
-            JsonObject jsonObject = gson.fromJson(result, JsonObject.class);
-
-            // 鏍¢獙data瀛楁鏄惁涓篔sonObject
-            JsonElement dataElement = jsonObject.get("data");
-            if (dataElement == null || !dataElement.isJsonObject()) {
-                log.info("銆恜arseResponseData銆戝搷搴旀暟鎹腑data瀛楁涓虹┖鎴栭潪瀵硅薄绫诲瀷锛屽師濮嬫暟鎹細{}", result);
-                return new ArrayList<>();
-            }
-
-            JsonObject dataObject = dataElement.getAsJsonObject();
-            JsonElement resultElement = dataObject.get("result");
-            if (resultElement == null || !resultElement.isJsonArray()) {
-                log.info("銆恜arseResponseData銆戝搷搴旀暟鎹腑result瀛楁涓虹┖鎴栭潪鏁扮粍绫诲瀷锛屽師濮嬫暟鎹細{}", result);
-                return new ArrayList<>();
-            }
-
-            JsonArray resultArray = resultElement.getAsJsonArray();
-            Type resultType = new TypeToken<List<ThiedInhospInfo>>() {
-            }.getType();
-            return gson.fromJson(resultArray, resultType);
-        } catch (Exception e) {
-            log.error("銆恜arseResponseData銆戣В鏋愬搷搴旀暟鎹紓甯革紝鍘熷鏁版嵁锛歿}", result, e);
-            throw e;
-        }
-    }
-
-    /**
-     * 瑙f瀽鍝嶅簲鏁版嵁
-     */
-    private List<ServiceAppointRecord> parseResponseData2(String result) {
-        try {
-            Gson gson = new Gson();
-            JsonObject jsonObject = gson.fromJson(result, JsonObject.class);
-
-            // 鏍¢獙data瀛楁鏄惁涓篔sonObject
-            JsonElement dataElement = jsonObject.get("data");
-            if (dataElement == null || !dataElement.isJsonObject()) {
-                log.warn("銆恜arseResponseData2銆戝搷搴旀暟鎹腑data瀛楁涓虹┖鎴栭潪瀵硅薄绫诲瀷锛屽師濮嬫暟鎹細{}", result);
-                return new ArrayList<>();
-            }
-
-            JsonObject dataObject = dataElement.getAsJsonObject();
-            JsonElement resultElement = dataObject.get("result");
-            if (resultElement == null || !resultElement.isJsonArray()) {
-                log.warn("銆恜arseResponseData2銆戝搷搴旀暟鎹腑result瀛楁涓虹┖鎴栭潪鏁扮粍绫诲瀷锛屽師濮嬫暟鎹細{}", result);
-                return new ArrayList<>();
-            }
-
-            JsonArray resultArray = resultElement.getAsJsonArray();
-            Type resultType = new TypeToken<List<ServiceAppointRecord>>() {
-            }.getType();
-            return gson.fromJson(resultArray, resultType);
-        } catch (Exception e) {
-            log.error("銆恜arseResponseData2銆戣В鏋愬搷搴旀暟鎹紓甯革紝鍘熷鏁版嵁锛歿}", result, e);
-            throw e;
-        }
-    }
-
-
-    /**
-     * 澶勭悊鍗曚釜鎮h�呮暟鎹�
-     */
-    private boolean processSinglePatient(ThiedInhospInfo thiedInhospInfo, String cry) {
-        // 楠岃瘉韬唤璇佸彿
-        if (StringUtils.isEmpty(thiedInhospInfo.getPatiIdCardNo())) {
-            log.warn("銆恜rocessSinglePatient銆戞偅鑰呰韩浠借瘉鍙蜂负绌猴紝璺宠繃澶勭悊锛屾偅鑰呯紪鍙凤細{}", thiedInhospInfo.getPatiMediaNo());
-            return false;
-        }
-
-        // 澶勭悊鎮h�呮。妗堜俊鎭�
-        PatArchive patArchive = processPatientArchive(thiedInhospInfo, cry);
-
-        // 澶勭悊鎮h�呬綇闄俊鎭�
-        processPatientInhospInfo(thiedInhospInfo, patArchive, cry);
-
-        return true;
-    }
-
-    /**
-     * 澶勭悊鎮h�呮。妗堜俊鎭�
-     */
-    private PatArchive processPatientArchive(ThiedInhospInfo thiedInhospInfo, String cry) {
-        // 鏌ヨ鎮h�呮槸鍚﹀凡瀛樺湪
-        PatArchive queryArchive = new PatArchive();
-        queryArchive.setIdcardno(thiedInhospInfo.getPatiIdCardNo().trim());
-        List<PatArchive> existingArchives = patArchiveService.selectPatArchiveList(queryArchive);
-
-        // 鏋勫缓鎮h�呮。妗堜俊鎭�
-        PatArchive patArchive = buildPatientArchive(thiedInhospInfo, cry);
-
-        // 淇濆瓨鎴栨洿鏂版偅鑰呮。妗�
-        if (CollectionUtils.isEmpty(existingArchives)) {
-            patArchiveService.insertPatArchive(patArchive);
-            log.debug("銆恜rocessPatientArchive銆戞柊澧炴偅鑰呮。妗堬紝鎮h�呯紪鍙凤細{}", patArchive.getPatientno());
-        } else {
-            patArchive.setId(existingArchives.get(0).getId());
-            patArchiveService.updateArchive(patArchive);
-            log.debug("銆恜rocessPatientArchive銆戞洿鏂版偅鑰呮。妗堬紝鎮h�呯紪鍙凤細{}", patArchive.getPatientno());
-        }
-
-        return patArchive;
-    }
-
-    /**
-     * 澶勭悊鎮h�呬綇闄俊鎭�
-     */
-    private void processPatientInhospInfo(ThiedInhospInfo thiedInhospInfo, PatArchive patArchive, String cry) {
-        // 鏋勫缓浣忛櫌淇℃伅
-        PatMedInhosp patMedInhosp = buildPatientInhospInfo(thiedInhospInfo, patArchive, cry);
-
-        // 鏌ヨ鏄惁宸插瓨鍦ㄤ綇闄㈣褰�
-        PatMedInhosp queryInhosp = new PatMedInhosp();
-        queryInhosp.setPatno(patArchive.getPatientno());
-        queryInhosp.setSerialnum(patMedInhosp.getSerialnum());
-        queryInhosp.setCry(Integer.valueOf(cry));
-        List<PatMedInhosp> existingInhosps = patMedInhospService.selectPatMedInhospList(queryInhosp);
-
-        // 淇濆瓨鎴栨洿鏂颁綇闄俊鎭�
-        if (CollectionUtils.isNotEmpty(existingInhosps)) {
-            patMedInhosp.setInhospid(existingInhosps.get(0).getInhospid());
-            patMedInhospService.updatePatMedInhosp(patMedInhosp);
-            log.debug("銆恜rocessPatientInhospInfo銆戞洿鏂颁綇闄俊鎭紝鎮h�呯紪鍙凤細{}锛屾祦姘村彿锛歿}", patArchive.getPatientno(), patMedInhosp.getSerialnum());
-        } else {
-            patMedInhospService.insertPatMedInhosp(patMedInhosp);
-            log.debug("銆恜rocessPatientInhospInfo銆戞柊澧炰綇闄俊鎭紝鎮h�呯紪鍙凤細{}锛屾祦姘村彿锛歿}", patArchive.getPatientno(), patMedInhosp.getSerialnum());
-        }
-    }
-
-
-    /**
-     * 鏋勫缓鎮h�呬綇闄俊鎭�
-     */
-    private PatMedInhosp buildPatientInhospInfo(ThiedInhospInfo thiedInhospInfo, PatArchive patArchive, String cry) {
-        PatMedInhosp patMedInhosp = new PatMedInhosp();
-
-        // 鎮h�呭熀鏈俊鎭�
-        patMedInhosp.setPatid(patArchive.getId());
-        patMedInhosp.setPatno(patArchive.getPatientno());
-        patMedInhosp.setPatname(patArchive.getName());
-
-        // 鎶ょ悊淇℃伅
-        patMedInhosp.setNurseId(thiedInhospInfo.getNurseId());
-        patMedInhosp.setNurseName(thiedInhospInfo.getNurseName());
-
-        // 浣忛櫌淇℃伅
-        patMedInhosp.setSerialnum(thiedInhospInfo.getInpatientId());
-        patMedInhosp.setFuflag("1");
-        if (StringUtils.isNotEmpty(patArchive.getNotrequiredFlag()) && patArchive.getNotrequiredFlag().equals("1"))
-            patMedInhosp.setFuflag("0");
-        patMedInhosp.setInhospstate("0".equals(cry) ? "0" : "1");
-
-        // 鍖婚櫌鍜屽簥浣嶄俊鎭�
-        patMedInhosp.setHospitalcode(thiedInhospInfo.getAreaId());
-        patMedInhosp.setBedNo(thiedInhospInfo.getAdmissBedNo());
-        patMedInhosp.setCry(Integer.valueOf(cry));
-
-
-        // 鏃堕棿淇℃伅
-        if (StringUtils.isNotEmpty(thiedInhospInfo.getAdmissDate())) {
-            try {
-                patMedInhosp.setStarttime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getAdmissDate()));
-            } catch (ParseException e) {
-                log.warn("銆恇uildPatientInhospInfo銆戣В鏋愬叆闄㈡椂闂村け璐ワ細{}", thiedInhospInfo.getAdmissDate(), e);
-            }
-        }
-
-        if (StringUtils.isNotEmpty(thiedInhospInfo.getOutDate())) {
-            try {
-                patMedInhosp.setEndtime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(thiedInhospInfo.getOutDate()));
-            } catch (ParseException e) {
-                log.warn("銆恇uildPatientInhospInfo銆戣В鏋愬嚭闄㈡椂闂村け璐ワ細{}", thiedInhospInfo.getOutDate(), e);
-            }
-        }
-
-        // 鍑洪櫌淇℃伅
-        if (cry.equals("1")) {
-            patMedInhosp.setLeaveldeptcode(thiedInhospInfo.getCurrDeptId());
-            patMedInhosp.setLeaveldeptname(thiedInhospInfo.getCurrDeptName());
-            patMedInhosp.setLeavediagname(thiedInhospInfo.getDiagName());
-            patMedInhosp.setLeaveicd10code(thiedInhospInfo.getDiagIcd10());
-            patMedInhosp.setOutWayId(thiedInhospInfo.getOutWayId());
-            patMedInhosp.setOutWayName(thiedInhospInfo.getOutWayName());
-            // 鐥呭尯淇℃伅
-            patMedInhosp.setLeavehospitaldistrictid(thiedInhospInfo.getCurrWardCode());
-            patMedInhosp.setLeavehospitaldistrictcode(thiedInhospInfo.getCurrWardId());
-            patMedInhosp.setLeavehospitaldistrictname(thiedInhospInfo.getCurrWardName());
-            patMedInhosp.setLeaveldeptid(thiedInhospInfo.getCurrDeptCode());
-        } else {
-            //鍏ラ櫌
-            patMedInhosp.setDeptcode(thiedInhospInfo.getCurrDeptId());
-            patMedInhosp.setDeptname(thiedInhospInfo.getCurrDeptName());
-            patMedInhosp.setDiagname(thiedInhospInfo.getDiagName());
-            patMedInhosp.setIcd10code(thiedInhospInfo.getDiagIcd10());
-            patMedInhosp.setHospitaldistrictid(thiedInhospInfo.getAdmissWardCode());
-            patMedInhosp.setHospitaldistrictcode(thiedInhospInfo.getAdmissWardId());
-            patMedInhosp.setHospitaldistrictname(thiedInhospInfo.getAdmissWardName());
-        }
-
-        // 鍖荤敓淇℃伅
-        patMedInhosp.setDrname(thiedInhospInfo.getDoctName());
-        patMedInhosp.setDrcode(thiedInhospInfo.getDoctId());
-
-
-        // 鐘舵�佷俊鎭�
-        patMedInhosp.setSchemestatus("0".equals(cry) ? 1L : 2L);
-
-        // 绯荤粺瀛楁
-        patMedInhosp.setDelFlag("0");
-        patMedInhosp.setOrgid("1");
-
-        return patMedInhosp;
-    }
-
-
-    /**
-     * 鏋勫缓鎮h�呮。妗堜俊鎭�
-     */
-    private PatArchive buildPatientArchive(ThiedInhospInfo thiedInhospInfo, String cry) {
-        PatArchive patArchive = new PatArchive();
-
-        // 鍩烘湰淇℃伅
-        patArchive.setPatientno(thiedInhospInfo.getPatiMediaNo());
-        patArchive.setIdcardno(thiedInhospInfo.getPatiIdCardNo().trim());
-        patArchive.setName(thiedInhospInfo.getPatiRecordName());
-        patArchive.setSourcefrom(2L);
-        patArchive.setPattype("2");
-
-        // 鎬у埆
-        patArchive.setSex("鐢�".equals(thiedInhospInfo.getPatiRecordGender()) ? 1L : 2L);
-
-        // 姘戞棌鍜岀睄璐�
-        patArchive.setNation(thiedInhospInfo.getPatiNation());
-        patArchive.setNativePlace(thiedInhospInfo.getPatiNationality());
-
-        // 灞呬綇鍦板潃
-        String homeAddr = thiedInhospInfo.getPatiHomeAddr();
-        patArchive.setPlaceOfResidence(StringUtils.isNotEmpty(homeAddr) ? homeAddr.replace("null", "") : "");
-
-        // 鍑虹敓鏃ユ湡
-        if (StringUtils.isNotEmpty(thiedInhospInfo.getPatiBirthday())) {
-            try {
-                patArchive.setBirthdate(new SimpleDateFormat("yyyy-MM-dd").parse(thiedInhospInfo.getPatiBirthday()));
-            } catch (ParseException e) {
-                log.warn("銆恇uildPatientArchive銆戣В鏋愬嚭鐢熸棩鏈熷け璐ワ細{}", thiedInhospInfo.getPatiBirthday(), e);
-            }
-        }
-
-        // 骞撮緞
-        if (thiedInhospInfo.getTreateAge() != null) {
-            patArchive.setAge(Long.valueOf(thiedInhospInfo.getTreateAge()));
-        }
-        patArchive.setAgeUnit(thiedInhospInfo.getTreatAgeunit());
-
-        // 鑱旂郴鏂瑰紡
-        patArchive.setTelcode(thiedInhospInfo.getCompanyTelNum());
-        patArchive.setRelativetelcode(thiedInhospInfo.getContactPersonPhone());
-
-        // 鍑洪櫌鏂瑰紡澶勭悊锛堟浜$瓑鐗规畩鎯呭喌锛�
-        if (StringUtils.isNotEmpty(thiedInhospInfo.getOutWayId()) && "4".equals(thiedInhospInfo.getOutWayId())) {
-            patArchive.setNotrequiredFlag("1");
-            patArchive.setNotrequiredreason(thiedInhospInfo.getOutWayName());
-        }
-        if ("1".equals(cry) && StringUtils.isEmpty(thiedInhospInfo.getOutWayId())) {
-            patArchive.setNotrequiredFlag("1");
-            patArchive.setNotrequiredreason("鍑洪櫌鏂瑰紡涓虹┖");
-        }
-
-        // 绯荤粺瀛楁
-        patArchive.setDelFlag("0");
-        patArchive.setCreateTime(new Date());
-        patArchive.setUpdateTime(new Date());
-
-        return patArchive;
-    }
-}
-
-
diff --git a/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml b/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
deleted file mode 100644
index f8cd913..0000000
--- a/smartor/src/main/resources/mapper/smartor/HNGatherPatArchiveMapper.xml
+++ /dev/null
@@ -1,644 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.HNGatherPatArchiveMapper">
-
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.SysUserDept" id="SysUserDeptResult">
-        <result property="id" column="id"/>
-        <result property="orgid" column="orgid"/>
-        <result property="userId" column="user_id"/>
-        <result property="deptId" column="dept_id"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="deptCode" column="dept_code"/>
-        <result property="deptName" column="dept_name"/>
-        <result property="deptType" column="dept_type"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateTime" column="update_time"/>
-    </resultMap>
-
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.SysUserRole" id="SysUserRoleResult">
-        <result property="userId" column="user_id"/>
-        <result property="roleId" column="role_id"/>
-        <result property="orgid" column="orgid"/>
-    </resultMap>
-
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.PatArchive" id="PatArchiveResult">
-        <result property="id" column="id"/>
-        <result property="patientno" column="patientno"/>
-        <result property="sourcefrom" column="sourcefrom"/>
-        <result property="notrequiredFlag" column="notrequired_flag"/>
-        <result property="notrequiredreason" column="notrequiredreason"/>
-        <result property="patidHis" column="patid_his"/>
-        <result property="sdFlag" column="sd_flag"/>
-        <result property="pattype" column="pattype"/>
-        <result property="viptype" column="viptype"/>
-        <result property="name" column="name"/>
-        <result property="sex" column="sex"/>
-        <result property="nation" column="nation"/>
-        <result property="nativePlace" column="native_place"/>
-        <result property="placeOfResidence" column="place_of_residence"/>
-        <result property="birthplace" column="birthplace"/>
-        <result property="idcardno" column="idcardno"/>
-        <result property="birthdate" column="birthdate"/>
-        <result property="age" column="age"/>
-        <result property="age2" column="age2"/>
-        <result property="sourcefrom" column="sourcefrom"/>
-        <result property="archivetime" column="archivetime"/>
-        <result property="archiveby" column="archiveby"/>
-        <result property="telcode" column="telcode"/>
-        <result property="relativetelcode" column="relativetelcode"/>
-        <result property="idcardtype" column="idcardtype"/>
-        <result property="orgid" column="orgid"/>
-        <result property="openid" column="openid"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="dept" column="deptname"/>
-        <result property="deptcode" column="deptcode"/>
-        <result property="drcode" column="drcode"/>
-        <result property="drname" column="drname"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="isupload" column="isupload"/>
-        <result property="uploadTime" column="upload_time"/>
-        <result property="tag" column="tag"/>
-        <result property="pattype" column="pattype"/>
-        <result property="bedNo" column="bedno"/>
-        <result property="inhosptime" column="inhosptime"/>
-        <result property="ageUnit" column="age_unit"/>
-        <result property="ageUnit2" column="age_unit2"/>
-        <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
-        <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
-        <result property="careFacilities" column="care_facilities"/>
-        <result property="casePath" column="case_path"/>
-        <result property="degreeOfEducation" column="degree_of_education"/>
-        <result property="maritalStatus" column="marital_status"/>
-        <result property="income" column="income"/>
-        <result property="medicareType" column="medicare_type"/>
-        <result property="carePerson" column="care_person"/>
-        <result property="casePersonAge" column="case_person_age"/>
-        <result property="guid" column="guid"/>
-        <result property="filterDrname" column="filter_drname"/>
-        <result property="filterDrcode" column="filter_drcode"/>
-    </resultMap>
-
-
-    <resultMap type="com.smartor.domain.PatArchiveOthreInfo" id="PatArchiveOthreInfoResult">
-        <result property="id" column="id"/>
-        <result property="notrequiredFlag" column="notrequired_flag"/>
-        <result property="notrequiredreason" column="notrequiredreason"/>
-        <result property="patientno" column="patientno"/>
-        <result property="sourcefrom" column="sourcefrom"/>
-        <result property="patidHis" column="patid_his"/>
-        <result property="sdFlag" column="sd_flag"/>
-        <result property="pattype" column="pattype"/>
-        <result property="viptype" column="viptype"/>
-        <result property="name" column="name"/>
-        <result property="sex" column="sex"/>
-        <result property="nation" column="nation"/>
-        <result property="nativePlace" column="native_place"/>
-        <result property="placeOfResidence" column="place_of_residence"/>
-        <result property="birthplace" column="birthplace"/>
-        <result property="idcardno" column="idcardno"/>
-        <result property="birthdate" column="birthdate"/>
-        <result property="age" column="age"/>
-        <result property="age2" column="age2"/>
-        <result property="sourcefrom" column="sourcefrom"/>
-        <result property="archivetime" column="archivetime"/>
-        <result property="archiveby" column="archiveby"/>
-        <result property="telcode" column="telcode"/>
-        <result property="relativetelcode" column="relativetelcode"/>
-        <result property="idcardtype" column="idcardtype"/>
-        <result property="orgid" column="orgid"/>
-        <result property="openid" column="openid"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="dept" column="deptname"/>
-        <result property="deptcode" column="deptcode"/>
-        <result property="drcode" column="drcode"/>
-        <result property="drname" column="drname"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="isupload" column="isupload"/>
-        <result property="uploadTime" column="upload_time"/>
-        <result property="tag" column="tag"/>
-        <result property="pattype" column="pattype"/>
-        <result property="bedNo" column="bedno"/>
-        <result property="starttime" column="starttime"/>
-        <result property="endtime" column="endtime"/>
-        <result property="ageUnit" column="age_unit"/>
-        <result property="ageUnit2" column="age_unit2"/>
-        <result property="inhospno" column="inhospno"/>
-        <result property="nurseId" column="nurse_id"/>
-        <result property="nurseName" column="nurse_name"/>
-        <result property="outWayName" column="out_way_name"/>
-        <result property="outWayId" column="out_way_id"/>
-        <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
-        <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
-        <result property="guid" column="guid"/>
-        <result property="leavediagname" column="leavediagname"/>
-        <result property="leaveicd10code" column="leaveicd10code"/>
-        <result property="filterDrname" column="filter_drname"/>
-        <result property="filterDrcode" column="filter_drcode"/>
-    </resultMap>
-
-    <resultMap type="com.ruoyi.inhospvisit.domain.PatMedInhosp" id="PatMedInhospResult">
-        <result property="inhospid" column="inhospid"/>
-        <result property="inhospno" column="inhospno"/>
-        <result property="serialnum" column="serialnum"/>
-        <result property="hospitalname" column="hospitalname"/>
-        <result property="hospitalcode" column="hospitalcode"/>
-        <result property="hospitaldistrictcode" column="hospitaldistrictcode"/>
-        <result property="hospitaldistrictname" column="hospitaldistrictname"/>
-        <result property="icd10code" column="icd10code"/>
-        <result property="diagname" column="diagname"/>
-        <result property="starttime" column="starttime"/>
-        <result property="endtime" column="endtime"/>
-        <result property="deptcode" column="deptcode"/>
-        <result property="deptname" column="deptname"/>
-        <result property="roomno" column="roomno"/>
-        <result property="bedNo" column="bed_no"/>
-        <result property="orgid" column="orgid"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="isupload" column="isupload"/>
-        <result property="uploadTime" column="upload_time"/>
-        <result property="patid" column="patid"/>
-        <result property="leavediagname" column="leavediagname"/>
-        <result property="leaveicd10code" column="leaveicd10code"/>
-        <result property="drcode" column="drcode"/>
-        <result property="drname" column="drname"/>
-        <result property="schemestatus" column="schemestatus"/>
-        <result property="generalschemestatus" column="generalschemestatus"/>
-        <result property="leaveldeptcode" column="leaveldeptcode"/>
-        <result property="leaveldeptname" column="leaveldeptname"/>
-        <result property="hospitaldistrictid" column="hospitaldistrictid"/>
-        <result property="leavehospitaldistrictcode" column="leavehospitaldistrictcode"/>
-        <result property="leavehospitaldistrictname" column="leavehospitaldistrictname"/>
-        <result property="leavehospitaldistrictid" column="leavehospitaldistrictid"/>
-        <result property="deptid" column="deptid"/>
-        <result property="leaveldeptid" column="leaveldeptid"/>
-        <result property="schemetime" column="schemetime"/>
-        <result property="patname" column="patname"/>
-        <result property="patno" column="patno"/>
-        <result property="inhospstate" column="inhospstate"/>
-        <result property="deptcheckFlag" column="deptcheck_flag"/>
-        <result property="wardcheckFlag" column="wardcheck_flag"/>
-        <result property="diagcheckFlag" column="diagcheck_flag"/>
-        <result property="age" column="age"/>
-        <result property="sex" column="sex"/>
-        <result property="telcode" column="telcode"/>
-        <result property="longTaskReason" column="long_task_reason"/>
-        <result property="nurseId" column="nurse_id"/>
-        <result property="nurseName" column="nurse_name"/>
-        <result property="outWayId" column="out_way_id"/>
-        <result property="outWayName" column="out_way_name"/>
-        <result property="guid" column="guid"/>
-        <result property="operator" column="operator"/>
-        <result property="operatorId" column="operator_id"/>
-        <result property="remark" column="remark"/>
-        <result property="tagname" column="tagname"/>
-        <result property="fuflag" column="fuflag"/>
-        <result property="fudate" column="fudate"/>
-        <result property="fuperiod" column="fuperiod"/>
-        <result property="futypecode" column="futypecode"/>
-        <result property="futypedesc" column="futypedesc"/>
-        <result property="fuadvice" column="fuadvice"/>
-        <result property="fuspecialadvice" column="fuspecialadvice"/>
-    </resultMap>
-
-    <resultMap type="com.ruoyi.outpatientvisit.domain.PatMedOuthosp" id="PatMedOuthospResult">
-        <result property="id" column="id"/>
-        <result property="serialnum" column="serialnum"/>
-        <result property="patid" column="patid"/>
-        <result property="hospitalname" column="hospitalname"/>
-        <result property="hospitalcode" column="hospitalcode"/>
-        <result property="icd10code" column="icd10code"/>
-        <result property="diagname" column="diagname"/>
-        <result property="deptcode" column="deptcode"/>
-        <result property="deptname" column="deptname"/>
-        <result property="drcode" column="drcode"/>
-        <result property="drname" column="drname"/>
-        <result property="admitdate" column="admitdate"/>
-        <result property="orgid" column="orgid"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="isupload" column="isupload"/>
-        <result property="uploadTime" column="upload_time"/>
-        <result property="schemestatus" column="schemestatus"/>
-        <result property="deptid" column="deptid"/>
-        <result property="schemetime" column="schemetime"/>
-        <result property="hpi" column="hpi"/>
-        <result property="mainsuit" column="mainsuit"/>
-        <result property="outhospno" column="outhospno"/>
-        <result property="patname" column="patname"/>
-        <result property="guid" column="guid"/>
-        <result property="patno" column="patno"/>
-        <result property="diagcheckFlag" column="diagcheck_flag"/>
-        <result property="idcardno" column="idcardno"/>
-        <result property="remark" column="remark"/>
-    </resultMap>
-
-
-    <resultMap type="com.smartor.domain.Icd10" id="Icd10Result">
-        <result property="icdid" column="icdid"/>
-        <result property="icdcode" column="icdcode"/>
-        <result property="icdname" column="icdname"/>
-        <result property="icdpym" column="icdpym"/>
-        <result property="icdwbm" column="icdwbm"/>
-        <result property="orgid" column="orgid"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="pid" column="pid"/>
-        <result property="guid" column="guid"/>
-        <result property="lastflag" column="lastflag"/>
-        <result property="chimedflag" column="chimedflag"/>
-        <result property="hisIcdid" column="his_icdid"/>
-    </resultMap>
-
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.SysDept" id="SysDeptResult">
-        <id property="deptId" column="dept_id"/>
-        <id property="hisDeptId" column="his_dept_id"/>
-        <result property="parentId" column="parent_id"/>
-        <result property="hisParentId" column="his_parent_id"/>
-        <result property="ancestors" column="ancestors"/>
-        <result property="deptName" column="dept_name"/>
-        <result property="orderNum" column="order_num"/>
-        <result property="leader" column="leader"/>
-        <result property="phone" column="phone"/>
-        <result property="email" column="email"/>
-        <result property="status" column="status"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="parentName" column="parent_name"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="deptCode" column="dept_code"/>
-        <result property="deptType" column="dept_type"/>
-        <result property="guid" column="guid"/>
-        <result property="orgid" column="orgid"/>
-        <result property="type" column="type"/>
-    </resultMap>
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult">
-        <id property="userId" column="user_id"/>
-        <id property="orgid" column="orgid"/>
-        <id property="hisUserId" column="his_user_id"/>
-        <result property="deptId" column="dept_id"/>
-        <result property="hospInfo" column="hosp_info"/>
-        <result property="deptInfo" column="dept_info"/>
-        <result property="userName" column="user_name"/>
-        <result property="nickName" column="nick_name"/>
-        <result property="email" column="email"/>
-        <result property="phonenumber" column="phonenumber"/>
-        <result property="sex" column="sex"/>
-        <result property="avatar" column="avatar"/>
-        <result property="password" column="password"/>
-        <result property="status" column="status"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="loginIp" column="login_ip"/>
-        <result property="loginDate" column="login_date"/>
-        <result property="createBy" column="create_by"/>
-        <result property="idCard" column="id_card"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="title" column="title"/>
-        <result property="birthday" column="birthday"/>
-        <result property="jobPhone" column="job_phone"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="remark" column="remark"/>
-        <result property="userType" column="user_type"/>
-        <result property="searchscope" column="searchscope"/>
-        <result property="guid" column="guid"/>
-    </resultMap>
-
-    <sql id="selectPatArchiveVo">
-        select notrequired_flag,
-               notrequiredreason,
-               patientno,
-               patid_his,
-               sd_flag,
-               name,
-               sex,
-               idcardno,
-               birthdate,
-               age,
-               nation,
-               native_place,
-               place_of_residence,
-               birthplace,
-               sourcefrom,
-               archivetime,
-               archiveby,
-               telcode,
-               relativetelcode,
-               idcardtype,
-               orgid,
-               openid,
-               viptype,
-               care_facilities,
-               case_path,
-               degree_of_education,
-               marital_status,
-               income,
-               medicare_type,
-               care_person,
-               case_person_age
-        from hzjbxx
-    </sql>
-
-
-    <select id="yhyjsxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserRoleResult">
-        select user_id, role_id, orgid
-        FROM yhyjsxx
-        where 1=1
-        <if test="hisUserId != null ">
-            and user_id = #{hisUserId}
-        </if>
-    </select>
-
-    <select id="yhyksxx" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserDeptResult">
-        select user_id, user_code, dept_type,department_id as
-        dept_id,dept_name,deptparent,del_flag,orgid,create_time,create_by,update_time,update_by
-        FROM yhyksxx
-        where 1=1
-            and user_id != 'admin'
-            <if test="hisUserId != null ">and user_id = #{hisUserId}</if>
-    </select>
-
-
-    <select id="selectPatArchiveList" parameterType="com.ruoyi.common.core.domain.entity.PatArchive" resultMap="PatArchiveResult">
-        <include refid="selectPatArchiveVo"/>
-        where 1=1
-            <if test="name != null  and name != ''">and name like concat('%', #{name}, '%')</if>
-            <if test="idcardno != null  and idcardno != ''">and idcardno = #{idcardno}</if>
-            <if test="sourcefrom != null ">and sourcefrom = #{sourcefrom}</if>
-            <if test="telcode != null  and telcode != ''">and telcode = #{telcode}</if>
-            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
-            <if test="id != null  and id != ''">and id = #{id}</if>
-            <if test="isupload != null ">and isupload = #{isupload}</if>
-            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
-            <if test="viptype != null ">and viptype = #{viptype}</if>
-            <if test="pattype != null ">and pattype = #{pattype}</if>
-            <if test="patientno != null ">and patientno = CAST(#{patientno} AS INTEGER)</if>
-            <if test="patidHis != null ">and patid_his = #{patidHis}</if>
-            <if test="sdFlag != null ">and sd_flag = #{sdFlag}</if>
-            <if test="ageUnit != null ">and age_unit = #{ageUnit}</if>
-            <if test="age != null ">and age = #{age}</if>
-            <if test="age2 != null ">and age2 = #{age2}</if>
-            <if test="ageUnit2 != null ">and age_unit2 = #{ageUnit2}</if>
-            <if test="notrequiredFlag != null ">and notrequired_flag = #{notrequiredFlag}</if>
-            <if test="notrequiredreason != null ">and notrequiredreason = #{notrequiredreason}</if>
-            <if test="careFacilities != null ">and care_facilities = #{careFacilities}</if>
-            <if test="casePath != null ">and case_path = #{casePath}</if>
-            <if test="degreeOfEducation != null ">and degree_of_education = #{degreeOfEducation}</if>
-            <if test="maritalStatus != null ">and marital_status = #{maritalStatus}</if>
-            <if test="income != null ">and income = #{income}</if>
-            <if test="medicareType != null ">and medicare_type = #{medicareType}</if>
-            <if test="carePerson != null ">and care_person = #{carePerson}</if>
-            <if test="casePersonAge != null ">and case_person_age = #{casePersonAge}</if>
-            <if test="filterDrname != null ">and filter_drname = #{filterDrname}</if>
-            <if test="filterDrcode != null ">and filter_drcode = #{filterDrcode}</if>
-    </select>
-
-
-    <select id="selectPatMedInhospListCount" parameterType="com.ruoyi.inhospvisit.domain.PatMedInhosp" resultType="Long">
-        select count(*)
-        FROM cryxx
-    </select>
-
-    <select id="selectPatArchiveListByLastId" resultMap="PatArchiveResult">
-        SELECT *
-        FROM (
-                 SELECT *,
-                        ROW_NUMBER() OVER (ORDER BY patid_his) as row_num
-                 FROM hzjbxx
-             ) a
-        WHERE row_num > #{lastRowNumber} LIMIT #{ps}
-    </select>
-
-    <select id="selectPatMedInhospListByLastId" resultMap="PatMedInhospResult">
-        SELECT *
-        FROM (SELECT *,
-                     ROW_NUMBER() OVER (ORDER BY patno) as row_num
-              FROM cryxx
-             ) a
-        WHERE row_num > #{lastRowNumber} LIMIT #{ps}
-    </select>
-
-    <select id="selectPatArchiveCount" parameterType="com.ruoyi.inhospvisit.domain.PatMedInhosp" resultType="Long">
-        select count(*)
-        FROM hzjbxx
-    </select>
-
-
-    <select id="selectPatMedInhospList" parameterType="com.ruoyi.inhospvisit.domain.PatMedInhosp" resultMap="PatMedInhospResult">
-        select
-        b.nurse_id,
-        b.nurse_name,
-        b.patname,
-        b.out_way_id,
-        b.out_way_name,
-        b.inhospstate,
-        b.patno,
-        b.inhospno,
-        b.serialnum,
-        b.hospitalname,
-        b.hospitalcode,
-        b.hospitaldistrictcode,
-        b.hospitaldistrictname,
-        b.icd10code,
-        b.diagname,
-        b.starttime,
-        b.endtime,
-        b.deptcode,
-        b.deptname,
-        b.roomno,
-        b.bed_no,
-        b.orgid,
-        b.leavediagname,
-        b.leaveicd10code,
-        b.drcode,
-        b.drname,
-        b.leaveldeptcode,
-        b.leaveldeptname,
-        b.hospitaldistrictid,
-        b.leavehospitaldistrictcode,
-        b.leavehospitaldistrictname,
-        b.leavehospitaldistrictid,
-        b.deptid,
-        b.leaveldeptid,
-        b.schemetime,
-        b.fuflag,
-        b.fudate,
-        b.fuperiod,
-        b.futypecode,
-        b.futypedesc,
-        b.fuadvice
-        FROM
-        cryxx b
-        where 1=1
-            <if test="startOutHospTime != null ">and to_char(b.endtime,'YYMMDD') &gt;=
-                to_char(#{startOutHospTime}::date,'YYMMDD')
-            </if>
-            <if test="endOutHospTime != null ">and to_char(b.endtime,'YYMMDD') &lt;=
-                to_char(#{endOutHospTime}::date,'YYMMDD')
-            </if>
-            <if test="startInHospTime != null ">and to_char(b.starttime,'YYMMDD') &gt;=
-                to_char(#{startInHospTime}::date,'%y%m%d')
-            </if>
-            <if test="endInHospTime != null ">and to_char(b.starttime,'YYMMDD') &lt;=
-                to_char(#{endInHospTime}::date,'YYMMDD')
-            </if>
-            <if test="inhospno != null ">and b.inhospno = #{inhospno}</if>
-            <if test="fuflag != null ">and b.fuflag = #{fuflag}</if>
-            <if test="serialnum != null ">and b.serialnum = #{serialnum}</if>
-            <if test="patno != null ">and b.patno = #{patno}</if>
-            <if test="nurseId != null ">and b.nurse_id = #{nurseId}</if>
-            <if test="nurseName != null and nurseName != ''">and b.nurse_name = #{nurseName}</if>
-            <if test="inhospstate != null ">and b.inhospstate = #{inhospstate}</if>
-            <if test="outWayId != null ">and b.out_way_id = #{outWayId}</if>
-            <if test="outWayName != null ">and b.out_way_name = #{outWayName}</if>
-            <if test="orgid != null ">and b.orgid = #{orgid}</if>
-    </select>
-
-
-    <select id="selectPatMedOuthospList" parameterType="com.ruoyi.outpatientvisit.domain.PatMedOuthosp"
-            resultMap="PatMedOuthospResult">
-        select
-        outhospno,
-        patno,
-        remark,
-        serialnum,
-        hospitalname,
-        hospitalcode,
-        icd10code,
-        diagname,
-        deptcode,
-        deptname,
-        drcode,
-        drname,
-        admitdate,
-        orgid,
-        update_by,
-        update_time,
-        create_by,
-        create_time,
-        isupload,
-        upload_time,
-        schemestatus,
-        deptid,
-        schemetime,
-        hpi,
-        patname,
-        mainsuit
-        from mzxx
-        where 1=1
-            <if test="beginTime != null ">and to_char( admitdate,'YYMMDD') &gt;=
-                to_char(#{beginTime}::date,'YYMMDD')
-            </if>
-            <if test="endTime != null ">and to_char( admitdate,'YYMMDD') &lt;=
-                to_char(#{endTime}::date,'YYMMDD')
-            </if>
-
-    </select>
-
-
-    <select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result">
-        select
-        icdcode,
-        his_icdid,
-        lastflag,
-        chimedflag,
-        icdname,
-        icdpym
-        from jbxx
-        where 1=1
-            <if test="icdcode != null  and icdcode != ''">and icdcode = #{icdcode}</if>
-            <if test="lastflag != null  and lastflag != ''">and lastflag = #{lastflag}</if>
-            <if test="chimedflag != null  and chimedflag != ''">and chimedflag = #{chimedflag}</if>
-            <if test="icdname != null  and icdname != ''">and icdname like concat('%', #{icdname}, '%')</if>
-            <if test="icdpym != null  and icdpym != ''">and icdpym = #{icdpym}</if>
-            <if test="icdwbm != null  and icdwbm != ''">and icdwbm = #{icdwbm}</if>
-            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
-            <if test="pid != null ">and pid = #{pid}</if>
-            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
-            <if test="hisIcdid != null  and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
-    </select>
-
-
-    <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult">
-        select
-        u.title,u.his_user_id, u.searchscope, u.dept_id, u.user_type,
-        u.nick_name, u.user_name, u.email,u.id_card, u.avatar,
-        u.birthday,u.orgid,u.job_phone,u.phonenumber, u.sex, u.status,
-        u.login_ip, u.login_date, u.create_by, u.create_time, u.remark
-        from ryxx u
-        where 1=1
-            <if test="userId != null and userId != 0">
-                AND u.user_id = #{userId}
-            </if>
-            <if test="userName != null and userName != ''">
-                AND u.user_name like concat('%', #{userName}, '%')
-            </if>
-            <if test="nickName != null and nickName != ''">
-                AND u.nick_name like concat('%', #{nickName}, '%')
-            </if>
-            <if test="status != null and status != ''">
-                AND u.status = #{status}
-            </if>
-            <if test="idCard != null and idCard != ''">
-                AND u.id_card = #{idCard}
-            </if>
-            <if test="title != null and title != ''">
-                AND u.title = #{title}
-            </if>
-            <if test="jobPhone != null and jobPhone != ''">
-                AND u.job_phone = #{jobPhone}
-            </if>
-            <if test="birthday != null and birthday != ''">
-                AND u.birthday = #{birthday}
-            </if>
-            <if test="hisUserId != null and hisUserId != ''">
-                AND u.his_user_id = #{hisUserId}
-            </if>
-            <if test="phonenumber != null and phonenumber != ''">
-                AND u.phonenumber like concat('%', #{phonenumber}, '%')
-            </if>
-    </select>
-
-    <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
-        SELECT d.dept_code,
-               d.TYPE,
-               d.ancestors,
-               d.dept_name,
-               d.order_num,
-               d.leader,
-               d.phone,
-               d.dept_type,
-               d.email,
-               d.status,
-               d.create_by,
-               d.create_time,
-               d.his_dept_id,
-               d.his_parent_id
-        FROM HEALTHY_DEPT d
-
-    </select>
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml b/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
deleted file mode 100644
index 1f0b415..0000000
--- a/smartor/src/main/resources/mapper/smartor/Icd10Mapper.xml
+++ /dev/null
@@ -1,221 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.Icd10Mapper">
-
-    <resultMap type="com.smartor.domain.Icd10" id="Icd10Result">
-        <result property="icdid" column="icdid"/>
-        <result property="icdcode" column="icdcode"/>
-        <result property="icdname" column="icdname"/>
-        <result property="icdpym" column="icdpym"/>
-        <result property="icdwbm" column="icdwbm"/>
-        <result property="orgid" column="orgid"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="pid" column="pid"/>
-        <result property="guid" column="guid"/>
-        <result property="lastflag" column="lastflag"/>
-        <result property="chimedflag" column="chimedflag"/>
-        <result property="hisIcdid" column="his_icdid"/>
-    </resultMap>
-
-    <sql id="selectIcd10Vo">
-        select icdid,
-               icdcode,
-               his_icdid,
-               lastflag,
-               chimedflag,
-               icdname,
-               icdpym,
-               icdwbm,
-               orgid,
-               del_flag,
-               create_by,
-               create_time,
-               update_by,
-               update_time,
-               pid,
-               guid
-        from icd10
-    </sql>
-
-    <select id="selectIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result">
-        <include refid="selectIcd10Vo"/>
-        where 1=1
-            and del_flag = 0
-            <if test="icdcode != null  and icdcode != ''">and icdcode = #{icdcode}</if>
-            <if test="lastflag != null  and lastflag != ''">and lastflag = #{lastflag}</if>
-            <if test="chimedflag != null  and chimedflag != ''">and chimedflag = #{chimedflag}</if>
-            <if test="icdname != null  and icdname != ''">and icdname like concat('%', #{icdname}, '%')</if>
-            <if test="icdpym != null  and icdpym != ''">and icdpym = #{icdpym}</if>
-            <if test="icdwbm != null  and icdwbm != ''">and icdwbm = #{icdwbm}</if>
-            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
-            <if test="pid != null ">and pid = #{pid}</if>
-            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
-            <if test="hisIcdid != null  and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
-            <if test="icdcodes != null and icdcodes.size() > 0">
-                AND icdcode IN
-                <foreach collection="icdcodes" item="icdcodeItem" open="("
-                         separator=","
-                         close=")">
-                    #{icdcodeItem}
-                </foreach>
-            </if>
-    </select>
-
-    <select id="exactQueryIcd10List" parameterType="com.smartor.domain.Icd10" resultMap="Icd10Result">
-        <include refid="selectIcd10Vo"/>
-        where 1=1
-        and del_flag = 0
-        <if test="icdcode != null  and icdcode != ''">and icdcode = #{icdcode}</if>
-        <if test="lastflag != null  and lastflag != ''">and lastflag = #{lastflag}</if>
-        <if test="chimedflag != null  and chimedflag != ''">and chimedflag = #{chimedflag}</if>
-        <if test="icdname != null  and icdname != ''">and icdname = #{icdname} </if>
-        <if test="icdpym != null  and icdpym != ''">and icdpym = #{icdpym}</if>
-        <if test="icdwbm != null  and icdwbm != ''">and icdwbm = #{icdwbm}</if>
-        <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
-        <if test="pid != null ">and pid = #{pid}</if>
-        <if test="guid != null  and guid != ''">and guid = #{guid}</if>
-        <if test="hisIcdid != null  and hisIcdid != ''">and his_icdid = #{hisIcdid}</if>
-        <if test="icdcodes != null and icdcodes.size() > 0">
-            AND icdcode IN
-            <foreach collection="icdcodes" item="icdcodeItem" open="("
-                     separator=","
-                     close=")">
-                #{icdcodeItem}
-            </foreach>
-        </if>
-    </select>
-
-    <select id="selectIcd10ByIcdid" parameterType="Long" resultMap="Icd10Result">
-        <include refid="selectIcd10Vo"/>
-        where icdid = #{icdid}
-    </select>
-
-    <insert id="insertIcd10" parameterType="com.smartor.domain.Icd10" useGeneratedKeys="true" keyProperty="icdid">
-        insert into icd10
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="icdcode != null">icdcode,</if>
-            <if test="icdname != null">icdname,</if>
-            <if test="icdpym != null">icdpym,</if>
-            <if test="icdwbm != null">icdwbm,</if>
-            <if test="orgid != null">orgid,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-            <if test="pid != null">pid,</if>
-            <if test="guid != null">guid,</if>
-            <if test="lastflag != null  and lastflag != ''">lastflag,</if>
-            <if test="chimedflag != null  and chimedflag != ''">chimedflag,</if>
-            <if test="hisIcdid != null  and hisIcdid != ''">his_icdid,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="icdcode != null">#{icdcode},</if>
-            <if test="icdname != null">#{icdname},</if>
-            <if test="icdpym != null">#{icdpym},</if>
-            <if test="icdwbm != null">#{icdwbm},</if>
-            <if test="orgid != null">#{orgid},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-            <if test="pid != null">#{pid},</if>
-            <if test="guid != null">#{guid},</if>
-            <if test="lastflag != null  and lastflag != ''">#{lastflag},</if>
-            <if test="chimedflag != null  and chimedflag != ''">#{chimedflag},</if>
-            <if test="hisIcdid != null  and hisIcdid != ''">#{hisIcdid},</if>
-        </trim>
-    </insert>
-
-    <insert id="batchIcd10">
-        insert into icd10
-        (
-        icdcode,
-        icdname,
-        icdpym,
-        icdwbm,
-        orgid,
-        del_flag,
-        create_by,
-        create_time,
-        update_by,
-        update_time,
-        pid,
-        guid,
-        lastflag,
-        chimedflag,
-        his_icdid)
-        VALUES
-        <foreach collection="list" item="item" separator=",">
-            (
-            #{item.icdcode},
-            #{item.icdname},
-            #{item.icdpym},
-            #{item.icdwbm},
-            #{item.orgid},
-            #{item.delFlag},
-            #{item.createBy},
-            #{item.createTime},
-            #{item.updateBy},
-            #{item.updateTime},
-            #{item.pid},
-            #{item.guid},
-            #{item.lastflag},
-            #{item.chimedflag},
-            #{item.hisIcdid}
-            )
-        </foreach>
-    </insert>
-
-    <update id="updateIcd10" parameterType="com.smartor.domain.Icd10">
-        update icd10
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="icdcode != null">icdcode = #{icdcode},</if>
-            <if test="icdname != null">icdname = #{icdname},</if>
-            <if test="icdpym != null">icdpym = #{icdpym},</if>
-            <if test="icdwbm != null">icdwbm = #{icdwbm},</if>
-            <if test="orgid != null">orgid = #{orgid},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="pid != null">pid = #{pid},</if>
-            <if test="guid != null">guid = #{guid},</if>
-            <if test="lastflag != null  and lastflag != ''">lastflag = #{lastflag},</if>
-            <if test="chimedflag != null  and chimedflag != ''">chimedflag = #{chimedflag},</if>
-            <if test="hisIcdid != null  and hisIcdid != ''">his_icdid = #{hisIcdid},</if>
-        </trim>
-        where icdid = #{icdid}
-    </update>
-
-    <delete id="deleteIcd10ByIcdid" parameterType="Long">
-        delete
-        from icd10
-        where icdid = #{icdid}
-    </delete>
-
-    <delete id="deleteIcd10ByIcdids" parameterType="String">
-        delete from icd10 where icdid in
-        <foreach item="icdid" collection="array" open="(" separator="," close=")">
-            #{icdid}
-        </foreach>
-    </delete>
-
-    <!-- 鎵归噺鏌ヨ宸插瓨鍦ㄧ殑 icdcode锛岀敤浜庡垎椤垫媺鍙栧悗鍘婚噸 -->
-    <select id="selectExistingIcdcodes" resultType="java.lang.String">
-        select icdname from icd10
-        where del_flag = 0
-          and icdname in
-        <foreach item="icdname" collection="icdnames" open="(" separator="," close=")">
-            #{icdname}
-        </foreach>
-    </select>
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/MedicationDoseInfoMapper.xml b/smartor/src/main/resources/mapper/smartor/MedicationDoseInfoMapper.xml
deleted file mode 100644
index b1d35d7..0000000
--- a/smartor/src/main/resources/mapper/smartor/MedicationDoseInfoMapper.xml
+++ /dev/null
@@ -1,172 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.MedicationDoseInfoMapper">
-
-    <resultMap type="com.smartor.domain.MedicationDoseInfo" id="MedicationDoseInfoResult">
-            <result property="id" column="id"/>
-            <result property="medicationItemId" column="medication_item_id"/>
-            <result property="doseSmallPackageRation" column="dose_small_package_ration"/>
-            <result property="dose" column="dose"/>
-            <result property="doseSmallPackageNum" column="dose_small_package_num"/>
-            <result property="doseUnit" column="dose_unit"/>
-            <result property="doseUnitType" column="dose_unit_type"/>
-            <result property="remark" column="remark"/>
-            <result property="createBy" column="create_by"/>
-            <result property="createTime" column="create_time"/>
-            <result property="updateBy" column="update_by"/>
-            <result property="updateTime" column="update_time"/>
-    </resultMap>
-
-    <sql id="selectMedicationDoseInfoVo">
-        select id, medication_item_id, dose_small_package_ration, dose, dose_small_package_num, dose_unit, dose_unit_type, remark, create_by, create_time, update_by, update_time
-        from medication_dose_info
-    </sql>
-
-    <select id="selectMedicationDoseInfoList" parameterType="com.smartor.domain.MedicationDoseInfo"
-            resultMap="MedicationDoseInfoResult">
-        <include refid="selectMedicationDoseInfoVo"/>
-        where 1=1
-            and del_flag=0
-                        <if test="medicationItemId != null ">
-                            and medication_item_id = #{medicationItemId}
-                        </if>
-                        <if test="doseSmallPackageRation != null ">
-                            and dose_small_package_ration = #{doseSmallPackageRation}
-                        </if>
-                        <if test="dose != null ">
-                            and dose = #{dose}
-                        </if>
-                        <if test="doseSmallPackageNum != null ">
-                            and dose_small_package_num = #{doseSmallPackageNum}
-                        </if>
-                        <if test="doseUnit != null  and doseUnit != ''">
-                            and dose_unit = #{doseUnit}
-                        </if>
-                        <if test="doseUnitType != null ">
-                            and dose_unit_type = #{doseUnitType}
-                        </if>
-    </select>
-
-    <select id="selectMedicationDoseInfoById" parameterType="Long"
-            resultMap="MedicationDoseInfoResult">
-            <include refid="selectMedicationDoseInfoVo"/>
-            where id = #{id}
-    </select>
-
-    <insert id="insertMedicationDoseInfo" parameterType="com.smartor.domain.MedicationDoseInfo"            useGeneratedKeys="true" keyProperty="id">
-        insert into medication_dose_info
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-                    <if test="medicationItemId != null">medication_item_id,
-                    </if>
-                    <if test="doseSmallPackageRation != null">dose_small_package_ration,
-                    </if>
-                    <if test="dose != null">dose,
-                    </if>
-                    <if test="doseSmallPackageNum != null">dose_small_package_num,
-                    </if>
-                    <if test="doseUnit != null">dose_unit,
-                    </if>
-                    <if test="doseUnitType != null">dose_unit_type,
-                    </if>
-                    <if test="remark != null">remark,
-                    </if>
-                    <if test="createBy != null">create_by,
-                    </if>
-                    <if test="createTime != null">create_time,
-                    </if>
-                    <if test="updateBy != null">update_by,
-                    </if>
-                    <if test="updateTime != null">update_time,
-                    </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-                    <if test="medicationItemId != null">#{medicationItemId},
-                    </if>
-                    <if test="doseSmallPackageRation != null">#{doseSmallPackageRation},
-                    </if>
-                    <if test="dose != null">#{dose},
-                    </if>
-                    <if test="doseSmallPackageNum != null">#{doseSmallPackageNum},
-                    </if>
-                    <if test="doseUnit != null">#{doseUnit},
-                    </if>
-                    <if test="doseUnitType != null">#{doseUnitType},
-                    </if>
-                    <if test="remark != null">#{remark},
-                    </if>
-                    <if test="createBy != null">#{createBy},
-                    </if>
-                    <if test="createTime != null">#{createTime},
-                    </if>
-                    <if test="updateBy != null">#{updateBy},
-                    </if>
-                    <if test="updateTime != null">#{updateTime},
-                    </if>
-        </trim>
-    </insert>
-
-    <update id="updateMedicationDoseInfo" parameterType="com.smartor.domain.MedicationDoseInfo">
-        update medication_dose_info
-        <trim prefix="SET" suffixOverrides=",">
-                    <if test="medicationItemId != null">medication_item_id =
-                        #{medicationItemId},
-                    </if>
-                    <if test="doseSmallPackageRation != null">dose_small_package_ration =
-                        #{doseSmallPackageRation},
-                    </if>
-                    <if test="dose != null">dose =
-                        #{dose},
-                    </if>
-                    <if test="doseSmallPackageNum != null">dose_small_package_num =
-                        #{doseSmallPackageNum},
-                    </if>
-                    <if test="doseUnit != null">dose_unit =
-                        #{doseUnit},
-                    </if>
-                    <if test="doseUnitType != null">dose_unit_type =
-                        #{doseUnitType},
-                    </if>
-                    <if test="remark != null">remark =
-                        #{remark},
-                    </if>
-                    <if test="createBy != null">create_by =
-                        #{createBy},
-                    </if>
-                    <if test="createTime != null">create_time =
-                        #{createTime},
-                    </if>
-                    <if test="updateBy != null">update_by =
-                        #{updateBy},
-                    </if>
-                    <if test="updateTime != null">update_time =
-                        #{updateTime},
-                    </if>
-        </trim>
-        where id = #{id}
-    </update>
-
-                <update id="deleteMedicationDoseInfoById" parameterType="Long">
-        update medication_dose_info
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where  id = #{id}
-    </update>
-
-                            <update id="deleteMedicationDoseInfoByIds" parameterType="String">
-        update  medication_dose_info
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </update>
-
-
-
-
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/MedicationItemMapper.xml b/smartor/src/main/resources/mapper/smartor/MedicationItemMapper.xml
deleted file mode 100644
index e46d8ac..0000000
--- a/smartor/src/main/resources/mapper/smartor/MedicationItemMapper.xml
+++ /dev/null
@@ -1,434 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.MedicationItemMapper">
-
-    <resultMap type="com.smartor.domain.MedicationItem" id="MedicationItemResult">
-        <result property="id" column="id"/>
-        <result property="identificationCode" column="identification_code"/>
-        <result property="wbm" column="wbm"/>
-        <result property="medicationCommonName" column="medication_common_name"/>
-        <result property="manufacturerName" column="manufacturer_name"/>
-        <result property="itemCode" column="item_code"/>
-        <result property="smallLargePackageRatio" column="small_large_package_ratio"/>
-        <result property="remark" column="remark"/>
-        <result property="orgId" column="org_id"/>
-        <result property="itemName" column="item_name"/>
-        <result property="medicationType" column="medication_type"/>
-        <result property="antimicrobialGradeCode" column="antimicrobial_grade_code"/>
-        <result property="licenseNumber" column="license_number"/>
-        <result property="defaultUsageName" column="default_usage_name"/>
-        <result property="specialDrugsName" column="special_drugs_name"/>
-        <result property="antimicrobialGradeName" column="antimicrobial_grade_name"/>
-        <result property="commonPinyin" column="common_pinyin"/>
-        <result property="commonWbm" column="common_wbm"/>
-        <result property="manufacturerId" column="manufacturer_id"/>
-        <result property="defaultUsageId" column="default_usage_id"/>
-        <result property="specification" column="specification"/>
-        <result property="smallPackageUnit" column="small_package_unit"/>
-        <result property="itemId" column="item_id"/>
-        <result property="specialDrugsCode" column="special_drugs_code"/>
-        <result property="pinyin" column="pinyin"/>
-        <result property="doseFormName" column="dose_form_name"/>
-        <result property="largePackageUnit" column="large_package_unit"/>
-        <result property="retailPrice" column="retail_price"/>
-        <result property="status" column="status"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-    </resultMap>
-
-    <sql id="selectMedicationItemVo">
-        select id,
-               identification_code,
-               wbm,
-               medication_common_name,
-               manufacturer_name,
-               item_code,
-               small_large_package_ratio,
-               remark,
-               org_id,
-               item_name,
-               medication_type,
-               antimicrobial_grade_code,
-               license_number,
-               default_usage_name,
-               special_drugs_name,
-               antimicrobial_grade_name,
-               common_pinyin,
-               common_wbm,
-               manufacturer_id,
-               default_usage_id,
-               specification,
-               small_package_unit,
-               item_id,
-               special_drugs_code,
-               pinyin,
-               dose_form_name,
-               large_package_unit,
-               retail_price,
-               status,
-               create_by,
-               create_time,
-               update_by,
-               update_time
-        from medication_item
-    </sql>
-
-    <select id="selectMedicationItemList" parameterType="com.smartor.domain.MedicationItem"
-            resultMap="MedicationItemResult">
-        <include refid="selectMedicationItemVo"/>
-        where 1=1
-        and del_flag=0
-        <if test="identificationCode != null  and identificationCode != ''">
-            and identification_code = #{identificationCode}
-        </if>
-        <if test="wbm != null  and wbm != ''">
-            and wbm = #{wbm}
-        </if>
-        <if test="medicationCommonName != null  and medicationCommonName != ''">
-            and medication_common_name like concat('%', #{medicationCommonName}, '%')
-        </if>
-        <if test="manufacturerName != null  and manufacturerName != ''">
-            and manufacturer_name like concat('%', #{manufacturerName}, '%')
-        </if>
-        <if test="itemCode != null  and itemCode != ''">
-            and item_code = #{itemCode}
-        </if>
-        <if test="smallLargePackageRatio != null ">
-            and small_large_package_ratio = #{smallLargePackageRatio}
-        </if>
-        <if test="orgId != null ">
-            and org_id = #{orgId}
-        </if>
-        <if test="itemName != null  and itemName != ''">
-            and item_name like concat('%', #{itemName}, '%')
-        </if>
-        <if test="medicationType != null  and medicationType != ''">
-            and medication_type = #{medicationType}
-        </if>
-        <if test="antimicrobialGradeCode != null  and antimicrobialGradeCode != ''">
-            and antimicrobial_grade_code = #{antimicrobialGradeCode}
-        </if>
-        <if test="licenseNumber != null  and licenseNumber != ''">
-            and license_number = #{licenseNumber}
-        </if>
-        <if test="defaultUsageName != null  and defaultUsageName != ''">
-            and default_usage_name like concat('%', #{defaultUsageName}, '%')
-        </if>
-        <if test="specialDrugsName != null  and specialDrugsName != ''">
-            and special_drugs_name like concat('%', #{specialDrugsName}, '%')
-        </if>
-        <if test="antimicrobialGradeName != null  and antimicrobialGradeName != ''">
-            and antimicrobial_grade_name like concat('%', #{antimicrobialGradeName}, '%')
-        </if>
-        <if test="commonPinyin != null  and commonPinyin != ''">
-            and common_pinyin = #{commonPinyin}
-        </if>
-        <if test="commonWbm != null  and commonWbm != ''">
-            and common_wbm = #{commonWbm}
-        </if>
-        <if test="manufacturerId != null ">
-            and manufacturer_id = #{manufacturerId}
-        </if>
-        <if test="defaultUsageId != null ">
-            and default_usage_id = #{defaultUsageId}
-        </if>
-        <if test="specification != null  and specification != ''">
-            and specification = #{specification}
-        </if>
-        <if test="smallPackageUnit != null  and smallPackageUnit != ''">
-            and small_package_unit = #{smallPackageUnit}
-        </if>
-        <if test="itemId != null ">
-            and item_id = #{itemId}
-        </if>
-        <if test="specialDrugsCode != null  and specialDrugsCode != ''">
-            and special_drugs_code = #{specialDrugsCode}
-        </if>
-        <if test="pinyin != null  and pinyin != ''">
-            and pinyin = #{pinyin}
-        </if>
-        <if test="doseFormName != null  and doseFormName != ''">
-            and dose_form_name like concat('%', #{doseFormName}, '%')
-        </if>
-        <if test="largePackageUnit != null  and largePackageUnit != ''">
-            and large_package_unit = #{largePackageUnit}
-        </if>
-        <if test="retailPrice != null ">
-            and retail_price = #{retailPrice}
-        </if>
-        <if test="status != null ">
-            and status = #{status}
-        </if>
-    </select>
-
-    <select id="selectMedicationItemById" parameterType="Long"
-            resultMap="MedicationItemResult">
-        <include refid="selectMedicationItemVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertMedicationItem" parameterType="com.smartor.domain.MedicationItem" useGeneratedKeys="true"
-            keyProperty="id">
-        insert into medication_item
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="identificationCode != null">identification_code,
-            </if>
-            <if test="wbm != null">wbm,
-            </if>
-            <if test="medicationCommonName != null">medication_common_name,
-            </if>
-            <if test="manufacturerName != null">manufacturer_name,
-            </if>
-            <if test="itemCode != null">item_code,
-            </if>
-            <if test="smallLargePackageRatio != null">small_large_package_ratio,
-            </if>
-            <if test="remark != null">remark,
-            </if>
-            <if test="orgId != null">org_id,
-            </if>
-            <if test="itemName != null">item_name,
-            </if>
-            <if test="medicationType != null">medication_type,
-            </if>
-            <if test="antimicrobialGradeCode != null">antimicrobial_grade_code,
-            </if>
-            <if test="licenseNumber != null">license_number,
-            </if>
-            <if test="defaultUsageName != null">default_usage_name,
-            </if>
-            <if test="specialDrugsName != null">special_drugs_name,
-            </if>
-            <if test="antimicrobialGradeName != null">antimicrobial_grade_name,
-            </if>
-            <if test="commonPinyin != null">common_pinyin,
-            </if>
-            <if test="commonWbm != null">common_wbm,
-            </if>
-            <if test="manufacturerId != null">manufacturer_id,
-            </if>
-            <if test="defaultUsageId != null">default_usage_id,
-            </if>
-            <if test="specification != null">specification,
-            </if>
-            <if test="smallPackageUnit != null">small_package_unit,
-            </if>
-            <if test="itemId != null">item_id,
-            </if>
-            <if test="specialDrugsCode != null">special_drugs_code,
-            </if>
-            <if test="pinyin != null">pinyin,
-            </if>
-            <if test="doseFormName != null">dose_form_name,
-            </if>
-            <if test="largePackageUnit != null">large_package_unit,
-            </if>
-            <if test="retailPrice != null">retail_price,
-            </if>
-            <if test="status != null">status,
-            </if>
-            <if test="createBy != null">create_by,
-            </if>
-            <if test="createTime != null">create_time,
-            </if>
-            <if test="updateBy != null">update_by,
-            </if>
-            <if test="updateTime != null">update_time,
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="identificationCode != null">#{identificationCode},
-            </if>
-            <if test="wbm != null">#{wbm},
-            </if>
-            <if test="medicationCommonName != null">#{medicationCommonName},
-            </if>
-            <if test="manufacturerName != null">#{manufacturerName},
-            </if>
-            <if test="itemCode != null">#{itemCode},
-            </if>
-            <if test="smallLargePackageRatio != null">#{smallLargePackageRatio},
-            </if>
-            <if test="remark != null">#{remark},
-            </if>
-            <if test="orgId != null">#{orgId},
-            </if>
-            <if test="itemName != null">#{itemName},
-            </if>
-            <if test="medicationType != null">#{medicationType},
-            </if>
-            <if test="antimicrobialGradeCode != null">#{antimicrobialGradeCode},
-            </if>
-            <if test="licenseNumber != null">#{licenseNumber},
-            </if>
-            <if test="defaultUsageName != null">#{defaultUsageName},
-            </if>
-            <if test="specialDrugsName != null">#{specialDrugsName},
-            </if>
-            <if test="antimicrobialGradeName != null">#{antimicrobialGradeName},
-            </if>
-            <if test="commonPinyin != null">#{commonPinyin},
-            </if>
-            <if test="commonWbm != null">#{commonWbm},
-            </if>
-            <if test="manufacturerId != null">#{manufacturerId},
-            </if>
-            <if test="defaultUsageId != null">#{defaultUsageId},
-            </if>
-            <if test="specification != null">#{specification},
-            </if>
-            <if test="smallPackageUnit != null">#{smallPackageUnit},
-            </if>
-            <if test="itemId != null">#{itemId},
-            </if>
-            <if test="specialDrugsCode != null">#{specialDrugsCode},
-            </if>
-            <if test="pinyin != null">#{pinyin},
-            </if>
-            <if test="doseFormName != null">#{doseFormName},
-            </if>
-            <if test="largePackageUnit != null">#{largePackageUnit},
-            </if>
-            <if test="retailPrice != null">#{retailPrice},
-            </if>
-            <if test="status != null">#{status},
-            </if>
-            <if test="createBy != null">#{createBy},
-            </if>
-            <if test="createTime != null">#{createTime},
-            </if>
-            <if test="updateBy != null">#{updateBy},
-            </if>
-            <if test="updateTime != null">#{updateTime},
-            </if>
-        </trim>
-    </insert>
-
-    <update id="updateMedicationItem" parameterType="com.smartor.domain.MedicationItem">
-        update medication_item
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="identificationCode != null">identification_code =
-                #{identificationCode},
-            </if>
-            <if test="wbm != null">wbm =
-                #{wbm},
-            </if>
-            <if test="medicationCommonName != null">medication_common_name =
-                #{medicationCommonName},
-            </if>
-            <if test="manufacturerName != null">manufacturer_name =
-                #{manufacturerName},
-            </if>
-            <if test="itemCode != null">item_code =
-                #{itemCode},
-            </if>
-            <if test="smallLargePackageRatio != null">small_large_package_ratio =
-                #{smallLargePackageRatio},
-            </if>
-            <if test="remark != null">remark =
-                #{remark},
-            </if>
-            <if test="orgId != null">org_id =
-                #{orgId},
-            </if>
-            <if test="itemName != null">item_name =
-                #{itemName},
-            </if>
-            <if test="medicationType != null">medication_type =
-                #{medicationType},
-            </if>
-            <if test="antimicrobialGradeCode != null">antimicrobial_grade_code =
-                #{antimicrobialGradeCode},
-            </if>
-            <if test="licenseNumber != null">license_number =
-                #{licenseNumber},
-            </if>
-            <if test="defaultUsageName != null">default_usage_name =
-                #{defaultUsageName},
-            </if>
-            <if test="specialDrugsName != null">special_drugs_name =
-                #{specialDrugsName},
-            </if>
-            <if test="antimicrobialGradeName != null">antimicrobial_grade_name =
-                #{antimicrobialGradeName},
-            </if>
-            <if test="commonPinyin != null">common_pinyin =
-                #{commonPinyin},
-            </if>
-            <if test="commonWbm != null">common_wbm =
-                #{commonWbm},
-            </if>
-            <if test="manufacturerId != null">manufacturer_id =
-                #{manufacturerId},
-            </if>
-            <if test="defaultUsageId != null">default_usage_id =
-                #{defaultUsageId},
-            </if>
-            <if test="specification != null">specification =
-                #{specification},
-            </if>
-            <if test="smallPackageUnit != null">small_package_unit =
-                #{smallPackageUnit},
-            </if>
-            <if test="itemId != null">item_id =
-                #{itemId},
-            </if>
-            <if test="specialDrugsCode != null">special_drugs_code =
-                #{specialDrugsCode},
-            </if>
-            <if test="pinyin != null">pinyin =
-                #{pinyin},
-            </if>
-            <if test="doseFormName != null">dose_form_name =
-                #{doseFormName},
-            </if>
-            <if test="largePackageUnit != null">large_package_unit =
-                #{largePackageUnit},
-            </if>
-            <if test="retailPrice != null">retail_price =
-                #{retailPrice},
-            </if>
-            <if test="status != null">status =
-                #{status},
-            </if>
-            <if test="createBy != null">create_by =
-                #{createBy},
-            </if>
-            <if test="createTime != null">create_time =
-                #{createTime},
-            </if>
-            <if test="updateBy != null">update_by =
-                #{updateBy},
-            </if>
-            <if test="updateTime != null">update_time =
-                #{updateTime},
-            </if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <update id="deleteMedicationItemById" parameterType="Long">
-        update medication_item
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where id = #{id}
-    </update>
-
-    <update id="deleteMedicationItemByIds" parameterType="String">
-        update medication_item
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </update>
-
-
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceAppointRecordMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceAppointRecordMapper.xml
deleted file mode 100644
index d424626..0000000
--- a/smartor/src/main/resources/mapper/smartor/ServiceAppointRecordMapper.xml
+++ /dev/null
@@ -1,806 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.ServiceAppointRecordMapper">
-
-    <resultMap type="com.smartor.domain.ServiceAppointRecord" id="ServiceAppointRecordResult">
-        <result property="id" column="id"/>
-        <result property="appointRecSn" column="appoint_rec_sn"/>
-        <result property="changeAppointRecSn" column="change_appoint_rec_sn"/>
-        <result property="orgCode" column="org_code"/>
-        <result property="patFileSn" column="pat_file_sn"/>
-        <result property="patMediaSn" column="pat_media_sn"/>
-        <result property="patMediaNum" column="pat_media_num"/>
-        <result property="patCateSn" column="pat_cate_sn"/>
-        <result property="patNatureSn" column="pat_nature_sn"/>
-        <result property="patFileName" column="pat_file_name"/>
-        <result property="patFileGender" column="pat_file_gender"/>
-        <result property="patAge" column="pat_age"/>
-        <result property="patBirthday" column="pat_birthday"/>
-        <result property="patCardTypeCode" column="pat_card_type_code"/>
-        <result property="patCardType" column="pat_card_type"/>
-        <result property="patIdCardNum" column="pat_id_card_num"/>
-        <result property="patAddr" column="pat_addr"/>
-        <result property="patTel" column="pat_tel"/>
-        <result property="patWayCode" column="pat_way_code"/>
-        <result property="patWay" column="pat_way"/>
-        <result property="appointTypeSn" column="appoint_type_sn"/>
-        <result property="appointDate" column="appoint_date"/>
-        <result property="appointOperatorId" column="appoint_operator_id"/>
-        <result property="appointOperatorName" column="appoint_operator_name"/>
-        <result property="appointRegistDate" column="appoint_regist_date"/>
-        <result property="registerScheduleSn" column="register_schedule_sn"/>
-        <result property="outpatCateSn" column="outpat_cate_sn"/>
-        <result property="outpatCateName" column="outpat_cate_name"/>
-        <result property="registDeptCode" column="regist_dept_code"/>
-        <result property="registDeptName" column="regist_dept_name"/>
-        <result property="deptPinyinCode" column="dept_pinyin_code"/>
-        <result property="registDoctCode" column="regist_doct_code"/>
-        <result property="registDoctName" column="regist_doct_name"/>
-        <result property="staffPinyinCode" column="staff_pinyin_code"/>
-        <result property="registTimeCate" column="regist_time_cate"/>
-        <result property="patiRegistSn" column="pati_regist_sn"/>
-        <result property="scheduleRegistCharge" column="schedule_regist_charge"/>
-        <result property="registRecSn" column="regist_rec_sn"/>
-        <result property="regUserSn" column="reg_user_sn"/>
-        <result property="regUserName" column="reg_user_name"/>
-        <result property="regOptTime" column="reg_opt_time"/>
-        <result property="revokeUserSn" column="revoke_user_sn"/>
-        <result property="revokeUserName" column="revoke_user_name"/>
-        <result property="revokeOptTime" column="revoke_opt_time"/>
-        <result property="withdrawalTime" column="withdrawal_time"/>
-        <result property="scheduleStatusFlag" column="schedule_status_flag"/>
-        <result property="scheduleMemoDesc" column="schedule_memo_desc"/>
-        <result property="scheduleCredenceNum" column="schedule_credence_num"/>
-        <result property="registTimeRange" column="regist_time_range"/>
-        <result property="scheduleDetailSn" column="schedule_detail_sn"/>
-        <result property="treatDate" column="treat_date"/>
-        <result property="treatDoctCode" column="treat_doct_code"/>
-        <result property="treatDoctName" column="treat_doct_name"/>
-        <result property="regWayCode" column="reg_way_code"/>
-        <result property="regWay" column="reg_way"/>
-        <result property="regSystemWayCode" column="reg_system_way_code"/>
-        <result property="regSystemWay" column="reg_system_way"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="visitFlag" column="visit_flag"/>
-        <result property="senderId" column="sender_id"/>
-        <result property="senderName" column="sender_name"/>
-        <result property="sendTime" column="send_time"/>
-    </resultMap>
-
-    <sql id="selectServiceAppointRecordVo">
-        select id,
-               appoint_rec_sn,
-               change_appoint_rec_sn,
-               org_code,
-               pat_file_sn,
-               pat_media_sn,
-               pat_media_num,
-               pat_cate_sn,
-               pat_nature_sn,
-               pat_file_name,
-               pat_file_gender,
-               pat_age,
-               pat_birthday,
-               pat_card_type_code,
-               pat_card_type,
-               pat_id_card_num,
-               pat_addr,
-               pat_tel,
-               pat_way_code,
-               pat_way,
-               appoint_type_sn,
-               appoint_date,
-               appoint_operator_id,
-               appoint_operator_name,
-               appoint_regist_date,
-               register_schedule_sn,
-               outpat_cate_sn,
-               outpat_cate_name,
-               regist_dept_code,
-               regist_dept_name,
-               dept_pinyin_code,
-               regist_doct_code,
-               regist_doct_name,
-               staff_pinyin_code,
-               regist_time_cate,
-               pati_regist_sn,
-               schedule_regist_charge,
-               regist_rec_sn,
-               reg_user_sn,
-               reg_user_name,
-               reg_opt_time,
-               revoke_user_sn,
-               revoke_user_name,
-               revoke_opt_time,
-               withdrawal_time,
-               schedule_status_flag,
-               schedule_memo_desc,
-               schedule_credence_num,
-               regist_time_range,
-               schedule_detail_sn,
-               treat_date,
-               treat_doct_code,
-               treat_doct_name,
-               reg_way_code,
-               reg_way,
-               reg_system_way_code,
-               reg_system_way,
-               create_time,
-               update_time,
-               visit_flag,
-               sender_id,
-               sender_name,
-               send_time
-        from service_appoint_record
-    </sql>
-
-    <select id="selectServiceAppointRecordList" parameterType="com.smartor.domain.ServiceAppointRecord"
-            resultMap="ServiceAppointRecordResult">
-        <include refid="selectServiceAppointRecordVo"/>
-        where 1=1
-        and del_flag=0
-        <if test="appointRecSn != null  and appointRecSn != ''">
-            and appoint_rec_sn = #{appointRecSn}
-        </if>
-        <if test="changeAppointRecSn != null  and changeAppointRecSn != ''">
-            and change_appoint_rec_sn = #{changeAppointRecSn}
-        </if>
-        <if test="orgCode != null  and orgCode != ''">
-            and org_code = #{orgCode}
-        </if>
-        <if test="patFileSn != null  and patFileSn != ''">
-            and pat_file_sn = #{patFileSn}
-        </if>
-        <if test="patMediaSn != null  and patMediaSn != ''">
-            and pat_media_sn = #{patMediaSn}
-        </if>
-        <if test="patMediaNum != null  and patMediaNum != ''">
-            and pat_media_num = #{patMediaNum}
-        </if>
-        <if test="patCateSn != null  and patCateSn != ''">
-            and pat_cate_sn = #{patCateSn}
-        </if>
-        <if test="patNatureSn != null  and patNatureSn != ''">
-            and pat_nature_sn = #{patNatureSn}
-        </if>
-        <if test="patFileName != null  and patFileName != ''">
-            and pat_file_name like concat('%', #{patFileName}, '%')
-        </if>
-        <if test="patFileGender != null  and patFileGender != ''">
-            and pat_file_gender = #{patFileGender}
-        </if>
-        <if test="patAge != null  and patAge != ''">
-            and pat_age = #{patAge}
-        </if>
-        <if test="patBirthday != null  and patBirthday != ''">
-            and pat_birthday = #{patBirthday}
-        </if>
-        <if test="patCardTypeCode != null  and patCardTypeCode != ''">
-            and pat_card_type_code = #{patCardTypeCode}
-        </if>
-        <if test="patCardType != null  and patCardType != ''">
-            and pat_card_type = #{patCardType}
-        </if>
-        <if test="patIdCardNum != null  and patIdCardNum != ''">
-            and pat_id_card_num = #{patIdCardNum}
-        </if>
-        <if test="patAddr != null  and patAddr != ''">
-            and pat_addr = #{patAddr}
-        </if>
-        <if test="patTel != null  and patTel != ''">
-            and pat_tel = #{patTel}
-        </if>
-        <if test="patWayCode != null  and patWayCode != ''">
-            and pat_way_code = #{patWayCode}
-        </if>
-        <if test="patWay != null  and patWay != ''">
-            and pat_way = #{patWay}
-        </if>
-        <if test="appointTypeSn != null  and appointTypeSn != ''">
-            and appoint_type_sn = #{appointTypeSn}
-        </if>
-        <if test="appointDate != null  and appointDate != ''">
-            and appoint_date = #{appointDate}
-        </if>
-        <if test="appointOperatorId != null  and appointOperatorId != ''">
-            and appoint_operator_id = #{appointOperatorId}
-        </if>
-        <if test="appointOperatorName != null  and appointOperatorName != ''">
-            and appoint_operator_name like concat('%', #{appointOperatorName}, '%')
-        </if>
-        <if test="appointRegistDate != null  and appointRegistDate != ''">
-            and appoint_regist_date = #{appointRegistDate}
-        </if>
-        <if test="registerScheduleSn != null  and registerScheduleSn != ''">
-            and register_schedule_sn = #{registerScheduleSn}
-        </if>
-        <if test="outpatCateSn != null  and outpatCateSn != ''">
-            and outpat_cate_sn = #{outpatCateSn}
-        </if>
-        <if test="outpatCateName != null  and outpatCateName != ''">
-            and outpat_cate_name like concat('%', #{outpatCateName}, '%')
-        </if>
-        <if test="registDeptCode != null  and registDeptCode != ''">
-            and regist_dept_code = #{registDeptCode}
-        </if>
-        <if test="registDeptName != null  and registDeptName != ''">
-            and regist_dept_name like concat('%', #{registDeptName}, '%')
-        </if>
-        <if test="deptPinyinCode != null  and deptPinyinCode != ''">
-            and dept_pinyin_code = #{deptPinyinCode}
-        </if>
-        <if test="registDoctCode != null  and registDoctCode != ''">
-            and regist_doct_code = #{registDoctCode}
-        </if>
-        <if test="registDoctName != null  and registDoctName != ''">
-            and regist_doct_name like concat('%', #{registDoctName}, '%')
-        </if>
-        <if test="staffPinyinCode != null  and staffPinyinCode != ''">
-            and staff_pinyin_code = #{staffPinyinCode}
-        </if>
-        <if test="registTimeCate != null ">
-            and regist_time_cate = #{registTimeCate}
-        </if>
-        <if test="patiRegistSn != null ">
-            and pati_regist_sn = #{patiRegistSn}
-        </if>
-        <if test="scheduleRegistCharge != null ">
-            and schedule_regist_charge = #{scheduleRegistCharge}
-        </if>
-        <if test="registRecSn != null  and registRecSn != ''">
-            and regist_rec_sn = #{registRecSn}
-        </if>
-        <if test="regUserSn != null  and regUserSn != ''">
-            and reg_user_sn = #{regUserSn}
-        </if>
-        <if test="regUserName != null  and regUserName != ''">
-            and reg_user_name like concat('%', #{regUserName}, '%')
-        </if>
-        <if test="regOptTime != null  and regOptTime != ''">
-            and reg_opt_time = #{regOptTime}
-        </if>
-        <if test="revokeUserSn != null  and revokeUserSn != ''">
-            and revoke_user_sn = #{revokeUserSn}
-        </if>
-        <if test="revokeUserName != null  and revokeUserName != ''">
-            and revoke_user_name like concat('%', #{revokeUserName}, '%')
-        </if>
-        <if test="revokeOptTime != null  and revokeOptTime != ''">
-            and revoke_opt_time = #{revokeOptTime}
-        </if>
-        <if test="withdrawalTime != null  and withdrawalTime != ''">
-            and withdrawal_time = #{withdrawalTime}
-        </if>
-        <if test="scheduleStatusFlag != null ">
-            and schedule_status_flag = #{scheduleStatusFlag}
-        </if>
-        <if test="scheduleMemoDesc != null  and scheduleMemoDesc != ''">
-            and schedule_memo_desc = #{scheduleMemoDesc}
-        </if>
-        <if test="scheduleCredenceNum != null  and scheduleCredenceNum != ''">
-            and schedule_credence_num = #{scheduleCredenceNum}
-        </if>
-        <if test="registTimeRange != null  and registTimeRange != ''">
-            and regist_time_range = #{registTimeRange}
-        </if>
-        <if test="scheduleDetailSn != null  and scheduleDetailSn != ''">
-            and schedule_detail_sn = #{scheduleDetailSn}
-        </if>
-        <if test="treatDate != null  and treatDate != ''">
-            and treat_date = #{treatDate}
-        </if>
-        <if test="treatDoctCode != null  and treatDoctCode != ''">
-            and treat_doct_code = #{treatDoctCode}
-        </if>
-        <if test="treatDoctName != null  and treatDoctName != ''">
-            and treat_doct_name like concat('%', #{treatDoctName}, '%')
-        </if>
-        <if test="regWayCode != null  and regWayCode != ''">
-            and reg_way_code = #{regWayCode}
-        </if>
-        <if test="regWay != null  and regWay != ''">
-            and reg_way = #{regWay}
-        </if>
-        <if test="regSystemWayCode != null  and regSystemWayCode != ''">
-            and reg_system_way_code = #{regSystemWayCode}
-        </if>
-        <if test="regSystemWay != null  and regSystemWay != ''">
-            and reg_system_way = #{regSystemWay}
-        </if>
-        <if test="visitFlag != null ">
-            and visit_flag = #{visitFlag}
-        </if>
-        <if test="senderId != null  and senderId != ''">
-            and sender_id = #{senderId}
-        </if>
-        <if test="senderName != null  and senderName != ''">
-            and sender_name like concat('%', #{senderName}, '%')
-        </if>
-        <if test="sendTime != null  and sendTime != ''">
-            and send_time = #{sendTime}
-        </if>
-    </select>
-
-    <select id="selectServiceAppointRecordById" parameterType="Long"
-            resultMap="ServiceAppointRecordResult">
-        <include refid="selectServiceAppointRecordVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertServiceAppointRecord" parameterType="com.smartor.domain.ServiceAppointRecord"
-            useGeneratedKeys="true" keyProperty="id">
-        insert into service_appoint_record
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="appointRecSn != null">appoint_rec_sn,
-            </if>
-            <if test="changeAppointRecSn != null">change_appoint_rec_sn,
-            </if>
-            <if test="orgCode != null">org_code,
-            </if>
-            <if test="patFileSn != null">pat_file_sn,
-            </if>
-            <if test="patMediaSn != null">pat_media_sn,
-            </if>
-            <if test="patMediaNum != null">pat_media_num,
-            </if>
-            <if test="patCateSn != null">pat_cate_sn,
-            </if>
-            <if test="patNatureSn != null">pat_nature_sn,
-            </if>
-            <if test="patFileName != null">pat_file_name,
-            </if>
-            <if test="patFileGender != null">pat_file_gender,
-            </if>
-            <if test="patAge != null">pat_age,
-            </if>
-            <if test="patBirthday != null">pat_birthday,
-            </if>
-            <if test="patCardTypeCode != null">pat_card_type_code,
-            </if>
-            <if test="patCardType != null">pat_card_type,
-            </if>
-            <if test="patIdCardNum != null">pat_id_card_num,
-            </if>
-            <if test="patAddr != null">pat_addr,
-            </if>
-            <if test="patTel != null">pat_tel,
-            </if>
-            <if test="patWayCode != null">pat_way_code,
-            </if>
-            <if test="patWay != null">pat_way,
-            </if>
-            <if test="appointTypeSn != null">appoint_type_sn,
-            </if>
-            <if test="appointDate != null">appoint_date,
-            </if>
-            <if test="appointOperatorId != null">appoint_operator_id,
-            </if>
-            <if test="appointOperatorName != null">appoint_operator_name,
-            </if>
-            <if test="appointRegistDate != null">appoint_regist_date,
-            </if>
-            <if test="registerScheduleSn != null">register_schedule_sn,
-            </if>
-            <if test="outpatCateSn != null">outpat_cate_sn,
-            </if>
-            <if test="outpatCateName != null">outpat_cate_name,
-            </if>
-            <if test="registDeptCode != null">regist_dept_code,
-            </if>
-            <if test="registDeptName != null">regist_dept_name,
-            </if>
-            <if test="deptPinyinCode != null">dept_pinyin_code,
-            </if>
-            <if test="registDoctCode != null">regist_doct_code,
-            </if>
-            <if test="registDoctName != null">regist_doct_name,
-            </if>
-            <if test="staffPinyinCode != null">staff_pinyin_code,
-            </if>
-            <if test="registTimeCate != null">regist_time_cate,
-            </if>
-            <if test="patiRegistSn != null">pati_regist_sn,
-            </if>
-            <if test="scheduleRegistCharge != null">schedule_regist_charge,
-            </if>
-            <if test="registRecSn != null">regist_rec_sn,
-            </if>
-            <if test="regUserSn != null">reg_user_sn,
-            </if>
-            <if test="regUserName != null">reg_user_name,
-            </if>
-            <if test="regOptTime != null">reg_opt_time,
-            </if>
-            <if test="revokeUserSn != null">revoke_user_sn,
-            </if>
-            <if test="revokeUserName != null">revoke_user_name,
-            </if>
-            <if test="revokeOptTime != null">revoke_opt_time,
-            </if>
-            <if test="withdrawalTime != null">withdrawal_time,
-            </if>
-            <if test="scheduleStatusFlag != null">schedule_status_flag,
-            </if>
-            <if test="scheduleMemoDesc != null">schedule_memo_desc,
-            </if>
-            <if test="scheduleCredenceNum != null">schedule_credence_num,
-            </if>
-            <if test="registTimeRange != null">regist_time_range,
-            </if>
-            <if test="scheduleDetailSn != null">schedule_detail_sn,
-            </if>
-            <if test="treatDate != null">treat_date,
-            </if>
-            <if test="treatDoctCode != null">treat_doct_code,
-            </if>
-            <if test="treatDoctName != null">treat_doct_name,
-            </if>
-            <if test="regWayCode != null">reg_way_code,
-            </if>
-            <if test="regWay != null">reg_way,
-            </if>
-            <if test="regSystemWayCode != null">reg_system_way_code,
-            </if>
-            <if test="regSystemWay != null">reg_system_way,
-            </if>
-            <if test="createTime != null">create_time,
-            </if>
-            <if test="updateTime != null">update_time,
-            </if>
-            <if test="visitFlag != null">visit_flag,
-            </if>
-            <if test="senderId != null">sender_id,
-            </if>
-            <if test="senderName != null">sender_name,
-            </if>
-            <if test="sendTime != null">send_time,
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="appointRecSn != null">#{appointRecSn},
-            </if>
-            <if test="changeAppointRecSn != null">#{changeAppointRecSn},
-            </if>
-            <if test="orgCode != null">#{orgCode},
-            </if>
-            <if test="patFileSn != null">#{patFileSn},
-            </if>
-            <if test="patMediaSn != null">#{patMediaSn},
-            </if>
-            <if test="patMediaNum != null">#{patMediaNum},
-            </if>
-            <if test="patCateSn != null">#{patCateSn},
-            </if>
-            <if test="patNatureSn != null">#{patNatureSn},
-            </if>
-            <if test="patFileName != null">#{patFileName},
-            </if>
-            <if test="patFileGender != null">#{patFileGender},
-            </if>
-            <if test="patAge != null">#{patAge},
-            </if>
-            <if test="patBirthday != null">#{patBirthday},
-            </if>
-            <if test="patCardTypeCode != null">#{patCardTypeCode},
-            </if>
-            <if test="patCardType != null">#{patCardType},
-            </if>
-            <if test="patIdCardNum != null">#{patIdCardNum},
-            </if>
-            <if test="patAddr != null">#{patAddr},
-            </if>
-            <if test="patTel != null">#{patTel},
-            </if>
-            <if test="patWayCode != null">#{patWayCode},
-            </if>
-            <if test="patWay != null">#{patWay},
-            </if>
-            <if test="appointTypeSn != null">#{appointTypeSn},
-            </if>
-            <if test="appointDate != null">#{appointDate},
-            </if>
-            <if test="appointOperatorId != null">#{appointOperatorId},
-            </if>
-            <if test="appointOperatorName != null">#{appointOperatorName},
-            </if>
-            <if test="appointRegistDate != null">#{appointRegistDate},
-            </if>
-            <if test="registerScheduleSn != null">#{registerScheduleSn},
-            </if>
-            <if test="outpatCateSn != null">#{outpatCateSn},
-            </if>
-            <if test="outpatCateName != null">#{outpatCateName},
-            </if>
-            <if test="registDeptCode != null">#{registDeptCode},
-            </if>
-            <if test="registDeptName != null">#{registDeptName},
-            </if>
-            <if test="deptPinyinCode != null">#{deptPinyinCode},
-            </if>
-            <if test="registDoctCode != null">#{registDoctCode},
-            </if>
-            <if test="registDoctName != null">#{registDoctName},
-            </if>
-            <if test="staffPinyinCode != null">#{staffPinyinCode},
-            </if>
-            <if test="registTimeCate != null">#{registTimeCate},
-            </if>
-            <if test="patiRegistSn != null">#{patiRegistSn},
-            </if>
-            <if test="scheduleRegistCharge != null">#{scheduleRegistCharge},
-            </if>
-            <if test="registRecSn != null">#{registRecSn},
-            </if>
-            <if test="regUserSn != null">#{regUserSn},
-            </if>
-            <if test="regUserName != null">#{regUserName},
-            </if>
-            <if test="regOptTime != null">#{regOptTime},
-            </if>
-            <if test="revokeUserSn != null">#{revokeUserSn},
-            </if>
-            <if test="revokeUserName != null">#{revokeUserName},
-            </if>
-            <if test="revokeOptTime != null">#{revokeOptTime},
-            </if>
-            <if test="withdrawalTime != null">#{withdrawalTime},
-            </if>
-            <if test="scheduleStatusFlag != null">#{scheduleStatusFlag},
-            </if>
-            <if test="scheduleMemoDesc != null">#{scheduleMemoDesc},
-            </if>
-            <if test="scheduleCredenceNum != null">#{scheduleCredenceNum},
-            </if>
-            <if test="registTimeRange != null">#{registTimeRange},
-            </if>
-            <if test="scheduleDetailSn != null">#{scheduleDetailSn},
-            </if>
-            <if test="treatDate != null">#{treatDate},
-            </if>
-            <if test="treatDoctCode != null">#{treatDoctCode},
-            </if>
-            <if test="treatDoctName != null">#{treatDoctName},
-            </if>
-            <if test="regWayCode != null">#{regWayCode},
-            </if>
-            <if test="regWay != null">#{regWay},
-            </if>
-            <if test="regSystemWayCode != null">#{regSystemWayCode},
-            </if>
-            <if test="regSystemWay != null">#{regSystemWay},
-            </if>
-            <if test="createTime != null">#{createTime},
-            </if>
-            <if test="updateTime != null">#{updateTime},
-            </if>
-            <if test="visitFlag != null">#{visitFlag},
-            </if>
-            <if test="senderId != null">#{senderId},
-            </if>
-            <if test="senderName != null">#{senderName},
-            </if>
-            <if test="sendTime != null">#{sendTime},
-            </if>
-        </trim>
-    </insert>
-
-    <update id="updateServiceAppointRecord" parameterType="com.smartor.domain.ServiceAppointRecord">
-        update service_appoint_record
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="appointRecSn != null">appoint_rec_sn =
-                #{appointRecSn},
-            </if>
-            <if test="changeAppointRecSn != null">change_appoint_rec_sn =
-                #{changeAppointRecSn},
-            </if>
-            <if test="orgCode != null">org_code =
-                #{orgCode},
-            </if>
-            <if test="patFileSn != null">pat_file_sn =
-                #{patFileSn},
-            </if>
-            <if test="patMediaSn != null">pat_media_sn =
-                #{patMediaSn},
-            </if>
-            <if test="patMediaNum != null">pat_media_num =
-                #{patMediaNum},
-            </if>
-            <if test="patCateSn != null">pat_cate_sn =
-                #{patCateSn},
-            </if>
-            <if test="patNatureSn != null">pat_nature_sn =
-                #{patNatureSn},
-            </if>
-            <if test="patFileName != null">pat_file_name =
-                #{patFileName},
-            </if>
-            <if test="patFileGender != null">pat_file_gender =
-                #{patFileGender},
-            </if>
-            <if test="patAge != null">pat_age =
-                #{patAge},
-            </if>
-            <if test="patBirthday != null">pat_birthday =
-                #{patBirthday},
-            </if>
-            <if test="patCardTypeCode != null">pat_card_type_code =
-                #{patCardTypeCode},
-            </if>
-            <if test="patCardType != null">pat_card_type =
-                #{patCardType},
-            </if>
-            <if test="patIdCardNum != null">pat_id_card_num =
-                #{patIdCardNum},
-            </if>
-            <if test="patAddr != null">pat_addr =
-                #{patAddr},
-            </if>
-            <if test="patTel != null">pat_tel =
-                #{patTel},
-            </if>
-            <if test="patWayCode != null">pat_way_code =
-                #{patWayCode},
-            </if>
-            <if test="patWay != null">pat_way =
-                #{patWay},
-            </if>
-            <if test="appointTypeSn != null">appoint_type_sn =
-                #{appointTypeSn},
-            </if>
-            <if test="appointDate != null">appoint_date =
-                #{appointDate},
-            </if>
-            <if test="appointOperatorId != null">appoint_operator_id =
-                #{appointOperatorId},
-            </if>
-            <if test="appointOperatorName != null">appoint_operator_name =
-                #{appointOperatorName},
-            </if>
-            <if test="appointRegistDate != null">appoint_regist_date =
-                #{appointRegistDate},
-            </if>
-            <if test="registerScheduleSn != null">register_schedule_sn =
-                #{registerScheduleSn},
-            </if>
-            <if test="outpatCateSn != null">outpat_cate_sn =
-                #{outpatCateSn},
-            </if>
-            <if test="outpatCateName != null">outpat_cate_name =
-                #{outpatCateName},
-            </if>
-            <if test="registDeptCode != null">regist_dept_code =
-                #{registDeptCode},
-            </if>
-            <if test="registDeptName != null">regist_dept_name =
-                #{registDeptName},
-            </if>
-            <if test="deptPinyinCode != null">dept_pinyin_code =
-                #{deptPinyinCode},
-            </if>
-            <if test="registDoctCode != null">regist_doct_code =
-                #{registDoctCode},
-            </if>
-            <if test="registDoctName != null">regist_doct_name =
-                #{registDoctName},
-            </if>
-            <if test="staffPinyinCode != null">staff_pinyin_code =
-                #{staffPinyinCode},
-            </if>
-            <if test="registTimeCate != null">regist_time_cate =
-                #{registTimeCate},
-            </if>
-            <if test="patiRegistSn != null">pati_regist_sn =
-                #{patiRegistSn},
-            </if>
-            <if test="scheduleRegistCharge != null">schedule_regist_charge =
-                #{scheduleRegistCharge},
-            </if>
-            <if test="registRecSn != null">regist_rec_sn =
-                #{registRecSn},
-            </if>
-            <if test="regUserSn != null">reg_user_sn =
-                #{regUserSn},
-            </if>
-            <if test="regUserName != null">reg_user_name =
-                #{regUserName},
-            </if>
-            <if test="regOptTime != null">reg_opt_time =
-                #{regOptTime},
-            </if>
-            <if test="revokeUserSn != null">revoke_user_sn =
-                #{revokeUserSn},
-            </if>
-            <if test="revokeUserName != null">revoke_user_name =
-                #{revokeUserName},
-            </if>
-            <if test="revokeOptTime != null">revoke_opt_time =
-                #{revokeOptTime},
-            </if>
-            <if test="withdrawalTime != null">withdrawal_time =
-                #{withdrawalTime},
-            </if>
-            <if test="scheduleStatusFlag != null">schedule_status_flag =
-                #{scheduleStatusFlag},
-            </if>
-            <if test="scheduleMemoDesc != null">schedule_memo_desc =
-                #{scheduleMemoDesc},
-            </if>
-            <if test="scheduleCredenceNum != null">schedule_credence_num =
-                #{scheduleCredenceNum},
-            </if>
-            <if test="registTimeRange != null">regist_time_range =
-                #{registTimeRange},
-            </if>
-            <!-- 鍘熶负 `#{schedDetailSn}`锛氬疄浣撳睘鎬у彨 scheduleDetailSn锛坱est 閲岀敤鐨勪篃鏄畠锛夛紝
-                 schedDetailSn 涓嶅瓨鍦� 鈥斺�� 涓�鏃﹁蛋鍒拌繖鏉″垎鏀氨鎶�
-                 ReflectionException: no getter for 'schedDetailSn'銆� -->
-            <if test="scheduleDetailSn != null">schedule_detail_sn =
-                #{scheduleDetailSn},
-            </if>
-            <if test="treatDate != null">treat_date =
-                #{treatDate},
-            </if>
-            <if test="treatDoctCode != null">treat_doct_code =
-                #{treatDoctCode},
-            </if>
-            <if test="treatDoctName != null">treat_doct_name =
-                #{treatDoctName},
-            </if>
-            <if test="regWayCode != null">reg_way_code =
-                #{regWayCode},
-            </if>
-            <if test="regWay != null">reg_way =
-                #{regWay},
-            </if>
-            <if test="regSystemWayCode != null">reg_system_way_code =
-                #{regSystemWayCode},
-            </if>
-            <if test="regSystemWay != null">reg_system_way =
-                #{regSystemWay},
-            </if>
-            <if test="createTime != null">create_time =
-                #{createTime},
-            </if>
-            <if test="updateTime != null">update_time =
-                #{updateTime},
-            </if>
-            <if test="visitFlag != null">visit_flag =
-                #{visitFlag},
-            </if>
-            <if test="senderId != null">sender_id =
-                #{senderId},
-            </if>
-            <if test="senderName != null">sender_name =
-                #{senderName},
-            </if>
-            <if test="sendTime != null">send_time =
-                #{sendTime},
-            </if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <update id="deleteServiceAppointRecordById" parameterType="Long">
-        update service_appoint_record
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where id = #{id}
-    </update>
-
-    <update id="deleteServiceAppointRecordByIds" parameterType="String">
-        update service_appoint_record
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </update>
-
-
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskRecordMapper.xml b/smartor/src/main/resources/mapper/smartor/ServiceSubtaskRecordMapper.xml
deleted file mode 100644
index 2491254..0000000
--- a/smartor/src/main/resources/mapper/smartor/ServiceSubtaskRecordMapper.xml
+++ /dev/null
@@ -1,179 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.ServiceSubtaskRecordMapper">
-
-    <resultMap type="com.ruoyi.task.domain.ServiceSubtaskRecord" id="ServiceSubtaskRecordResult">
-        <result property="id" column="id"/>
-        <result property="taskid" column="taskid"/>
-        <result property="subtaskId" column="subtask_id"/>
-        <result property="uuid" column="uuid"/>
-        <result property="tasktype" column="tasktype"/>
-        <result property="preachform" column="preachform"/>
-        <result property="recordtype" column="recordtype"/>
-        <result property="startTime" column="start_time"/>
-        <result property="endTime" column="end_time"/>
-        <result property="result" column="result"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="isupload" column="isupload"/>
-        <result property="uploadTime" column="upload_time"/>
-        <result property="orgid" column="orgid"/>
-        <result property="pid" column="pid"/>
-        <result property="guid" column="guid"/>
-        <result property="remark" column="remark"/>
-    </resultMap>
-
-    <sql id="selectServiceSubtaskRecordVo">
-        select id,
-               taskid,
-               subtask_id,
-               uuid,
-               tasktype,
-               preachform,
-               recordtype,
-               start_time,
-               end_time,
-               result,
-               del_flag,
-               update_by,
-               update_time,
-               create_by,
-               create_time,
-               isupload,
-               upload_time,
-               orgid,
-               pid,
-               remark,
-               guid
-        from service_subtask_record
-    </sql>
-
-    <select id="selectServiceSubtaskRecordList" parameterType="com.ruoyi.task.domain.ServiceSubtaskRecord"
-            resultMap="ServiceSubtaskRecordResult">
-        <include refid="selectServiceSubtaskRecordVo"/>
-        where 1=1
-            <if test="taskid != null  and taskid != ''">and taskid = #{taskid}</if>
-            <if test="subtaskId != null ">and subtask_id = #{subtaskId}</if>
-            <if test="uuid != null  and uuid != ''">and uuid = #{uuid}</if>
-            <if test="tasktype != null  and tasktype != ''">and tasktype = #{tasktype}</if>
-            <if test="preachform != null  and preachform != ''">and preachform = #{preachform}</if>
-            <if test="recordtype != null  and recordtype != ''">and recordtype = #{recordtype}</if>
-            <if test="startTime != null ">and start_time = #{startTime}</if>
-            <if test="endTime != null ">and end_time = #{endTime}</if>
-            <if test="result != null  and result != ''">and result = #{result}</if>
-            <if test="isupload != null ">and isupload = #{isupload}</if>
-            <if test="uploadTime != null ">and upload_time = #{uploadTime}</if>
-            <if test="orgid != null  and orgid != ''">and orgid = #{orgid}</if>
-            <if test="pid != null ">and pid = #{pid}</if>
-            <if test="guid != null  and guid != ''">and guid = #{guid}</if>
-            <if test="remark != null  and remark != ''">and remark = #{remark}</if>
-    </select>
-
-    <select id="selectServiceSubtaskRecordBySubtaskIds" resultMap="ServiceSubtaskRecordResult">
-        <include refid="selectServiceSubtaskRecordVo"/>
-        where subtask_id IN
-        <foreach collection="list" item="subtaskId" open="(" separator="," close=")">
-            #{subtaskId}
-        </foreach>
-    </select>
-
-    <select id="selectServiceSubtaskRecordById" parameterType="Long" resultMap="ServiceSubtaskRecordResult">
-        <include refid="selectServiceSubtaskRecordVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertServiceSubtaskRecord" parameterType="com.ruoyi.task.domain.ServiceSubtaskRecord">
-        insert into service_subtask_record
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="id != null">id,</if>
-            <if test="taskid != null">taskid,</if>
-            <if test="uuid != null">uuid,</if>
-            <if test="tasktype != null">tasktype,</if>
-            <if test="preachform != null">preachform,</if>
-            <if test="recordtype != null">recordtype,</if>
-            <if test="startTime != null">start_time,</if>
-            <if test="endTime != null">end_time,</if>
-            <if test="result != null">result,</if>
-            <if test="delFlag != null">del_flag,</if>
-            <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
-            <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
-            <if test="isupload != null">isupload,</if>
-            <if test="uploadTime != null">upload_time,</if>
-            <if test="orgid != null">orgid,</if>
-            <if test="pid != null">pid,</if>
-            <if test="guid != null">guid,</if>
-            <if test="remark != null">remark,</if>
-            <if test="subtaskId != null ">subtask_id,</if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="id != null">#{id},</if>
-            <if test="taskid != null">#{taskid},</if>
-            <if test="uuid != null">#{uuid},</if>
-            <if test="tasktype != null">#{tasktype},</if>
-            <if test="preachform != null">#{preachform},</if>
-            <if test="recordtype != null">#{recordtype},</if>
-            <if test="startTime != null">#{startTime},</if>
-            <if test="endTime != null">#{endTime},</if>
-            <if test="result != null">#{result},</if>
-            <if test="delFlag != null">#{delFlag},</if>
-            <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
-            <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
-            <if test="isupload != null">#{isupload},</if>
-            <if test="uploadTime != null">#{uploadTime},</if>
-            <if test="orgid != null">#{orgid},</if>
-            <if test="pid != null">#{pid},</if>
-            <if test="guid != null">#{guid},</if>
-            <if test="remark != null">#{remark},</if>
-            <if test="subtaskId != null ">#{subtaskId},</if>
-        </trim>
-    </insert>
-
-    <update id="updateServiceSubtaskRecord" parameterType="com.ruoyi.task.domain.ServiceSubtaskRecord">
-        update service_subtask_record
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="taskid != null">taskid = #{taskid},</if>
-            <if test="uuid != null">uuid = #{uuid},</if>
-            <if test="tasktype != null">tasktype = #{tasktype},</if>
-            <if test="preachform != null">preachform = #{preachform},</if>
-            <if test="recordtype != null">recordtype = #{recordtype},</if>
-            <if test="startTime != null">start_time = #{startTime},</if>
-            <if test="endTime != null">end_time = #{endTime},</if>
-            <if test="result != null">result = #{result},</if>
-            <if test="delFlag != null">del_flag = #{delFlag},</if>
-            <if test="updateBy != null">update_by = #{updateBy},</if>
-            <if test="updateTime != null">update_time = #{updateTime},</if>
-            <if test="createBy != null">create_by = #{createBy},</if>
-            <if test="createTime != null">create_time = #{createTime},</if>
-            <if test="isupload != null">isupload = #{isupload},</if>
-            <if test="uploadTime != null">upload_time = #{uploadTime},</if>
-            <if test="orgid != null">orgid = #{orgid},</if>
-            <if test="pid != null">pid = #{pid},</if>
-            <if test="guid != null">guid = #{guid},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="subtaskId != null ">subtask_id = #{subtaskId},</if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <delete id="deleteServiceSubtaskRecordById" parameterType="Long">
-        delete
-        from service_subtask_record
-        where id = #{id}
-    </delete>
-
-    <delete id="deleteServiceSubtaskRecordByIds" parameterType="String">
-        delete from service_subtask_record where id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </delete>
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SysDeptMapper.xml b/smartor/src/main/resources/mapper/smartor/SysDeptMapper.xml
deleted file mode 100644
index 66be32b..0000000
--- a/smartor/src/main/resources/mapper/smartor/SysDeptMapper.xml
+++ /dev/null
@@ -1,363 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.SysDept2Mapper">
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.SysDept" id="SysDeptResult">
-        <id property="deptId" column="dept_id"/>
-        <id property="hisDeptId" column="his_dept_id"/>
-        <result property="parentId" column="parent_id"/>
-        <result property="hisParentId" column="his_parent_id"/>
-        <result property="ancestors" column="ancestors"/>
-        <result property="deptName" column="dept_name"/>
-        <result property="orderNum" column="order_num"/>
-        <result property="leader" column="leader"/>
-        <result property="phone" column="phone"/>
-        <result property="email" column="email"/>
-        <result property="status" column="status"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="parentName" column="parent_name"/>
-        <result property="createBy" column="create_by"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="deptCode" column="dept_code"/>
-        <result property="deptType" column="dept_type"/>
-        <result property="guid" column="guid"/>
-        <result property="orgid" column="orgid"/>
-        <result property="type" column="type"/>
-        <result property="campusid" column="campusid"/>
-    </resultMap>
-
-    <sql id="selectDeptVo">
-        select d.dept_id,
-               d.dept_code,
-               d.type,
-               d.orgid,
-               d.campusid,
-               d.parent_id,
-               d.ancestors,
-               d.dept_name,
-               d.order_num,
-               d.leader,
-               d.phone,
-               d.dept_type,
-               d.email,
-               d.status,
-               d.del_flag,
-               d.create_by,
-               d.guid,
-               d.create_time,
-               d.his_dept_id,
-               d.his_parent_id
-        from sys_dept d
-    </sql>
-
-    <select id="selectDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysDept" resultMap="SysDeptResult">
-        <include refid="selectDeptVo"/>
-        where d.del_flag = '0'
-        <if test="deptId != null and deptId != 0">
-            AND dept_id = #{deptId}
-        </if>
-        <if test="type != null">
-            AND type = #{type}
-        </if>
-        <if test="parentId != null and parentId != 0">
-            AND parent_id = #{parentId}
-        </if>
-        <if test="deptName != null and deptName != ''">
-            AND dept_name like concat('%', #{deptName}, '%')
-        </if>
-        <if test="status != null and status != ''">
-            AND status = #{status}
-        </if>
-        <if test="deptCode != null and deptCode != ''">
-            AND dept_code = #{deptCode}
-        </if>
-        <if test="deptType != null and deptType != ''">
-            AND dept_type = #{deptType}
-        </if>
-        <if test="hisDeptId != null and hisDeptId != ''">
-            AND his_dept_id = #{hisDeptId}
-        </if>
-        <if test="hisParentId != null and hisParentId != ''">
-            AND his_parent_id = #{hisParentId}
-        </if>
-        <if test="orgid != null and orgid != ''">
-            AND orgid = #{orgid}
-        </if>
-        <if test="campusid != null and campusid != ''">
-            AND campusid = #{campusid}
-        </if>
-        order by d.parent_id, d.order_num
-    </select>
-
-    <select id="selectDeptListByRoleId" resultType="Long">
-        select d.dept_id
-        from sys_dept d
-        left join sys_role_dept rd on d.dept_id = rd.dept_id
-        where rd.role_id = #{roleId}
-        <if test="deptCheckStrictly">
-            and d.dept_id not in (select d.parent_id from sys_dept d inner join sys_role_dept rd on d.dept_id =
-            rd.dept_id and rd.role_id = #{roleId})
-        </if>
-        order by d.parent_id, d.order_num
-    </select>
-
-    <select id="selectDeptById" parameterType="Long" resultMap="SysDeptResult">
-        select d.dept_id,
-               d.parent_id,
-               d.campusid,
-               d.dept_code,
-               d.type,
-               d.dept_type,
-               d.ancestors,
-               d.dept_name,
-               d.order_num,
-               d.leader,
-               d.phone,
-               d.email,
-               d.status,
-               d.orgid,
-               d.his_dept_id,
-               d.his_parent_id
-                   (select dept_name from sys_dept where dept_id = d.parent_id) parent_name
-        from sys_dept d
-        where d.dept_id = #{deptId}
-    </select>
-
-    <select id="selectDeptByCode" parameterType="string" resultMap="SysDeptResult">
-        select d.dept_id,
-        d.parent_id,
-        d.type,
-        d.campusid,
-        d.dept_code,
-        d.dept_type,
-        d.ancestors,
-        d.dept_name,
-        d.order_num,
-        d.leader,
-        d.phone,
-        d.email,
-        d.orgid,
-        d.his_dept_id,
-        d.his_parent_id,
-        d.status
-        from sys_dept d
-        where del_flag = 0
-        <if test="deptCode != null and deptCode != ''">
-            AND dept_code = #{deptCode}
-        </if>
-        <if test="orgid != null and orgid != ''">
-            AND orgid = #{orgid}
-        </if>
-    </select>
-
-    <select id="selectDeptByCodeAndCampus" parameterType="string" resultMap="SysDeptResult">
-        select d.dept_id,
-        d.parent_id,
-        d.type,
-        d.campusid,
-        d.dept_code,
-        d.dept_type,
-        d.ancestors,
-        d.dept_name,
-        d.order_num,
-        d.leader,
-        d.phone,
-        d.email,
-        d.orgid,
-        d.his_dept_id,
-        d.his_parent_id,
-        d.status
-        from sys_dept d
-        where del_flag = 0
-        <if test="deptCode != null and deptCode != ''">
-            AND dept_code = #{deptCode}
-        </if>
-        <if test="orgid != null and orgid != ''">
-            AND orgid = #{orgid}
-        </if>
-        <if test="campusid != null and campusid != ''">
-            AND campusid = #{campusid}
-        </if>
-    </select>
-
-    <select id="checkDeptExistUser" parameterType="Long" resultType="int">
-        select count(1)
-        from sys_user
-        where dept_id = #{deptId}
-          and del_flag = '0'
-    </select>
-
-    <select id="hasChildByDeptId" parameterType="Long" resultType="int">
-        select count(1)
-        from sys_dept
-        where del_flag = '0'
-          and parent_id = #{deptId} limit 1
-    </select>
-
-    <select id="selectChildrenDeptById" parameterType="Long" resultMap="SysDeptResult">
-        select *
-        from sys_dept
-        where find_in_set(#{deptId}, ancestors)
-    </select>
-
-    <select id="selectNormalChildrenDeptById" parameterType="Long" resultType="int">
-        select count(*)
-        from sys_dept
-        where status = 0
-          and del_flag = '0'
-          and find_in_set(#{deptId}, ancestors)
-    </select>
-
-    <select id="checkDeptNameUnique" resultMap="SysDeptResult">
-        <include refid="selectDeptVo"/>
-        where dept_name=#{deptName} and parent_id = #{parentId} and del_flag = '0' limit 1
-    </select>
-
-
-    <insert id="batchDept">
-        insert into sys_dept(
-        dept_id,
-        parent_id,
-        dept_name,
-        ancestors,
-        order_num,
-        leader,
-        phone,
-        email,
-        status,
-        dept_code,
-        dept_type,
-        create_by,
-        his_dept_id,
-        his_parent_id,
-        type,
-        guid,
-        orgid,
-        campusid,
-        create_time
-        ) values
-        <foreach collection="list" item="item" separator=",">
-            (
-            #{item.deptId},
-            #{item.parentId},
-            #{item.deptName},
-            #{item.ancestors},
-            #{item.orderNum},
-            #{item.leader},
-            #{item.phone},
-            #{item.email},
-            #{item.status},
-            #{item.deptCode},
-            #{item.deptType},
-            #{item.createBy},
-            #{item.hisDeptId},
-            #{item.hisParentId},
-            #{item.type},
-            #{item.guid},
-            #{item.orgid},
-            #{item.campusid},
-            now()
-            )
-        </foreach>
-    </insert>
-
-
-    <insert id="insertDept" parameterType="com.ruoyi.common.core.domain.entity.SysDept">
-        insert into sys_dept(
-        <if test="deptId != null and deptId != 0">dept_id,</if>
-        <if test="parentId != null and parentId != 0">parent_id,</if>
-        <if test="deptName != null and deptName != ''">dept_name,</if>
-        <if test="ancestors != null and ancestors != ''">ancestors,</if>
-        <if test="orderNum != null">order_num,</if>
-        <if test="leader != null and leader != ''">leader,</if>
-        <if test="phone != null and phone != ''">phone,</if>
-        <if test="email != null and email != ''">email,</if>
-        <if test="status != null">status,</if>
-        <if test="deptCode != null">dept_code,</if>
-        <if test="deptType != null">dept_type,</if>
-        <if test="createBy != null and createBy != ''">create_by,</if>
-        <if test="hisDeptId != null and hisDeptId != ''">his_dept_id,</if>
-        <if test="hisParentId != null and hisParentId != ''">his_parent_id,</if>
-        <if test="type != null and type != ''">type,</if>
-        <if test="guid != null and guid != ''">guid,</if>
-        <if test="orgid != null and orgid != ''">orgid,</if>
-        <if test="campusid != null and campusid != ''">campusid,</if>
-        create_time
-        )values(
-        <if test="deptId != null and deptId != 0">#{deptId},</if>
-        <if test="parentId != null and parentId != 0">#{parentId},</if>
-        <if test="deptName != null and deptName != ''">#{deptName},</if>
-        <if test="ancestors != null and ancestors != ''">#{ancestors},</if>
-        <if test="orderNum != null">#{orderNum},</if>
-        <if test="leader != null and leader != ''">#{leader},</if>
-        <if test="phone != null and phone != ''">#{phone},</if>
-        <if test="email != null and email != ''">#{email},</if>
-        <if test="status != null">#{status},</if>
-        <if test="deptCode != null">#{deptCode},</if>
-        <if test="deptType != null">#{deptType},</if>
-        <if test="createBy != null and createBy != ''">#{createBy},</if>
-        <if test="hisDeptId != null and hisDeptId != ''">#{hisDeptId},</if>
-        <if test="hisParentId != null and hisParentId != ''">#{hisParentId},</if>
-        <if test="type != null and type != ''">#{type},</if>
-        <if test="guid != null and guid != ''">#{guid},</if>
-        <if test="orgid != null and orgid != ''">#{orgid},</if>
-        <if test="campusid != null and campusid != ''">#{campusid},</if>
-        sysdate()
-        )
-    </insert>
-
-    <update id="updateDept" parameterType="com.ruoyi.common.core.domain.entity.SysDept">
-        update sys_dept
-        <set>
-            <if test="parentId != null and parentId != 0">parent_id = #{parentId},</if>
-            <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
-            <if test="ancestors != null and ancestors != ''">ancestors = #{ancestors},</if>
-            <if test="orderNum != null">order_num = #{orderNum},</if>
-            <if test="leader != null">leader = #{leader},</if>
-            <if test="phone != null">phone = #{phone},</if>
-            <if test="orgid != null">orgid = #{orgid},</if>
-            <if test="email != null">email = #{email},</if>
-            <if test="status != null and status != ''">status = #{status},</if>
-            <if test="deptCode != null">dept_code=#{deptCode},</if>
-            <if test="deptType != null">dept_type=#{deptType},</if>
-            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-            <if test="hisParentId != null and hisParentId != ''">his_parent_id = #{hisParentId},</if>
-            <if test="hisDeptId != null and hisDeptId != ''">his_dept_id = #{hisDeptId},</if>
-            <if test="type != null and type != ''">type = #{type},</if>
-            <if test="campusid != null and campusid != ''">campusid = #{campusid},</if>
-            update_time = sysdate()
-        </set>
-        where dept_id = #{deptId}
-    </update>
-
-    <update id="updateDeptChildren" parameterType="java.util.List">
-        update sys_dept set ancestors =
-        <foreach collection="depts" item="item" index="index"
-                 separator=" " open="case dept_id" close="end">
-            when #{item.deptId} then #{item.ancestors}
-        </foreach>
-        where dept_id in
-        <foreach collection="depts" item="item" index="index"
-                 separator="," open="(" close=")">
-            #{item.deptId}
-        </foreach>
-    </update>
-
-    <update id="updateDeptStatusNormal" parameterType="Long">
-        update sys_dept set status = '0' where dept_id in
-        <foreach collection="array" item="deptId" open="(" separator="," close=")">
-            #{deptId}
-        </foreach>
-    </update>
-
-    <delete id="deleteDeptById" parameterType="Long">
-        update sys_dept
-        set del_flag = '1'
-        where dept_id = #{deptId}
-    </delete>
-
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
deleted file mode 100644
index 80691f9..0000000
--- a/smartor/src/main/resources/mapper/smartor/SysUserDeptMapper.xml
+++ /dev/null
@@ -1,281 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.SysUserDeptMapper">
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.SysUserDept" id="SysUserDeptResult">
-        <result property="id" column="id"/>
-        <result property="orgid" column="orgid"/>
-        <result property="userId" column="user_id"/>
-        <result property="deptId" column="dept_id"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="deptCode" column="dept_code"/>
-        <result property="deptName" column="dept_name"/>
-        <result property="deptType" column="dept_type"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="campusid" column="campusid"/>
-    </resultMap>
-
-    <resultMap id="deptResult" type="com.ruoyi.common.core.domain.entity.SysDept">
-        <id property="deptId" column="dept_id"/>
-        <result property="parentId" column="parent_id"/>
-        <result property="deptName" column="dept_name"/>
-        <result property="ancestors" column="ancestors"/>
-        <result property="orderNum" column="order_num"/>
-        <result property="leader" column="leader"/>
-        <result property="status" column="dept_status"/>
-        <result property="campusid" column="campusid"/>
-    </resultMap>
-
-    <sql id="selectSysUserDeptVo">
-        select id,
-               user_id,
-               dept_id,
-               del_flag,
-               campusid,
-               orgid,
-               create_time,
-               update_time,
-               dept_code,
-               dept_name,
-               dept_type
-        from sys_user_dept
-    </sql>
-
-    <select id="selectSysUserDeptList" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept"
-            resultMap="SysUserDeptResult">
-        <include refid="selectSysUserDeptVo"/>
-        where 1=1
-            and del_flag = 0
-            and orgid=#{orgid}
-            <if test="userId != null ">
-                and user_id = #{userId}
-            </if>
-            <if test="deptId != null ">
-                and dept_id = #{deptId}
-            </if>
-            <if test="delFlag != null ">
-                and del_flag = #{delFlag}
-            </if>
-            <if test="createTime != null ">
-                and create_time = #{createTime}
-            </if>
-            <if test="updateTime != null ">
-                and update_time = #{updateTime}
-            </if>
-            <if test="deptType != null ">
-                and dept_type = #{deptType}
-            </if>
-            <if test="deptCode != null ">
-                and dept_code = #{deptCode}
-            </if>
-            <if test="campusid != null ">
-                and campusid = #{campusid}
-            </if>
-    </select>
-
-    <select id="selectSysUserDeptById" parameterType="Long"
-            resultMap="SysUserDeptResult">
-        <include refid="selectSysUserDeptVo"/>
-        where id = #{id}
-    </select>
-
-    <insert id="insertSysUserDept" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept"
-            useGeneratedKeys="true" keyProperty="id">
-        insert into sys_user_dept
-        <trim prefix="(" suffix=")" suffixOverrides=",">
-            <if test="userId != null">user_id,
-            </if>
-            <if test="deptId != null">dept_id,
-            </if>
-            <if test="delFlag != null ">
-                del_flag,
-            </if>
-            <if test="createTime != null ">
-                create_time,
-            </if>
-            <if test="updateTime != null ">
-                update_time,
-            </if>
-            <if test="deptType != null ">
-                dept_type,
-            </if>
-            <if test="deptCode != null ">
-                dept_code,
-            </if>
-            <if test="deptName != null ">
-                dept_name,
-            </if>
-            <if test="orgid != null ">
-                orgid,
-            </if>
-            <if test="userCode != null ">
-                user_code,
-            </if>
-            <if test="campusid != null ">
-                campusid,
-            </if>
-        </trim>
-        <trim prefix="values (" suffix=")" suffixOverrides=",">
-            <if test="userId != null">#{userId},
-            </if>
-            <if test="deptId != null">#{deptId},
-            </if>
-            <if test="delFlag != null ">
-                #{delFlag},
-            </if>
-            <if test="createTime != null ">
-                #{createTime},
-            </if>
-            <if test="updateTime != null ">
-                #{updateTime},
-            </if>
-            <if test="deptType != null ">
-                #{deptType},
-            </if>
-            <if test="deptCode != null ">
-                #{deptCode},
-            </if>
-            <if test="deptName != null ">
-                #{deptName},
-            </if>
-            <if test="orgid != null ">
-                #{orgid},
-            </if>
-            <if test="userCode != null ">
-                #{userCode},
-            </if>
-            <if test="campusid != null ">
-                #{campusid},
-            </if>
-        </trim>
-    </insert>
-
-    <update id="updateSysUserDept" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept">
-        update sys_user_dept
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="userId != null">user_id =
-                #{userId},
-            </if>
-            <if test="deptId != null">dept_id =
-                #{deptId},
-            </if>
-            <if test="delFlag != null ">
-                del_flag = #{delFlag},
-            </if>
-            <if test="createTime != null ">
-                create_time = #{createTime},
-            </if>
-            <if test="updateTime != null ">
-                update_time = #{updateTime},
-            </if>
-            <if test="deptType != null ">
-                dept_type = #{deptType},
-            </if>
-            <if test="deptCode != null ">
-                dept_code = #{deptCode},
-            </if>
-            <if test="deptName != null ">
-                dept_name = #{deptName},
-            </if>
-            <if test="orgid != null ">
-                orgid = #{orgid},
-            </if>
-            <if test="campusid != null ">
-                campusid = #{campusid},
-            </if>
-        </trim>
-        where id = #{id}
-    </update>
-
-    <update id="deleteSysUserDeptById" parameterType="Long">
-        update sys_user_dept
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1
-        </trim>
-        where id = #{id}
-    </update>
-
-    <select id="selectDeptListByUserId" resultMap="deptResult">
-        select d.dept_id,
-               d.dept_name,
-               d.parent_id,
-               d.ancestors,
-               d.dept_name,
-               d.order_num,
-               d.campusid,
-               d.leader,
-               d.orgid,
-               d.status as dept_status
-        from sys_dept d
-                 left join sys_user_dept ud on d.dept_code = ud.dept_code
-        where ud.user_id = #{userId}
-          and ud.del_flag = 0
-          and d.del_flag = 0
-    </select>
-    <update id="deleteSysUserDeptByIds" parameterType="String">
-        update sys_user_dept
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1,
-            update_time = sysdate()
-        </trim>
-        where user_id in
-        <foreach item="id" collection="array" open="(" separator="," close=")">
-            #{id}
-        </foreach>
-    </update>
-
-
-    <update id="deleteSysUserDeptByCode" parameterType="String">
-        update sys_user_dept
-        <trim prefix="SET" suffixOverrides=",">
-            del_flag =1,
-            update_time = sysdate()
-        </trim>
-        where del_flag = 0
-            and user_id =#{userId}
-            and dept_code=#{deptCode}
-    </update>
-
-    <update id="updateSysUserDeptForSync" parameterType="com.ruoyi.common.core.domain.entity.SysUserDept">
-        update sys_user_dept
-        <trim prefix="SET" suffixOverrides=",">
-            <if test="deptId != null">dept_id =
-                #{deptId},
-            </if>
-            <if test="delFlag != null ">
-                del_flag = #{delFlag},
-            </if>
-            <if test="createTime != null ">
-                create_time = #{createTime},
-            </if>
-            <if test="updateTime != null ">
-                update_time = #{updateTime},
-            </if>
-            <if test="deptType != null ">
-                dept_type = #{deptType},
-            </if>
-            <if test="deptCode != null ">
-                dept_code = #{deptCode},
-            </if>
-            <if test="deptName != null ">
-                dept_name = #{deptName},
-            </if>
-            <if test="orgid != null ">
-                orgid = #{orgid},
-            </if>
-            <if test="campusid != null ">
-                campusid = #{campusid},
-            </if>
-        </trim>
-        where user_id =#{userId}
-        <if test="orgid != null and orgid != ''">
-            and orgid = #{orgid}
-        </if>
-        <if test="campusid != null and campusid != ''">
-            and campusid = #{campusid}
-        </if>
-    </update>
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SysUserMapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserMapper.xml
deleted file mode 100644
index e9089d8..0000000
--- a/smartor/src/main/resources/mapper/smartor/SysUserMapper.xml
+++ /dev/null
@@ -1,432 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.SysUser2Mapper">
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.SysUser" id="SysUserResult">
-        <id property="userId" column="user_id"/>
-        <id property="hisUserId" column="his_user_id"/>
-        <result property="deptId" column="dept_id"/>
-        <result property="userCode" column="user_code"/>
-        <result property="hospInfo" column="hosp_info"/>
-        <result property="deptInfo" column="dept_info"/>
-        <result property="userName" column="user_name"/>
-        <result property="nickName" column="nick_name"/>
-        <result property="email" column="email"/>
-        <result property="phonenumber" column="phonenumber"/>
-        <result property="sex" column="sex"/>
-        <result property="avatar" column="avatar"/>
-        <result property="password" column="password"/>
-        <result property="status" column="status"/>
-        <result property="delFlag" column="del_flag"/>
-        <result property="loginIp" column="login_ip"/>
-        <result property="loginDate" column="login_date"/>
-        <result property="createBy" column="create_by"/>
-        <result property="idCard" column="id_card"/>
-        <result property="createTime" column="create_time"/>
-        <result property="updateBy" column="update_by"/>
-        <result property="title" column="title"/>
-        <result property="birthday" column="birthday"/>
-        <result property="jobPhone" column="job_phone"/>
-        <result property="updateTime" column="update_time"/>
-        <result property="remark" column="remark"/>
-        <result property="userType" column="user_type"/>
-        <result property="searchscope" column="searchscope"/>
-        <result property="guid" column="guid"/>
-        <result property="orgid" column="orgid"/>
-        <result property="campusid" column="campusid"/>
-        <association property="dept" column="dept_id" javaType="com.ruoyi.common.core.domain.entity.SysDept"
-                     resultMap="deptResult"/>
-        <collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
-    </resultMap>
-
-    <resultMap id="deptResult" type="com.ruoyi.common.core.domain.entity.SysDept">
-        <id property="deptId" column="dept_id"/>
-        <result property="parentId" column="parent_id"/>
-        <result property="deptName" column="dept_name"/>
-        <result property="ancestors" column="ancestors"/>
-        <result property="orderNum" column="order_num"/>
-        <result property="leader" column="leader"/>
-        <result property="status" column="dept_status"/>
-    </resultMap>
-
-    <resultMap id="RoleResult" type="com.ruoyi.common.core.domain.entity.SysRole">
-        <id property="roleId" column="role_id"/>
-        <result property="roleName" column="role_name"/>
-        <result property="roleKey" column="role_key"/>
-        <result property="roleSort" column="role_sort"/>
-        <result property="dataScope" column="data_scope"/>
-        <result property="status" column="role_status"/>
-    </resultMap>
-
-    <sql id="selectUserVo">
-        select u.user_id,
-               u.dept_id,
-               u.user_code,
-               u.id_card,
-               u.hosp_info,
-               u.dept_info,
-               u.searchscope,
-               u.user_name,
-               u.user_type,
-               u.nick_name,
-               u.title,
-               u.his_user_id,
-               u.job_phone,
-               u.birthday,
-               u.email,
-               u.avatar,
-               u.phonenumber,
-               u.password,
-               u.sex,
-               u.status,
-               u.del_flag,
-               u.login_ip,
-               u.login_date,
-               u.create_by,
-               u.create_time,
-               u.remark,
-               u.guid,
-               u.orgid,
-               u.campusid,
-               d.dept_id,
-               d.parent_id,
-               d.ancestors,
-               d.dept_name,
-               d.order_num,
-               d.leader,
-               d.status as dept_status,
-               r.role_id,
-               r.role_name,
-               r.role_key,
-               r.role_sort,
-               r.data_scope,
-               r.status as role_status
-        from sys_user u
-                 left join sys_user_org o on o.user_id = u.user_id
-                 left join sys_dept d on u.dept_id = d.dept_id
-                 left join sys_user_role ur on u.user_id = ur.user_id
-                 left join sys_role r on r.role_id = ur.role_id
-    </sql>
-
-    <select id="selectUserList" parameterType="com.ruoyi.common.core.domain.entity.SysUser" resultMap="SysUserResult">
-        select u.user_code,u.user_id,u.title,u.his_user_id,u.hosp_info,u.dept_info, u.searchscope, u.dept_id,
-        u.user_type,
-        u.nick_name, u.user_name,
-        u.email,u.id_card,
-        u.avatar,
-        u.birthday,
-        u.job_phone,
-        u.phonenumber, u.sex, u.status,
-        u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
-        u.orgid, u.campusid,
-        d.dept_name, d.leader
-        from sys_user u
-        left join sys_dept d on u.dept_id = d.dept_id
-        where u.del_flag = '0'
-        <if test="orgid != null and orgid != ''">
-            AND u.orgid = #{orgid}
-        </if>
-        <if test="userId != null and userId != 0">
-            AND u.user_id = #{userId}
-        </if>
-        <if test="userName != null and userName != ''">
-            AND u.user_name = #{userName}
-        </if>
-        <if test="nickName != null and nickName != ''">
-            AND u.nick_name like concat('%', #{nickName}, '%')
-        </if>
-        <if test="status != null and status != ''">
-            AND u.status = #{status}
-        </if>
-        <if test="idCard != null and idCard != ''">
-            AND u.id_card = #{idCard}
-        </if>
-        <if test="title != null and title != ''">
-            AND u.title = #{title}
-        </if>
-        <if test="jobPhone != null and jobPhone != ''">
-            AND u.job_phone = #{jobPhone}
-        </if>
-        <if test="birthday != null and birthday != ''">
-            AND u.birthday = #{birthday}
-        </if>
-        <if test="hisUserId != null and hisUserId != ''">
-            AND u.his_user_id = #{hisUserId}
-        </if>
-        <if test="phonenumber != null and phonenumber != ''">
-            AND u.phonenumber like concat('%', #{phonenumber}, '%')
-        </if>
-        <if test="params.beginTime != null and params.beginTime != ''"><!-- 寮�濮嬫椂闂存绱� -->
-            AND date_format(u.create_time,'%y%m%d') &gt;= date_format(#{params.beginTime},'%y%m%d')
-        </if>
-        <if test="params.endTime != null and params.endTime != ''"><!-- 缁撴潫鏃堕棿妫�绱� -->
-            AND date_format(u.create_time,'%y%m%d') &lt;= date_format(#{params.endTime},'%y%m%d')
-        </if>
-        <if test="deptId != null and deptId != 0">
-            AND (u.dept_id = #{deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{deptId},
-            ancestors) ))
-        </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        ${params.dataScope}
-    </select>
-
-    <select id="selectAllocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser"
-            resultMap="SysUserResult">
-        select distinct u.user_id,u.his_user_id,u.title,u.hosp_info,u.dept_info, u.searchscope, u.dept_id, u.user_name,
-        u.user_type,u.user_code,
-        u.nick_name,
-        u.email,
-        u.birthday,
-        u.job_phone,
-        u.phonenumber, u.status,u.id_card,
-        u.create_time
-        from sys_user u
-        left join sys_dept d on u.dept_id = d.dept_id
-        left join sys_user_role ur on u.user_id = ur.user_id
-        left join sys_role r on r.role_id = ur.role_id
-        where u.del_flag = '0' and r.role_id = #{roleId}
-        <if test="userName != null and userName != ''">
-            AND u.user_name like concat('%', #{userName}, '%')
-        </if>
-        <if test="phonenumber != null and phonenumber != ''">
-            AND u.phonenumber like concat('%', #{phonenumber}, '%')
-        </if>
-        <if test="title != null and title != ''">
-            AND u.title = #{title}
-        </if>
-        <if test="hisUserId != null and hisUserId != ''">
-            AND u.his_user_id = #{hisUserId}
-        </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        ${params.dataScope}
-    </select>
-
-    <select id="selectUnallocatedList" parameterType="com.ruoyi.common.core.domain.entity.SysUser"
-            resultMap="SysUserResult">
-        select distinct u.user_id, u.dept_id, u.hosp_info, u.dept_info,u.searchscope, u.user_name, u.user_type,
-        u.nick_name,
-        u.user_code,
-        u.email,
-        u.his_user_id,
-        u.title,
-        u.job_phone,
-        u.birthday,
-        u.phonenumber, u.status,u.id_card,
-        u.create_time
-        from sys_user u
-        left join sys_dept d on u.dept_id = d.dept_id
-        left join sys_user_role ur on u.user_id = ur.user_id
-        left join sys_role r on r.role_id = ur.role_id
-        where u.del_flag = '0' and (r.role_id != #{roleId} or r.role_id IS NULL)
-        and u.user_id not in (select u.user_id from sys_user u inner join sys_user_role ur on u.user_id = ur.user_id and
-        ur.role_id = #{roleId})
-        <if test="userName != null and userName != ''">
-            AND u.user_name like concat('%', #{userName}, '%')
-        </if>
-        <if test="phonenumber != null and phonenumber != ''">
-            AND u.phonenumber like concat('%', #{phonenumber}, '%')
-        </if>
-        <!-- 鏁版嵁鑼冨洿杩囨护 -->
-        ${params.dataScope}
-    </select>
-
-    <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult">
-        <include refid="selectUserVo"/>
-        where u.user_name = #{userName} and u.del_flag = '0'
-    </select>
-
-    <select id="selectUserById" parameterType="Long" resultMap="SysUserResult">
-        <include refid="selectUserVo"/>
-        where u.user_id = #{userId}
-    </select>
-
-    <select id="checkUserNameUnique" parameterType="String" resultMap="SysUserResult">
-        select user_id, user_name
-        from sys_user
-        where user_name = #{userName}
-          and del_flag = '0' limit 1
-    </select>
-
-    <select id="checkPhoneUnique" parameterType="String" resultMap="SysUserResult">
-        select user_id, phonenumber
-        from sys_user
-        where phonenumber = #{phonenumber}
-          and del_flag = '0' limit 1
-    </select>
-
-    <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult">
-        select user_id, email
-        from sys_user
-        where email = #{email}
-          and del_flag = '0' limit 1
-    </select>
-
-    <insert id="insertUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser" useGeneratedKeys="true"
-            keyProperty="userId">
-        insert into sys_user(
-        <if test="userId != null and userId != 0">user_id,</if>
-        <if test="deptId != null and deptId != 0">dept_id,</if>
-        <if test="userName != null and userName != ''">user_name,</if>
-        <if test="nickName != null and nickName != ''">nick_name,</if>
-        <if test="email != null and email != ''">email,</if>
-        <if test="avatar != null and avatar != ''">avatar,</if>
-        <if test="phonenumber != null and phonenumber != ''">phonenumber,</if>
-        <if test="sex != null and sex != ''">sex,</if>
-        <if test="password != null and password != ''">password,</if>
-        <if test="status != null and status != ''">status,</if>
-        <if test="createBy != null and createBy != ''">create_by,</if>
-        <if test="remark != null and remark != ''">remark,</if>
-        <if test="userType != null and userType != ''">user_type,</if>
-        <if test="deptInfo != null and deptInfo != ''">dept_info,</if>
-        <if test="hospInfo != null and hospInfo != ''">hosp_info,</if>
-        <if test="searchscope != null and searchscope != ''">searchscope,</if>
-        <if test="idCard != null and idCard != ''">id_card,</if>
-        <if test="title != null and title != ''">title,</if>
-        <if test="jobPhone != null and jobPhone != ''">job_phone,</if>
-        <if test="birthday != null ">birthday,</if>
-        <if test="hisUserId != null and hisUserId != ''">his_user_id,</if>
-        <if test="guid != null and guid != ''">guid,</if>
-        <if test="deptCode != null and deptCode != ''">dept_code,</if>
-        <if test="deptName != null and deptName != ''">dept_name,</if>
-        <if test="userCode != null and userCode != ''">user_code,</if>
-        <if test="orgid != null and orgid != ''">orgid,</if>
-        <if test="campusid != null and campusid != ''">campusid,</if>
-        create_time
-        )values(
-        <if test="userId != null and userId != 0">#{userId},</if>
-        <if test="deptId != null and deptId != 0">#{deptId},</if>
-        <if test="userName != null and userName != ''">#{userName},</if>
-        <if test="nickName != null and nickName != ''">#{nickName},</if>
-        <if test="email != null and email != ''">#{email},</if>
-        <if test="avatar != null and avatar != ''">#{avatar},</if>
-        <if test="phonenumber != null and phonenumber != ''">#{phonenumber},</if>
-        <if test="sex != null and sex != ''">#{sex},</if>
-        <if test="password != null and password != ''">#{password},</if>
-        <if test="status != null and status != ''">#{status},</if>
-        <if test="createBy != null and createBy != ''">#{createBy},</if>
-        <if test="remark != null and remark != ''">#{remark},</if>
-        <if test="userType != null and userType != ''">#{userType},</if>
-        <if test="deptInfo != null and deptInfo != ''">#{deptInfo},</if>
-        <if test="hospInfo != null and hospInfo != ''">#{hospInfo},</if>
-        <if test="searchscope != null and searchscope != ''">#{searchscope},</if>
-        <if test="idCard != null and idCard != ''">#{idCard},</if>
-        <if test="title != null and title != ''">#{title},</if>
-        <if test="jobPhone != null and jobPhone != ''">#{jobPhone},</if>
-        <if test="birthday != null">#{birthday},</if>
-        <if test="hisUserId != null and hisUserId != ''">#{hisUserId},</if>
-        <if test="guid != null and guid != ''">#{guid},</if>
-        <if test="deptCode != null and deptCode != ''">#{deptCode},</if>
-        <if test="deptName != null and deptName != ''">#{deptName},</if>
-        <if test="userCode != null and userCode != ''">#{userCode},</if>
-        <if test="orgid != null and orgid != ''">#{orgid},</if>
-        <if test="campusid != null and campusid != ''">#{campusid},</if>
-        sysdate()
-        )
-    </insert>
-
-
-    <insert id="batchUser" useGeneratedKeys="true" keyProperty="userId">
-        insert into sys_user(
-        user_id, dept_id, user_name, nick_name, email, avatar, phonenumber, sex, password, status, create_by, remark,
-        user_type, dept_info, hosp_info, searchscope, id_card, title, job_phone, birthday, his_user_id, guid,
-        user_code, orgid, campusid,
-        create_time
-        ) values
-        <foreach collection="list" item="item" separator=",">
-            (
-            #{item.userId},
-            #{item.deptId},
-            #{item.userName},
-            #{item.nickName},
-            #{item.email},
-            #{item.avatar},
-            #{item.phonenumber},
-            #{item.sex},
-            #{item.password},
-            #{item.status},
-            #{item.createBy},
-            #{item.remark},
-            #{item.userType},
-            #{item.deptInfo},
-            #{item.hospInfo},
-            #{item.searchscope},
-            #{item.idCard},
-            #{item.title},
-            #{item.jobPhone},
-            #{item.birthday},
-            #{item.hisUserId},
-            #{item.guid},
-            #{item.userCode},
-            #{item.orgid},
-            #{item.campusid},
-            now()
-            )
-        </foreach>
-    </insert>
-
-    <update id="updateUser" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
-        update sys_user
-        <set>
-            <if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
-            <if test="userName != null and userName != ''">user_name = #{userName},</if>
-            <if test="nickName != null and nickName != ''">nick_name = #{nickName},</if>
-            <if test="email != null ">email = #{email},</if>
-            <if test="phonenumber != null ">phonenumber = #{phonenumber},</if>
-            <if test="sex != null and sex != ''">sex = #{sex},</if>
-            <if test="avatar != null and avatar != ''">avatar = #{avatar},</if>
-            <if test="password != null and password != ''">password = #{password},</if>
-            <if test="status != null and status != ''">status = #{status},</if>
-            <if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
-            <if test="loginDate != null">login_date = #{loginDate},</if>
-            <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
-            <if test="remark != null">remark = #{remark},</if>
-            <if test="userType != null">user_type = #{userType},</if>
-            <if test="searchscope != null">searchscope = #{searchscope},</if>
-            <if test="deptInfo != null and deptInfo != ''">dept_info=#{deptInfo},</if>
-            <if test="hospInfo != null and hospInfo != ''">hosp_info=#{hospInfo},</if>
-            <if test="idCard != null and idCard != ''">id_card=#{idCard},</if>
-            <if test="jobPhone != null and jobPhone != ''">job_phone=#{jobPhone},</if>
-            <if test="birthday != null ">birthday=#{birthday},</if>
-            <if test="userCode != null ">user_code=#{userCode},</if>
-            <if test="title != null and title != ''">
-                title = #{title},
-            </if>
-            <if test="hisUserId != null and hisUserId != ''">
-                his_user_id = #{hisUserId},
-            </if>
-            <if test="orgid != null and orgid != ''">orgid = #{orgid},</if>
-            <if test="campusid != null and campusid != ''">campusid = #{campusid},</if>
-            update_time = sysdate()
-        </set>
-        where user_id = #{userId}
-    </update>
-
-
-    <update id="updateUserAvatar" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
-        update sys_user
-        set avatar = #{avatar}
-        where user_name = #{userName}
-    </update>
-
-    <update id="resetUserPwd" parameterType="com.ruoyi.common.core.domain.entity.SysUser">
-        update sys_user
-        set password = #{password}
-        where user_name = #{userName}
-    </update>
-
-    <delete id="deleteUserById" parameterType="Long">
-        update sys_user
-        set del_flag = '1'
-        where user_id = #{userId}
-    </delete>
-
-    <delete id="deleteUserByIds" parameterType="Long">
-        update sys_user set del_flag = '1' where user_id in
-        <foreach collection="array" item="userId" open="(" separator="," close=")">
-            #{userId}
-        </foreach>
-    </delete>
-
-</mapper>
diff --git a/smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml b/smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml
deleted file mode 100644
index 6e21fb5..0000000
--- a/smartor/src/main/resources/mapper/smartor/SysUserRole2Mapper.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE mapper
-        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
-<mapper namespace="com.smartor.mapper.SysUserRole2Mapper">
-
-    <resultMap type="com.ruoyi.common.core.domain.entity.SysUserRole" id="SysUserRoleResult">
-        <result property="userId" column="user_id"/>
-        <result property="roleId" column="role_id"/>
-        <result property="guid" column="guid"/>
-        <result property="orgid" column="orgid"/>
-    </resultMap>
-
-    <delete id="deleteUserRoleByUserId" parameterType="Long">
-        delete
-        from sys_user_role
-        where user_id = #{userId}
-    </delete>
-
-    <select id="countUserRoleByRoleId" resultType="Integer">
-        select count(1)
-        from sys_user_role
-        where role_id = #{roleId}
-    </select>
-
-    <select id="selectUserRoleByRoleIdAndUserId" resultMap="SysUserRoleResult">
-        select user_id,role_id,guid,orgid
-        from sys_user_role
-        where 1=1
-            <if test="roleId != null ">and role_id = #{roleId}</if>
-            <if test="userId != null ">and user_id = #{userId}</if>
-
-    </select>
-
-    <delete id="deleteUserRole" parameterType="Long">
-        delete from sys_user_role where user_id in
-        <foreach collection="array" item="userId" open="(" separator="," close=")">
-            #{userId}
-        </foreach>
-    </delete>
-
-    <insert id="batchUserRole">
-        insert into sys_user_role(user_id, role_id,guid,orgid) values
-        <foreach item="item" index="index" collection="list" separator=",">
-            (#{item.userId},#{item.roleId},#{item.guid},#{item.orgid})
-        </foreach>
-    </insert>
-
-    <delete id="deleteUserRoleInfo" parameterType="SysUserRole">
-        delete
-        from sys_user_role
-        where user_id = #{userId}
-          and role_id = #{roleId}
-    </delete>
-
-    <delete id="deleteUserRoleInfos">
-        delete from sys_user_role where role_id=#{roleId} and user_id in
-        <foreach collection="userIds" item="userId" open="(" separator="," close=")">
-            #{userId}
-        </foreach>
-    </delete>
-</mapper>

--
Gitblit v1.9.3