| | |
| | | var serialNosError = resultTrayCellsStatus.SerialNos.Where(x => x.SerialNoStatus != 1 && x.SerialNoStatus != 4).ToList(); |
| | | if (serialNosError.Count > 0) |
| | | { |
| | | //空框逻辑 |
| | | //NG流程 |
| | | var platform = _platFormRepository.QueryFirst(x => x.ProductionLine == resultTrayCellsStatus.ProductionLine); |
| | | ConveyorLineTaskCommand conveyorLineTaskCommand = new ConveyorLineTaskCommand() |
| | | { |
| | | TaskNum = 1, |
| | | TargetAddress=Convert.ToInt32( platform.Capacity), |
| | | Barcode= resultTrayCellsStatus.TrayBarcode, |
| | | }; |
| | | conveyorLine.SendCommand(conveyorLineTaskCommand, childDeviceCode); |
| | | ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true); |
| | | ConsoleHelper.WriteSuccessLine($"MOM数据异常,送至二封【{resultTrayCellsStatus.ProductionLine}】异常口【{Convert.ToInt32(platform.Capacity)}】"); |
| | | return; |
| | | } |
| | | if (resultTrayCellsStatus.SerialNos.Count < 0) |
| | | { |
| | | var Traycontent = await _taskService.RequestWMSTask(command.Barcode, childDeviceCode); |
| | | if (Traycontent.Status) |
| | | { |
| | | ConsoleHelper.WriteSuccessLine("化成空框请求回流静置"); |
| | | ExecuteConveyorLineTask(conveyorLine, command, ProtocalDetailValue, childDeviceCode); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | |
| | | { |
| | | ConsoleHelper.WriteSuccessLine("化成实托请求入静置"); |
| | | ExecuteConveyorLineTask(conveyorLine, command, ProtocalDetailValue, childDeviceCode); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | ConsoleHelper.WriteWarningLine("出库任务未完成"); |
| | | return; |
| | | } |
| | | } |
| | | else if (task != null && task.TaskState == (int)TaskOutStatusEnum.SC_OutExecuting) |
| | | { |
| | | ConsoleHelper.WriteWarningLine("已存在静置出库任务"); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | |
| | | ExecuteConveyorLineTask(conveyorLine, command, ProtocalDetailValue, childDeviceCode); |
| | | return; |
| | | } |
| | | } |
| | | else |
| | |
| | | RoadWay = isTrue, |
| | | SourceAddress = childDeviceCode, |
| | | TargetAddress = isTrue, |
| | | TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | TaskState = (int)TaskOutStatusEnum.SC_OutFinish, |
| | | Id = 2, |
| | | TaskType = (int)TaskOutboundTypeEnum.InToOut, |
| | | ProductionLine = resultTrayCellsStatus.ProductionLine, |
| | |
| | | if (Taskcontent.Status) |
| | | { |
| | | ExecuteConveyorLineTask(conveyorLine, command, ProtocalDetailValue, childDeviceCode); |
| | | return; |
| | | } |
| | | else |
| | | { |
| | | WriteInfo(conveyorLine.DeviceName, Taskcontent.Message); |
| | | |
| | | return; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | ConsoleHelper.WriteWarningLine("二封缓存位已满"); |
| | | return; |
| | | } |
| | | |
| | | } |