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

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

parent bf2bd3a4
......@@ -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.ToipResponse;
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.PlanStepJsonVO;
import com.yeejoin.amos.fas.business.vo.Toke;
......@@ -482,30 +483,16 @@ public class ContingencyAction implements CustomerAction {
contingencyPlanInstanceMapper.updateMessageById(instance);
}
try {
String code = Objects.requireNonNull(redisTemplate.opsForValue().get("stepCode")).toString();
if (StringUtils.isNotBlank(code)) {
if (Integer.parseInt(stepCode) > Integer.parseInt(code)) {
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) && "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);
}
System.out.println("======optionarea 加入队列参数信息======action=====");
ButtonJsonVO buttonJsonVO = JSONObject.parseObject(buttonJson, ButtonJsonVO.class);
Map<String, Object> map = buttonJsonVO.getOperate().get(buttonJsonVO.getOperate().size() - 1);
System.out.println("batchNo-->" + batchNo);
System.out.println("stepCode-->" + stepCode);
System.out.println("stepCodeNew-->" + buttonJsonVO.getStepCode());
System.out.println("contingencyPlanId-->" + contingencyPlanId);
System.out.println("buttonCode-->" + map.get("code").toString());
iContingencyInstance.fire(batchNo, buttonJsonVO.getStepCode(), contingencyPlanId, map.get("code").toString(), "CANCEL_0", "A", RequestContext.getToken(), RequestContext.getProduct(), RequestContext.getAppKey());
} catch (Exception e) {
log.error("optionarea 加入队列失败-->" + e.getMessage());
}
......
......@@ -417,13 +417,19 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
// 通过contingencyPlanId获取buttonJson数据
ContingencyPlanInstance planInstance = iContingencyPlanInstanceRepository.getOne(contingencyPlanId);
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());
PlanStepVo planStepVo = new PlanStepVo();
planStepVo.setBatchNo(batchNo);
planStepVo.setPlanStep(JSON.toJSONString(collect));
planStepVo.setPlanStep(JSON.toJSONString(collect1));
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