From 6c1b1e0601a7db6b576aaa180d6777418a404f18 Mon Sep 17 00:00:00 2001 From: Rodney Chen <rodney.chen@hotmail.com> Date: 星期三, 25 十二月 2024 21:15:56 +0800 Subject: [PATCH] 修复了一些已知问题 --- Tiger.Business.MES/Transaction/Position.cs | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/Tiger.Business.MES/Transaction/Position.cs b/Tiger.Business.MES/Transaction/Position.cs index 7003188..f4cf4b5 100644 --- a/Tiger.Business.MES/Transaction/Position.cs +++ b/Tiger.Business.MES/Transaction/Position.cs @@ -144,8 +144,7 @@ action.LocaleMsg = new("MES.Transaction.Position.SelectOrder.BatchStatusException", input.OrderNo, batch.BATCH_NO, batch.STATUS.GetEnumDesc<BIZ_MES_WO_BATCH.STATUSs>()); return action; } - var wb = new WorkBatch(input.OrderNo).Init(CurLine.LINE_CODE); - WoContext.WoBatchDic.Add(wb.Batch.BATCH_NO, wb); + var wb = WoContext.Add(input.OrderNo, CurLine.LINE_CODE); batchNo = wb.Batch.BATCH_NO; } CurBatch = WoContext.GetBatch(input.OrderNo, CurLine.LINE_CODE, batchNo); @@ -651,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": @@ -673,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); @@ -707,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": -- Gitblit v1.9.3