| | |
| | | /// <returns></returns> |
| | | public static WorkBatch GetBatch(string workorder, string lineCode) |
| | | { |
| | | return WoBatchDic.FirstOrDefault(q => q.Value.Batch.ORDER_NO == workorder && q.Value.Batch.ACT_LINE == lineCode).Value; |
| | | if (ExistsBatch(workorder, lineCode)) |
| | | { |
| | | return WoBatchDic.FirstOrDefault(q => q.Value.Batch.ORDER_NO == workorder && q.Value.Batch.ACT_LINE == lineCode).Value; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (!WoBatchDic.Any(q => q.Value.WO.ORDER_NO == wipSNs.First().WORK_ORDER)) |
| | | { |
| | | var wb = new WorkBatch(wipSNs.First().WORK_ORDER).Init(""); |
| | | WoBatchDic.Add(wb.Batch.BATCH_NO, wb); |
| | | WoBatchDic.Add(wipSNs.First().BATCH_NO, wb); |
| | | } |
| | | var wo = WoBatchDic.FirstOrDefault(q => q.Value.WO.ORDER_NO == wipSNs.First().WORK_ORDER).Value; |
| | | action.Data = new() |