From eb29ee75c7f2f4154b7a3d0c475f94e0b964e996 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期三, 02 四月 2025 18:17:48 +0800 Subject: [PATCH] 优化事务基础写法 --- Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs | 27 ++++++++++++++------------- 1 files changed, 14 insertions(+), 13 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 1cd1a9b..609996a 100644 --- a/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs +++ b/Tiger.Business.WMS/Transaction/Yada/In_BIZ_U9_RECEIPT.cs @@ -63,7 +63,7 @@ catch (Exception ex) { //鍙栨秷褰撳墠鎿嶄綔 - ResetScan(); + ResetTrans(); //action.CatchExceptionWithLog(ex, $"鎵弿[{input.SN}]寮傚父"); action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.Scan.ScanException", input.SN)); } @@ -192,7 +192,7 @@ action.IsSuccessed = false; //action.LocaleMsg = Biz.L("鍌ㄤ綅[{0}]鍙兘瀛樻斁涓�涓墿鏂�"); action.LocaleMsg = Biz.L("WMS.Default.ScanItem.LocationSingleFailure", nLocation.LOCATION_CODE); - ResetScan(); + ResetTrans(); return SetOutPutMqttMsg(action, input.Locale); } @@ -223,7 +223,7 @@ { action.IsSuccessed = false; action.LocaleMsg = putonResult.LocaleMsg; - ResetScan(); + ResetTrans(); return SetOutPutMqttMsg(action, input.Locale); } @@ -299,7 +299,7 @@ catch (Exception ex) { //鍙栨秷褰撳墠鎿嶄綔 - ResetScan(); + ResetTrans(); //action.CatchExceptionWithLog(ex, $"鎵弿鏉$爜[{input.SN}]澶嶆牳寮傚父"); action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanItem.ScanException", input.SN)); } @@ -390,7 +390,7 @@ catch (Exception ex) { //鍙栨秷褰撳墠鎿嶄綔 - ResetScan(); + ResetTrans(); //action.CatchExceptionWithLog(ex, $"鎵弿璐ф灦/鍌ㄤ綅[{0}]寮傚父"); action.CatchExceptionWithLog(ex, Biz.L("WMS.Default.ScanShelf.ScanException", Code)); } @@ -431,29 +431,30 @@ action.LocaleMsg = Biz.L("WMS.Default.ScanItem.PutOnSucceeded", 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(); CurScanShelf = null; + base.ResetTrans(); } /// <summary> - /// 閲嶇疆鎵爜淇℃伅 + /// 閲嶇疆鏈鎵爜淇℃伅 /// </summary> - public void ResetScanInfo() + public override void ResetScan() { - Command = null; + Command = "Normal"; CurInvItem = null; + base.ResetScan(); } public override bool Close(bool needSaveHistoryLog = false) -- Gitblit v1.9.3