fix:修复手动创建指令失败问题
This commit is contained in:
@@ -145,11 +145,6 @@ public class AgvWaitUtil {
|
||||
if (manipulatorAgvStationDeviceDriver.getTo_command() != 3) {
|
||||
manipulatorAgvStationDeviceDriver.writing(3);
|
||||
}
|
||||
try {
|
||||
Thread.sleep(1000);
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
if (manipulatorAgvStationDeviceDriver.getAction() == 0 && manipulatorAgvStationDeviceDriver.getMode() == 2) {
|
||||
if (StrUtil.equals(paramService.findByCode(AcsConfig.isSendLms).getValue(), CommonFinalParam.ONE)){
|
||||
if (!AgvActionTypeEnum.ORDINARY.getCode().equals(inst.getAgv_action_type())) {
|
||||
|
||||
@@ -390,6 +390,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
dto = foramte(dto);
|
||||
String task_code = dto.getTask_code();
|
||||
TaskDto task = taskService.findByCodeFromCache(task_code);
|
||||
if (task == null) {
|
||||
throw new BadRequestException("任务号为:" + task_code + "的任务不存在!");
|
||||
}
|
||||
if (regional(dto.getStart_device_code(), dto.getNext_device_code())) {
|
||||
throw new BadRequestException(LangProcess.msg("error_regional_max"));
|
||||
}
|
||||
@@ -420,9 +423,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
if (StrUtil.isEmpty(dto.getIs_send())) {
|
||||
dto.setIs_send(task.getIs_send());
|
||||
}
|
||||
if (StrUtil.isEmpty(dto.getLink_num())) {
|
||||
dto.setIs_send(task.getLink_num());
|
||||
}
|
||||
// if (StrUtil.isEmpty(dto.getLink_num())) {
|
||||
// dto.setIs_send(task.getLink_num());
|
||||
// }
|
||||
if (StrUtil.isEmpty(dto.getVehicle_code2())) {
|
||||
dto.setVehicle_code2(task.getVehicle_code2());
|
||||
}
|
||||
@@ -604,6 +607,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
dto = foramte(dto);
|
||||
String task_code = dto.getTask_code();
|
||||
TaskDto task = taskService.findByCodeFromCache(task_code);
|
||||
if (ObjectUtil.isEmpty(task)) {
|
||||
throw new BadRequestException("任务不存在!");
|
||||
}
|
||||
if (regional(dto.getStart_device_code(), dto.getNext_device_code())) {
|
||||
throw new BadRequestException(LangProcess.msg("error_regional_max"));
|
||||
}
|
||||
@@ -634,9 +640,9 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
if (StrUtil.isEmpty(dto.getIs_send())) {
|
||||
dto.setIs_send(task.getIs_send());
|
||||
}
|
||||
if (StrUtil.isEmpty(dto.getLink_num())) {
|
||||
dto.setIs_send(task.getLink_num());
|
||||
}
|
||||
// if (StrUtil.isEmpty(dto.getLink_num())) {
|
||||
// dto.setIs_send(task.getLink_num());
|
||||
// }
|
||||
|
||||
if (StrUtil.isEmpty(dto.getVehicle_code2())) {
|
||||
dto.setVehicle_code2(task.getVehicle_code2());
|
||||
@@ -2097,7 +2103,6 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
|
||||
}
|
||||
|
||||
|
||||
|
||||
public List<Instruction> findReadyInstructions() {
|
||||
|
||||
//根据时间升序取第一个
|
||||
|
||||
@@ -130,8 +130,6 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
private static final String BQHJ_TYPE = "6";
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public PageInfo<TaskDto> queryAll(TaskQueryParam query, Pageable pageable) {
|
||||
IPage<Task> queryPage = PageUtil.toMybatisPage(pageable);
|
||||
@@ -1055,6 +1053,9 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
List<RouteLineDto> shortPathsList =
|
||||
routeLineService.getShortPathLines(
|
||||
start_device_code, acsTask.getNext_device_code(), route_plan_code);
|
||||
if (shortPathsList.size() == 0) {
|
||||
throw new BadRequestException(start_device_code + "->" + acsTask.getNext_device_code() + "路由不存在!");
|
||||
}
|
||||
Device startDevice = deviceAppService.findDeviceByCode(start_device_code);
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||
RouteLineDto routeLineDto = shortPathsList.get(0);
|
||||
@@ -1293,7 +1294,6 @@ public class TaskServiceImpl extends CommonServiceImpl<TaskMapper, Task> impleme
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public TaskDto findByEndCodeAndReady(String device_code) {
|
||||
Optional<TaskDto> optionalTask = tasks.stream()
|
||||
|
||||
Reference in New Issue
Block a user