From ef691687fb6a3d9da7c254c974d526af89f602ff Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期五, 07 三月 2025 21:06:46 +0800 Subject: [PATCH] Merge branch 'master' of http://47.115.28.255:8110/r/TigerClouds-Tech/Server/TigerApi6_2024 --- Tiger.Business.WMS/Transaction/ReprintLabel.cs | 80 ++++++++++++++++++++-------------------- 1 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Tiger.Business.WMS/Transaction/ReprintLabel.cs b/Tiger.Business.WMS/Transaction/ReprintLabel.cs index d87b28a..45eb8c4 100644 --- a/Tiger.Business.WMS/Transaction/ReprintLabel.cs +++ b/Tiger.Business.WMS/Transaction/ReprintLabel.cs @@ -150,11 +150,11 @@ } else { - if (Biz.Db.Queryable<WMS_ITEM>().Any(q=>q.SUPP_LOTNO == rePrints.BatchNo) && (Biz.Db.Queryable<WMS_ITEM>().Where(q=>q.SUPP_LOTNO == rePrints.BatchNo).Sum(x=>x.QTY)>= rePrints.BatchQty)) { - action.IsSuccessed = false; - action.LocaleMsg = Biz.L($"姝ゅ簱浣峓{LocationCode}]涓婄殑鎵规[{rePrints.BatchNo}]鏁伴噺宸茬粡澶熸暟锛屼笉鑳藉啀涓婃灦鐢熸垚鏍囩"); - return action; - } + //if (Biz.Db.Queryable<WMS_ITEM>().Any(q=>q.SUPP_LOTNO == rePrints.BatchNo) && (Biz.Db.Queryable<WMS_ITEM>().Where(q=>q.SUPP_LOTNO == rePrints.BatchNo && q.STATUS == WMS_ITEM.STATUSs.InStore.GetValue()).Sum(x=>x.QTY)>= rePrints.BatchQty)) { + // action.IsSuccessed = false; + // action.LocaleMsg = Biz.L($"姝ゅ簱浣峓{LocationCode}]涓婄殑鎵规[{rePrints.BatchNo}]鏁伴噺宸茬粡澶熸暟锛屼笉鑳藉啀涓婃灦鐢熸垚鏍囩"); + // return action; + //} foreach (var ent in rePrints.SnList) { string CurSN = DI.Resolve<ICodeRuleCache>()["InitialBarcode"]?.Generate($"{ent.SN}").Data.ToString() ?? ""; @@ -289,43 +289,43 @@ //} //鎵ц涓婃灦 - foreach (var item in inv.Items) - { - item.TRANS_CODE = "ReprintLabel"; - item.TRANS_NO = $"ReprintLabel{DateTime.Now:yyyyMMdd}"; - } - Result<PutOnInfo> putonResult = WMS_ITEM_Biz.WmsItem.PutOn(inv, input.AuthOption, nLocation.LOCATION_CODE); - if (!putonResult.IsSuccessed) - { - action.IsSuccessed = false; - action.LocaleMsg = putonResult.LocaleMsg; - inv = null; - CurSN = ""; - return action; - } - PutOnInfo putOnInfo = putonResult.Data; - items.AddRange(putOnInfo.Items); - itemhiss.AddRange(putOnInfo.History); - itemPkgs.AddRange(putOnInfo.Packages); - itemExts.AddRange(putOnInfo.ItemsExt); + //foreach (var item in inv.Items) + //{ + // item.TRANS_CODE = "ReprintLabel"; + // item.TRANS_NO = $"ReprintLabel{DateTime.Now:yyyyMMdd}"; + //} + //Result<PutOnInfo> putonResult = WMS_ITEM_Biz.WmsItem.PutOn(inv, input.AuthOption, nLocation.LOCATION_CODE); + //if (!putonResult.IsSuccessed) + //{ + // action.IsSuccessed = false; + // action.LocaleMsg = putonResult.LocaleMsg; + // inv = null; + // CurSN = ""; + // return action; + //} + //PutOnInfo putOnInfo = putonResult.Data; + //items.AddRange(putOnInfo.Items); + //itemhiss.AddRange(putOnInfo.History); + //itemPkgs.AddRange(putOnInfo.Packages); + //itemExts.AddRange(putOnInfo.ItemsExt); } //淇濆瓨鍒版暟鎹簱 - var db = Business.Biz.Db; - var dbTran = db.UseTran(() => - { - //鍏ュ簱 - db.Storageable(items, UserCode).ExecuteCommand(); - db.Storageable(itemPkgs, UserCode).ExecuteCommand(); - db.Insertable(itemhiss, UserCode).ExecuteCommand(); - var x = db.Storageable(itemExts, UserCode).ToStorage(); - x.AsInsertable.ExecuteCommand();//涓嶅瓨鍦ㄦ彃鍏� - x.AsUpdateable.ExecuteCommand();//瀛樺湪鏇存柊 - }); - if (!dbTran.IsSuccess) - { - Logger.Default.Fatal(dbTran.ErrorException, "Database transaction save exception"); - throw dbTran.ErrorException; - } + //var db = Business.Biz.Db; + //var dbTran = db.UseTran(() => + //{ + // //鍏ュ簱 + // db.Storageable(items, UserCode).ExecuteCommand(); + // db.Storageable(itemPkgs, UserCode).ExecuteCommand(); + // db.Insertable(itemhiss, UserCode).ExecuteCommand(); + // var x = db.Storageable(itemExts, UserCode).ToStorage(); + // x.AsInsertable.ExecuteCommand();//涓嶅瓨鍦ㄦ彃鍏� + // x.AsUpdateable.ExecuteCommand();//瀛樺湪鏇存柊 + //}); + //if (!dbTran.IsSuccess) + //{ + // Logger.Default.Fatal(dbTran.ErrorException, "Database transaction save exception"); + // throw dbTran.ErrorException; + //} action.Data.Data = rePrints; action.LocaleMsg = Biz.L("搴撲綅鎵规鏉$爜涓婃灦鎴愬姛"); -- Gitblit v1.9.3