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

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

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