using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Tiger.IBusiness;
using static Tiger.Business.Biz;
namespace Tiger.Business.MES
{
///
/// 工单 上下文
///
public class WoContext
{
#region 工单管理
///
/// 工单批次字典
///
public static Dictionary WoBatchDic { get; set; } = new Dictionary();
///
/// 从工单批次字典中获取一个工单批次对象
///
///
///
///
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;
}
///
/// 判断工单批次是否存在于工单批次字典中
///
///
///
///
public static bool ExistsBatch(string workOrder, string lineCode)
{
return WoBatchDic.Any(q => q.Value.Batch.ORDER_NO == workOrder && q.Value.Batch.ACT_LINE == lineCode);
}
#endregion
}
}