fix: bug修改

This commit is contained in:
2024-06-24 11:12:42 +08:00
parent 4422f305a4
commit 8134ecbe96
8 changed files with 39 additions and 17 deletions

View File

@@ -244,7 +244,9 @@ public class BeltConveyorDeviceDriver extends AbstractOpcDeviceDriver implements
}
if (move != 0 && task > 0) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() ;
if (null!=inst) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code();
}
CompletableFuture.runAsync(() -> {
// 异步更新指令状态
try {

View File

@@ -200,8 +200,9 @@ public class BoxStorageOutConveyorDeviceDriver extends AbstractOpcDeviceDriver i
}
if (move != 0 && task > 0) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() ;
update_instruction_status();
if (null!=inst) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code();
} update_instruction_status();
}
} catch (Exception var17) {
var17.printStackTrace();

View File

@@ -196,8 +196,9 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
logServer.deviceExecuteLog(this.device_code, "", "", "信号mode" + last_mode + "->" + mode);
}
if (move != 0 && task > 0) {
inst_message = "当前指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() + " 载具号:" + inst.getVehicle_code();
update_instruction_status();
if (null!=inst) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code();
} update_instruction_status();
}
} catch (Exception var17) {
var17.printStackTrace();
@@ -363,11 +364,20 @@ public class BoxSubvolumesConveyorDeviceDriver extends AbstractOpcDeviceDriver i
apply.put("vehicle_code", material_barcode);
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code(device_code)
.content("申请AGV任务,请求参数:" + apply)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto);
String str = acsToWmsService.applySendOutTwo(apply);
logServer.deviceExecuteLog(this.device_code, "", "", "申请AGV任务,请求参数:" + apply + ",响应参数");
JSONObject jo = JSON.parseObject(str);
LuceneLogDto logDto2 = LuceneLogDto.builder()
.device_code(device_code)
.content("申请AGV任务,参数,接口返回:" + jo)
.build();
luceneExecuteLogService.deviceExecuteLog(logDto2);
message = "申请AGV任务,参数,接口返回:" + jo;
if (jo.getInteger("status") == 200) {
List list = new ArrayList();

View File

@@ -190,7 +190,9 @@ public class BoxPackageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
// 更新指令状态
if (mode == 3 && task > 0) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() ;
if (null!=inst) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code();
}
updateInstrction();
}

View File

@@ -160,7 +160,9 @@ public class BoxStorageManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
}
// 更新指令状态
if (mode == 3 && task > 0 && !requireActionSucess) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() ;
if (null!=inst) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code();
}
updateInstructionStatus();
}

View File

@@ -173,8 +173,9 @@ public class ReturnGoodManipulatorDeviceDriver extends AbstractOpcDeviceDriver i
// 更新指令状态
if (mode == 3 && task > 0) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() ;
if (null!=inst) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code();
}
updateInstructionStatus();
}

View File

@@ -168,8 +168,9 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
}
// 更新指令状态
if (mode == 3 && task > 0) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() ;
if (null!=inst) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code();
}
updateInstructionStatus();
}
@@ -362,9 +363,11 @@ public class TrappedManipulatorManipulatorDeviceDriver extends AbstractOpcDevice
List<TaskDto> taskDtos = taskserver.findByTrappedManipulatorReady();
List<TaskDto> taskDtosReady = new ArrayList<>();
TaskDto taskDto = new TaskDto();
for (TaskDto taskDto1 : taskDtos) {
if (getDeviceCodeList.contains(taskDto1.getStart_device_code())){
taskDtosReady.add(taskDto1);
if (CollUtil.isNotEmpty(taskDtos)) {
for (TaskDto taskDto1 : taskDtos) {
if (getDeviceCodeList.contains(taskDto1.getStart_device_code())) {
taskDtosReady.add(taskDto1);
}
}
}
if (CollUtil.isNotEmpty(taskDtosReady)) {

View File

@@ -187,8 +187,9 @@ public class VolumeTwoManipulatorManipulatorDeviceDriver extends AbstractOpcDevi
}
// 更新指令状态
if (mode == 3 && task > 0) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code() ;
if (null!=inst) {
inst_message = "指令号:" + inst.getInstruction_code() + " " + inst.getStart_point_code() + "->" + inst.getNext_point_code();
}
updateInstructionStatus();
}