From a8fcfbb5e5ed9a07b1a30ef2d7ef9d407e9b04dd Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期三, 02 四月 2025 21:44:54 +0800
Subject: [PATCH] 更新ASN实体

---
 Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs b/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs
index 4847c35..690b95f 100644
--- a/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs
+++ b/Tiger.Business.WMS/Transaction/Yada/Out_BIZ_WMS_PREP.cs
@@ -95,7 +95,7 @@
             catch (Exception ex)
             {
                 //鍙栨秷褰撳墠鎿嶄綔
-                ResetScan();
+                ResetTrans();
                 //action.CatchExceptionWithLog(ex, $"鎵弿[{input.SN}]寮傚父");
                 action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.Scan.ScanException", input.SN));
             }
@@ -141,7 +141,7 @@
             catch (Exception ex)
             {
                 //鍙栨秷褰撳墠鎿嶄綔
-                ResetScan();
+                ResetTrans();
                 //action.CatchExceptionWithLog(ex, $"澶囨枡浠诲姟鎵弿鍗曟嵁寮傚父(Data: {0})");
                 action.CatchExceptionWithLog(ex, Biz.L("WMS.Out_BIZ_WMS_PREP.ScanOrderException", input?.Data));
             }
@@ -272,7 +272,7 @@
             catch (Exception ex)
             {
                 //鍙栨秷褰撳墠鎿嶄綔
-                ResetScan();
+                ResetTrans();
                 //action.CatchExceptionWithLog(ex, $"澶囨枡浠诲姟閫夋嫨瑕佺墿鏂欒寮傚父(Data: {0})");
                 action.CatchExceptionWithLog(ex, Biz.L("WMS.Out_BIZ_WMS_PREP.SelectItemException", input?.Data));
             }
@@ -581,7 +581,7 @@
                 {
                     action.IsSuccessed = false;
                     action.LocaleMsg = downResult.LocaleMsg;
-                    ResetScanInfo();
+                    ResetScan();
                     return SetOutPutMqttMsg(action, input.Locale);
                 }
                 else//澶勭悊澶囨枡浠诲姟鏁版嵁
@@ -632,9 +632,7 @@
             catch (Exception ex)
             {
                 //鍙栨秷褰撳墠鎿嶄綔
-                ResetScan();
-                //娓呯悊鏆傚瓨鏁版嵁鎻愪氦鎿嶄綔
-                DBCommitList.Clear();
+                ResetTrans();
                 //action.CatchExceptionWithLog(ex, $"鎵弿鏉$爜[{input.SN}]澶嶆牳寮傚父");
                 action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN));
             }
@@ -735,7 +733,7 @@
             catch (Exception ex)
             {
                 //鍙栨秷褰撳墠鎿嶄綔
-                ResetScan();
+                ResetTrans();
                 //action.CatchExceptionWithLog(ex, $"鎵弿璐ф灦/鍌ㄤ綅[{0}]寮傚父");
                 action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanShelf.ScanException", Code));
             }
@@ -775,30 +773,33 @@
             action.LocaleMsg = Biz.L("WMS.Default.ScanItem.TakeDownSucceeded", CurInvItem.SN, CurInvItem.Location?.LOCATION_CODE);
 
             //閲嶇疆宸ュ簭
-            ResetScanInfo();
+            ResetScan();
             return SetOutPutMqttMsg(action, locale);
         }
 
         #endregion
 
         /// <summary>
-        /// 閲嶇疆褰撳墠鎿嶄綔锛屾湁闇�瑕佸垯閲嶅啓姝ゆ柟娉�
+        /// 閲嶇疆浜嬪姟鏁版嵁锛屾湁闇�瑕佸垯閲嶅啓姝ゆ柟娉�
         /// </summary>
-        public override void ResetScan()
+        public override void ResetTrans()
         {
-            base.ResetScan();
-            ResetScanInfo();
+            ResetScan();
             CurPREP = new(MainDB, UserCode, OrgCode);
+            CurPrepDtl = new();
             CurScanShelf = null;
+            base.ResetTrans();
         }
 
         /// <summary>
-        /// 閲嶇疆鎵爜淇℃伅
+        /// 閲嶇疆鏈鎵爜淇℃伅
         /// </summary>
-        public void ResetScanInfo()
+        public override void ResetScan()
         {
             Command = "Normal";
             CurInvItem = null;
+            CurSn = new();
+            base.ResetScan();
         }
 
         public override bool Close(bool needSaveHistoryLog = false)

--
Gitblit v1.9.3