From 21cce90e8d660954f0b89bfe25b9f5218dcbaacd Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期一, 12 五月 2025 00:32:34 +0800
Subject: [PATCH] 退料单(U9)上架事务

---
 Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs b/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs
index d13fe63..3d49dd0 100644
--- a/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs
+++ b/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs
@@ -21,7 +21,6 @@
     /// </summary>
     public class In_BIZ_U9_RECEIPT : WmsTask, IIn_BIZ_U9_RECEIPT
     {
-
         public IIn_BIZ_U9_RECEIPT Init(string id, string userCode, string apiHost, string orgCode)
         {
             base.Init(id, userCode, apiHost, orgCode);
@@ -71,7 +70,7 @@
                         action.LocaleMsg = Biz.L("WMS.Default.ScanItem.SnEmptyFailure");
                         return SetOutPutMqttMsg(action, input.Locale);
                     }
-                    //鍒ゆ柇鎵弿鐨勬槸鍚﹁揣鏋�
+                    //鍒ゆ柇鎵弿鐨勬槸鍚﹁揣鏋�/鍌ㄤ綅
                     var whUnit = await MainDB.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() || string.IsNullOrEmpty(CurScanShelf?.ShelfCode))
@@ -308,6 +307,11 @@
                     sn.STATUS = WMS_ITEM.STATUSs.InStore.GetValue();
                     sn.IS_IN = "Y";
                 }
+                //璁剧疆褰撳墠鐗╂枡鐨勯粯璁ゅ偍浣�
+                if (CurInvItem.ItemInfo.DEFAULT_LOCATION.IsNullOrEmpty())
+                {
+                    SetDefaultLocation(MainDB, CurInvItem.ItemInfo, nLocation, receiptDtl.ID.ToInt64());
+                }
                 //濡傛灉褰撳墠琛屼笂鏋跺畬鎴愭爣璁颁负寰呭鏍�
                 receiptDtl.QTY_IN = receipt.SnList.Where(q => q.LINE_NO == receiptDtl.LINE_NO && q.STATUS == WMS_ITEM.STATUSs.InStore.GetValue()).Sum(q => q.QTY);
                 if (receiptDtl.QTY_IN == receiptDtl.QTY_OK)
@@ -369,14 +373,16 @@
                 });
 
                 //瀹屾垚鎵�鏈夊鐞嗗悗浣跨敤浜嬪姟淇濆瓨鏁版嵁
-                action = DoIfFinish(action, input.Locale, () =>
-                {
-                    //璁剧疆褰撳墠鐗╂枡鐨勯粯璁ゅ偍浣�
-                    if (CurInvItem.ItemInfo.DEFAULT_LOCATION.IsNullOrEmpty())
-                    {
-                        SetDefaultLocation(MainDB, CurInvItem.ItemInfo, nLocation);
-                    }
-                });
+                action = DoIfFinish(action, input.Locale
+                    //, () =>
+                    //{
+                    //    //璁剧疆褰撳墠鐗╂枡鐨勯粯璁ゅ偍浣�
+                    //    if (CurInvItem.ItemInfo.DEFAULT_LOCATION.IsNullOrEmpty())
+                    //    {
+                    //        SetDefaultLocation(MainDB, CurInvItem.ItemInfo, nLocation, receiptDtl.ID.ToInt64());
+                    //    }
+                    //}
+                 );
                 //if (!action.Data.Data.IsNullOrEmpty() && action.Data.Data is DefaultInStoreOutput)
                 //{
                 //    (action.Data.Data as DefaultInStoreOutput).OrderInfo = receipt;

--
Gitblit v1.9.3