| | |
| | | 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": |