| | |
| | | if (taskNum == 0) |
| | | { |
| | | ConsoleHelper.WriteColorLine($"【{commonStackerCrane.DeviceName}】任务号为【{0}】,任务号不一致可以下发任务", ConsoleColor.DarkBlue); |
| | | |
| | | Thread.Sleep(1000); |
| | | bool sendFlag = commonStackerCrane.SendCommand(stackerCraneTaskCommand); |
| | | if (sendFlag) |
| | | { |
| | |
| | | { |
| | | if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5) |
| | | { |
| | | string str = $"【{commonStackerCrane.DeviceName}】任务完成,任务号:【{e.TaskNum}】"; |
| | | ConsoleHelper.WriteColorLine($"【{commonStackerCrane.DeviceName}】堆垛机作业状态:【{(int)commonStackerCrane.StackerCraneWorkStatusValue}】时间【{DateTime.Now}】", ConsoleColor.Magenta); |
| | | |
| | | string str = $"【{commonStackerCrane.DeviceName}】任务完成,任务号:【{e.TaskNum}】时间【{DateTime.Now}】"; |
| | | WriteInfo(commonStackerCrane.DeviceName, str); |
| | | ConsoleHelper.WriteColorLine(str, ConsoleColor.Blue); |
| | | var task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum); |
| | |
| | | { |
| | | task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum); |
| | | Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress); |
| | | _taskService.UpdateData(newTask); |
| | | } |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && (task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001")) |
| | | { |
| | |
| | | _htyRepository.AddData(TASKHTY); |
| | | } |
| | | var isWorkType = commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5); |
| | | str = $"WMS|WCS任务完成:【{content.Status}】,堆垛机完成信号写入:【{isWorkType}】,任务号:【{e.TaskNum}】,托盘号:【{task.PalletCode}】"; |
| | | str = $"{commonStackerCrane.DeviceName}】WMS|WCS任务完成:【{content.Status}】,堆垛机完成信号写入:【{isWorkType}】,任务号:【{e.TaskNum}】时间【{DateTime.Now}】"; |
| | | WriteInfo(commonStackerCrane.DeviceName, str); |
| | | ConsoleHelper.WriteColorLine(str, ConsoleColor.Blue); |
| | | } |
| | |
| | | WriteInfo(commonStackerCrane.DeviceName, log); |
| | | |
| | | task = FindAnotherOutboundTask(commonStackerCrane.DeviceCode, task.TaskId); |
| | | |
| | | if (task == null) |
| | | { |
| | | task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return task; |
| | | } |
| | | |
| | | } |
| | | else if (task == null) |
| | | { |
| | | task = _taskService.QueryStackerCraneInTask(commonStackerCrane.DeviceCode); |
| | | } |
| | | |
| | | return task; |
| | | } |
| | | |
| | |
| | | } |
| | | else |
| | | { |
| | | if (task.TargetAddress == "002-021-001" && task.Roadway.Contains("JZ") && task.TaskType == (int)TaskOutboundTypeEnum.OutTray) |
| | | if ((task.TargetAddress == "002-021-001" || task.TargetAddress == "001-021-001") && task.Roadway.Contains("JZ")) |
| | | { |
| | | string[] endCodes = task.NextAddress.Split("-"); |
| | | stackerCraneTaskCommand.EndRow = Convert.ToInt16(endCodes[0]); |