fix:解决agv任务下发失败问题

This commit is contained in:
2024-07-31 15:16:31 +08:00
parent 3ddc9a3bcb
commit 188d4a1658
2 changed files with 13 additions and 3 deletions

View File

@@ -412,10 +412,14 @@ public class InstructionServiceImpl extends CommonServiceImpl<InstructionMapper,
if (StrUtil.isEmpty(dto.getLink_num())) {
dto.setIs_send(task.getLink_num());
}
if (ObjectUtil.isNotEmpty(task.getTask_type()) && task.getClass_type().length()==2) {
dto.setInstruction_type(task.getClass_type());
} else {
if (StrUtil.isEmpty(task.getClass_type())){
dto.setInstruction_type(task.getTask_type());
}else {
if (ObjectUtil.isNotEmpty(task.getTask_type()) && task.getClass_type().length() == 2) {
dto.setInstruction_type(task.getClass_type());
} else {
dto.setInstruction_type(task.getTask_type());
}
}
// 起点设备与终点设备相同则为初始指令

View File

@@ -264,6 +264,12 @@ public class DeviceOpcProtocolRunable implements Runnable, DataCallback, ServerC
if (log.isWarnEnabled()) {
log.warn("{} 所有内容都为空, all_null:{} ,暂定{}ms", tag, all_null, 5000);
}
LuceneLogDto logDto = LuceneLogDto.builder()
.device_code("OPC数据源")
.content("OPC数据源:" + tag + "内容为:" + all_null)
.build();
logDto.setLog_level(4);
luceneExecuteLogService.deviceExecuteLog(logDto);
ThreadUtl.sleep((long) (5000));
break start;
}