| | |
| | | if (item.StationType == StationTypeEnum.StationType_InStartAndOutEnd.ObjToInt() && deviceProRead != null) |
| | | { |
| | | R_ConveyorLineCPInfo conveyorLineInfoRead = device.Communicator.ReadCustomer<R_ConveyorLineCPInfo>(deviceProRead.DeviceProAddress); |
| | | if (conveyorLineInfoRead.StatusPV == 3 && conveyorLineInfoRead.Command == 11) |
| | | if (conveyorLineInfoRead.StatusPV == 2 && conveyorLineInfoRead.Command == 11) |
| | | { |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.SourceAddress == item.StationCode && _taskService.TaskInboundTypes.Contains(x.TaskType) && (x.TaskState == TaskStatusEnum.RGV_Execute.ObjToInt() || x.TaskState == TaskStatusEnum.RGV_Executing.ObjToInt() || x.TaskState == TaskStatusEnum.New.ObjToInt())); |
| | | if (task == null) |
| | |
| | | _taskService.UpdateTask(taskNew, TaskStatusEnum.RGV_Execute); |
| | | } |
| | | } |
| | | Thread.Sleep(1000); |
| | | } |
| | | } |
| | | } |