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

item:应急处置流程优化

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