From ee6ed49aa82a2746facff0a89b94d74d37329e85 Mon Sep 17 00:00:00 2001 From: Ben Lin <maobin001@msn.com> Date: 星期四, 16 一月 2025 21:41:06 +0800 Subject: [PATCH] 添加扫描入库逻辑及相关属性和方法 --- Tiger.Business.WMS/Transaction/In_Default.cs | 13 +++++++++---- 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Tiger.Business.WMS/Transaction/In_Default.cs b/Tiger.Business.WMS/Transaction/In_Default.cs index 76b9532..f8ab470 100644 --- a/Tiger.Business.WMS/Transaction/In_Default.cs +++ b/Tiger.Business.WMS/Transaction/In_Default.cs @@ -48,7 +48,7 @@ /// </summary> public async Task<ApiAction<ScanOutput>> Scan(BaseInput input) { - var action = new ApiAction<ScanOutput>(); + var action = new ApiAction<ScanOutput>(new ScanOutput()); try { if (input.SN.IsNullOrEmpty()) @@ -61,7 +61,7 @@ //鍒ゆ柇鎵弿鐨勬槸鍚﹁揣鏋� var whUnit = await Biz.Db.Queryable<V_WH_UNIT>().Where(t => (t.SHELF_CODE.ToUpper() == input.SN || t.LOCATION_CODE.ToUpper() == input.SN) && t.AUTH_ORG == OrgCode).IncludesAllFirstLayer().FirstAsync(); //if (string.IsNullOrEmpty(CurScanShelf?.ShelfCode)) - if (!whUnit.IsNullOrEmpty()) + if (!whUnit.IsNullOrEmpty() || string.IsNullOrEmpty(CurScanShelf?.ShelfCode)) { action = await ScanShelf(input.SN, whUnit); } @@ -90,7 +90,8 @@ { if (CurInvItem.IsNullOrEmpty()) { - Result<IInventory> result = WMS_ITEM_Biz.WmsItem.Get(input.SN, input.AuthOption, true); + //瑙f瀽鏉$爜 + Result<IInventory> result = WMS_ITEM_Biz.WmsItem.Get(input.SN, input.AuthOption, true); if (!result.IsSuccessed) { action.IsSuccessed = false; @@ -224,7 +225,11 @@ { var item = CurInvItem.Items.First(q => q.SN == qty.SN); item.QTY = qty.QTY; - } + var pkg = CurInvItem.Packages.First(q => q.SN == qty.SN); + pkg.QTY = qty.QTY; + } + CurInvItem.UpdatePkgQty(); + Command = "Normal"; } } -- Gitblit v1.9.3