1、增加指令首次下发的时候,发送RCP查询请求到RCP查询程序。

2、动态规则update bugfix
3、静态规则协议为空,生成指令时候报错NULLPOINT fix
This commit is contained in:
PushM
2024-06-11 00:05:53 +08:00
parent e8d38b3c4b
commit b227536328
5 changed files with 97 additions and 20 deletions

View File

@@ -140,18 +140,30 @@ public class CommandService {
//设置指令是否已经研判
Boolean success = commandMapper.setCommandJudged(commandId, isJudged);
//isJudged为true时发送指令首次 下发信号
try {
List<String> commandUUIDs = Collections.singletonList(commandId);
if (isJudged){
stateHandler.sendCommandDistributeSignal(commandUUIDs);
if (!isJudged) {
return success;
}
}catch (Exception e) {
log.info(String.format("动态任务研判后任务首次指令下发c3出错任务id: %d,commandUUIDs: %s",
queryCommandInfoByUUID(commandId).getTaskId(),
commandId));
//指令首次下发
try {
stateHandler.sendCommandDistributeSignal(commandUUIDs);
} catch (Exception e) {
log.info(String.format("动态任务研判后任务首次指令下发c3出错任务id: %d,commandUUIDs: %s",
queryCommandInfoByUUID(commandId).getTaskId(),
commandId));
}
//指令首次查询RCP
try {
stateHandler.sendCommandRcpQuerySignal(commandUUIDs);
} catch (Exception e) {
log.info(String.format("动态任务研判后任务首次查询RCP出错任务id: %d,commandUUIDs: %s",
queryCommandInfoByUUID(commandId).getTaskId(),
commandId));
}
}catch (Exception e){
throw new IllegalArgumentException("指令研判状态修改失败,无效的指令");
}
return success;
}