From 76245024a71fedf2e9c9cb03fd489851f81bce55 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期三, 02 四月 2025 16:34:58 +0800
Subject: [PATCH] Merge branch 'master' of http://47.115.28.255:8110/r/TigerClouds-Tech/Server/TigerApi6_2024

---
 Tiger.Business.MES/Transaction/PackingNode.cs |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/Tiger.Business.MES/Transaction/PackingNode.cs b/Tiger.Business.MES/Transaction/PackingNode.cs
index 26f7d68..d155090 100644
--- a/Tiger.Business.MES/Transaction/PackingNode.cs
+++ b/Tiger.Business.MES/Transaction/PackingNode.cs
@@ -264,6 +264,8 @@
             {
                 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"));
             }
@@ -405,6 +407,7 @@
                         wipSN.SEGMENT = curNode.SEGMENT;
                         wipSN.UNBIND_FLAG = "N";
                         wipSN.OPERATION_TIME = DateTime.Now;
+                        wipSN.OPERATION_END = DateTime.Now;
                         var curShiftPeriod = GetShiftPeriodForNow();
                         if (!curShiftPeriod.IsNullOrEmpty())
                         {
@@ -666,6 +669,7 @@
                     wipSN.OPER_CODE = curNode.OPER_CODE;
                     wipSN.SEGMENT = curNode.SEGMENT;
                     wipSN.OPERATION_TIME = DateTime.Now;
+                    wipSN.OPERATION_END = DateTime.Now;
                 }
 
                 var wipHiss = new List<MES_WIP_HIS>();
@@ -688,7 +692,7 @@
                     var db = GetCommitDB();
                     //鏁版嵁淇濆瓨閫昏緫
                     db.Updateable(_woSns, UserCode).UpdateColumns(q => new { q.UPDATE_TIME, q.UPDATE_USER, q.STATUS }).ExecuteCommand();
-                    db.Updateable(_wipSns, UserCode).UpdateColumns(q => new { q.UPDATE_TIME, q.UPDATE_USER, q.STATUS, q.NODE_ID, q.NODE_NAME, q.OPER_CODE, q.SEGMENT, q.OPERATION_TIME }).ExecuteCommand();
+                    db.Updateable(_wipSns, UserCode).UpdateColumns(q => new { q.UPDATE_TIME, q.UPDATE_USER, q.STATUS, q.NODE_ID, q.NODE_NAME, q.OPER_CODE, q.SEGMENT, q.OPERATION_TIME, q.OPERATION_END }).ExecuteCommand();
                     db.Storageable(_wipHiss, UserCode).ExecuteCommand();
                     if (_pkgList.Any())
                     {

--
Gitblit v1.9.3