From ea9bdf217e8202a5fa475262dba1792decb05bcb Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期五, 13 九月 2024 15:36:00 +0800
Subject: [PATCH] 1
---
代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoRepository/TaskRepository.cs | 26 ++++++++++++++++++++++++++
1 files changed, 26 insertions(+), 0 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 8f9d98f..87598ea 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"
@@ -20,7 +20,9 @@
using System.Linq;
using System.Text;
using System.Threading.Tasks;
+using WIDESEA_Core.Attributes;
using WIDESEA_Core.BaseRepository;
+using WIDESEA_Core.Helper;
using WIDESEA_ITaskInfoRepository;
using WIDESEA_Model.Models;
@@ -32,5 +34,29 @@
{
}
+ public int GetTaskNum(string sequenceName)
+ {
+ return Db.Ado.GetScalar($"SELECT NEXT VALUE FOR {sequenceName}").ObjToInt();
+ }
+
+ public override int AddData(Dt_Task entity)
+ {
+ return base.AddData(entity);
+ }
+
+ public override int AddData(List<Dt_Task> listEntity)
+ {
+ if (listEntity.GroupBy(x => x.PalletCode).Select(x => x.Count()).Any(x => x > 1))
+ {
+ throw new Exception("浠诲姟鏁扮粍鏁版嵁鎵樼洏鍙烽噸澶�");
+ }
+
+ if (QueryFirst(x => listEntity.Select(v => v.PalletCode).Contains(x.PalletCode)) != null)
+ {
+ throw new Exception("鏈夐噸澶嶄换鍔�");
+ }
+
+ return base.AddData(listEntity);
+ }
}
}
--
Gitblit v1.9.3