From 151058f7d8e58fc6eade60c8fb4942cca6969e66 Mon Sep 17 00:00:00 2001 From: "Mr.Wang" Date: Sat, 16 Mar 2024 17:29:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E4=BA=8B=E4=BB=B6=E7=A1=AE?= =?UTF-8?q?=E8=AE=A4=E8=BF=94=E5=9B=9E=E5=80=BC=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/DcEmergencyPlansController.java | 4 ++-- .../zc/business/service/DcEmergencyPlansService.java | 5 +++-- .../service/impl/DcEmergencyPlansServiceImpl.java | 11 ++++++----- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java b/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java index 91f32974..1163548e 100644 --- a/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java +++ b/zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java @@ -123,7 +123,7 @@ public class DcEmergencyPlansController extends BaseController { @PreAuthorize("@ss.hasPermi('business:plans:edit')") @PostMapping("/event/confirm") public AjaxResult eventConfirm(@RequestBody DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { - return toAjax(dcEmergencyPlansService.executionEventConfirmation(dcEventAnDcEmergencyPlans)); + return AjaxResult.success(dcEmergencyPlansService.executionEventConfirmation(dcEventAnDcEmergencyPlans)); } /** @@ -133,7 +133,7 @@ public class DcEmergencyPlansController extends BaseController { @PreAuthorize("@ss.hasPermi('business:plans:edit')") @PostMapping("/warning/confirm") public AjaxResult warningConfirm(@RequestBody DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { - return toAjax(dcEmergencyPlansService.executionWarningConfirmation(dcEventAnDcEmergencyPlans)); + return AjaxResult.success(dcEmergencyPlansService.executionWarningConfirmation(dcEventAnDcEmergencyPlans)); } /** diff --git a/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java b/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java index 3109ae0e..2ecea0a2 100644 --- a/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java +++ b/zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java @@ -1,5 +1,6 @@ package com.zc.business.service; +import com.alibaba.fastjson.JSONArray; import com.zc.business.domain.*; import java.util.List; @@ -62,7 +63,7 @@ public interface DcEmergencyPlansService { * @param dcEventAnDcEmergencyPlans 事件数据 和 事件预案数据 * @return 结果 */ - int executionEventConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans); + JSONArray executionEventConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans); /** * 感知事件确定 @@ -70,7 +71,7 @@ public interface DcEmergencyPlansService { * @param dcEventAnDcEmergencyPlans 事件数据 和 事件预案数据 * @return 结果 */ - int executionWarningConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans); + JSONArray executionWarningConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans); /** * 感知事件-情报板自动生成 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 4bae8457..4af3b938 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 @@ -394,7 +394,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { * @return 结果 */ @Override - public int executionEventConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { + public JSONArray executionEventConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { // 获取事件数据 DcEvent dcEvent = dcEventAnDcEmergencyPlans.getDcEvent(); // 方向 @@ -497,7 +497,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { * @return */ @Override - public int executionWarningConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { + public JSONArray executionWarningConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { // 获取事件数据 DcWarning dcWarning = dcEventAnDcEmergencyPlans.getDcWarning(); @@ -514,7 +514,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { * @param dcEventAnDcEmergencyPlans 事件数据 和 事件预案数据 * @return */ - public int executionConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans, + public JSONArray executionConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans, String stakeMark, String direction, String id) { @@ -572,14 +572,15 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService { eventPlanAssoc.setExecutingControlDevice(deviceIds.toString().replaceFirst(";", "")); eventPlanAssoc.setExecutingControlResult(resultArray.toJSONString()); eventPlanAssoc.setCreateTime(DateUtils.getNowDate()); - return eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc); + eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc); } else { EventPlanAssoc selectEventPlanAssoc = eventPlanAssocMapper.selectByEventId(eventPlanAssoc); selectEventPlanAssoc.setUpdateTime(DateUtils.getNowDate()); selectEventPlanAssoc.setRecoveredControlDevice(deviceIds.toString().replaceFirst(";", "")); selectEventPlanAssoc.setRecoveredControlResult(resultArray.toJSONString()); - return eventPlanAssocMapper.updateEventPlanAssoc(selectEventPlanAssoc); + eventPlanAssocMapper.updateEventPlanAssoc(selectEventPlanAssoc); } + return resultArray; } /**