| | |
| | | public bool NeedTemporaryStoreDBCommitAction { get; set; } = false; |
| | | protected Dictionary<string, List<Action>> DBCommitList { get; set; } = new(); |
| | | protected List<Position> NodeCommitList { get; set; } = new(); |
| | | protected Dictionary<string, OperInfo> OperInfoDic { get; set; } = new(); |
| | | //protected OperInfo CurOperInfo { get; set; } |
| | | private Dictionary<string, OperInfo> OperInfoDic = new(); |
| | | |
| | | #endregion Propertys & Variables |
| | | |
| | | #region Functions |
| | |
| | | CurDefects.Clear(); |
| | | } |
| | | |
| | | //获取当前的工序信息 |
| | | protected OperInfo CurOperInfo(string locale) |
| | | { |
| | | OperInfo info = new(); |
| | | if (CurBatch?.Batch?.BATCH_NO != null) |
| | | { |
| | | info = OperInfoDic[CurBatch.Batch.BATCH_NO ]; |
| | | info.StepsInfo = Steps.Select(q => q.GetInfo(locale)).ToList(); |
| | | } |
| | | return info; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 设置当前条码的工序信息 |
| | | /// </summary> |
| | | public OperInfo SetOperNodeInfo(OperInfo info, string locale) |
| | | public OperInfo SetOperNodeInfo(OperInfo info) |
| | | { |
| | | if (CurWipSNs.Any()) |
| | | { |
| | | info.CurNode = CurWipSNs.First().NODE_NAME; |
| | | info.NextNode = string.Join(",", CurBatch.GetNextNodes(CurWipSNs.First()).Select(q => q.NODE_NAME)); |
| | | info.StepsInfo = Steps.Select(q => q.GetInfo(locale)).ToList(); |
| | | } |
| | | else |
| | | { |
| | | info.CurNode = " — "; |
| | | info.NextNode = " — "; |
| | | info.StepsInfo = new(); |
| | | } |
| | | return info; |
| | | } |
| | |
| | | CurStep = step; |
| | | //更新后续可执行的工步列表 |
| | | NextSteps = GetNextSteps(CurStep); |
| | | //返回结果到客户端 |
| | | result = canBegin; |
| | | result.Data.SetValue(CurBatch, CurStep, CurStep?.ID, IsFinishAllSteps); |
| | | |
| | | //如果当前执行工步尝试执行后就已经完成,不需要后续交互,且,则继续开始下一工步 |
| | | if (CurStep.IsFinished && NextSteps.Any()) |
| | | { |
| | | result = BeginNextActionStep(input); |
| | | } |
| | | else |
| | | { |
| | | //返回结果到客户端 |
| | | result = canBegin; |
| | | result.Data.SetValue(CurBatch, CurStep, CurStep?.ID, IsFinishAllSteps); |
| | | } |
| | | return result; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | #region 打印专用方法 |
| | | /// <summary> |
| | | /// 获取打印标签模板过程变量值 |
| | | /// </summary> |
| | |
| | | return result; |
| | | } |
| | | |
| | | #endregion |
| | | #endregion Functions |
| | | |
| | | public override bool Close(bool needSaveHistoryLog = false) |