| | |
| | | var structs = BitConverter.GetBytes(conmmand.InteractiveSignal).Reverse().ToArray().ToBoolArray(); |
| | | if (structs[2]) |
| | | { |
| | | //var task = _taskRepository.QueryFirst(x => x.TaskNum == conmmand.TargetAddress); |
| | | var task = _taskRepository.QueryFirst(x => x.TaskState == (int)TaskInStatusEnum.Line_InExecuting && x.TaskNum == conmmand.ConveyorLineTargetAddress); |
| | | if (task != null) |
| | | { |
| | | task.TaskState = (int)TaskInStatusEnum.Line_InFinish; |
| | | task.CurrentAddress = task.NextAddress; |
| | | //鑾峰彇WMS璐т綅淇℃伅 |
| | | task.NextAddress = task.TargetAddress; |
| | | _taskRepository.UpdateData(task); |
| | | WebResponseContent content = _taskService.UpdateTaskStatusToNext(task.TaskNum); |
| | | WriteInfo(conveyorLine.DeviceName, $"{JsonConvert.SerializeObject(content)}"); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | if (task != null && task.AGVSign == "RequestPickUp") |
| | | { |
| | | if (!structs[3]) |
| | | { |
| | | conveyorLine.Communicator.WriteNoRead("DB100.0", Convert.ToInt32(9999)); |
| | | } |
| | | if (conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.AllowPickUp, "LK001") == 1) |
| | | { |
| | | await _taskService.ContinueAgvTask(task.AGVTaskNum); |
| | |
| | | } |
| | | if (task != null && task.AGVSign == "RequestPut") |
| | | { |
| | | if (!structs[3]) |
| | | { |
| | | conveyorLine.Communicator.WriteNoRead("DB100.0", Convert.ToInt32(9999)); |
| | | } |
| | | if (conveyorLine.GetValue<ConveyorLineDBName, short>(ConveyorLineDBName.AllowPut, "LK001") == 1) |
| | | { |
| | | await _taskService.ContinueAgvTask(task.AGVTaskNum); |