From 97a161a5042d9ef92605f306163f040823491f1f Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期四, 10 七月 2025 18:06:46 +0800
Subject: [PATCH] 代码提交

---
 smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

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 c8e8bb5..b6e641e 100644
--- a/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
+++ b/smartor/src/main/java/com/smartor/service/impl/ServiceExternalServiceImpl.java
@@ -920,7 +920,7 @@
         int count = patMedOuthospMapper.countPatMedOuthosp();
         if (count > 3000000) {
             // 2. 鍐疯棌琛ㄥ苟鏂板缓
-            String timeSuffix = new SimpleDateFormat("yyyyMMddHHmmss").format(new Date());
+            String timeSuffix = new SimpleDateFormat("yyyyMM").format(new Date());
             String oldName = "pat_med_outhosp";
             String newName = oldName + "_" + timeSuffix;
 
@@ -937,9 +937,10 @@
                 }
             }
 
-            // 4. 鏂板缓
-            patMedOuthospMapper.createPatMedOuthosp(oldName, newName);
-
+            // 4. 鏂板缓(姝ゆ椂鍙墿鍐疯〃锛孭atMedOuthosp娌′簡锛岄渶瑕佹柊寤轰竴涓�)
+            patMedOuthospMapper.createPatMedOuthosp(newName, oldName);
+            //璁剧疆鏂拌〃鑷涓婚敭
+            patMedOuthospMapper.createPatMedOuthospAutoAdd(oldName);
             // 5. 璁剧疆鏂拌〃鑷璧峰鍊�
             patMedOuthospMapper.setAutoIncrement(oldName, maxId + 1);
 

--
Gitblit v1.9.3