From 733e63cb362f17aea4a1020654fa348a0d0c1f06 Mon Sep 17 00:00:00 2001 From: dengjunjie <dengjunjie@hnkhzn.com> Date: 星期一, 24 二月 2025 00:08:59 +0800 Subject: [PATCH] 优化入库逻辑,优化直接出库逻辑,优化移库任务逻辑 --- 项目代码/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs" index 87598ea..fb28719 100644 --- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs" +++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs" @@ -36,7 +36,12 @@ 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 >= 999999) + { + Db.Ado.GetScalar($"ALTER SEQUENCE {sequenceName} RESTART WITH {1}"); + } + return taskNum; } public override int AddData(Dt_Task entity) -- Gitblit v1.9.3