|
|
@ -594,6 +594,10 @@ 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) && StrUtil.isNotBlank(dto.getTask_id())){ |
|
|
|
//从数据库查找
|
|
|
|
task = taskService.findById(dto.getTask_id()); |
|
|
|
} |
|
|
|
String currentUsername = SecurityUtils.getCurrentUsername(); |
|
|
|
String now = DateUtil.now(); |
|
|
|
if (StrUtil.isEmpty(dto.getRoute_plan_code())) { |
|
|
@ -641,15 +645,6 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper, |
|
|
|
if (ObjectUtil.isNotEmpty(task.getTask_type())) { |
|
|
|
dto.setInstruction_type(task.getTask_type()); |
|
|
|
} |
|
|
|
DeviceAppService appService = SpringContextHolder.getBean(DeviceAppServiceImpl.class); |
|
|
|
Device startdevice = appService.findDeviceByCode(dto.getStart_device_code()); |
|
|
|
HongXiangConveyorDeviceDriver hongXiangConveyorDeviceDriver; |
|
|
|
StandardCoveyorControlWithScannerDeviceDriver standardCoveyorControlWithScannerDeviceDriver; |
|
|
|
|
|
|
|
if (startdevice.getDeviceDriver() instanceof HongXiangConveyorDeviceDriver) { |
|
|
|
hongXiangConveyorDeviceDriver = (HongXiangConveyorDeviceDriver) startdevice.getDeviceDriver(); |
|
|
|
hongXiangConveyorDeviceDriver.writing(3, Integer.valueOf(dto.getInstruction_code())); |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
// String start_device_code = dto.getStart_device_code();
|
|
|
|