| | |
| | | { |
| | | string isTrue = string.Empty; |
| | | |
| | | //ResultTrayCellsStatus result = GetResultTrayCellsStatus(command, stationManager); |
| | | ResultTrayCellsStatus result = GetResultTrayCellsStatus(command, stationManager); |
| | | |
| | | //List<string> strings = stationManager.Roadway.Split(",").ToList(); |
| | | //foreach (string item in strings) |
| | | //{ |
| | | // isTrue = RequestInboundPlatform(conveyorLine, item, result.ProductionLine, false); |
| | | // if (isTrue != null) |
| | | // { |
| | | // break; |
| | | // } |
| | | //} |
| | | //if (isTrue != null && isTrue != string.Empty) |
| | | //{ |
| | | // WMSTaskDTO taskDTO = new WMSTaskDTO |
| | | // { |
| | | // TaskNum = _taskRepository.GetTaskNo().Result, |
| | | // Grade = 1, |
| | | // PalletCode = command.Barcode, |
| | | // RoadWay = childDeviceCode, |
| | | // SourceAddress = childDeviceCode, |
| | | // TargetAddress = isTrue, |
| | | // TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | // Id = 2, |
| | | // TaskType = (int)TaskOutboundTypeEnum.InToOut, |
| | | // ProductionLine = result.ProductionLine, |
| | | // }; |
| | | // var Taskcontent = _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | // if (Taskcontent.Status) |
| | | // { |
| | | // ExecuteConveyorLineTask(conveyorLine, command, ProtocalDetailValue, childDeviceCode); |
| | | // } |
| | | List<string> strings = stationManager.Roadway.Split(",").ToList(); |
| | | foreach (string item in strings) |
| | | { |
| | | isTrue = RequestInboundPlatform(item, result.ProductionLine, false); |
| | | if (isTrue != null) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | if (isTrue != null && isTrue != string.Empty) |
| | | { |
| | | WMSTaskDTO taskDTO = new WMSTaskDTO |
| | | { |
| | | TaskNum = _taskRepository.GetTaskNo().Result, |
| | | Grade = 1, |
| | | PalletCode = command.Barcode, |
| | | RoadWay = childDeviceCode, |
| | | SourceAddress = childDeviceCode, |
| | | TargetAddress = isTrue, |
| | | TaskState = (int)TaskOutStatusEnum.OutNew, |
| | | Id = 2, |
| | | TaskType = (int)TaskOutboundTypeEnum.InToOut, |
| | | ProductionLine = result.ProductionLine, |
| | | }; |
| | | var Taskcontent = _taskService.ReceiveWMSTask(new List<WMSTaskDTO> { taskDTO }); |
| | | if (Taskcontent.Status) |
| | | { |
| | | ExecuteConveyorLineTask(conveyorLine, command, ProtocalDetailValue, childDeviceCode); |
| | | } |
| | | |
| | | //} |
| | | //else |
| | | //{ |
| | | } |
| | | else |
| | | { |
| | | var Taskcontent = await _taskService.RequestWMSTask(command.Barcode, childDeviceCode); |
| | | if (Taskcontent.Status) |
| | | { |
| | | ExecuteConveyorLineTask(conveyorLine, command, ProtocalDetailValue, childDeviceCode); |
| | | } |
| | | //} |
| | | } |
| | | #region |
| | | |
| | | //if (Taskcontent.Status) |