From 8679d61f74886106a85578cb6ba36b91ce33df51 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期六, 12 十月 2024 18:31:50 +0800
Subject: [PATCH] 获取工单批次的数量汇总

---
 Tiger.Business.MES/WorkAction/ThreeInOne.cs |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/Tiger.Business.MES/WorkAction/ThreeInOne.cs b/Tiger.Business.MES/WorkAction/ThreeInOne.cs
index dcb9985..b2ca033 100644
--- a/Tiger.Business.MES/WorkAction/ThreeInOne.cs
+++ b/Tiger.Business.MES/WorkAction/ThreeInOne.cs
@@ -286,7 +286,7 @@
                 action.LocaleMsg = new("MES.WorkAction.ThreeInOne.NotSameCustomer", CustCSN.CUST_SN, CustCSN.CUST_CODE, CurPosition.WorkBatch.WO.CUST_CODE);
             }
             //楠岃瘉浜у搧瀹㈡埛鏍囩鏉$爜瑙勫垯
-            if (!CustInfo.RULE_CODE.IsNullOrEmpty() && !Biz.CodeRule[CustInfo.RULE_CODE].IsNullOrEmpty())
+            if (!CustInfo.IsNullOrEmpty() && !CustInfo.RULE_CODE.IsNullOrEmpty() && !Biz.CodeRule[CustInfo.RULE_CODE].IsNullOrEmpty())
             {
                 var result = Biz.CodeRule[CustInfo.RULE_CODE].Verify(CustCSN.CUST_SN);
                 if (!result.IsSuccessed)
@@ -326,8 +326,8 @@
 
             //鏇存柊鍘傚唴娴佺▼鐮�
             FlowCSN.CUST_CODE = CurPosition.WorkBatch.WO.CUST_CODE;
-            FlowCSN.WORK_ORDER = CurPosition.WorkBatch.WO.ORDER_NO;
-            FlowCSN.ITEM_CODE = CurPosition.WorkBatch.WO.ITEM_CODE;
+            FlowCSN.PKG_ORDER = CurPosition.WorkBatch.WO.ORDER_NO;
+            FlowCSN.PROD_CODE = CurPosition.WorkBatch.WO.ITEM_CODE;
 
             //璁板綍琛屼负鎿嶄綔璁板綍
             var wipActs = new List<MES_WIP_ACT>();
@@ -378,8 +378,8 @@
                     PRD_CODE = wipSn.PRD_CODE,
                     ACT_TYPE = NodeAct.ACT_TYPE,
                     ACT_SN = wipSn.SN,
-                    ACT_VALUE_1 = Label.LABEL_CODE,
-                    ACT_VALUE_2 = Label.Variables.ToJson(),
+                    ACT_VALUE_1 = Label?.LABEL_CODE,
+                    ACT_VALUE_2 = Label?.Variables.ToJson(),
                     ACT_RESULT = "Y",
                     ELAPSED_TIME = CurStep.GetElapsedTime().TotalMilliseconds.ToInt64(),
                     TRACE_INFO = $"鍘傚唴鏉$爜[{FlowCSN.FLOW_SN}]缁戝畾瀹㈡埛鏉$爜[{FlowCSN.CUST_SN}]鎴愬姛",

--
Gitblit v1.9.3