Browse Source

更改事件确认返回值类型

develop
Mr.Wang 8 months ago
parent
commit
151058f7d8
  1. 4
      zc-business/src/main/java/com/zc/business/controller/DcEmergencyPlansController.java
  2. 5
      zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java
  3. 11
      zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

4
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')") @PreAuthorize("@ss.hasPermi('business:plans:edit')")
@PostMapping("/event/confirm") @PostMapping("/event/confirm")
public AjaxResult eventConfirm(@RequestBody DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { 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')") @PreAuthorize("@ss.hasPermi('business:plans:edit')")
@PostMapping("/warning/confirm") @PostMapping("/warning/confirm")
public AjaxResult warningConfirm(@RequestBody DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { public AjaxResult warningConfirm(@RequestBody DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) {
return toAjax(dcEmergencyPlansService.executionWarningConfirmation(dcEventAnDcEmergencyPlans)); return AjaxResult.success(dcEmergencyPlansService.executionWarningConfirmation(dcEventAnDcEmergencyPlans));
} }
/** /**

5
zc-business/src/main/java/com/zc/business/service/DcEmergencyPlansService.java

@ -1,5 +1,6 @@
package com.zc.business.service; package com.zc.business.service;
import com.alibaba.fastjson.JSONArray;
import com.zc.business.domain.*; import com.zc.business.domain.*;
import java.util.List; import java.util.List;
@ -62,7 +63,7 @@ public interface DcEmergencyPlansService {
* @param dcEventAnDcEmergencyPlans 事件数据 事件预案数据 * @param dcEventAnDcEmergencyPlans 事件数据 事件预案数据
* @return 结果 * @return 结果
*/ */
int executionEventConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans); JSONArray executionEventConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans);
/** /**
* 感知事件确定 * 感知事件确定
@ -70,7 +71,7 @@ public interface DcEmergencyPlansService {
* @param dcEventAnDcEmergencyPlans 事件数据 事件预案数据 * @param dcEventAnDcEmergencyPlans 事件数据 事件预案数据
* @return 结果 * @return 结果
*/ */
int executionWarningConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans); JSONArray executionWarningConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans);
/** /**
* 感知事件-情报板自动生成 * 感知事件-情报板自动生成

11
zc-business/src/main/java/com/zc/business/service/impl/DcEmergencyPlansServiceImpl.java

@ -394,7 +394,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
* @return 结果 * @return 结果
*/ */
@Override @Override
public int executionEventConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { public JSONArray executionEventConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) {
// 获取事件数据 // 获取事件数据
DcEvent dcEvent = dcEventAnDcEmergencyPlans.getDcEvent(); DcEvent dcEvent = dcEventAnDcEmergencyPlans.getDcEvent();
// 方向 // 方向
@ -497,7 +497,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
* @return * @return
*/ */
@Override @Override
public int executionWarningConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) { public JSONArray executionWarningConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans) {
// 获取事件数据 // 获取事件数据
DcWarning dcWarning = dcEventAnDcEmergencyPlans.getDcWarning(); DcWarning dcWarning = dcEventAnDcEmergencyPlans.getDcWarning();
@ -514,7 +514,7 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
* @param dcEventAnDcEmergencyPlans 事件数据 事件预案数据 * @param dcEventAnDcEmergencyPlans 事件数据 事件预案数据
* @return * @return
*/ */
public int executionConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans, public JSONArray executionConfirmation(DcEventAnDcEmergencyPlans dcEventAnDcEmergencyPlans,
String stakeMark, String stakeMark,
String direction, String direction,
String id) { String id) {
@ -572,14 +572,15 @@ public class DcEmergencyPlansServiceImpl implements DcEmergencyPlansService {
eventPlanAssoc.setExecutingControlDevice(deviceIds.toString().replaceFirst(";", "")); eventPlanAssoc.setExecutingControlDevice(deviceIds.toString().replaceFirst(";", ""));
eventPlanAssoc.setExecutingControlResult(resultArray.toJSONString()); eventPlanAssoc.setExecutingControlResult(resultArray.toJSONString());
eventPlanAssoc.setCreateTime(DateUtils.getNowDate()); eventPlanAssoc.setCreateTime(DateUtils.getNowDate());
return eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc); eventPlanAssocMapper.insertEventPlanAssoc(eventPlanAssoc);
} else { } else {
EventPlanAssoc selectEventPlanAssoc = eventPlanAssocMapper.selectByEventId(eventPlanAssoc); EventPlanAssoc selectEventPlanAssoc = eventPlanAssocMapper.selectByEventId(eventPlanAssoc);
selectEventPlanAssoc.setUpdateTime(DateUtils.getNowDate()); selectEventPlanAssoc.setUpdateTime(DateUtils.getNowDate());
selectEventPlanAssoc.setRecoveredControlDevice(deviceIds.toString().replaceFirst(";", "")); selectEventPlanAssoc.setRecoveredControlDevice(deviceIds.toString().replaceFirst(";", ""));
selectEventPlanAssoc.setRecoveredControlResult(resultArray.toJSONString()); selectEventPlanAssoc.setRecoveredControlResult(resultArray.toJSONString());
return eventPlanAssocMapper.updateEventPlanAssoc(selectEventPlanAssoc); eventPlanAssocMapper.updateEventPlanAssoc(selectEventPlanAssoc);
} }
return resultArray;
} }
/** /**

Loading…
Cancel
Save