Commit d30cbfff authored by 高建强's avatar 高建强

item:应急处置流程优化

parent 25ade279
...@@ -196,6 +196,11 @@ public class ContingencyAction implements CustomerAction { ...@@ -196,6 +196,11 @@ public class ContingencyAction implements CustomerAction {
stringStringMap = new HashMap<>(); stringStringMap = new HashMap<>();
returnMap = new HashMap<>(); returnMap = new HashMap<>();
Toke toke = remoteSecurityService.getServerToken();
RequestContext.setToken(toke.getToke());
RequestContext.setProduct(toke.product);
RequestContext.setAppKey(toke.appKey);
ResponseModel responseModel = jcsFeign.dutyPersonList(); ResponseModel responseModel = jcsFeign.dutyPersonList();
if ("SUCCESS".equals(responseModel.getDevMessage())) { if ("SUCCESS".equals(responseModel.getDevMessage())) {
String JSONStr = JSON.toJSONString(responseModel.getResult()); String JSONStr = JSON.toJSONString(responseModel.getResult());
......
...@@ -338,19 +338,22 @@ public class ContingencyInstanceImpl implements IContingencyInstance { ...@@ -338,19 +338,22 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
throw new Exception("请勿重复操作."); throw new Exception("请勿重复操作.");
} }
if ("CONFIRM".equals(buttonState)) { if ("CONFIRM".equals(buttonState)) {
if (code.equals(operate.getCode())) { if (code.equals(operate.getCode())) {
operate.setState("executed"); operate.setState("executed");
if ("FIRE_CANCEL".equals(code) || "END_EMERGENCY".equals(code)) { if ("FIRE_CANCEL".equals(code) || "END_EMERGENCY".equals(code)) {
redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning()); redisTemplate.delete(RiskSourceServiceImpl.cacheKeyForCanBeRunning());
}
if ("END_EMERGENCY".equals(code)) {
// 应急处置中断,初始化planStep,json数据 // 应急处置中断,初始化planStep,json数据
planRuleService.updatePlanRuleByBatchNo(batchNo); planRuleService.updatePlanRuleByBatchNo(batchNo);
// 应急处置中断,更新预案信息表结束时间 // 应急处置中断,更新预案信息表结束时间
contingencyInstanceInfoService.updateEndTimeById(batchNo); contingencyInstanceInfoService.updateEndTimeById(batchNo);
} }
// if ("END_EMERGENCY".equals(code)) {
// // 应急处置中断,初始化planStep,json数据
// planRuleService.updatePlanRuleByBatchNo(batchNo);
// // 应急处置中断,更新预案信息表结束时间
// contingencyInstanceInfoService.updateEndTimeById(batchNo);
// }
} else { } else {
operate.setState("disable"); operate.setState("disable");
} }
......
...@@ -108,13 +108,9 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen ...@@ -108,13 +108,9 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
Integer total = Integer.parseInt(map.get("total").toString()); Integer total = Integer.parseInt(map.get("total").toString());
Integer count = Integer.parseInt(map.get("count").toString()); Integer count = Integer.parseInt(map.get("count").toString());
if (SqlKeyWordEnum.AND.getKey().equalsIgnoreCase(type)) { if (SqlKeyWordEnum.AND.getKey().equalsIgnoreCase(type)) {
if (total.equals(count)) { return total.equals(count);
return true;
}
} else if (SqlKeyWordEnum.OR.getKey().equalsIgnoreCase(type)) { } else if (SqlKeyWordEnum.OR.getKey().equalsIgnoreCase(type)) {
if (count != 0) { return count != 0;
return true;
}
} }
} }
return false; return false;
......
...@@ -69,7 +69,7 @@ ...@@ -69,7 +69,7 @@
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "HANDOVER_COMMAND", "buttonCode": "HANDOVER_COMMAND",
"isParallel": "1", "isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A" "roleCode": "Digital_Responsing_Plan_B"
}, },
{ {
"stepCode": "9", "stepCode": "9",
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "START_VALVE_HALL_CONTINGENCY", "buttonCode": "START_VALVE_HALL_CONTINGENCY",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A" "roleCode": "Digital_Responsing_Plan_B"
}, },
{ {
"stepCode": "11", "stepCode": "11",
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "PLUG_CABLETRENCH", "buttonCode": "PLUG_CABLETRENCH",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A" "roleCode": "Digital_Responsing_Plan_B"
}, },
{ {
"stepCode": "12", "stepCode": "12",
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "HANDOVER_FIGTHHING", "buttonCode": "HANDOVER_FIGTHHING",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A" "roleCode": "Digital_Responsing_Plan_B"
}, },
{ {
"stepCode": "13", "stepCode": "13",
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "FIRE_EXTINCT", "buttonCode": "FIRE_EXTINCT",
"isParallel": "0", "isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A" "roleCode": "Digital_Responsing_Plan_B"
}, },
{ {
"stepCode": "14", "stepCode": "14",
...@@ -117,6 +117,6 @@ ...@@ -117,6 +117,6 @@
"stepStatus": "0", "stepStatus": "0",
"buttonCode": "END_EMERGENCY", "buttonCode": "END_EMERGENCY",
"isParallel": "1", "isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A" "roleCode": "Digital_Responsing_Plan_B"
} }
] ]
\ No newline at end of file
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