From 8f316cbca92dc248151863320c506f961ed95db8 Mon Sep 17 00:00:00 2001
From: dengjunjie <dengjunjie@hnkhzn.com>
Date: 星期二, 17 六月 2025 17:18:00 +0800
Subject: [PATCH] 1

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
index 87598ea..8701370 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs"
@@ -36,7 +36,9 @@
 
         public int GetTaskNum(string sequenceName)
         {
-            return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt();
+            int taskNum = Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt();
+            if (taskNum >= 99999999) Db.Ado.GetScalar($"ALTER SEQUENCE {sequenceName} RESTART WITH {1}");
+            return taskNum;
         }
 
         public override int AddData(Dt_Task entity)

--
Gitblit v1.9.3