drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceController.java
@@ -16,51 +16,52 @@ */ package org.sxkj.fw.device.controller; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 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.ApiParam; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import lombok.AllArgsConstructor; import javax.validation.Valid; import org.springblade.core.secure.BladeUser; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.mp.support.Condition; import org.springblade.core.mp.support.Query; import org.springblade.core.secure.BladeUser; import org.springblade.core.tool.api.R; import org.springblade.core.tool.constant.BladeConstant; import org.springblade.core.tool.utils.DateUtil; 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.device.dto.FwDeviceAndTrackDTO; import org.sxkj.fw.device.entity.FwDeviceEntity; import org.sxkj.fw.device.vo.FwDeviceVO; import org.sxkj.fw.device.excel.FwDeviceExcel; import org.sxkj.fw.device.wrapper.FwDeviceWrapper; import org.sxkj.fw.device.service.IFwDeviceService; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.tool.constant.BladeConstant; import org.sxkj.fw.device.vo.FwDeviceVO; import org.sxkj.fw.device.wrapper.FwDeviceWrapper; import springfox.documentation.annotations.ApiIgnore; import java.util.Map; import java.util.List; import javax.servlet.http.HttpServletResponse; import javax.validation.Valid; import java.util.List; import java.util.Map; /** * 反无设备表 控制器 * 设备表 控制器 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ @RestController @AllArgsConstructor @RequestMapping("fwDevice/fwDevice") @Api(value = "反无设备表", tags = "反无设备表接口") @RequestMapping("device/fwDevice") @Api(value = "设备表", tags = "设备表接口") public class FwDeviceController extends BladeController { private final IFwDeviceService fwDeviceService; /** * 反无设备表 详情 * 设备表 详情 */ @GetMapping("/detail") @ApiOperationSupport(order = 1) @@ -69,19 +70,9 @@ FwDeviceEntity detail = fwDeviceService.getOne(Condition.getQueryWrapper(fwDevice)); return R.data(FwDeviceWrapper.build().entityVO(detail)); } /** * 反无设备表 分页 */ @GetMapping("/list") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入fwDevice") public R<IPage<FwDeviceVO>> list(@ApiIgnore @RequestParam Map<String, Object> fwDevice, Query query) { IPage<FwDeviceEntity> pages = fwDeviceService.page(Condition.getPage(query), Condition.getQueryWrapper(fwDevice, FwDeviceEntity.class)); return R.data(FwDeviceWrapper.build().pageVO(pages)); } /** * 反无设备表 自定义分页 * 设备表 自定义分页 */ @GetMapping("/page") @ApiOperationSupport(order = 3) @@ -91,38 +82,19 @@ return R.data(pages); } /** * 反无设备表 新增 */ @PostMapping("/save") @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入fwDevice") public R save(@Valid @RequestBody FwDeviceEntity fwDevice) { return R.status(fwDeviceService.save(fwDevice)); } /** * 反无设备表 修改 */ @PostMapping("/update") @ApiOperationSupport(order = 5) @ApiOperation(value = "修改", notes = "传入fwDevice") public R update(@Valid @RequestBody FwDeviceEntity fwDevice) { return R.status(fwDeviceService.updateById(fwDevice)); } /** * 反无设备表 新增或修改 * 设备表 新增或修改 */ @PostMapping("/submit") @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入fwDevice") public R submit(@Valid @RequestBody FwDeviceEntity fwDevice) { return R.status(fwDeviceService.saveOrUpdate(fwDevice)); public R submit(@Valid @RequestBody FwDeviceAndTrackDTO dto) { return R.status(fwDeviceService.saveFwDevice(dto)); } /** * 反无设备表 删除 * 设备表 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 7) @@ -145,7 +117,7 @@ //} queryWrapper.lambda().eq(FwDeviceEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); List<FwDeviceExcel> list = fwDeviceService.exportFwDevice(queryWrapper); ExcelUtil.export(response, "反无设备表数据" + DateUtil.time(), "反无设备表数据表", list, FwDeviceExcel.class); ExcelUtil.export(response, "设备表数据" + DateUtil.time(), "设备表数据表", list, FwDeviceExcel.class); } } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/controller/FwDeviceTrackController.java
New file @@ -0,0 +1,151 @@ /* * 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.controller; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; import lombok.AllArgsConstructor; import javax.validation.Valid; import org.springblade.core.secure.BladeUser; 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.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.device.entity.FwDeviceTrackEntity; import org.sxkj.fw.device.vo.FwDeviceTrackVO; import org.sxkj.fw.device.excel.FwDeviceTrackExcel; import org.sxkj.fw.device.wrapper.FwDeviceTrackWrapper; import org.sxkj.fw.device.service.IFwDeviceTrackService; import org.springblade.core.boot.ctrl.BladeController; import org.springblade.core.tool.utils.DateUtil; import org.springblade.core.excel.util.ExcelUtil; import org.springblade.core.tool.constant.BladeConstant; import springfox.documentation.annotations.ApiIgnore; import java.util.Map; import java.util.List; import javax.servlet.http.HttpServletResponse; /** * 设备跟踪流转表 控制器 * * @author Aix * @since 2026-01-08 */ @RestController @AllArgsConstructor @RequestMapping("device/fwDeviceTrack") @Api(value = "设备跟踪流转表", tags = "设备跟踪流转表接口") public class FwDeviceTrackController extends BladeController { private final IFwDeviceTrackService fwDeviceTrackService; /** * 设备跟踪流转表 详情 */ @GetMapping("/detail") @ApiOperationSupport(order = 1) @ApiOperation(value = "详情", notes = "传入fwDeviceTrack") public R<FwDeviceTrackVO> detail(FwDeviceTrackEntity fwDeviceTrack) { FwDeviceTrackEntity detail = fwDeviceTrackService.getOne(Condition.getQueryWrapper(fwDeviceTrack)); return R.data(FwDeviceTrackWrapper.build().entityVO(detail)); } /** * 设备跟踪流转表 分页 */ @GetMapping("/list") @ApiOperationSupport(order = 2) @ApiOperation(value = "分页", notes = "传入fwDeviceTrack") public R<IPage<FwDeviceTrackVO>> list(@ApiIgnore @RequestParam Map<String, Object> fwDeviceTrack, Query query) { IPage<FwDeviceTrackEntity> pages = fwDeviceTrackService.page(Condition.getPage(query), Condition.getQueryWrapper(fwDeviceTrack, FwDeviceTrackEntity.class)); return R.data(FwDeviceTrackWrapper.build().pageVO(pages)); } /** * 设备跟踪流转表 自定义分页 */ @GetMapping("/page") @ApiOperationSupport(order = 3) @ApiOperation(value = "分页", notes = "传入fwDeviceTrack") public R<IPage<FwDeviceTrackVO>> page(FwDeviceTrackVO fwDeviceTrack, Query query) { IPage<FwDeviceTrackVO> pages = fwDeviceTrackService.selectFwDeviceTrackPage(Condition.getPage(query), fwDeviceTrack); return R.data(pages); } /** * 设备跟踪流转表 新增 */ @PostMapping("/save") @ApiOperationSupport(order = 4) @ApiOperation(value = "新增", notes = "传入fwDeviceTrack") public R save(@Valid @RequestBody FwDeviceTrackEntity fwDeviceTrack) { return R.status(fwDeviceTrackService.save(fwDeviceTrack)); } /** * 设备跟踪流转表 修改 */ @PostMapping("/update") @ApiOperationSupport(order = 5) @ApiOperation(value = "修改", notes = "传入fwDeviceTrack") public R update(@Valid @RequestBody FwDeviceTrackEntity fwDeviceTrack) { return R.status(fwDeviceTrackService.updateById(fwDeviceTrack)); } /** * 设备跟踪流转表 新增或修改 */ @PostMapping("/submit") @ApiOperationSupport(order = 6) @ApiOperation(value = "新增或修改", notes = "传入fwDeviceTrack") public R submit(@Valid @RequestBody FwDeviceTrackEntity fwDeviceTrack) { return R.status(fwDeviceTrackService.saveOrUpdate(fwDeviceTrack)); } /** * 设备跟踪流转表 删除 */ @PostMapping("/remove") @ApiOperationSupport(order = 7) @ApiOperation(value = "逻辑删除", notes = "传入ids") public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { return R.status(fwDeviceTrackService.deleteLogic(Func.toLongList(ids))); } /** * 导出数据 */ @GetMapping("/export-fwDeviceTrack") @ApiOperationSupport(order = 9) @ApiOperation(value = "导出数据", notes = "传入fwDeviceTrack") public void exportFwDeviceTrack(@ApiIgnore @RequestParam Map<String, Object> fwDeviceTrack, BladeUser bladeUser, HttpServletResponse response) { QueryWrapper<FwDeviceTrackEntity> queryWrapper = Condition.getQueryWrapper(fwDeviceTrack, FwDeviceTrackEntity.class); //if (!AuthUtil.isAdministrator()) { // queryWrapper.lambda().eq(FwDeviceTrack::getTenantId, bladeUser.getTenantId()); //} queryWrapper.lambda().eq(FwDeviceTrackEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED); List<FwDeviceTrackExcel> list = fwDeviceTrackService.exportFwDeviceTrack(queryWrapper); ExcelUtil.export(response, "设备跟踪流转表数据" + DateUtil.time(), "设备跟踪流转表数据表", list, FwDeviceTrackExcel.class); } } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceAndTrackDTO.java
New file @@ -0,0 +1,21 @@ package org.sxkj.fw.device.dto; import io.swagger.annotations.ApiModelProperty; import lombok.Data; /** * @Description 设备出入库管理 * @Author AIX * @Date 2026/1/8 11:10 * @Version 1.0 */ @Data public class FwDeviceAndTrackDTO { @ApiModelProperty(value = "设备对象") private FwDeviceDTO fwDeviceDTO; @ApiModelProperty(value = "出入库对象") private FwDeviceTrackDTO fwDeviceTrackDTO; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceDTO.java
@@ -16,19 +16,61 @@ */ package org.sxkj.fw.device.dto; import io.swagger.annotations.ApiModelProperty; import org.sxkj.fw.device.entity.FwDeviceEntity; import lombok.Data; import lombok.EqualsAndHashCode; /** * 反无设备表 数据传输对象实体类 * 设备表 数据传输对象实体类 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ @Data @EqualsAndHashCode(callSuper = true) public class FwDeviceDTO extends FwDeviceEntity { public class FwDeviceDTO { private static final long serialVersionUID = 1L; /** * 设备名称 */ @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 remark; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/dto/FwDeviceTrackDTO.java
New file @@ -0,0 +1,69 @@ /* * 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.dto; import io.swagger.annotations.ApiModelProperty; import org.sxkj.fw.device.entity.FwDeviceTrackEntity; import lombok.Data; import lombok.EqualsAndHashCode; import java.util.Date; /** * 设备跟踪流转表 数据传输对象实体类 * * @author Aix * @since 2026-01-08 */ @Data public class FwDeviceTrackDTO { private static final long serialVersionUID = 1L; /** * 出库时间 */ @ApiModelProperty(value = "出库时间") private Date outTime; /** * 出库去向 */ @ApiModelProperty(value = "出库去向") private String outTarget; /** * 用途 */ @ApiModelProperty(value = "用途") private String purpose; /** * 负责人 */ @ApiModelProperty(value = "负责人") private String charger; /** * 联系电话 */ @ApiModelProperty(value = "联系电话") private String contactPhone; /** * 部门名称 */ @ApiModelProperty(value = "部门名称") private String deptName; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/entity/FwDeviceEntity.java
@@ -17,68 +17,100 @@ package org.sxkj.fw.device.entity; import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableField; import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Date; import java.math.BigDecimal; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.tenant.mp.TenantEntity; /** * 反无设备表 实体类 * 设备表 实体类 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ @Data @TableName("ja_fw_device") @ApiModel(value = "FwDevice对象", description = "反无设备表") @ApiModel(value = "FwDevice对象", description = "设备表") @EqualsAndHashCode(callSuper = true) public class FwDeviceEntity extends BaseEntity { /** * 设备名称 */ @TableField("device_name") @ApiModelProperty(value = "设备名称") private String deviceName; /** * 设备类型 * 设备类型(察打一体/便捷侦测箱/反制枪) */ @TableField("device_type") @ApiModelProperty(value = "设备类型") @ApiModelProperty(value = "设备类型(察打一体/便捷侦测箱/反制枪)") private String deviceType; /** * 设备型号 * 设备属性(无线电/光电/雷达) */ @TableField("device_model") @ApiModelProperty(value = "设备型号") @ApiModelProperty(value = "设备属性(无线电/光电/雷达)") private String deviceAtt; /** * 型号 */ @ApiModelProperty(value = "型号") private String deviceModel; /** * 规格 */ @TableField("device_specification") @ApiModelProperty(value = "规格") private String deviceSpecification; /** * 生产厂商 */ @TableField("manufacturer") @ApiModelProperty(value = "生产厂商") private String manufacturer; /** * 来源 */ @TableField("source") @ApiModelProperty(value = "来源") private String source; /** * 备注 */ @TableField("remark") @ApiModelProperty(value = "备注") private String remark; /** * 电量百分比 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 = "工作模式:侦测中/信号干扰中/诱导驱离中/待机") private String workMode; /** * 区域编码 */ @ApiModelProperty(value = "区域编码") private String areaCode; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/entity/FwDeviceTrackEntity.java
New file @@ -0,0 +1,81 @@ /* * 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.entity; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.util.Date; import lombok.EqualsAndHashCode; import org.springblade.core.mp.base.BaseEntity; import org.springblade.core.tenant.mp.TenantEntity; /** * 设备跟踪流转表 实体类 * * @author Aix * @since 2026-01-08 */ @Data @TableName("ja_fw_device_track") @ApiModel(value = "FwDeviceTrack对象", description = "设备跟踪流转表") @EqualsAndHashCode(callSuper = true) public class FwDeviceTrackEntity extends BaseEntity { /** * 设备ID */ @ApiModelProperty(value = "设备ID") private Long deviceId; /** * 出库时间 */ @ApiModelProperty(value = "出库时间") private Date outTime; /** * 出库去向 */ @ApiModelProperty(value = "出库去向") private String outTarget; /** * 用途 */ @ApiModelProperty(value = "用途") private String purpose; /** * 负责人 */ @ApiModelProperty(value = "负责人") private String charger; /** * 联系电话 */ @ApiModelProperty(value = "联系电话") private String contactPhone; /** * 部门名称 */ @ApiModelProperty(value = "部门名称") private String deptName; /** * 区域编码 */ @ApiModelProperty(value = "区域编码") private String areaCode; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/excel/FwDeviceExcel.java
@@ -19,7 +19,7 @@ import lombok.Data; import java.util.Date; import java.math.BigDecimal; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ContentRowHeight; @@ -28,10 +28,10 @@ /** * 反无设备表 Excel实体类 * 设备表 Excel实体类 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ @Data @ColumnWidth(25) @@ -48,16 +48,22 @@ @ExcelProperty("设备名称") private String deviceName; /** * 设备类型 * 设备类型(察打一体/便捷侦测箱/反制枪) */ @ColumnWidth(20) @ExcelProperty("设备类型") @ExcelProperty("设备类型(察打一体/便捷侦测箱/反制枪)") private String deviceType; /** * 设备型号 * 设备属性(无线电/光电/雷达) */ @ColumnWidth(20) @ExcelProperty("设备型号") @ExcelProperty("设备属性(无线电/光电/雷达)") private String deviceAtt; /** * 型号 */ @ColumnWidth(20) @ExcelProperty("型号") private String deviceModel; /** * 规格 @@ -84,10 +90,52 @@ @ExcelProperty("备注") private String remark; /** * 是否已删除 * 电量百分比 0-100 */ @ColumnWidth(20) @ExcelProperty("是否已删除") private Integer isDeleted; @ExcelProperty("电量百分比 0-100") private Byte batteryPct; /** * 方位角 0-360° */ @ColumnWidth(20) @ExcelProperty("方位角 0-360°") private Short azimuth; /** * 俯仰角 -90-+90° */ @ColumnWidth(20) @ExcelProperty("俯仰角 -90-+90°") private Short elevation; /** * 侦测目标数量 */ @ColumnWidth(20) @ExcelProperty("侦测目标数量") private Integer detectTargetCnt; /** * 有效范围 km */ @ColumnWidth(20) @ExcelProperty("有效范围 km") private BigDecimal effectiveRangeKm; /** * 工作模式:侦测中/信号干扰中/诱导驱离中/待机 */ @ColumnWidth(20) @ExcelProperty("工作模式:侦测中/信号干扰中/诱导驱离中/待机") private String workMode; /** * 区域编码 */ @ColumnWidth(20) @ExcelProperty("区域编码") private String areaCode; /** * 删除标志(0存在 1删除) */ @ColumnWidth(20) @ExcelProperty("删除标志(0存在 1删除)") private Byte isDeleted; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/excel/FwDeviceTrackExcel.java
New file @@ -0,0 +1,99 @@ /* * 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.excel; import lombok.Data; import java.util.Date; import com.alibaba.excel.annotation.ExcelProperty; import com.alibaba.excel.annotation.write.style.ColumnWidth; import com.alibaba.excel.annotation.write.style.ContentRowHeight; import com.alibaba.excel.annotation.write.style.HeadRowHeight; import java.io.Serializable; /** * 设备跟踪流转表 Excel实体类 * * @author Aix * @since 2026-01-08 */ @Data @ColumnWidth(25) @HeadRowHeight(20) @ContentRowHeight(18) public class FwDeviceTrackExcel implements Serializable { private static final long serialVersionUID = 1L; /** * 设备ID */ @ColumnWidth(20) @ExcelProperty("设备ID") private Long deviceId; /** * 出库时间 */ @ColumnWidth(20) @ExcelProperty("出库时间") private Date outTime; /** * 出库去向 */ @ColumnWidth(20) @ExcelProperty("出库去向") private String outTarget; /** * 用途 */ @ColumnWidth(20) @ExcelProperty("用途") private String purpose; /** * 负责人 */ @ColumnWidth(20) @ExcelProperty("负责人") private String charger; /** * 联系电话 */ @ColumnWidth(20) @ExcelProperty("联系电话") private String contactPhone; /** * 部门名称 */ @ColumnWidth(20) @ExcelProperty("部门名称") private String deptName; /** * 区域编码 */ @ColumnWidth(20) @ExcelProperty("区域编码") private String areaCode; /** * 删除标志(0存在 1删除) */ @ColumnWidth(20) @ExcelProperty("删除标志(0存在 1删除)") private Byte isDeleted; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.java
@@ -26,10 +26,10 @@ import java.util.List; /** * 反无设备表 Mapper 接口 * 设备表 Mapper 接口 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ public interface FwDeviceMapper extends BaseMapper<FwDeviceEntity> { drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceMapper.xml
@@ -7,11 +7,19 @@ <result column="id" property="id"/> <result column="device_name" property="deviceName"/> <result column="device_type" property="deviceType"/> <result column="device_att" property="deviceAtt"/> <result column="device_model" property="deviceModel"/> <result column="device_specification" property="deviceSpecification"/> <result column="manufacturer" property="manufacturer"/> <result column="source" property="source"/> <result column="remark" property="remark"/> <result column="battery_pct" property="batteryPct"/> <result column="azimuth" property="azimuth"/> <result column="elevation" property="elevation"/> <result column="detect_target_cnt" property="detectTargetCnt"/> <result column="effective_range_km" property="effectiveRangeKm"/> <result column="work_mode" property="workMode"/> <result column="area_code" property="areaCode"/> <result column="create_user" property="createUser"/> <result column="create_dept" property="createDept"/> <result column="create_time" property="createTime"/> drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceTrackMapper.java
New file @@ -0,0 +1,54 @@ /* * 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.mapper; import org.sxkj.fw.device.entity.FwDeviceTrackEntity; import org.sxkj.fw.device.vo.FwDeviceTrackVO; import org.sxkj.fw.device.excel.FwDeviceTrackExcel; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.apache.ibatis.annotations.Param; import java.util.List; /** * 设备跟踪流转表 Mapper 接口 * * @author Aix * @since 2026-01-08 */ public interface FwDeviceTrackMapper extends BaseMapper<FwDeviceTrackEntity> { /** * 自定义分页 * * @param page * @param fwDeviceTrack * @return */ List<FwDeviceTrackVO> selectFwDeviceTrackPage(IPage page, FwDeviceTrackVO fwDeviceTrack); /** * 获取导出数据 * * @param queryWrapper * @return */ List<FwDeviceTrackExcel> exportFwDeviceTrack(@Param("ew") Wrapper<FwDeviceTrackEntity> queryWrapper); } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/mapper/FwDeviceTrackMapper.xml
New file @@ -0,0 +1,35 @@ <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="org.sxkj.fw.device.mapper.FwDeviceTrackMapper"> <!-- 通用查询映射结果 --> <resultMap id="fwDeviceTrackResultMap" type="org.sxkj.fw.device.entity.FwDeviceTrackEntity"> <result column="id" property="id"/> <result column="device_id" property="deviceId"/> <result column="out_time" property="outTime"/> <result column="out_target" property="outTarget"/> <result column="purpose" property="purpose"/> <result column="charger" property="charger"/> <result column="contact_phone" property="contactPhone"/> <result column="dept_name" property="deptName"/> <result column="area_code" property="areaCode"/> <result column="create_user" property="createUser"/> <result column="create_dept" property="createDept"/> <result column="create_time" property="createTime"/> <result column="update_user" property="updateUser"/> <result column="update_time" property="updateTime"/> <result column="status" property="status"/> <result column="is_deleted" property="isDeleted"/> </resultMap> <select id="selectFwDeviceTrackPage" resultMap="fwDeviceTrackResultMap"> select * from ja_fw_device_track where is_deleted = 0 </select> <select id="exportFwDeviceTrack" resultType="org.sxkj.fw.device.excel.FwDeviceTrackExcel"> SELECT * FROM ja_fw_device_track ${ew.customSqlSegment} </select> </mapper> drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceService.java
@@ -17,6 +17,7 @@ package org.sxkj.fw.device.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import org.sxkj.fw.device.dto.FwDeviceAndTrackDTO; import org.sxkj.fw.device.entity.FwDeviceEntity; import org.sxkj.fw.device.vo.FwDeviceVO; import org.sxkj.fw.device.excel.FwDeviceExcel; @@ -25,10 +26,10 @@ import java.util.List; /** * 反无设备表 服务类 * 设备表 服务类 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ public interface IFwDeviceService extends BaseService<FwDeviceEntity> { /** @@ -49,4 +50,11 @@ */ List<FwDeviceExcel> exportFwDevice(Wrapper<FwDeviceEntity> queryWrapper); /** * 添加或更新 * @param dto * @return */ Boolean saveFwDevice(FwDeviceAndTrackDTO dto); } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/IFwDeviceTrackService.java
New file @@ -0,0 +1,52 @@ /* * 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.service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import org.sxkj.fw.device.entity.FwDeviceTrackEntity; import org.sxkj.fw.device.vo.FwDeviceTrackVO; import org.sxkj.fw.device.excel.FwDeviceTrackExcel; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseService; import java.util.List; /** * 设备跟踪流转表 服务类 * * @author Aix * @since 2026-01-08 */ public interface IFwDeviceTrackService extends BaseService<FwDeviceTrackEntity> { /** * 自定义分页 * * @param page * @param fwDeviceTrack * @return */ IPage<FwDeviceTrackVO> selectFwDeviceTrackPage(IPage<FwDeviceTrackVO> page, FwDeviceTrackVO fwDeviceTrack); /** * 导出数据 * * @param queryWrapper * @return */ List<FwDeviceTrackExcel> exportFwDeviceTrack(Wrapper<FwDeviceTrackEntity> queryWrapper); } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceServiceImpl.java
@@ -16,7 +16,11 @@ */ package org.sxkj.fw.device.service.impl; import lombok.AllArgsConstructor; import org.sxkj.fw.device.dto.FwDeviceAndTrackDTO; import org.sxkj.fw.device.entity.FwDeviceEntity; import org.sxkj.fw.device.entity.FwDeviceTrackEntity; import org.sxkj.fw.device.service.IFwDeviceTrackService; import org.sxkj.fw.device.vo.FwDeviceVO; import org.sxkj.fw.device.excel.FwDeviceExcel; import org.sxkj.fw.device.mapper.FwDeviceMapper; @@ -25,16 +29,22 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; import org.sxkj.fw.device.wrapper.FwDeviceTrackWrapper; import org.sxkj.fw.device.wrapper.FwDeviceWrapper; import java.util.List; /** * 反无设备表 服务实现类 * 设备表 服务实现类 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ @Service @AllArgsConstructor public class FwDeviceServiceImpl extends BaseServiceImpl<FwDeviceMapper, FwDeviceEntity> implements IFwDeviceService { private final IFwDeviceTrackService fwDeviceTrackService; @Override public IPage<FwDeviceVO> selectFwDevicePage(IPage<FwDeviceVO> page, FwDeviceVO fwDevice) { @@ -51,4 +61,16 @@ return fwDeviceList; } @Override public Boolean saveFwDevice(FwDeviceAndTrackDTO dto) { // 保存设备信息 FwDeviceEntity entity = FwDeviceWrapper.build().entityDTO(dto.getFwDeviceDTO()); save(entity); // 保存设备跟踪信息 FwDeviceTrackEntity trackEntity = FwDeviceTrackWrapper.build().entityDTO(dto.getFwDeviceTrackDTO()); trackEntity.setDeviceId(entity.getId()); return fwDeviceTrackService.save(trackEntity); } } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/service/impl/FwDeviceTrackServiceImpl.java
New file @@ -0,0 +1,54 @@ /* * 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.service.impl; import org.sxkj.fw.device.entity.FwDeviceTrackEntity; import org.sxkj.fw.device.vo.FwDeviceTrackVO; import org.sxkj.fw.device.excel.FwDeviceTrackExcel; import org.sxkj.fw.device.mapper.FwDeviceTrackMapper; import org.sxkj.fw.device.service.IFwDeviceTrackService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import org.springblade.core.mp.base.BaseServiceImpl; import java.util.List; /** * 设备跟踪流转表 服务实现类 * * @author Aix * @since 2026-01-08 */ @Service public class FwDeviceTrackServiceImpl extends BaseServiceImpl<FwDeviceTrackMapper, FwDeviceTrackEntity> implements IFwDeviceTrackService { @Override public IPage<FwDeviceTrackVO> selectFwDeviceTrackPage(IPage<FwDeviceTrackVO> page, FwDeviceTrackVO fwDeviceTrack) { return page.setRecords(baseMapper.selectFwDeviceTrackPage(page, fwDeviceTrack)); } @Override public List<FwDeviceTrackExcel> exportFwDeviceTrack(Wrapper<FwDeviceTrackEntity> queryWrapper) { List<FwDeviceTrackExcel> fwDeviceTrackList = baseMapper.exportFwDeviceTrack(queryWrapper); //fwDeviceTrackList.forEach(fwDeviceTrack -> { // fwDeviceTrack.setTypeName(DictCache.getValue(DictEnum.YES_NO, FwDeviceTrack.getType())); //}); return fwDeviceTrackList; } } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceTrackVO.java
New file @@ -0,0 +1,35 @@ /* * 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 org.sxkj.fw.device.entity.FwDeviceTrackEntity; import org.springblade.core.tool.node.INode; import lombok.Data; import lombok.EqualsAndHashCode; /** * 设备跟踪流转表 视图实体类 * * @author Aix * @since 2026-01-08 */ @Data @EqualsAndHashCode(callSuper = true) public class FwDeviceTrackVO extends FwDeviceTrackEntity { private static final long serialVersionUID = 1L; } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/vo/FwDeviceVO.java
@@ -22,10 +22,10 @@ import lombok.EqualsAndHashCode; /** * 反无设备表 视图实体类 * 设备表 视图实体类 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ @Data @EqualsAndHashCode(callSuper = true) drone-service/drone-fw/src/main/java/org/sxkj/fw/device/wrapper/FwDeviceTrackWrapper.java
New file @@ -0,0 +1,47 @@ /* * 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.wrapper; import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.utils.BeanUtil; import org.sxkj.fw.device.dto.FwDeviceTrackDTO; import org.sxkj.fw.device.entity.FwDeviceTrackEntity; import org.sxkj.fw.device.vo.FwDeviceTrackVO; import java.util.Objects; /** * 设备跟踪流转表 包装类,返回视图层所需的字段 * * @author Aix * @since 2026-01-08 */ public class FwDeviceTrackWrapper extends BaseEntityWrapper<FwDeviceTrackEntity, FwDeviceTrackVO> { public static FwDeviceTrackWrapper build() { return new FwDeviceTrackWrapper(); } @Override public FwDeviceTrackVO entityVO(FwDeviceTrackEntity fwDeviceTrack) { return Objects.requireNonNull(BeanUtil.copy(fwDeviceTrack, FwDeviceTrackVO.class)); } public FwDeviceTrackEntity entityDTO(FwDeviceTrackDTO fwDeviceTrackDTO) { return Objects.requireNonNull(BeanUtil.copy(fwDeviceTrackDTO, FwDeviceTrackEntity.class)); } } drone-service/drone-fw/src/main/java/org/sxkj/fw/device/wrapper/FwDeviceWrapper.java
@@ -18,15 +18,17 @@ import org.springblade.core.mp.support.BaseEntityWrapper; import org.springblade.core.tool.utils.BeanUtil; import org.sxkj.fw.device.dto.FwDeviceAndTrackDTO; import org.sxkj.fw.device.dto.FwDeviceDTO; import org.sxkj.fw.device.entity.FwDeviceEntity; import org.sxkj.fw.device.vo.FwDeviceVO; import java.util.Objects; /** * 反无设备表 包装类,返回视图层所需的字段 * 设备表 包装类,返回视图层所需的字段 * * @author AIX * @since 2026-01-06 * @author Aix * @since 2026-01-08 */ public class FwDeviceWrapper extends BaseEntityWrapper<FwDeviceEntity, FwDeviceVO> { @@ -36,14 +38,11 @@ @Override public FwDeviceVO entityVO(FwDeviceEntity fwDevice) { FwDeviceVO fwDeviceVO = Objects.requireNonNull(BeanUtil.copy(fwDevice, FwDeviceVO.class)); return Objects.requireNonNull(BeanUtil.copy(fwDevice, FwDeviceVO.class)); } //User createUser = UserCache.getUser(fwDevice.getCreateUser()); //User updateUser = UserCache.getUser(fwDevice.getUpdateUser()); //fwDeviceVO.setCreateUserName(createUser.getName()); //fwDeviceVO.setUpdateUserName(updateUser.getName()); return fwDeviceVO; public FwDeviceEntity entityDTO(FwDeviceDTO dto) { return Objects.requireNonNull(BeanUtil.copy(dto, FwDeviceEntity.class)); }