From 5ffa80fab641a443c23945b4103855171f43f65f Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期五, 20 十二月 2024 15:53:20 +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