Commit 7dbe4c1e authored by 高建强's avatar 高建强

item:解决结案JSON被覆盖bug

parent 3cf71a99
......@@ -344,20 +344,18 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
throw new Exception("请勿重复操作.");
}
if ("CONFIRM".equals(buttonState)) {
if (code.equals(operate.getCode())) {
operate.setState("executed");
if ("FIRE_CANCEL".equals(code) || "END_EMERGENCY".equals(code)) {
redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
// 应急处置中断,初始化planStep,json数据
planRuleService.updatePlanRuleByBatchNo(batchNo);
// 应急处置中断,更新预案信息表结束时间
contingencyInstanceInfoService.updateEndTimeById(batchNo);
}
} else {
operate.setState("disable");
}
}
// if ("CONFIRM".equals(buttonState)) {
// if (code.equals(operate.getCode())) {
// operate.setState("executed");
// if ("FIRE_CANCEL".equals(code) || "END_EMERGENCY".equals(code)) {
// redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
// // 应急处置中断,初始化planStep,json数据
// planRuleService.updatePlanRuleByBatchNo(batchNo);
// // 应急处置中断,更新预案信息表结束时间
// contingencyInstanceInfoService.updateEndTimeById(batchNo);
// }
// }
// }
}
}
......@@ -381,6 +379,13 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
}
// 异步数据同步之消息发送
contingencyPlanInstanceDataSync(instance);
if ("CONFIRM".equals(buttonState) && ("FIRE_CANCEL".equals(code) || "END_EMERGENCY".equals(code))) {
redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
// 应急处置中断,初始化planStep,json数据
planRuleService.updatePlanRuleByBatchNo(batchNo);
// 应急处置中断,更新预案信息表结束时间
contingencyInstanceInfoService.updateEndTimeById(batchNo);
}
}
}
......@@ -592,9 +597,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
RequestContext.setAppKey(appKey);
RequestContext.setProduct(product);
RequestContext.setToken(token);
planVisual3dService.updatePlanStep(batchNo, stepCode, contingencyPlanId, buttonCode, isExecute);
setButtonExecuted(batchNo, contingencyPlanId, buttonCode, confirm);
fire(batchNo, stepCode, contingencyPlanId, buttonCode, confirm, stepState);
planVisual3dService.updatePlanStep(batchNo, stepCode, contingencyPlanId, buttonCode, isExecute);
} catch (Exception e) {
throw e;
} finally {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment