From 7928338686e53bf5ff06c7263dca0b70a5e6743e Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Wed, 15 May 2024 17:23:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=8B=E4=BB=B6=E7=A1=AE?= =?UTF-8?q?=E5=AE=9A=E4=B8=AD=E7=9A=84=E4=BA=8B=E4=BB=B6=E9=A2=84=E6=A1=88?= =?UTF-8?q?=E5=85=B3=E8=81=94=E8=A1=A8=E5=AD=98=E5=82=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/zc/business/domain/EventPlanAssoc.java | 6 ++++++ .../service/impl/DcEmergencyPlansServiceImpl.java | 13 +++++++------ .../mapper/business/EventPlanAssocMapper.xml | 2 ++ 3 files changed, 15 insertions(+), 6 deletions(-) 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},