| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.*; |
| | | 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.springframework.format.annotation.DateTimeFormat; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.sxkj.fw.area.vo.FwAreaDivideVO; |
| | | import org.sxkj.fw.area.vo.FwDefenseSceneManageVO; |
| | | 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.cockpit.vo.SceneManageStatisticsVO; |
| | | import org.sxkj.fw.detection.param.FwEffectEvalParam; |
| | | import org.sxkj.fw.device.dto.FwDeviceDTO; |
| | | import org.sxkj.fw.device.vo.CockpitFwDeviceVO; |
| | |
| | | import org.sxkj.fw.record.vo.FwDroneAlarmRecordVO; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | /** |
| | | * 设备出库去向统计 |
| | | * @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") |
| | |
| | | } |
| | | |
| | | /** |
| | | * 场景管理与区域数量统计 |
| | | */ |
| | | @GetMapping("/sceneManageStatistics") |
| | | @ApiOperationSupport(order = 6) |
| | | @ApiOperation(value = "场景管理统计", notes = "返回场景管理数量与区域数量") |
| | | public R<SceneManageStatisticsVO> getSceneManageStatistics( |
| | | @ApiParam(value = "时间筛选(yyyy-MM-dd HH:mm:ss)") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date time) { |
| | | Date filterTime = time == null ? new Date() : time; |
| | | SceneManageStatisticsVO statistics = cockpitService.statisticsSceneManageAndArea(filterTime); |
| | | return R.data(statistics); |
| | | } |
| | | |
| | | /** |
| | | * 信号干扰,诱导驱离 |
| | | */ |
| | | @PostMapping("/interferenceAndExpulsion") |
| | |
| | | public R interferenceAndExpulsion(@Valid @RequestBody FwEffectEvalParam fwEffectEvalParam) { |
| | | return R.status(cockpitService.interferenceAndExpulsion(fwEffectEvalParam)); |
| | | } |
| | | |
| | | /** |
| | | * 区域划分表 列表 |
| | | */ |
| | | @GetMapping("/areaDivideList") |
| | | @ApiOperationSupport(order = 2) |
| | | @ApiOperation(value = "列表-不带分页", notes = "传入filterSelected或sceneId或areaTypeKeys或isSetSceneManage或flyTime") |
| | | public R<List<FwAreaDivideVO>> list( |
| | | @ApiParam(value = "是否过滤已被选择的数据(1过滤 0不过滤)") @RequestParam(required = false) Integer filterSelected, |
| | | @ApiParam(value = "场景id") @RequestParam(required = false) Long sceneId, |
| | | @ApiParam(value = "区域类型key集合(逗号分隔)") @RequestParam(required = false) String areaTypeKeys, |
| | | @ApiParam(value = "是否按场景管理过滤(1是 0或空否)") @RequestParam(required = false) Integer isSetSceneManage, |
| | | @ApiParam(value = "时间筛选(yyyy-MM-dd HH:mm:ss)") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime flyTime) { |
| | | List<FwAreaDivideVO> list = cockpitService.selectFwAreaDivideList(filterSelected, sceneId, areaTypeKeys, isSetSceneManage, flyTime); |
| | | return R.data(list); |
| | | } |
| | | |
| | | /** |
| | | * 场景管理表 列表 |
| | | */ |
| | | @GetMapping("/defenseSceneManageList") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "列表", notes = "传入time") |
| | | public R<List<FwDefenseSceneManageVO>> list( |
| | | @ApiParam(value = "时间筛选(yyyy-MM-dd HH:mm:ss)") @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") Date time) { |
| | | Date filterTime = time == null ? new Date() : time; |
| | | List<FwDefenseSceneManageVO> list = cockpitService.selectFwDefenseSceneManageList(filterTime); |
| | | return R.data(list); |
| | | } |
| | | } |