From c9c91ad3e3ac218d81c86809c93a35622b51a686 Mon Sep 17 00:00:00 2001 From: schangxiang@126.com <schangxiang@126.com> Date: 周三, 17 9月 2025 16:05:05 +0800 Subject: [PATCH] 初步 增加 推送线程 --- DEmon/iWareDataCore/BASE/Service/InOutListService.cs | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/DEmon/iWareDataCore/BASE/Service/InOutListService.cs b/DEmon/iWareDataCore/BASE/Service/InOutListService.cs index f3f05a8..ef56cba 100644 --- a/DEmon/iWareDataCore/BASE/Service/InOutListService.cs +++ b/DEmon/iWareDataCore/BASE/Service/InOutListService.cs @@ -12,7 +12,7 @@ namespace iWareDataCore.BASE.Service { - public class InOutListService : CommonService<InOutListEntity, BASEInOutList, DbModelCore> + public class InOutListService : CommonService<InOutListEntity, BASEInOutList, DbModelCore> { private static object Lock = new object(); @@ -54,6 +54,15 @@ { List<BASEInOutListDetail> inldlst = new List<BASEInOutListDetail>(); msg = ""; + + //楠岃瘉鍗曞彿鏄惁宸茬粡瀛樺湪 銆怑ditby shaocx,2025-09-17銆� + var findInOutList = DbModel.BASEInOutLists.FirstOrDefault(x => x.listno == iol.ListNo); + if (findInOutList != null) + { + msg = $"鍗曞彿{iol.ListNo}宸插瓨鍦�"; + return -1; + } + iol.InOutListDetail.ForEach(x => { inldlst.Add(x.ToOrm()); }); BASEInOutList biol = new BASEInOutList(); biol = iol.ToOrm(); @@ -77,7 +86,7 @@ msg = ""; using (var dbModel = new DbModelCore()) { - var cutInOut = dbModel.BASEInOutLists.FirstOrDefault(x=>x.listno== inoutNo); + var cutInOut = dbModel.BASEInOutLists.FirstOrDefault(x => x.listno == inoutNo); if (cutInOut == null) { msg = "鍑哄叆搴撳崟鍙蜂笉瀛樺湪"; @@ -89,7 +98,7 @@ msg = "鐗╂枡涓嶅瓨鍦�"; return false; } - var findInOutDetail = dbModel.BASEInOutListDetails.FirstOrDefault(x => x.inoutlistid == cutInOut.id && x.materialid== cutMarital.id); + var findInOutDetail = dbModel.BASEInOutListDetails.FirstOrDefault(x => x.inoutlistid == cutInOut.id && x.materialid == cutMarital.id); if (findInOutDetail != null) { msg = "姝ゅ崟鍙峰拰鐗╂枡宸插瓨鍦�"; @@ -112,7 +121,7 @@ return false; } } - + public override int Delete(int id, out string msg) { msg = ""; -- Gitblit v1.9.3