Commit e3a43f0c authored by KeYong's avatar KeYong

鄱阳湖版本预案调试修改

parent d4ec3a1b
......@@ -979,7 +979,7 @@ public class ContingencyAction implements CustomerAction {
*/
@RuleMethod(methodLabel = "任务动作保存", project = "换流站消防专项预案")
@Transactional
public void saveTaskInfo(@MethodParam(paramLabel = "动作名称") String taskName, @MethodParam(paramLabel = "角色编码") String roleCode, @MethodParam(paramLabel = "任务编号") Integer taskNum, @MethodParam(paramLabel = "步骤编码") String stepCode, @MethodParam(paramLabel = "按钮json字符串") String buttonJson, @MethodParam(paramLabel = "预案对象") Object paramObj) {
public void saveTaskInfo(@MethodParam(paramLabel = "任务名称") String taskName, @MethodParam(paramLabel = "角色编码") String roleCode, @MethodParam(paramLabel = "任务编号") Integer taskNum, @MethodParam(paramLabel = "步骤编码") String stepCode, @MethodParam(paramLabel = "按钮json字符串") String buttonJson, @MethodParam(paramLabel = "预案对象") Object paramObj) {
ContingencyRo contingencyRo = (ContingencyRo) paramObj;
String batchNo = contingencyRo.getBatchNo();
if (!findByBatchNoAndStatus(batchNo)) {
......
......@@ -642,7 +642,7 @@ public class ContingencyInstanceImpl implements IContingencyInstance {
e.printStackTrace();
}
String img = "";
if ("SUCCESS".equals(responseModel.getDevMessage())) {
if (responseModel != null && "SUCCESS".equals(responseModel.getDevMessage())) {
img = JSON.toJSONString(responseModel.getResult()).replace("\"","");
}
img = StringUtils.isEmpty(img) ? personImg : img;
......
......@@ -56,10 +56,10 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
private static final String VALUE = "true";
// 停运本极对端换流器
// private static final int stepIndex = 9;
private static final int stepIndex = 9;
// 消防泵正常启动
// private static final int pumpStepIndex = 7;
private static final int pumpStepIndex = 7;
@Autowired
private IEquipmentFireEquipmentService equipmentFireEquipmentService;
......@@ -191,20 +191,20 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
String fireEquipId = String.valueOf(map.get("fireEquipId"));
List<Long> fireEquipments = new ArrayList<>();
// 若是停运本极对端换流器,则需查出本极对应的电力设备列表,暂用电力设备名称过滤出本极电力设备,注意此处的电力设备按照标准有两极(极I,极II)
// if (stepIndex == index) {
// Optional<Equipment> equipment = iEquipmentDao.findById(Long.valueOf(fireEquipId));
// if (equipment.get() != null) {
// String fireEquipNamePrefix = equipment.get().getName().substring(0, 2);
// List<String> fireEquipIdList = equipmentSpecificMapper.getFireEquipIdsByNamePrefix(fireEquipNamePrefix);
// String[] strings = fireEquipIdList.toArray(new String[fireEquipIdList.size()]);
// // 获取消防设备id列表
// fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(strings);
// }
// } else {
if (stepIndex == index) {
Optional<Equipment> equipment = iEquipmentDao.findById(Long.valueOf(fireEquipId));
if (equipment.get() != null) {
String fireEquipNamePrefix = equipment.get().getName().substring(0, 2);
List<String> fireEquipIdList = equipmentSpecificMapper.getFireEquipIdsByNamePrefix(fireEquipNamePrefix);
String[] strings = fireEquipIdList.toArray(new String[fireEquipIdList.size()]);
// 获取消防设备id列表
fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(strings);
}
} else {
String[] fireEquipIds = new String[]{fireEquipId};
// 获取消防设备id列表
fireEquipments = equipmentFireEquipmentService.findFireEquipmentIdsByEquipmentId(fireEquipIds);
// }
}
PlanStepJsonVO vo = result.stream().filter(x -> x.getIndex() == index).collect(Collectors.toList()).get(0);
List<ConditionVO> list = vo.getCondition();
......@@ -227,16 +227,16 @@ public class EquipmentFireEquipmentServiceImpl implements IEquipmentFireEquipmen
for (PlanMessage message : messages) {
int count = planMessageMapper.getPlanMessageCount(String.valueOf(map.get("batchNo")), index, message.getIndexCreateTime());
if (0 <count) {
continue;
continue;
}
planMessageDao.save(message);
}
}
// if (pumpStepIndex == index) {
// return 0 < resultSize;
// } else {
if (pumpStepIndex == index) {
return 0 < resultSize;
} else {
return (0 < resultSize && num == resultSize);
// }
}
} else {
return false;
}
......
......@@ -495,7 +495,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
e.printStackTrace();
}
String img = "";
if ("SUCCESS".equals(responseModel.getDevMessage())) {
if (responseModel != null && "SUCCESS".equals(responseModel.getDevMessage())) {
img = JSON.toJSONString(responseModel.getResult()).replace("\"","");
}
img = StringUtils.isEmpty(img) ? personImg : img;
......@@ -708,7 +708,7 @@ public class PlanVisual3dServiceImpl implements IPlanVisual3dService {
e.printStackTrace();
}
String img = "";
if ("SUCCESS".equals(responseModel.getDevMessage())) {
if (responseModel != null && "SUCCESS".equals(responseModel.getDevMessage())) {
img = JSON.toJSONString(responseModel.getResult()).replace("\"","");
}
img = StringUtils.isEmpty(img) ? personImg : img;
......
......@@ -913,4 +913,16 @@
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
</sql>
</changeSet>
<changeSet author="keyong" id="1682647357-1">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="contingency_plan_instance" columnName="category" />
</not>
</preConditions>
<comment>修改contingency_plan_instance表结构</comment>
<sql>
ALTER TABLE `contingency_plan_instance` MODIFY COLUMN `category` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '一级分类' AFTER `record_type`;
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
[
{
"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": "",
"condition": [
{
"equipName": "换流器",
"equipCode": "92261200S7944",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "DCCP_DCCPStreamTransformerCharged",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "2",
"stepName": "拨打报警电话",
"stepStatus": "0",
"buttonCode": "CALL_PHONE",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 2,
"checkYesOrNo": ""
},
{
"stepCode": "3",
"stepName": "确认油枕排油系统已开启",
"stepStatus": "0",
"buttonCode": "DRAIN_OIL_CONFIRM",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 3,
"checkYesOrNo": "",
"condition": [
{
"equipName": "排油阀",
"equipCode": "92102700EBA44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "ONL_OilDischargeDeviceOilPillowDischargeOpen",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "4",
"stepName": "确认水喷雾系统已开启",
"stepStatus": "0",
"buttonCode": "OPEN_WATERSYSTEM",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 4,
"checkYesOrNo": "",
"condition": [
{
"equipName": "雨淋阀",
"equipCode": "92130300BH644",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "WSS_DelugeValve_Start",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "5",
"stepName": "断开上级电源",
"stepStatus": "0",
"buttonCode": "OFF_POWER",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 5,
"checkYesOrNo": ""
},
{
"stepCode": "6",
"stepName": "停运阀厅空调系统",
"stepStatus": "0",
"buttonCode": "STOP_AIRCON",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 6,
"checkYesOrNo": ""
},
{
"stepCode": "7",
"stepName": "一键开启消防炮",
"stepStatus": "0",
"buttonCode": "MONITOR_START",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_A",
"index": 7,
"checkYesOrNo": "",
"condition": [
{
"equipName": "消防炮阀",
"equipCode": "92032200BUX44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "CAFS_CAFSFireGunEquipmentValveStatus",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "8",
"stepName": "驻站消防队指挥权交接",
"stepStatus": "0",
"buttonCode": "HANDOVER_COMMAND",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 8,
"checkYesOrNo": ""
},
{
"stepCode": "9",
"stepName": "确认本体排油已开启",
"stepStatus": "0",
"buttonCode": "OWNER_DRAIN_OIL",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 9,
"checkYesOrNo": "",
"condition": [
{
"equipName": "排油阀",
"equipCode": "92102700EBA44",
"equipSpeName": "",
"equipSpeCode": "",
"equipSpeIndexKey": "ONL_OilDischargeDeviceOilyPillowDischargeOpen",
"standardValue": "true",
"inAndOr": "and"
}
],
"outAndOr": "and",
"isAuto": 0
},
{
"stepCode": "10",
"stepName": "启动阀厅应急预案",
"stepStatus": "0",
"buttonCode": "START_VALVE_HALL_CONTINGENCY",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 10,
"checkYesOrNo": ""
},
{
"stepCode": "11",
"stepName": "电缆沟封堵",
"stepStatus": "0",
"buttonCode": "PLUG_CABLETRENCH",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 11,
"checkYesOrNo": ""
},
{
"stepCode": "12",
"stepName": "政府消防队指挥权交接",
"stepStatus": "0",
"buttonCode": "HANDOVER_FIGTHHING",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 12,
"checkYesOrNo": ""
},
{
"stepCode": "13",
"stepName": "确认明火扑灭",
"stepStatus": "0",
"buttonCode": "FIRE_EXTINCT",
"isParallel": "0",
"roleCode": "Digital_Responsing_Plan_B",
"index": 13,
"checkYesOrNo": ""
},
{
"stepCode": "14",
"stepName": "应急处置结束",
"stepStatus": "0",
"buttonCode": "END_EMERGENCY",
"isParallel": "1",
"roleCode": "Digital_Responsing_Plan_B",
"index": 14,
"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