diff --git a/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java b/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java index 98b5f157..50a71e48 100644 --- a/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java +++ b/zc-business/src/main/java/com/zc/business/domain/EventPlanAssoc.java @@ -58,4 +58,10 @@ public class EventPlanAssoc { */ @ApiModelProperty("执行操作结果") private String controlResult; + + /** + * 执行操作 + */ + @ApiModelProperty("执行操作") + private String control; } diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java index 4784ce2f..ee191c68 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java @@ -170,12 +170,12 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { dcExecuteActions.forEach(dcExecuteAction -> { JSONObject executeConfig = JSON.parseObject(dcExecuteAction.getExecuteConfig()); if (dcExecuteAction.getDeviceType() == DeviceTypeEnum.ROAD_SECTION_VOICE_BROADCASTING.getCode() - && executeConfig.get("operationType").equals("2")) { + && executeConfig.getString("operationType").equals("2")) { // 执行操作中智能发布语音广播 String content = intelligentPublishingOfInformation(dcEvent); updateIntelligentPublishingContent(dcExecuteAction,markArray,dcEvent,content,dcEvent.getDirection()); } else if (dcExecuteAction.getDeviceType() == DeviceTypeEnum.VARIABLE_INFORMATION_FLAG.getCode() - && executeConfig.get("operationType").equals("2")) { + && executeConfig.getString("operationType").equals("2")) { // 执行操作中智能发布情报板 String content = intelligentPublishingOfInformation(dcEvent); updateIntelligentPublishingContent(dcExecuteAction,markArray,dcEvent,content,dcEvent.getDirection()); @@ -753,6 +753,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { eventPlanAssoc.setControlDevice(deviceIds.toString().replaceFirst(";", "")); eventPlanAssoc.setControlResult(resultArray.toJSONString()); eventPlanAssoc.setCreateTime(DateUtils.getNowDate()); + eventPlanAssoc.setControl(JSON.toJSONString(dcEmergencyPlans.getDcExecuteAction())); eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc); resultObject.put("eventPlanAssocId",eventPlanAssoc.getId()); @@ -819,7 +820,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { else if (device.getDeviceType().equals(DeviceTypeConstants.VARIABLE_INFORMATION_FLAG.toString())) { if (operationType == 1) { // 情报板发布全流程 - if (otherConfig.get("operationType").equals("2")) { + if (otherConfig.getString("operationType").equals("2")) { JSONArray contentList = JSON.parseArray(otherConfig.get("contentList").toString()); JSONObject foundContent = contentList.stream() .map(content -> JSON.parseObject(content.toString())) @@ -843,7 +844,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { } else { // 恢复操作 - if (otherConfig.get("operationType").equals("2")) { + if (otherConfig.getString("operationType").equals("2")) { // 还原上次 props.put("fileId", "10"); functionId = DeviceFunctionIdConstants.VARIABLE_INFORMATION_FLAG_1B; @@ -869,7 +870,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { params.put("name", "task-event"); params.put("outVVol", "8"); params.put("priority", "1"); - if (otherConfig.get("operationType").equals("2")) { + if (otherConfig.getString("operationType").equals("2")) { // 智能发布 JSONArray contentList = JSON.parseArray(otherConfig.get("contentList").toString()); JSONObject foundContent = contentList.stream() @@ -1169,7 +1170,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { }else if (dcExecuteAction.getDeviceType() == DeviceTypeConstants.VARIABLE_INFORMATION_FLAG || dcExecuteAction.getDeviceType() == DeviceTypeConstants.ROAD_SECTION_VOICE_BROADCASTING) { // 情报板/语音广播 - if (jsonObject.get("operationType").equals("1")) { + if (jsonObject.getString("operationType").equals("1")) { config.put("content",jsonObject.get("content")); }else { config.put("operationType","智能发布"); diff --git a/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml b/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml index c0c79aca..c56e0a2c 100644 --- a/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml +++ b/zc-business/src/main/resources/mapper/business/EventPlanAssocMapper.xml @@ -26,6 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" create_time, update_time, control_result, + control, #{eventId}, @@ -35,6 +36,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{createTime}, #{updateTime}, #{controlResult}, + #{control},