fix: 烘箱下发信号指令错误解决
This commit is contained in:
@@ -440,9 +440,6 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
notCreateInstMessage = "手动创建指令未下发电气信号原因->取货位:" + start_device_code + ",放货位:" + next_device_code + ",存在关联的同一列烘箱设备未关门!指令号:" + instruction.getInstruction_code();
|
||||
return false;
|
||||
}
|
||||
instruction.setInstruction_status("1");
|
||||
instruction.setUpdate_time(DateUtil.now());
|
||||
instructionService.update(instruction);
|
||||
Device startDevice = deviceAppService.findDeviceByCode(start_device_code);
|
||||
Device nextDevice = deviceAppService.findDeviceByCode(next_device_code);
|
||||
if (ObjectUtil.isEmpty(startDevice.getExtraValue().get("address"))) {
|
||||
@@ -454,7 +451,7 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
String start_addr = startDevice.getExtraValue().get("address").toString();
|
||||
String next_addr = nextDevice.getExtraValue().get("address").toString();
|
||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||
+ instruction.getInstruction_code() + ",指令起点:" + instruction.getStart_device_code()
|
||||
+ instruction.getInstruction_code() + "任务号="+ taskDto.getTask_code() + ",指令起点:" + instruction.getStart_device_code()
|
||||
+ ",指令终点:" + instruction.getNext_device_code());
|
||||
this.writing("to_onset", start_addr);
|
||||
this.writing("to_target", next_addr);
|
||||
@@ -622,10 +619,15 @@ public class OvenGantryManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
throw new BadRequestException("设备:" + nextDevice.getDevice_code() + "未设置电气调度号!");
|
||||
}
|
||||
Instruction byInsructionCode = instructionService.findByInsructionCode(instdto.getInstruction_code());
|
||||
if(ObjectUtil.isEmpty(byInsructionCode)){
|
||||
logServer.deviceExecuteLog(this.getDevice_code(), "", "", "未找到指令号: "+instdto.getInstruction_code());
|
||||
return false;
|
||||
}
|
||||
String start_addr = startDevice.getExtraValue().get("address").toString();
|
||||
String next_addr = nextDevice.getExtraValue().get("address").toString();
|
||||
logServer.deviceExecuteLog(device_code, "", "", "当前设备:" + device_code + ",下发指令:"
|
||||
+ instdto.getInstruction_code() +";指令号: "+ CodeUtil.getNewCode("INSTRUCT_NO") + ",指令起点:" + instdto.getStart_device_code()
|
||||
+ instdto.getInstruction_code()+ "任务号: "+ task.getTask_code() + ",指令起点:" + instdto.getStart_device_code()
|
||||
+ ",指令终点:" + instdto.getNext_device_code());
|
||||
this.writing("to_onset", start_addr);
|
||||
this.writing("to_target", next_addr);
|
||||
|
||||
Reference in New Issue
Block a user