Commit 990046ca authored by 高建强's avatar 高建强

item:应急处置执行业务完善

parent 12cdf817
...@@ -10,9 +10,9 @@ import java.util.Map; ...@@ -10,9 +10,9 @@ import java.util.Map;
*/ */
public enum PlanReplyMessageEnum { public enum PlanReplyMessageEnum {
FIRE_PERSON("文本","text"), TEXT("文本","text"),
OPS_PERSON("图片","image"), IMAGE("图片","image"),
REAL_PERSON("视频","video"); VIDEO("视频","video");
/** /**
* 名称,描述 * 名称,描述
......
...@@ -154,7 +154,7 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla ...@@ -154,7 +154,7 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
public ContingencyPlanInstance createInstanceRecord(String instanceNo, String category, String subCategory, String content, String recordType, String icon) { public ContingencyPlanInstance createInstanceRecord(String instanceNo, String category, String subCategory, String content, String recordType, String icon) {
ContingencyPlanInstance planInstance = new ContingencyPlanInstance(); ContingencyPlanInstance planInstance = new ContingencyPlanInstance();
if ("MESSAGE".equalsIgnoreCase(recordType)) { if ("MESSAGE".equalsIgnoreCase(recordType)) {
planInstance.setFileType(PlanReplyMessageEnum.FIRE_PERSON.getCode()); planInstance.setFileType(PlanReplyMessageEnum.TEXT.getCode());
} }
planInstance.setContent(content); planInstance.setContent(content);
planInstance.setIcon(icon); planInstance.setIcon(icon);
...@@ -165,7 +165,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla ...@@ -165,7 +165,8 @@ public class ContingencyInstanceImpl /*extends GenericManagerImpl<ContingencyPla
//计算序号 //计算序号
int count = repository.countByBatchNo(instanceNo); int count = repository.countByBatchNo(instanceNo);
planInstance.setSort(++count); planInstance.setSort(++count);
ContingencyPlanInstance instance = this.repository.save(planInstance); ContingencyPlanInstance contingencyPlanInstance = contingencyInstance.updateExtendColumn(planInstance);
ContingencyPlanInstance instance = this.repository.save(contingencyPlanInstance);
// 异步数据同步之消息发送 // 异步数据同步之消息发送
contingencyPlanInstanceDataSync(instance); contingencyPlanInstanceDataSync(instance);
return instance; return instance;
......
...@@ -795,6 +795,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -795,6 +795,7 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
if (!planList.isEmpty()) { if (!planList.isEmpty()) {
planList.forEach(PlanOperationRecord -> { planList.forEach(PlanOperationRecord -> {
String batchNo = PlanOperationRecord.getBatchNo(); String batchNo = PlanOperationRecord.getBatchNo();
customerAction.intreeuptPlan(batchNo);
redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning()); redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
Optional<Equipment> equipment; Optional<Equipment> equipment;
try { try {
...@@ -807,7 +808,6 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService { ...@@ -807,7 +808,6 @@ public class ContingencyPlanServiceImpl implements IContingencyPlanService {
equip.setStatus(NumberEnum.ONE.getValue()); equip.setStatus(NumberEnum.ONE.getValue());
equipmentService.save(equip); equipmentService.save(equip);
}); });
customerAction.intreeuptPlan(batchNo);
} catch (Exception e) { } catch (Exception e) {
logger.info("预案重置失败batchNo:{}", batchNo, e); logger.info("预案重置失败batchNo:{}", batchNo, e);
e.printStackTrace(); e.printStackTrace();
......
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