Commit 9b17fec7 authored by 高建强's avatar 高建强

item:应急处置同步调整提交

parent bf2bd3a4
...@@ -27,6 +27,7 @@ import com.yeejoin.amos.fas.business.service.intfc.*; ...@@ -27,6 +27,7 @@ import com.yeejoin.amos.fas.business.service.intfc.*;
import com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus; import com.yeejoin.amos.fas.business.service.model.ContingencyDeviceStatus;
import com.yeejoin.amos.fas.business.service.model.ToipResponse; import com.yeejoin.amos.fas.business.service.model.ToipResponse;
import com.yeejoin.amos.fas.business.util.JSONUtil; import com.yeejoin.amos.fas.business.util.JSONUtil;
import com.yeejoin.amos.fas.business.vo.ButtonJsonVO;
import com.yeejoin.amos.fas.business.vo.MessageVO; import com.yeejoin.amos.fas.business.vo.MessageVO;
import com.yeejoin.amos.fas.business.vo.PlanStepJsonVO; import com.yeejoin.amos.fas.business.vo.PlanStepJsonVO;
import com.yeejoin.amos.fas.business.vo.Toke; import com.yeejoin.amos.fas.business.vo.Toke;
...@@ -482,30 +483,16 @@ public class ContingencyAction implements CustomerAction { ...@@ -482,30 +483,16 @@ public class ContingencyAction implements CustomerAction {
contingencyPlanInstanceMapper.updateMessageById(instance); contingencyPlanInstanceMapper.updateMessageById(instance);
} }
try { try {
String code = Objects.requireNonNull(redisTemplate.opsForValue().get("stepCode")).toString(); System.out.println("======optionarea 加入队列参数信息======action=====");
if (StringUtils.isNotBlank(code)) {
if (Integer.parseInt(stepCode) > Integer.parseInt(code)) { ButtonJsonVO buttonJsonVO = JSONObject.parseObject(buttonJson, ButtonJsonVO.class);
redisTemplate.opsForValue().set("stepCode", stepCode); Map<String, Object> map = buttonJsonVO.getOperate().get(buttonJsonVO.getOperate().size() - 1);
System.out.println("batchNo-->" + batchNo);
System.out.println("======optionarea 加入队列参数信息======action====="); System.out.println("stepCode-->" + stepCode);
System.out.println("batchNo-->" + batchNo); System.out.println("stepCodeNew-->" + buttonJsonVO.getStepCode());
System.out.println("stepCode-->" + stepCode); System.out.println("contingencyPlanId-->" + contingencyPlanId);
System.out.println("contingencyPlanId-->" + contingencyPlanId); System.out.println("buttonCode-->" + map.get("code").toString());
System.out.println("buttonCode-->" + buttonCode); iContingencyInstance.fire(batchNo, buttonJsonVO.getStepCode(), contingencyPlanId, map.get("code").toString(), "CANCEL_0", "A", RequestContext.getToken(), RequestContext.getProduct(), RequestContext.getAppKey());
iContingencyInstance.fire(batchNo, stepCode, contingencyPlanId, buttonCode, "CANCEL_0", "A", RequestContext.getToken(), RequestContext.getProduct(), RequestContext.getAppKey());
}
} else if (StringUtils.isBlank(code) && "0".equals(stepCode)) {
redisTemplate.opsForValue().set("stepCode", stepCode);
System.out.println("======optionarea 加入队列参数信息======action=====");
System.out.println("batchNo-->" + batchNo);
System.out.println("stepCode-->" + stepCode);
System.out.println("contingencyPlanId-->" + contingencyPlanId);
System.out.println("buttonCode-->" + buttonCode);
iContingencyInstance.fire(batchNo, stepCode, contingencyPlanId, buttonCode, "CANCEL_0", "A", RequestContext.getToken(), RequestContext.getProduct(), RequestContext.getAppKey());
} else if (StringUtils.isBlank(code)) {
redisTemplate.opsForValue().set("stepCode", stepCode);
}
} catch (Exception e) { } catch (Exception e) {
log.error("optionarea 加入队列失败-->" + e.getMessage()); log.error("optionarea 加入队列失败-->" + e.getMessage());
} }
......
...@@ -417,13 +417,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService { ...@@ -417,13 +417,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
// 通过contingencyPlanId获取buttonJson数据 // 通过contingencyPlanId获取buttonJson数据
ContingencyPlanInstance planInstance = iContingencyPlanInstanceRepository.getOne(contingencyPlanId); ContingencyPlanInstance planInstance = iContingencyPlanInstanceRepository.getOne(contingencyPlanId);
x.setButtonJson(planInstance.getContent()); x.setButtonJson(planInstance.getContent());
// 更新进度条标志位 }
x.setShowLine(Integer.parseInt(x.getStepCode()) <= Integer.parseInt(stepCode)); }).collect(Collectors.toList());
List<PlanStepJsonVO> collect1 = collect.stream().peek(x -> {
if (isExecute) {
if (Integer.parseInt(x.getStepCode()) <= Integer.parseInt(stepCode)) {
// 更新进度条标志位
x.setShowLine(Integer.parseInt(x.getStepCode()) <= Integer.parseInt(stepCode));
}
} }
}).collect(Collectors.toList()); }).collect(Collectors.toList());
PlanStepVo planStepVo = new PlanStepVo(); PlanStepVo planStepVo = new PlanStepVo();
planStepVo.setBatchNo(batchNo); planStepVo.setBatchNo(batchNo);
planStepVo.setPlanStep(JSON.toJSONString(collect)); planStepVo.setPlanStep(JSON.toJSONString(collect1));
updatePlanStep(planStepVo); updatePlanStep(planStepVo);
} }
} }
......
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