| | |
| | | } |
| | | else |
| | | { |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: router.NextPosi, targetAddress: "1102"); |
| | | _taskService.UpdateTask(task, TaskStatusEnum.Line_Execute, deviceCode: stationManger.StationDeviceCode, currentAddress: stationManger.StationCode, nextAddress: "1102", targetAddress: "1102"); |
| | | } |
| | | |
| | | } |
| | |
| | | else |
| | | { |
| | | Dt_Task reloTask = _mapper.Map<Dt_Task>(taskDTO); |
| | | reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); |
| | | reloTask.CurrentAddress = taskDTO.SourceAddress; |
| | | reloTask.NextAddress = taskDTO.TargetAddress; |
| | | reloTask.DeviceCode = task.DeviceCode; |
| | | reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt(); |
| | | int taskId = _taskRepository.AddData(reloTask); |
| | | reloTask.TaskId = taskId; |
| | | //鍒ゆ柇绉诲簱璐т綅浠诲姟鏄惁宸插瓨鍦紝濡傚瓨鍦ㄥ厛鎵ц |
| | | Dt_Task existTask = _taskService.QueryStackerExistTask(reloTask.PalletCode, reloTask.SourceAddress); |
| | | if (existTask != null) |
| | | { |
| | | return existTask; |
| | | } |
| | | else |
| | | { |
| | | reloTask.TaskState = TaskStatusEnum.SC_Execute.ObjToInt(); |
| | | reloTask.CurrentAddress = taskDTO.SourceAddress; |
| | | reloTask.NextAddress = taskDTO.TargetAddress; |
| | | reloTask.DeviceCode = task.DeviceCode; |
| | | reloTask.TaskType = TaskTypeEnum.Relocation.ObjToInt(); |
| | | int taskId = _taskRepository.AddData(reloTask); |
| | | reloTask.TaskId = taskId; |
| | | } |
| | | return reloTask; |
| | | |
| | | } |