drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/controller/CockpitController.java
@@ -19,6 +19,7 @@ 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; @@ -61,9 +62,9 @@ @GetMapping("/deviceSearch") @ApiOperationSupport(order = 2) @ApiOperation(value = "设备查询", notes = "传入fwDevice") public R<IPage<FwDeviceVO>> page(FwDeviceDTO fwDevice, Query query) { IPage<FwDeviceEntity> pages = cockpitService.selectFwDevicePage(Condition.getPage(query), fwDevice); return R.data(FwDeviceWrapper.build().pageVO(pages)); public R<IPage<CockpitFwDeviceVO>> page(FwDeviceDTO fwDevice, Query query) { IPage<CockpitFwDeviceVO> pages = cockpitService.selectCockpitDevicePage(Condition.getPage(query), fwDevice); return R.data(pages); } /** drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/service/ICockpitService.java
@@ -6,6 +6,7 @@ import org.sxkj.fw.detection.entity.FwEffectEvalEntity; 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; @@ -27,7 +28,7 @@ * @param fwDevice * @return */ IPage<FwDeviceEntity> selectFwDevicePage(IPage<FwDeviceEntity> page, FwDeviceDTO fwDevice); IPage<CockpitFwDeviceVO> selectCockpitDevicePage(IPage<CockpitFwDeviceVO> page, FwDeviceDTO fwDevice); /** * 设备类型统计 drone-service/drone-fw/src/main/java/org/sxkj/fw/cockpit/service/impl/CockpitServiceImpl.java
@@ -11,6 +11,7 @@ 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.record.dto.FwDroneAlarmRecordDTO; import org.sxkj.fw.record.entity.FwDroneAlarmRecordEntity; import org.sxkj.fw.record.service.IFwDroneAlarmRecordService; @@ -38,8 +39,8 @@ } @Override public IPage<FwDeviceEntity> selectFwDevicePage(IPage<FwDeviceEntity> page, FwDeviceDTO fwDevice) { return fwDeviceService.selectFwDevicePage(page, fwDevice); public IPage<CockpitFwDeviceVO> selectCockpitDevicePage(IPage<CockpitFwDeviceVO> page, FwDeviceDTO fwDevice) { return fwDeviceService.selectCockpitDevicePage(page, fwDevice); } @Override drone-service/drone-fw/src/main/java/org/sxkj/fw/detection/controller/FwEffectEvalController.java
@@ -16,6 +16,7 @@ */ package org.sxkj.fw.detection.controller; import com.github.xiaoymin.knife4j.annotations.Ignore; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -72,16 +73,7 @@ FwEffectEvalEntity detail = fwEffectEvalService.getOne(Condition.getQueryWrapper(fwEffectEval)); return R.data(FwEffectEvalWrapper.build().entityVO(detail)); } /** * 反制效果评估表 分页 */ // @GetMapping("/list") // @ApiOperationSupport(order = 2) // @ApiOperation(value = "分页", notes = "传入fwEffectEval") // public R<IPage<FwEffectEvalVO>> list(@ApiIgnore @RequestParam Map<String, Object> fwEffectEval, Query query) { // IPage<FwEffectEvalEntity> pages = fwEffectEvalService.page(Condition.getPage(query), Condition.getQueryWrapper(fwEffectEval, FwEffectEvalEntity.class)); // return R.data(FwEffectEvalWrapper.build().pageVO(pages)); // } /** * 反制效果评估表 自定义分页 @@ -93,26 +85,6 @@ IPage<FwEffectEvalVO> pages = fwEffectEvalService.selectFwEffectEvalPage(Condition.getPage(query), fwEffectEval); return R.data(pages); } /** * 反制效果评估表 新增 */ // @PostMapping("/save") // @ApiOperationSupport(order = 4) // @ApiOperation(value = "新增", notes = "传入fwEffectEval") // public R save(@Valid @RequestBody FwEffectEvalEntity fwEffectEval) { // return R.status(fwEffectEvalService.save(fwEffectEval)); // } /** * 反制效果评估表 修改 */ // @PostMapping("/update") // @ApiOperationSupport(order = 5) // @ApiOperation(value = "修改", notes = "传入fwEffectEval") // public R update(@Valid @RequestBody FwEffectEvalEntity fwEffectEval) { // return R.status(fwEffectEvalService.updateById(fwEffectEval)); // } /** * 反制效果评估表 新增或修改 @@ -141,6 +113,7 @@ */ @GetMapping("/export-fwEffectEval") @ApiOperationSupport(order = 9) @Ignore @ApiOperation(value = "导出数据", notes = "传入fwEffectEval") public void exportFwEffectEval(@ApiIgnore @RequestParam Map<String, Object> fwEffectEval, BladeUser bladeUser, HttpServletResponse response) { QueryWrapper<FwEffectEvalEntity> queryWrapper = Condition.getQueryWrapper(fwEffectEval, FwEffectEvalEntity.class); drone-service/drone-fw/src/main/java/org/sxkj/fw/detection/controller/FwTaskScheduleController.java
@@ -16,6 +16,7 @@ */ package org.sxkj.fw.detection.controller; import com.github.xiaoymin.knife4j.annotations.Ignore; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -27,10 +28,13 @@ 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.springblade.core.tool.utils.Func; import org.springframework.web.bind.annotation.*; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.sxkj.fw.detection.dto.FwTaskScheduleDTO; import org.sxkj.fw.detection.entity.FwEffectEvalEntity; import org.sxkj.fw.detection.entity.FwTaskScheduleEntity; import org.sxkj.fw.detection.vo.FwTaskScheduleVO; import org.sxkj.fw.detection.excel.FwTaskScheduleExcel; @@ -43,6 +47,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.util.Map; import java.util.List; import java.util.Objects; import javax.servlet.http.HttpServletResponse; /** @@ -69,16 +74,7 @@ FwTaskScheduleEntity detail = fwTaskScheduleService.getOne(Condition.getQueryWrapper(fwTaskSchedule)); return R.data(FwTaskScheduleWrapper.build().entityVO(detail)); } /** * 任务调度记录表 分页 */ @GetMapping("/list") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入fwTaskSchedule") public R<IPage<FwTaskScheduleVO>> list(@ApiIgnore @RequestParam Map<String, Object> fwTaskSchedule, Query query) { IPage<FwTaskScheduleEntity> pages = fwTaskScheduleService.page(Condition.getPage(query), Condition.getQueryWrapper(fwTaskSchedule, FwTaskScheduleEntity.class)); return R.data(FwTaskScheduleWrapper.build().pageVO(pages)); } /** * 任务调度记录表 自定义分页 @@ -91,25 +87,7 @@ return R.data(pages); } /** * 任务调度记录表 新增 */ @PostMapping("/save") @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入fwTaskSchedule") public R save(@Valid @RequestBody FwTaskScheduleEntity fwTaskSchedule) { return R.status(fwTaskScheduleService.save(fwTaskSchedule)); } /** * 任务调度记录表 修改 */ @PostMapping("/update") @ApiOperationSupport(order = 5) @ApiOperation(value = "修改", notes = "传入fwTaskSchedule") public R update(@Valid @RequestBody FwTaskScheduleEntity fwTaskSchedule) { return R.status(fwTaskScheduleService.updateById(fwTaskSchedule)); } /** * 任务调度记录表 新增或修改 @@ -117,8 +95,9 @@ @PostMapping("/submit") @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入fwTaskSchedule") public R submit(@Valid @RequestBody FwTaskScheduleEntity fwTaskSchedule) { return R.status(fwTaskScheduleService.saveOrUpdate(fwTaskSchedule)); public R submit(@Valid @RequestBody FwTaskScheduleDTO fwTaskSchedule) { FwTaskScheduleEntity fwTaskScheduleEntity = Objects.requireNonNull(BeanUtil.copy(fwTaskSchedule, FwTaskScheduleEntity.class)); return R.status(fwTaskScheduleService.saveOrUpdate(fwTaskScheduleEntity)); } /** @@ -137,6 +116,7 @@ */ @GetMapping("/export-fwTaskSchedule") @ApiOperationSupport(order = 9) @Ignore @ApiOperation(value = "导出数据", notes = "传入fwTaskSchedule") public void exportFwTaskSchedule(@ApiIgnore @RequestParam Map<String, Object> fwTaskSchedule, BladeUser bladeUser, HttpServletResponse response) { QueryWrapper<FwTaskScheduleEntity> queryWrapper = Condition.getQueryWrapper(fwTaskSchedule, FwTaskScheduleEntity.class); drone-service/drone-fw/src/main/java/org/sxkj/fw/detection/dto/FwTaskScheduleDTO.java
@@ -16,9 +16,14 @@ */ package org.sxkj.fw.detection.dto; import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import io.swagger.annotations.ApiModelProperty; import org.sxkj.fw.detection.entity.FwTaskScheduleEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.util.Date; /** * 任务调度记录表 数据传输对象实体类 @@ -27,8 +32,69 @@ * @since 2026-01-08 */ @Data @EqualsAndHashCode(callSuper = true) public class FwTaskScheduleDTO extends FwTaskScheduleEntity { public class FwTaskScheduleDTO { private static final long serialVersionUID = 1L; /** * 设备ID(ja_fw_device.id) */ @ApiModelProperty(value = "设备ID(ja_fw_device.id)") private Long deviceId; /** * 关联区域ID */ @ApiModelProperty(value = "关联区域ID") private Long areaDivideId; /** * 关联场景ID */ @ApiModelProperty(value = "关联场景ID") private Long defenseSceneId; /** * 调度经度 */ @ApiModelProperty(value = "调度经度") private Double longitude; /** * 调度纬度 */ @ApiModelProperty(value = "调度纬度") private Double latitude; /** * 调度人员 */ @ApiModelProperty(value = "调度人员") private String dispatchUser; /** * 调度日期-开始 */ @ApiModelProperty(value = "调度日期-开始") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date dispatchStartTime; /** * 调度日期-结束 */ @ApiModelProperty(value = "调度日期-结束") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date dispatchEndTime; /** * 调度内容 */ @ApiModelProperty(value = "调度内容") private String dispatchContent; /** * 调度结果 */ @ApiModelProperty(value = "调度结果") private String dispatchResult; /** * 处置措施 */ @ApiModelProperty(value = "处置措施") private String disposeMeasure; /** * 区域编码 */ @ApiModelProperty(value = "区域编码") private String areaCode; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.java
@@ -20,6 +20,7 @@ import org.sxkj.fw.cockpit.vo.DeviceStatisticsVO; 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.device.vo.FwDeviceVO; import org.sxkj.fw.device.excel.FwDeviceExcel; import com.baomidou.mybatisplus.core.mapper.BaseMapper; @@ -61,8 +62,16 @@ List<DeviceStatisticsVO> statisticalDeviceType(); /** * * 告警统计 * @return */ AlarmStatisticsVO statisticalDeviceAtt(); /** * 获取设备列表 * @param page * @param fwDevice * @return */ List<CockpitFwDeviceVO> selectCockpitDevicePage(IPage<CockpitFwDeviceVO> page, FwDeviceDTO fwDevice); } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
@@ -133,4 +133,47 @@ (SELECT COUNT(*) FROM ja_fw_device WHERE is_deleted = 0 AND status in ('1', '2', '3') ) AS deviceAlarmCount; </select> <select id="selectCockpitDevicePage" resultType="org.sxkj.fw.device.vo.CockpitFwDeviceVO"> select d.*, fts.longitude, fts.latitude from ja_fw_device d left join ja_fw_task_schedule fts on d.id = fts.device_id <where> d.is_deleted = 0 <if test="param2.id != null and param2.id != ''"> and d.id = #{param2.id} </if> <if test="param2.deviceName != null and param2.deviceName != ''"> and d.device_name like concat('%',#{param2.deviceName},'%') </if> <if test="param2.deviceType != null and param2.deviceType != ''"> and d.device_type = #{param2.deviceType} </if> <if test="param2.deviceModel != null and param2.deviceModel != ''"> and d.device_model = #{param2.deviceModel} </if> <if test="param2.deviceSpecification != null and param2.deviceSpecification != ''"> and d.device_specification = #{param2.deviceSpecification} </if> <if test="param2.manufacturer != null and param2.manufacturer != ''"> and d.manufacturer = #{param2.manufacturer} </if> <if test="param2.source != null and param2.source != ''"> and d.source = #{param2.source} </if> <if test="param2.belongDept != null and param2.belongDept != ''"> and d.belong_dept = #{param2.belongDept} </if> <if test="param2.deviceStatusList != null and param2.deviceStatusList != ''"> and d.status in <foreach item="item" collection="param2.deviceStatusList" separator="," open="(" close=")" index=""> #{item} </foreach> </if> </where> </select> </mapper> drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceService.java
@@ -21,6 +21,7 @@ import org.sxkj.fw.cockpit.vo.DeviceStatisticsVO; 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.device.vo.FwDeviceVO; import org.sxkj.fw.device.excel.FwDeviceExcel; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -59,8 +60,16 @@ List<DeviceStatisticsVO> statisticalDeviceType(); /** * * 设备报警统计 * @return */ AlarmStatisticsVO statisticalDeviceAtt(); /** * 驾驶舱获取设备列表 * @param page * @param fwDevice * @return */ IPage<CockpitFwDeviceVO> selectCockpitDevicePage(IPage<CockpitFwDeviceVO> page, FwDeviceDTO fwDevice); } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceServiceImpl.java
@@ -20,6 +20,7 @@ import org.sxkj.fw.cockpit.vo.DeviceStatisticsVO; 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.device.vo.FwDeviceVO; import org.sxkj.fw.device.excel.FwDeviceExcel; import org.sxkj.fw.device.mapper.FwDeviceMapper; @@ -55,7 +56,18 @@ } /** * * 获取设备列表 * @param page * @param fwDevice * @return */ @Override public IPage<CockpitFwDeviceVO> selectCockpitDevicePage(IPage<CockpitFwDeviceVO> page, FwDeviceDTO fwDevice) { return page.setRecords(baseMapper.selectCockpitDevicePage(page, fwDevice)); } /** * 设备类型统计 * @return */ @Override @@ -63,6 +75,10 @@ return baseMapper.statisticalDeviceType(); } /** * 设备属性统计 * @return */ @Override public AlarmStatisticsVO statisticalDeviceAtt() { return baseMapper.statisticalDeviceAtt(); drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/CockpitFwDeviceVO.java
New file @@ -0,0 +1,156 @@ /* * Copyright (c) 2018-2028, Chill Zhuang All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the dreamlu.net developer nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * Author: Chill 庄骞 (smallchill@163.com) */ package org.sxkj.fw.device.vo; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.Getter; import org.sxkj.system.cache.SysCache; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** * 设备表 视图实体类 * * @author aix * @since 2026-01-08 */ @Data @Getter public class CockpitFwDeviceVO implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty(value = "主键") private Long id; /** * 设备名称 */ @ApiModelProperty(value = "设备名称") private String deviceName; /** * 设备类型(察打一体/便捷侦测箱/反制枪) */ @ApiModelProperty(value = "设备类型(察打一体/便捷侦测箱/反制枪)") private String deviceType; /** * 设备属性(无线电/光电/雷达) */ @ApiModelProperty(value = "设备属性(无线电/光电/雷达)") private String deviceAtt; /** * 型号 */ @ApiModelProperty(value = "型号") private String deviceModel; /** * 规格 */ @ApiModelProperty(value = "规格") private String deviceSpecification; /** * 生产厂商 */ @ApiModelProperty(value = "生产厂商") private String manufacturer; /** * 来源 */ @ApiModelProperty(value = "来源") private String source; /** * 用途 */ @ApiModelProperty(value = "用途") private String purpose; /** * 所属部门 */ @ApiModelProperty(value = "所属部门id") private Long belongDept; /** * 负责人 */ @ApiModelProperty(value = "负责人") private String charger; /** * 联系电话 */ @ApiModelProperty(value = "联系电话") private String contactPhone; /** * 备注 */ @ApiModelProperty(value = "备注") private String remark; @ApiModelProperty("运行状态(0:在线/1:离线/2:故障/3:报废)") private Integer status; @ApiModelProperty("创建时间") private Date createTime; /** * 电量百分比 0-100 */ @ApiModelProperty(value = "电量百分比 0-100") private Byte batteryPct; /** * 方位角 0-360° */ @ApiModelProperty(value = "方位角 0-360°") private Short azimuth; /** * 俯仰角 -90-+90° */ @ApiModelProperty(value = "俯仰角 -90-+90°") private Short elevation; /** * 侦测目标数量 */ @ApiModelProperty(value = "侦测目标数量") private Integer detectTargetCnt; /** * 有效范围 km */ @ApiModelProperty(value = "有效范围 km") private BigDecimal effectiveRangeKm; /** * 工作模式:侦测中/信号干扰中/诱导驱离中/待机 */ @ApiModelProperty(value = "工作模式:1.侦测中/2.信号干扰中/3.诱导驱离中/4.待机") private String workMode; @ApiModelProperty(value = "经度") private Double longitude; @ApiModelProperty(value = "纬度") private Double latitude; @ApiModelProperty(value = "所属部门名称") public String getBelongDeptName() { if (belongDept == null) { return null; } return SysCache.getDeptName(belongDept); } }