From 922bb885bfaf59610dae78e6ede5f53f21984833 Mon Sep 17 00:00:00 2001
From: Rodney Chen <rodney.chen@hotmail.com>
Date: 星期三, 13 十一月 2024 09:56:16 +0800
Subject: [PATCH] 所有工序增加产品被判断不良后下线

---
 Tiger.Business.MES/Transaction/Position.cs |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Tiger.Business.MES/Transaction/Position.cs b/Tiger.Business.MES/Transaction/Position.cs
index ccb961a..8c6fae8 100644
--- a/Tiger.Business.MES/Transaction/Position.cs
+++ b/Tiger.Business.MES/Transaction/Position.cs
@@ -143,6 +143,7 @@
                     }
                     var wb = new WorkBatch(input.OrderNo).Init(CurLine.LINE_CODE);
                     WoContext.WoBatchDic.Add(wb.Batch.BATCH_NO, wb);
+                    batchNo = wb.Batch.BATCH_NO;
                 }
                 CurBatch = WoContext.GetBatch(input.OrderNo, CurLine.LINE_CODE, batchNo);
                 if (!OperInfoDic.ContainsKey(CurBatch.Batch.BATCH_NO))
@@ -607,7 +608,7 @@
                                     {
                                         qtylist = (curAction as PrintInStoreLabel).CurPkg.Item.GetMinPackageList().Select(q => q.SN).ToList();
                                     }
-                                    return $"{qtylist.Count}PCS";
+                                    return $"{qtylist.Count}";
                                 case "GetModel":
                                     return GetLabelVarWo(lv, WorkBatch.Product.ExtInfo?.Model);
                                 case "GetInput":
@@ -628,7 +629,7 @@
                                         var snList = _orderAction.CurPkg.Item.GetMinPackageList().Select(q => q.FLOW_SN).ToList();
                                         if (!snList.Any())
                                         {
-                                            snList.Add(_orderAction.CurPkg.CustSN.FLOW_SN);
+                                            snList.Add(_orderAction.CurPkg.CustSN?.FLOW_SN);
                                         }
                                         _lotnos = string.Join(",", Biz.Db.Queryable<MES_CUST_SN>()
                                             .Where((q) => snList.Contains(q.FLOW_SN))

--
Gitblit v1.9.3