From 09318297f1a2b732d343ccebce4a514dffc4d495 Mon Sep 17 00:00:00 2001
From: Ben Lin <maobin001@msn.com>
Date: 星期四, 26 十二月 2024 16:13:40 +0800
Subject: [PATCH] 基础上架更新

---
 Tiger.Business.MES/Transaction/Position.cs |   46 +++++++++++++++++++++-------------------------
 1 files changed, 21 insertions(+), 25 deletions(-)

diff --git a/Tiger.Business.MES/Transaction/Position.cs b/Tiger.Business.MES/Transaction/Position.cs
index 83c2ad7..f4cf4b5 100644
--- a/Tiger.Business.MES/Transaction/Position.cs
+++ b/Tiger.Business.MES/Transaction/Position.cs
@@ -650,6 +650,10 @@
                                         {
                                             minPkgList = GetMinPkgList(_pkaction);
                                         }
+                                        if (curAction is PrintInStoreLabel)
+                                        {
+                                            minPkgList = (curAction as PrintInStoreLabel).CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
+                                        }
                                     }
                                     return string.Join("\r\n", minPkgList);
                                 case "GetDescription":
@@ -672,6 +676,10 @@
                                         if (_action != null)
                                         {
                                             list = _action.CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
+                                        }
+                                        if (curAction is PrintInStoreLabel)
+                                        {
+                                            list = (curAction as PrintInStoreLabel).CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                         }
                                     }
                                     return GetHuaWeiWeek(WorkBatch.Batch.ORDER_NO, list);
@@ -706,28 +714,30 @@
                                 case "GetVarByWo":
                                     return GetLabelVarWo(lv, "");
                                 case "GetLOTNO":
+                                    List<string> snList = new List<string>();
                                     string _lotnos = "";
                                     var _orderAction = curAction is PackingAction ? curAction as PackingAction : null;
                                     if (!CurPkg.IsNullOrEmpty())
                                     {
-                                        qtylist = CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
+                                        snList = CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
                                     }
                                     else
                                     {
                                         if (_orderAction != null)
                                         {
-                                            var snList = _orderAction.CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
-                                            //if (!snList.Any())
-                                            {
-                                                snList.Add(_orderAction.CurPkg.CustSN?.FLOW_SN);
-                                            }
-                                            _lotnos = string.Join(",", MainDB.Queryable<MES_CUST_SN>()
-                                                .Where((q) => snList.Contains(q.FLOW_SN))
-                                                .Select((q) => q.WORK_ORDER).Distinct().ToList());
-                                            return _lotnos;
+                                            snList = _orderAction.CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
+                                            snList.Add(_orderAction.CurPkg.CustSN?.FLOW_SN);
+                                        }
+                                        if (curAction is PrintInStoreLabel)
+                                        {
+                                            snList = (curAction as PrintInStoreLabel).CurPkg.Item.GetWipSnList().Select(q => q.Value).ToList();
+                                            snList.Add((curAction as PrintInStoreLabel).CurPkg.CustSN?.FLOW_SN);
                                         }
                                     }
-                                    return "";
+                                    _lotnos = string.Join(",", MainDB.Queryable<MES_CUST_SN>()
+                                        .Where((q) => snList.Contains(q.FLOW_SN))
+                                        .Select((q) => q.WORK_ORDER).Distinct().ToList());
+                                    return _lotnos;
                                 case "GetNOTES":
                                     return GetLabelVarWo(lv, WorkBatch.Product.ExtInfo?.Remark);
                                 case "GetXH":
@@ -991,20 +1001,6 @@
                 list.AddRange(GetPackageList(item));
             }
             return list;
-        }
-        #endregion
-        #region 鎻愪氦鍓嶉�氱敤鏂规硶
-        public async Task<ApiAction> CheckCode(string code) {
-            var action = new ApiAction();
-            try
-            {
-                
-            }
-            catch (Exception ex)
-            {
-                action.CatchExceptionWithLog(ex, $"妫�鏌ユ潯鐮亄code}寮傚父");
-            }
-            return action;
         }
         #endregion
         #endregion Functions

--
Gitblit v1.9.3