Commit ecb3e195 authored by litengwei's avatar litengwei

预案弹窗逻辑

parent 3131809c
...@@ -253,6 +253,10 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -253,6 +253,10 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
result.setMessage(ReserveEnum.RUN.getText()); result.setMessage(ReserveEnum.RUN.getText());
result.setBatchNo(batchNo); result.setBatchNo(batchNo);
if(vo.getTriggerMode().equals("automatic")) {
iContingencyInstance.fire(batchNo, "0", "", instanceInfo.getId(), "FIRE_CONFIRM", "CONFIRM", "0", "true", "false", toke.getToke(), toke.getProduct(), toke.getAppKey(), null);
}
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() { TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronization() {
@Override @Override
public void afterCommit() { public void afterCommit() {
...@@ -441,7 +445,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -441,7 +445,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
if (planEquipment != null) { if (planEquipment != null) {
vo = new ContingencyPlanParamVo(); vo = new ContingencyPlanParamVo();
vo.setPlanId(planEquipment.getPlanId().toString()); vo.setPlanId(planEquipment.getPlanId().toString());
vo.setStatus(ContingencyPlanStatusEnum.SIMULATION_START.getCode()); vo.setStatus(ContingencyPlanStatusEnum.ONGOING.getCode());
vo.setRiskType(riskType); vo.setRiskType(riskType);
return vo; return vo;
} }
......
...@@ -435,6 +435,20 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -435,6 +435,20 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
} }
}).collect(Collectors.toList()); }).collect(Collectors.toList());
redisTemplate.opsForValue().set("planStep", JSON.toJSONString(collect1)); redisTemplate.opsForValue().set("planStep", JSON.toJSONString(collect1));
if(stepCode.equals("0")) {
PlanStepJsonVO planStepJsonVO = collect1.get(0);
if(!StringUtils.isEmpty(planStepJsonVO.getButtonJson())) {
String topic = String.format("/%s/%s/%s", serviceName, stationName, "plan");
Map<String, Object> map = new HashMap<>();
JSONObject msgContext = new JSONObject();
msgContext.put("tips", "alertAlarm");
map.put("msgContext", msgContext);
map.put("msgType", "alertAlarm");
map.put("step", "0");
map.put("batchNo", planStepJsonVO.getBatchNo());
webMqttComponent.publish(topic, JSON.toJSONString(map));
}
}
} }
} }
} }
......
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