吉安感知网项目-后端
rain
2026-01-29 5b23a8cb9294506d88330f0750f39b9a2cbabbdc
drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceController.java
@@ -35,6 +35,7 @@
import org.sxkj.fw.common.GenericConverter;
import org.sxkj.fw.common.IdParam;
import org.sxkj.fw.device.dto.FwDeviceDTO;
import org.sxkj.fw.device.dto.FwDevicePolygonQueryDTO;
import org.sxkj.fw.device.entity.FwDeviceEntity;
import org.sxkj.fw.device.excel.FwDeviceExcel;
import org.sxkj.fw.device.param.FwDevicePageParam;
@@ -96,6 +97,18 @@
   }
   /**
    * 设备表 列表(多边形过滤)
    */
   @PostMapping("/listByPolygons")
   @ApiOperationSupport(order = 2)
   @ApiOperation(value = "列表-多边形过滤", notes = "传入isAreaSelect、areaId、status、isTrack、polygons")
   public R<List<FwDeviceVO>> listByPolygons(@Valid @RequestBody FwDevicePolygonQueryDTO query) {
      List<FwDeviceEntity> list = fwDeviceService.selectFwDeviceListByPolygons(query);
      FwDeviceWrapper wrapper = FwDeviceWrapper.build();
      return R.data(list.stream().map(wrapper::entityVO).collect(Collectors.toList()));
   }
   /**
    * 设备表 自定义分页
    */
   @GetMapping("/page")
@@ -114,6 +127,15 @@
   public R submit(@Valid @RequestBody FwDeviceDTO fwDevice) {
      return R.status(fwDeviceService.saveOrUpdateDevice(FwDeviceWrapper.build().entityDTO(fwDevice)));
   }
   /**
    * 设备表 新增或修改
    */
   @PostMapping("/updateTrackStatus")
   @ApiOperationSupport(order = 4)
   @ApiOperation(value = "修改设备出入库状态", notes = "传入fwDevice")
   public R updateTrackStatus(@ApiParam(value = "", required = true) @RequestParam Long deviceId) {
      return R.status(fwDeviceService.updateTrackStatusByDeviceId(deviceId,0));
   }
   /**
    * 设备表 删除