From 1c3d9f4f6d0dc330a80b199cfb824f41a048fe6c Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Sat, 31 Jan 2026 16:39:33 +0800
Subject: [PATCH] 设备权限优化

---
 drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/controller/CockpitController.java |   32 +++++++++++++++++++-------------
 1 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/controller/CockpitController.java b/drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/controller/CockpitController.java
index ca63d86..671609e 100644
--- a/drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/controller/CockpitController.java
+++ b/drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/controller/CockpitController.java
@@ -3,32 +3,25 @@
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
 import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 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;
 
 /**
  * 数据驾驶舱
@@ -79,6 +72,20 @@
 	}
 
 	/**
+	 * 设备出库去向统计
+	 * @return 统计数据
+	 */
+	@GetMapping("/statisticalDeviceOut")
+	@ApiOperationSupport(order = 7)
+	@ApiOperation(value = "设备出库去向统计", notes = "设备出库去向统计")
+	@ApiImplicitParams({
+		@ApiImplicitParam(name = "effectiveRangeKmIsNotNull", value = "有效范围是否为空:0-不处理 1-不为空 2-为空", paramType = "query", dataType = "string")
+	})
+	public R<List<DeviceStatisticsVO>> statisticalDeviceOut(String effectiveRangeKmIsNotNull) {
+		return R.data(cockpitService.getDeviceOutStatistics(effectiveRangeKmIsNotNull));
+	}
+
+	/**
 	 * 告警记录统计接口
 	 */
 	@GetMapping("/alarmStatistics")
@@ -95,8 +102,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));
 	}
 }

--
Gitblit v1.9.3