吉安感知网项目-后端
linwei
2026-01-17 497e3161f4e8fc2be2a78a348ccf3dfcfe4ea602
反制
4 files modified
1 files added
98 ■■■■ changed files
drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/controller/CockpitController.java 16 ●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/service/ICockpitService.java 7 ●●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/service/impl/CockpitServiceImpl.java 33 ●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/detection/entity/FwEffectEvalEntity.java 4 ●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/detection/param/FwEffectEvalParam.java 38 ●●●●● patch | view | raw | blame | history
drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/controller/CockpitController.java
@@ -8,27 +8,18 @@
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.BeanUtil;
import org.springframework.web.bind.annotation.*;
import org.sxkj.fw.cockpit.service.ICockpitService;
import org.sxkj.fw.cockpit.vo.AlarmStatisticsVO;
import org.sxkj.fw.cockpit.vo.DeviceStatisticsVO;
import org.sxkj.fw.detection.dto.FwEffectEvalDTO;
import org.sxkj.fw.detection.entity.FwEffectEvalEntity;
import org.sxkj.fw.detection.service.IFwEffectEvalService;
import org.sxkj.fw.detection.param.FwEffectEvalParam;
import org.sxkj.fw.device.dto.FwDeviceDTO;
import org.sxkj.fw.device.entity.FwDeviceEntity;
import org.sxkj.fw.device.service.IFwDeviceService;
import org.sxkj.fw.device.vo.CockpitFwDeviceVO;
import org.sxkj.fw.device.vo.FwDeviceVO;
import org.sxkj.fw.device.wrapper.FwDeviceWrapper;
import org.sxkj.fw.record.dto.FwDroneAlarmRecordDTO;
import org.sxkj.fw.record.service.IFwDroneAlarmRecordService;
import org.sxkj.fw.record.vo.FwDroneAlarmRecordVO;
import javax.validation.Valid;
import java.util.List;
import java.util.Objects;
/**
 * 数据驾驶舱
@@ -95,8 +86,7 @@
    @PostMapping("/interferenceAndExpulsion")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "信号干扰,诱导驱离", notes = "传入fwEffectEval")
    public R submit(@Valid @RequestBody FwEffectEvalDTO fwEffectEval) {
        FwEffectEvalEntity fwEffectEvalEntity = Objects.requireNonNull(BeanUtil.copy(fwEffectEval, FwEffectEvalEntity.class));
        return R.status(cockpitService.saveOrUpdate(fwEffectEvalEntity));
    public R interferenceAndExpulsion(@Valid @RequestBody FwEffectEvalParam fwEffectEvalParam) {
         return R.status(cockpitService.interferenceAndExpulsion(fwEffectEvalParam));
    }
}
drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/service/ICockpitService.java
@@ -3,9 +3,8 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.sxkj.fw.cockpit.vo.AlarmStatisticsVO;
import org.sxkj.fw.cockpit.vo.DeviceStatisticsVO;
import org.sxkj.fw.detection.entity.FwEffectEvalEntity;
import org.sxkj.fw.detection.param.FwEffectEvalParam;
import org.sxkj.fw.device.dto.FwDeviceDTO;
import org.sxkj.fw.device.entity.FwDeviceEntity;
import org.sxkj.fw.device.vo.CockpitFwDeviceVO;
import org.sxkj.fw.record.dto.FwDroneAlarmRecordDTO;
import org.sxkj.fw.record.vo.FwDroneAlarmRecordVO;
@@ -38,10 +37,10 @@
    /**
     * 评估结果保存
     * @param fwEffectEvalEntity
     * @param fwEffectEvalParam
     * @return
     */
    boolean saveOrUpdate(FwEffectEvalEntity fwEffectEvalEntity);
    boolean interferenceAndExpulsion(FwEffectEvalParam fwEffectEvalParam);
    /**
     * 告警记录和设备记录统计
drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/service/impl/CockpitServiceImpl.java
@@ -1,12 +1,12 @@
package org.sxkj.fw.cockpit.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.sxkj.fw.cockpit.service.ICockpitService;
import org.sxkj.fw.cockpit.vo.AlarmStatisticsVO;
import org.sxkj.fw.cockpit.vo.DeviceStatisticsVO;
import org.sxkj.fw.detection.entity.FwEffectEvalEntity;
import org.sxkj.fw.detection.param.FwEffectEvalParam;
import org.sxkj.fw.detection.service.IFwEffectEvalService;
import org.sxkj.fw.device.dto.FwDeviceDTO;
import org.sxkj.fw.device.entity.FwDeviceEntity;
@@ -49,11 +49,36 @@
    }
    @Override
    public boolean saveOrUpdate(FwEffectEvalEntity fwEffectEvalEntity) {
        FwDroneAlarmRecordEntity alarmRecordEntity = fwDroneAlarmRecordService.getById(fwEffectEvalEntity.getAlarmRecordId());
    public boolean interferenceAndExpulsion(FwEffectEvalParam fwEffectEvalParam) {
        FwDroneAlarmRecordEntity alarmRecordEntity = fwDroneAlarmRecordService.getById(fwEffectEvalParam.getAlarmRecordId());
        FwDeviceEntity device = fwDeviceService.getById(alarmRecordEntity.getDeviceId());
        FwEffectEvalEntity fwEffectEvalEntity = new FwEffectEvalEntity();
        // 告警记录相关字段
        fwEffectEvalEntity.setAlarmRecordId(fwEffectEvalParam.getAlarmRecordId());
        fwEffectEvalEntity.setDroneName(alarmRecordEntity.getDroneName());
        fwEffectEvalEntity.setDroneType(alarmRecordEntity.getDroneType());
        fwEffectEvalEntity.setDroneDeviceCode(alarmRecordEntity.getDroneSerialNo());
        fwEffectEvalEntity.setFindTime(alarmRecordEntity.getAlarmTime());
        // 从参数获取反制方式,否则使用告警记录中的值
        fwEffectEvalEntity.setCounterWay(fwEffectEvalParam.getCounterWay());
        // 设备相关字段
        fwEffectEvalEntity.setDeviceId(alarmRecordEntity.getDeviceId());
        fwEffectEvalEntity.setCounterEffect("1");
        fwEffectEvalEntity.setDeviceSn(device.getDeviceSn());
        fwEffectEvalEntity.setDeviceName(device.getDeviceName());
        fwEffectEvalEntity.setDeviceModel(device.getDeviceModel());
        fwEffectEvalEntity.setDeviceType(device.getDeviceType());
        fwEffectEvalEntity.setDeployLongitude(device.getLongitude() != null ? Double.parseDouble(device.getLongitude()) : null);
        fwEffectEvalEntity.setDeployLatitude(device.getLatitude() != null ? Double.parseDouble(device.getLatitude()) : null);
        fwEffectEvalEntity.setAreaCode(device.getAreaCode());
        // 反制效果及工作模式(从参数获取,否则使用默认值)
        fwEffectEvalEntity.setCounterEffect( "1"); // 1.success/2.fail
        fwEffectEvalEntity.setCoverRadiusM(2500); // 覆盖范围(米)
        fwEffectEvalEntity.setWorkMode( "1"); // 1.机动/2.固定
        return fwEffectEvalService.saveOrUpdate(fwEffectEvalEntity);
    }
drone-service/drone-fw/src/main/java/org/sxkj/fw/detection/entity/FwEffectEvalEntity.java
@@ -57,9 +57,9 @@
    /**
     * 反制设备编码(快照)
     */
    @TableField("device_code")
    @TableField("device_sn")
    @ApiModelProperty(value = "反制设备编码(快照)")
    private String deviceCode;
    private String deviceSn;
    /**
     * 反制设备名称(快照)
     */
drone-service/drone-fw/src/main/java/org/sxkj/fw/detection/param/FwEffectEvalParam.java
New file
@@ -0,0 +1,38 @@
package org.sxkj.fw.detection.param;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
 * 反制效果评估表 参数类
 *
 * @author BladeX
 * @since 2026-01-17
 */
@Data
public class FwEffectEvalParam implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 告警记录ID(ja_fw_drone_alarm_record.id)
     */
    @ApiModelProperty(value = "告警记录ID(ja_fw_drone_alarm_record.id)")
    private Long alarmRecordId;
    @ApiModelProperty(value = "反制方式:1.信号干扰/2.诱导驱离/无")
    private String counterWay;
    // @ApiModelProperty(value = "反制效果(1.success/2.fail)")
    // private String counterEffect;
    //
    // @ApiModelProperty(value = "覆盖范围(米)")
    // private Integer coverRadiusM;
    //
    // @ApiModelProperty(value = "工作模式(1.机动/2.固定)")
    // private String workMode;
}