From f2fb67bf0cf463eb020599342f5e0476356821d8 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期四, 02 一月 2025 14:58:29 +0800
Subject: [PATCH] Rename BAS_LABEL_PV to BAS_PROCESS_VAR

---
 Tiger.Business.MES/Transaction/YadaPacking.cs |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/Tiger.Business.MES/Transaction/YadaPacking.cs b/Tiger.Business.MES/Transaction/YadaPacking.cs
index e4469c4..eda33f4 100644
--- a/Tiger.Business.MES/Transaction/YadaPacking.cs
+++ b/Tiger.Business.MES/Transaction/YadaPacking.cs
@@ -298,8 +298,11 @@
             {
                 action.Data.ShortMsg = new("宸ュ簭寮傚父", ShortMessage.Types.Error);
                 action.Data.OperInfo = CurOperInfo(input.Locale);
+                RemoveCurSnFromCurPackage(Context.ContainsKey("CurPackage") ? (Context["CurPackage"] as WipPkg).Item : null);
+                ResetNode();
                 //action.CatchExceptionWithLog(ex, $"鍖呰宸ュ簭锛氭彁浜ゆ搷浣滄暟鎹紓甯�");
                 action.CatchExceptionWithLog(ex, Biz.L("MES.Transaction.PackingNode.SubmitException"));
+            
             }
             debug.Log(new StackFrame(true), "***** 9", info => { ConsoleExt.WriteLine(info.ToString()); });
             return SetOutPutMqttMsg(action, input.Locale);
@@ -401,7 +404,7 @@
 
                     //鑾峰彇鍑鸿揣鐘舵��
                     var ship = U9CDB.Queryable<mes_ShipList>().Where(q => q.MoDoc == CurBatch.WO.ORDER_NO && q.Status == 2 && SqlFunc.DateIsSame(q.BusinessDate, DateTime.Now)).First();
-                    int CurShipQty = 0;
+                    decimal CurShipQty = 0;
                     int WaitShipmentCarton = 0;
                     int WaitShipment = 0;
                     if (ship.IsNullOrEmpty()) { IsPrintCustomerLabel = false; }
@@ -774,7 +777,7 @@
                     }
                 };
             }
-
+            //throw new Exception("鍝�");
             //淇濆瓨鏁版嵁搴�
             SaveStepsCommitActionToDB(endAction);
 
@@ -941,7 +944,7 @@
             try
             {
                 var CurPkg = Context.ContainsKey("CurPackage") ? Context["CurPackage"] as WipPkg : null;
-                var LabelPV = MainDB.Queryable<BAS_LABEL_PV>().ToList();
+                var LabelPV = MainDB.Queryable<BAS_PROCESS_VAR>().ToList();
                 var label = CurPkg.Item.LABEL_CODE.IsNullOrEmpty() ? null : MainDB.Queryable<BAS_LABEL_TEMP>().Where(q => q.LABEL_CODE == CurPkg.Item.LABEL_CODE).IncludesAllFirstLayer().First();
                 var printLb = SetLabelVariables(LabelPV, label, new PackingAction(), CurPkg);
                 action.Data = new PackingActionOutput()

--
Gitblit v1.9.3