| | |
| | | if (isOutTray || isOutboundAndOutFinish || !isOutboundAndLineOutExecuting) |
| | | { |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, taskCommand.ConveyorLineTaskNum, childDeviceCode); |
| | | //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, taskCommand.ConveyorLineTargetAddress, childDeviceCode); |
| | | //conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, taskCommand.ConveyorLineBarcode, childDeviceCode); |
| | | //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | _taskService.UpdateTaskStatusToNext(taskOut); |
| | | } |
| | | else if (taskOut.TaskType == (int)TaskOutboundTypeEnum.OutTray && taskOut.TaskState == (int)TaskOutStatusEnum.Line_OutExecuting) |
| | |
| | | var task = _taskService.QueryConveyorLineTask(conveyorLine.DeviceCode, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | var taskCommand = MapTaskCommand(task, command); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //var taskCommand = MapTaskCommand(task, command); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)task.TaskNum, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | } |
| | |
| | | |
| | | var config = _sys_ConfigService.GetConfigsByCategory(CateGoryConst.CONFIG_SYS_IPAddress); |
| | | var wmsBase = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.WMSIP_BASE)?.ConfigValue; |
| | | var requestTrayInTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTask)?.ConfigValue; |
| | | var requestTrayInTask = config.FirstOrDefault(x => x.ConfigKey == SysConfigKeyConst.RequestTrayInTask)?.ConfigValue; |
| | | if (wmsBase == null || requestTrayInTask == null) |
| | | { |
| | | throw new InvalidOperationException("WMS IP 未配置"); |
| | |
| | | var Hastask = _taskService.QueryBarCodeConveyorLineTask(command.ConveyorLineBarcode, childDeviceCode); |
| | | if (Hastask != null) |
| | | { |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(Hastask); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(Hastask); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)Hastask.TaskNum, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, Hastask.NextAddress, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, Hastask.PalletCode, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | return; |
| | | } |
| | |
| | | var task = _taskService.QueryBarCodeConveyorLineTask(command.ConveyorLineBarcode, childDeviceCode); |
| | | if (task != null) |
| | | { |
| | | ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | //conveyorLine.SendCommand(taskCommand, childDeviceCode); |
| | | //conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | //ConveyorLineTaskCommand_After taskCommand = _mapper.Map<ConveyorLineTaskCommand_After>(task); |
| | | |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTaskNum, (long)task.TaskNum, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineTargetAddress, task.NextAddress, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ConveyorLineBarcode, task.PalletCode, childDeviceCode); |
| | | conveyorLine.SetValue(ConveyorLineDBName_After.ResponState, 1, childDeviceCode); |
| | | _taskService.UpdateTaskStatusToNext(task); |
| | | } |