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

item:解决结案JSON被覆盖bug

parent 3cf71a99
...@@ -344,20 +344,18 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -344,20 +344,18 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
throw new Exception("请勿重复操作."); throw new Exception("请勿重复操作.");
} }
if ("CONFIRM".equals(buttonState)) { // if ("CONFIRM".equals(buttonState)) {
if (code.equals(operate.getCode())) { // if (code.equals(operate.getCode())) {
operate.setState("executed"); // operate.setState("executed");
if ("FIRE_CANCEL".equals(code) || "END_EMERGENCY".equals(code)) { // if ("FIRE_CANCEL".equals(code) || "END_EMERGENCY".equals(code)) {
redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning()); // redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
// 应急处置中断,初始化planStep,json数据 // // 应急处置中断,初始化planStep,json数据
planRuleService.updatePlanRuleByBatchNo(batchNo); // planRuleService.updatePlanRuleByBatchNo(batchNo);
// 应急处置中断,更新预案信息表结束时间 // // 应急处置中断,更新预案信息表结束时间
contingencyInstanceInfoService.updateEndTimeById(batchNo); // contingencyInstanceInfoService.updateEndTimeById(batchNo);
} // }
} else { // }
operate.setState("disable"); // }
}
}
} }
} }
...@@ -381,6 +379,13 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -381,6 +379,13 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
} }
// 异步数据同步之消息发送 // 异步数据同步之消息发送
contingencyPlanInstanceDataSync(instance); 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 { ...@@ -592,9 +597,9 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
RequestContext.setAppKey(appKey); RequestContext.setAppKey(appKey);
RequestContext.setProduct(product); RequestContext.setProduct(product);
RequestContext.setToken(token); RequestContext.setToken(token);
planVisual3dService.updatePlanStep(batchNo, stepCode, contingencyPlanId, buttonCode, isExecute);
setButtonExecuted(batchNo, contingencyPlanId, buttonCode, confirm); setButtonExecuted(batchNo, contingencyPlanId, buttonCode, confirm);
fire(batchNo, stepCode, contingencyPlanId, buttonCode, confirm, stepState); fire(batchNo, stepCode, contingencyPlanId, buttonCode, confirm, stepState);
planVisual3dService.updatePlanStep(batchNo, stepCode, contingencyPlanId, buttonCode, isExecute);
} catch (Exception e) { } catch (Exception e) {
throw e; throw e;
} finally { } 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