| | |
| | | /// <summary> |
| | | /// 从工单批次字典中获取一个工单批次对象 |
| | | /// </summary> |
| | | /// <param name="batchNo"></param> |
| | | /// <param name="workorder"></param> |
| | | /// <param name="lineCode"></param> |
| | | /// <returns></returns> |
| | | public static WorkBatch GetBatch(string batchNo, string lineCode = null) |
| | | public static WorkBatch GetBatch(string workorder, string lineCode) |
| | | { |
| | | return WoBatchDic.FirstOrDefault(q => q.Value.Batch.BATCH_NO == batchNo && (lineCode.IsNullOrEmpty() || q.Value.Batch.ACT_LINE == lineCode)).Value; |
| | | return WoBatchDic.FirstOrDefault(q => q.Value.Batch.ORDER_NO == workorder && q.Value.Batch.ACT_LINE == lineCode).Value; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 判断工单批次是否存在于工单批次字典中 |
| | | /// </summary> |
| | | /// <param name="batchNo"></param> |
| | | /// <param name="workorder"></param> |
| | | /// <param name="lineCode"></param> |
| | | /// <returns></returns> |
| | | public static bool ExistsBatch(string batchNo, string lineCode = null) |
| | | public static bool ExistsBatch(string workorder, string lineCode) |
| | | { |
| | | return WoBatchDic.Any(q => q.Value.Batch.BATCH_NO == batchNo && (lineCode.IsNullOrEmpty() || q.Value.Batch.ACT_LINE == lineCode)); |
| | | return WoBatchDic.Any(q => q.Value.Batch.ORDER_NO == workorder && q.Value.Batch.ACT_LINE == lineCode); |
| | | } |
| | | |
| | | /// 从工单批次字典中删除一个工单批次对象 |