Commit 824e5c01 authored by KeYong's avatar KeYong

增加钱塘江预案流程

parent 1a09c939
......@@ -28,13 +28,10 @@ import com.yeejoin.amos.fas.common.enums.PlanReplyMessageEnum;
import com.yeejoin.amos.fas.core.util.ResponseModel;
import com.yeejoin.amos.fas.dao.entity.ContingencyOriginalData;
import com.yeejoin.amos.fas.dao.entity.ContingencyPlanInstance;
import com.yeejoin.amos.fas.dao.entity.EmergencyTaskContent;
import com.yeejoin.amos.fas.dao.entity.Equipment;
import com.yeejoin.amos.fas.datasync.bo.ContingencyOriginalDataSyncBo;
import com.yeejoin.amos.feign.privilege.Privilege;
import com.yeejoin.amos.feign.privilege.model.AgencyUserModel;
import com.yeejoin.amos.feign.privilege.model.RoleModel;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.StringUtils;
import org.codehaus.jackson.map.ObjectMapper;
......@@ -44,7 +41,6 @@ import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.core.io.Resource;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -52,12 +48,7 @@ import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import org.typroject.tyboot.core.foundation.context.RequestContext;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.stream.Collectors;
import static org.typroject.tyboot.core.foundation.context.RequestContext.*;
@Service
public class ContingencyInstanceImpl implements IContingencyInstance {
......@@ -68,9 +59,6 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
// public final static List<String> list = Arrays.asList("0", "1", "2", "5", "9", "10", "11");
@Value("classpath:/json/plan-setp-node.json")
private Resource planStepNodeResource;
@Autowired
private IContingencyPlanInstanceRepository repository;
......@@ -516,23 +504,12 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
@Override
public Optional<Equipment> clickButton(String batchNo, String stepCode, String buttonJson, String contingencyPlanId, String buttonCode, String buttonState, String stepStateOnbutton, String isExecute, String isAuto, String token, String product, String appKey,String startUserName) throws Exception {
// String json;
// try {
// json = IOUtils.toString(planStepNodeResource.getInputStream(), String.valueOf(StandardCharsets.UTF_8));
// } catch (IOException e) {
// throw new RuntimeException("获取预案节点信息失败!");
// }
if ("0".equals(stepCode)) {
contingencyInstance.fire(batchNo, stepCode, buttonJson, contingencyPlanId,
"FIRE_CONFIRM", buttonState, stepStateOnbutton, "true", "false", token,
product, appKey, startUserName);
}
// JSONObject jsonObject = JSONObject.parseObject(json);
// List<String> nodes = Arrays.stream(jsonObject.get("nodes").toString().split(",")).collect(Collectors.toList());
// List<String> strs = nodes.stream().filter(x -> x.equals(stepCode)).collect(Collectors.toList());
ContingencyPlanInstance instance = contingencyPlanInstanceMapper.getMessageById(contingencyPlanId);
instance.setId(null);
instance.setRecordType("REPLYMESSAGE");
......
{
"nodes": "0,1,2,5,9,10,11",
"nodes_pyh": "0,2,5,15,19",
"nodes_yn": "0,1,2,5,9,10,11"
}
[
{
"stepCode": "0",
"stepName": "检查确认火情",
"stepStatus": "0",
"buttonCode": "FIRE_CONFIRM",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A",
"index": 0,
"checkYesOrNo": ""
},
{
"stepCode": "1",
"stepName": "检查相应阀组是否停用、交流进线开关是否已跳开",
"stepStatus": "0",
"buttonCode": "STOP_COMMUTATION",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A",
"index": 1,
"checkYesOrNo": ""
},
{
"stepCode": "2",
"stepName": "向各级领导、调度汇报火情",
"stepStatus": "0",
"buttonCode": "LEADER_REPORT_FIRE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 2,
"checkYesOrNo": ""
},
{
"stepCode": "3",
"stepName": "申请主控站转移、停用本级对端换流器",
"stepStatus": "0",
"buttonCode": "STOP_LOCAL_END_TRANSVERTER",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 3,
"checkYesOrNo": ""
},
{
"stepCode": "4",
"stepName": "通知专职消防队、值班领导或驻站检修负责人及保安人员",
"stepStatus": "0",
"buttonCode": "NOTICE_STATION_ALL_PERSON",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 4,
"checkYesOrNo": ""
},
{
"stepCode": "5",
"stepName": "拨打119火警电话、全站广播通报火情",
"stepStatus": "0",
"buttonCode": "CALL_PHONE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 5,
"checkYesOrNo": ""
},
{
"stepCode": "6",
"stepName": "起火换流变转检修",
"stepStatus": "0",
"buttonCode": "FIRE_TRANSVERTER_TO_OVERHAUL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 6,
"checkYesOrNo": ""
},
{
"stepCode": "7",
"stepName": "驻站消防队开始灭火",
"stepStatus": "0",
"buttonCode": "FIRETEAM_START_OUTFIRE",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A",
"index": 7,
"checkYesOrNo": ""
},
{
"stepCode": "8",
"stepName": "调整工业视频监视工业水池、现场火势情况",
"stepStatus": "1",
"buttonCode": "ADJUST_VIDEO_TO_POOL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 8,
"checkYesOrNo": ""
},
{
"stepCode": "9",
"stepName": "CAFS喷淋系统已开启",
"stepStatus": "0",
"buttonCode": "OPEN_WATERSYSTEM",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 9,
"checkYesOrNo": "",
"condition": [
{
"equipName": "雨淋阀",
"equipCode": "92130300BH644",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "WSS_DelugeValve_Start",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "10",
"stepName": "开启换流变挑檐炮",
"stepStatus": "0",
"buttonCode": "MONITOR_START",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 10,
"condition": [
{
"equipName": "CAFS消防炮",
"equipCode": "92032200BUX44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "CAFS_GunValve_Open",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0,
"checkYesOrNo": ""
},
{
"stepCode": "11",
"stepName": "停运阀冷系统、阀厅空调系统",
"stepStatus": "0",
"buttonCode": "STOP_VALVE_COOL_SYS",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 11,
"checkYesOrNo": "",
"condition": [
{
"equipName": "AIRCS-风机",
"equipCode": "92230600UH244",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "AIRCS_Fan_Start",
"standardValue": "false",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "12",
"stepName": "断开交直流电源",
"stepStatus": "0",
"buttonCode": "OFF_POWER",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 12,
"checkYesOrNo": ""
},
{
"stepCode": "13",
"stepName": "启动着火换流变排油装置",
"stepStatus": "0",
"buttonCode": "DRAIN_OIL_CONFIRM",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A",
"index": 13,
"checkYesOrNo": "",
"condition": [
{
"equipName": "排油阀",
"equipCode": "92102700EBA44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "ONL_OilDischargeDeviceOilPillowDischargeOpen",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "14",
"stepName": "对阀侧套管、阀厅进行降温",
"stepStatus": "0",
"buttonCode": "COOL_SYS_COOL_DOWN",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 14,
"checkYesOrNo": ""
},
{
"stepCode": "15",
"stepName": "驻站消防队指挥权交接",
"stepStatus": "0",
"buttonCode": "HANDOVER_COMMAND",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 15,
"checkYesOrNo": ""
},
{
"stepCode": "16",
"stepName": "确认明火扑灭",
"stepStatus": "0",
"buttonCode": "FIRE_EXTINCT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 16,
"checkYesOrNo": ""
},
{
"stepCode": "17",
"stepName": "确认无复燃情况",
"stepStatus": "0",
"buttonCode": "CONFIRM_REKINDLE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 17,
"checkYesOrNo": ""
},
{
"stepCode": "18",
"stepName": "向各级领导、调度、指挥中心汇报已灭火",
"stepStatus": "0",
"buttonCode": "LEADER_REPORT_FIRE_EXTINCT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 18,
"checkYesOrNo": ""
},
{
"stepCode": "19",
"stepName": "应急处置结束",
"stepStatus": "0",
"buttonCode": "END_EMERGENCY",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 19,
"checkYesOrNo": ""
}
]
\ No newline at end of file
[
{
"stepCode": "0",
"stepName": "确认灾情",
"stepName": "检查确认火情",
"stepStatus": "0",
"buttonCode": "FIRE_CONFIRM",
"isParallel": "1",
......@@ -61,7 +61,7 @@
},
{
"stepCode": "6",
"stepName": "起火换流转检修",
"stepName": "起火换流转检修",
"stepStatus": "0",
"buttonCode": "FIRE_TRANSVERTER_TO_OVERHAUL",
"isParallel": "0",
......
[
{
"stepCode": "0",
"stepName": "确认灾情",
"stepName": "检查确认火情",
"stepStatus": "0",
"buttonCode": "FIRE_CONFIRM",
"isParallel": "1",
......@@ -11,68 +11,92 @@
},
{
"stepCode": "1",
"stepName": "停运换流阀",
"stepName": "检查相应阀组是否停用、交流进线开关是否已跳开",
"stepStatus": "0",
"buttonCode": "STOP_COMMUTATION",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A",
"index": 1,
"checkYesOrNo": "",
"condition": [
{
"equipName": "换流器",
"equipCode": "92261200S7944",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "DCCP_DCCPStreamTransformerCharged",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
"checkYesOrNo": ""
},
{
"stepCode": "2",
"stepName": "拨打报警电话",
"stepName": "向各级领导、调度汇报火情",
"stepStatus": "0",
"buttonCode": "CALL_PHONE",
"buttonCode": "LEADER_REPORT_FIRE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"roleCode": "Digital_Responsing_Plan_B",
"index": 2,
"checkYesOrNo": ""
},
{
"stepCode": "3",
"stepName": "确认油枕排油系统已开启",
"stepName": "申请主控站转移、停用本级对端换流器",
"stepStatus": "0",
"buttonCode": "DRAIN_OIL_CONFIRM",
"buttonCode": "STOP_LOCAL_END_TRANSVERTER",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"roleCode": "Digital_Responsing_Plan_B",
"index": 3,
"checkYesOrNo": "",
"condition": [
{
"equipName": "排油阀",
"equipCode": "92102700EBA44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "ONL_OilDischargeDeviceOilPillowDischargeOpen",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
"checkYesOrNo": ""
},
{
"stepCode": "4",
"stepName": "确认水喷雾系统已开启",
"stepName": "通知专职消防队、值班领导或驻站检修负责人及保安人员",
"stepStatus": "0",
"buttonCode": "NOTICE_STATION_ALL_PERSON",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 4,
"checkYesOrNo": ""
},
{
"stepCode": "5",
"stepName": "拨打119火警电话、全站广播通报火情",
"stepStatus": "0",
"buttonCode": "CALL_PHONE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 5,
"checkYesOrNo": ""
},
{
"stepCode": "6",
"stepName": "起火换流变转检修",
"stepStatus": "0",
"buttonCode": "FIRE_TRANSVERTER_TO_OVERHAUL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 6,
"checkYesOrNo": ""
},
{
"stepCode": "7",
"stepName": "驻站消防队开始灭火",
"stepStatus": "0",
"buttonCode": "FIRETEAM_START_OUTFIRE",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A",
"index": 7,
"checkYesOrNo": ""
},
{
"stepCode": "8",
"stepName": "调整工业视频监视工业水池、现场火势情况",
"stepStatus": "1",
"buttonCode": "ADJUST_VIDEO_TO_POOL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 8,
"checkYesOrNo": ""
},
{
"stepCode": "9",
"stepName": "CAFS喷淋系统已开启",
"stepStatus": "0",
"buttonCode": "OPEN_WATERSYSTEM",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 4,
"index": 9,
"checkYesOrNo": "",
"condition": [
{
......@@ -89,42 +113,45 @@
"isAuto": 0
},
{
"stepCode": "5",
"stepName": "断开上级电源",
"stepStatus": "0",
"buttonCode": "OFF_POWER",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 5,
"checkYesOrNo": ""
},
{
"stepCode": "6",
"stepName": "停运阀厅空调系统",
"stepCode": "10",
"stepName": "开启换流变挑檐炮",
"stepStatus": "0",
"buttonCode": "STOP_AIRCON",
"buttonCode": "MONITOR_START",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 6,
"index": 10,
"condition": [
{
"equipName": "CAFS消防炮",
"equipCode": "92032200BUX44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "CAFS_GunValve_Open",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0,
"checkYesOrNo": ""
},
{
"stepCode": "7",
"stepName": "一键开启消防炮",
"stepCode": "11",
"stepName": "停运阀冷系统、阀厅空调系统",
"stepStatus": "0",
"buttonCode": "MONITOR_START",
"buttonCode": "STOP_VALVE_COOL_SYS",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 7,
"index": 11,
"checkYesOrNo": "",
"condition": [
{
"equipName": "消防炮阀",
"equipCode": "92032200BUX44",
"equipName": "AIRCS-风机",
"equipCode": "92230600UH244",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "CAFS_CAFSFireGunEquipmentValveStatus",
"standardValue": "true",
"equipSpeIndexKey": "AIRCS_Fan_Start",
"standardValue": "false",
"inAndOr": "and"
}
],
......@@ -132,23 +159,23 @@
"isAuto": 0
},
{
"stepCode": "8",
"stepName": "驻站消防队指挥权交接",
"stepCode": "12",
"stepName": "断开交直流电源",
"stepStatus": "0",
"buttonCode": "HANDOVER_COMMAND",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 8,
"buttonCode": "OFF_POWER",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 12,
"checkYesOrNo": ""
},
{
"stepCode": "9",
"stepName": "确认本体排油已开启",
"stepCode": "13",
"stepName": "启动着火换流变排油装置",
"stepStatus": "0",
"buttonCode": "OWNER_DRAIN_OIL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 9,
"buttonCode": "DRAIN_OIL_CONFIRM",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_A",
"index": 13,
"checkYesOrNo": "",
"condition": [
{
......@@ -156,7 +183,7 @@
"equipCode": "92102700EBA44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "ONL_OilDischargeDeviceOilyPillowDischargeOpen",
"equipSpeIndexKey": "ONL_OilDischargeDeviceOilPillowDischargeOpen",
"standardValue": "true",
"inAndOr": "and"
}
......@@ -165,53 +192,63 @@
"isAuto": 0
},
{
"stepCode": "10",
"stepName": "启动阀厅应急预案",
"stepCode": "14",
"stepName": "对阀侧套管、阀厅进行降温",
"stepStatus": "0",
"buttonCode": "START_VALVE_HALL_CONTINGENCY",
"buttonCode": "COOL_SYS_COOL_DOWN",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 10,
"index": 14,
"checkYesOrNo": ""
},
{
"stepCode": "11",
"stepName": "电缆沟封堵",
"stepCode": "15",
"stepName": "驻站消防队指挥权交接",
"stepStatus": "0",
"buttonCode": "PLUG_CABLETRENCH",
"buttonCode": "HANDOVER_COMMAND",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 11,
"index": 15,
"checkYesOrNo": ""
},
{
"stepCode": "12",
"stepName": "政府消防队指挥权交接",
"stepCode": "16",
"stepName": "确认明火扑灭",
"stepStatus": "0",
"buttonCode": "HANDOVER_FIGTHHING",
"buttonCode": "FIRE_EXTINCT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 12,
"index": 16,
"checkYesOrNo": ""
},
{
"stepCode": "13",
"stepName": "确认明火扑灭",
"stepCode": "17",
"stepName": "确认无复燃情况",
"stepStatus": "0",
"buttonCode": "FIRE_EXTINCT",
"buttonCode": "CONFIRM_REKINDLE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 13,
"index": 17,
"checkYesOrNo": ""
},
{
"stepCode": "14",
"stepCode": "18",
"stepName": "向各级领导、调度、指挥中心汇报已灭火",
"stepStatus": "0",
"buttonCode": "LEADER_REPORT_FIRE_EXTINCT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 18,
"checkYesOrNo": ""
},
{
"stepCode": "19",
"stepName": "应急处置结束",
"stepStatus": "0",
"buttonCode": "END_EMERGENCY",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 14,
"index": 19,
"checkYesOrNo": ""
}
]
\ 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