服务端的TigerApi 框架,基于.NET6 2024 版本
Rodney Chen
2024-09-24 e3034dbd4d96e244af376ba36842edf1f732a76c
Tiger.Business/MES/WoContext.cs
@@ -33,7 +33,11 @@
        /// <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>
@@ -200,7 +204,7 @@
                    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()