From 35afcfe07fef52f74a2079fdb5977a87f88ddbb6 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期二, 17 十二月 2024 20:40:47 +0800 Subject: [PATCH] 提交前检查是否岗位、工单和不良代码 --- Tiger.Business.WMS/Transaction/OutOther.cs | 15 +++------------ 1 files changed, 3 insertions(+), 12 deletions(-) diff --git a/Tiger.Business.WMS/Transaction/OutOther.cs b/Tiger.Business.WMS/Transaction/OutOther.cs index 86c33bc..e144659 100644 --- a/Tiger.Business.WMS/Transaction/OutOther.cs +++ b/Tiger.Business.WMS/Transaction/OutOther.cs @@ -218,7 +218,7 @@ { if (!input.Code.IsNullOrEmpty()) { - Biz.Db.Deleteable<WMS_ITEM_POOL>().Where(q => CurPoolList.Select(q => q.SN).Contains(q.SN)).ExecuteCommand(); + Biz.Db.Deleteable<WMS_ITEM_POOL>().Where(q => q.TRANS_CODE == req.BILLCODE).ExecuteCommand(); //濡傛灉涓婁竴娆℃帹鑽愭湁鏁版嵁锛屽垯鍏堢伃鎺変寒鐨勭伅 if (Suggests.Any()) { @@ -276,16 +276,7 @@ Suggests.RemoveAll(q => q.poolItem.IsNullOrEmpty()); //淇濆瓨鐗╂枡姹犲埌鏁版嵁搴� - var db = Biz.Db; - var dbTran = db.UseTran(() => - { - db.Deleteable<WMS_ITEM_POOL>().Where(q => q.TRANS_CODE == req.BILLCODE).ExecuteCommand(); - db.Insertable(CurPoolList).ExecuteCommand(); - }); - if (!dbTran.IsSuccess) - { - throw dbTran.ErrorException; - } + Biz.Db.Insertable(CurPoolList).ExecuteCommand(); action = await LightAll(new() { AuthOption = input.AuthOption, ReqType = ReqType.IsWhole, Color = LedColor.Blue,ItemCode = input.Code }); } } @@ -411,7 +402,7 @@ //} var MaxDC = CurPoolList.Any(x => x.ITEM_CODE == CurInv.ItemInfo.ITEM_CODE) ? CurPoolList.Where(x => x.ITEM_CODE == CurInv.ItemInfo.ITEM_CODE).Max(t => t.PROD_DATE) : DateTime.MinValue; //鍒ゆ柇绯荤粺鍙傛暟鏄惁璁剧疆鍏堣繘鍏堝嚭 - if (Biz.SysParam["YesOrNo"].PARAM_VALUE == "Y") + if (Cache.SysParam["YesOrNo"].PARAM_VALUE == "Y") { if (CurInv.Items.Max(x => x.PROD_DATE).Date > MaxDC.Date) { -- Gitblit v1.9.3