吉安感知网项目-后端
linwei
2026-01-14 d6a5f05d6ff1ca1282cfbd5f2581fd55793a8312
设备信息
10 files added
1051 ■■■■■ changed files
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/controller/GdManageDeviceController.java 151 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/dto/GdManageDeviceDTO.java 34 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/entity/GdManageDeviceEntity.java 252 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/excel/GdManageDeviceExcel.java 304 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/mapper/GdManageDeviceMapper.java 54 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/mapper/GdManageDeviceMapper.xml 65 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/service/IGdManageDeviceService.java 52 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/service/impl/GdManageDeviceServiceImpl.java 54 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/vo/GdManageDeviceVO.java 35 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/wrapper/GdManageDeviceWrapper.java 50 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/controller/GdManageDeviceController.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.gd.workOrder.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.gd.workOrder.entity.GdManageDeviceEntity;
import org.sxkj.gd.workOrder.vo.GdManageDeviceVO;
import org.sxkj.gd.workOrder.excel.GdManageDeviceExcel;
import org.sxkj.gd.workOrder.wrapper.GdManageDeviceWrapper;
import org.sxkj.gd.workOrder.service.IGdManageDeviceService;
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 lw
 * @since 2026-01-14
 */
@RestController
@AllArgsConstructor
@RequestMapping("workOrder/gdManageDevice")
@Api(value = "设备信息", tags = "设备信息接口")
public class GdManageDeviceController extends BladeController {
    private final IGdManageDeviceService gdManageDeviceService;
    /**
     * 设备信息 详情
     */
    @GetMapping("/detail")
    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "详情", notes = "传入gdManageDevice")
    public R<GdManageDeviceVO> detail(GdManageDeviceEntity gdManageDevice) {
        GdManageDeviceEntity detail = gdManageDeviceService.getOne(Condition.getQueryWrapper(gdManageDevice));
        return R.data(GdManageDeviceWrapper.build().entityVO(detail));
    }
    /**
     * 设备信息 分页
     */
    @GetMapping("/list")
    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "分页", notes = "传入gdManageDevice")
    public R<IPage<GdManageDeviceVO>> list(@ApiIgnore @RequestParam Map<String, Object> gdManageDevice, Query query) {
        IPage<GdManageDeviceEntity> pages = gdManageDeviceService.page(Condition.getPage(query), Condition.getQueryWrapper(gdManageDevice, GdManageDeviceEntity.class));
        return R.data(GdManageDeviceWrapper.build().pageVO(pages));
    }
    /**
     * 设备信息 自定义分页
     */
    @GetMapping("/page")
    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "分页", notes = "传入gdManageDevice")
    public R<IPage<GdManageDeviceVO>> page(GdManageDeviceVO gdManageDevice, Query query) {
        IPage<GdManageDeviceVO> pages = gdManageDeviceService.selectGdManageDevicePage(Condition.getPage(query), gdManageDevice);
        return R.data(pages);
    }
    /**
     * 设备信息 新增
     */
    @PostMapping("/save")
    @ApiOperationSupport(order = 4)
    @ApiOperation(value = "新增", notes = "传入gdManageDevice")
    public R save(@Valid @RequestBody GdManageDeviceEntity gdManageDevice) {
        return R.status(gdManageDeviceService.save(gdManageDevice));
    }
    /**
     * 设备信息 修改
     */
    @PostMapping("/update")
    @ApiOperationSupport(order = 5)
    @ApiOperation(value = "修改", notes = "传入gdManageDevice")
    public R update(@Valid @RequestBody GdManageDeviceEntity gdManageDevice) {
        return R.status(gdManageDeviceService.updateById(gdManageDevice));
    }
    /**
     * 设备信息 新增或修改
     */
    @PostMapping("/submit")
    @ApiOperationSupport(order = 6)
    @ApiOperation(value = "新增或修改", notes = "传入gdManageDevice")
    public R submit(@Valid @RequestBody GdManageDeviceEntity gdManageDevice) {
        return R.status(gdManageDeviceService.saveOrUpdate(gdManageDevice));
    }
    /**
     * 设备信息 删除
     */
    @PostMapping("/remove")
    @ApiOperationSupport(order = 7)
    @ApiOperation(value = "逻辑删除", notes = "传入ids")
    public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
        return R.status(gdManageDeviceService.deleteLogic(Func.toLongList(ids)));
    }
    /**
     * 导出数据
     */
    @GetMapping("/export-gdManageDevice")
    @ApiOperationSupport(order = 9)
    @ApiOperation(value = "导出数据", notes = "传入gdManageDevice")
    public void exportGdManageDevice(@ApiIgnore @RequestParam Map<String, Object> gdManageDevice, BladeUser bladeUser, HttpServletResponse response) {
        QueryWrapper<GdManageDeviceEntity> queryWrapper = Condition.getQueryWrapper(gdManageDevice, GdManageDeviceEntity.class);
        //if (!AuthUtil.isAdministrator()) {
        //    queryWrapper.lambda().eq(GdManageDevice::getTenantId, bladeUser.getTenantId());
        //}
        queryWrapper.lambda().eq(GdManageDeviceEntity::getIsDeleted, BladeConstant.DB_NOT_DELETED);
        List<GdManageDeviceExcel> list = gdManageDeviceService.exportGdManageDevice(queryWrapper);
        ExcelUtil.export(response, "设备信息数据" + DateUtil.time(), "设备信息数据表", list, GdManageDeviceExcel.class);
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/dto/GdManageDeviceDTO.java
New file
@@ -0,0 +1,34 @@
/*
 *      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.gd.workOrder.dto;
import org.sxkj.gd.workOrder.entity.GdManageDeviceEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 设备信息 数据传输对象实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GdManageDeviceDTO extends GdManageDeviceEntity {
    private static final long serialVersionUID = 1L;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/entity/GdManageDeviceEntity.java
New file
@@ -0,0 +1,252 @@
/*
 *      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.gd.workOrder.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.BaseEntity;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 设备信息 实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@TableName("ja_gd_manage_device")
@ApiModel(value = "GdManageDevice对象", description = "设备信息")
@EqualsAndHashCode(callSuper = true)
public class GdManageDeviceEntity extends BaseEntity {
    /**
     * dock, drone, remote control
     */
    @ApiModelProperty(value = "dock, drone, remote control")
    private String deviceSn;
    /**
     * model of the device. This parameter corresponds to the device name in the device dictionary table.
     */
    @ApiModelProperty(value = "model of the device. This parameter corresponds to the device name in the device dictionary table.")
    private String deviceName;
    /**
     * custom name of the device
     */
    @ApiModelProperty(value = "custom name of the device")
    private String nickname;
    /**
     * The workspace to which the current device belongs.如果为时间戳则表明该机场已被解绑
     */
    @ApiModelProperty(value = "The workspace to which the current device belongs.如果为时间戳则表明该机场已被解绑")
    private String workspaceId;
    /**
     * This parameter corresponds to the device type in the device dictionary table.
     */
    @ApiModelProperty(value = "This parameter corresponds to the device type in the device dictionary table.")
    private Integer deviceType;
    /**
     * This parameter corresponds to the sub type in the device dictionary table.
     */
    @ApiModelProperty(value = "This parameter corresponds to the sub type in the device dictionary table.")
    private Integer subType;
    /**
     * 设备负载(红外,喇叭,闪光灯)
     */
    @ApiModelProperty(value = "设备负载(红外,喇叭,闪光灯)")
    private String devicePayload;
    /**
     * 当前经度
     */
    @ApiModelProperty(value = "当前经度")
    private Double longitude;
    /**
     * 当前纬度
     */
    @ApiModelProperty(value = "当前纬度")
    private Double latitude;
    /**
     * The account used when the device was bound.
     */
    @ApiModelProperty(value = "The account used when the device was bound.")
    private String userId;
    /**
     * This parameter corresponds to the domain in the device dictionary table.
     */
    @ApiModelProperty(value = "This parameter corresponds to the domain in the device dictionary table.")
    private Integer domain;
    /**
     * firmware version of the device
     */
    @ApiModelProperty(value = "firmware version of the device")
    private String firmwareVersion;
    /**
     * 1:一致;0:不一致;固件版本是否一致。
     */
    @ApiModelProperty(value = "1:一致;0:不一致;固件版本是否一致。")
    private Boolean compatibleStatus;
    /**
     * version of the protocol. This field is currently not useful.
     */
    @ApiModelProperty(value = "version of the protocol. This field is currently not useful.")
    private String version;
    /**
     * Control of the drone, A control or B control.
     */
    @ApiModelProperty(value = "Control of the drone, A control or B control.")
    private String deviceIndex;
    /**
     * The device controlled by the gateway.
     */
    @ApiModelProperty(value = "The device controlled by the gateway.")
    private String childSn;
    /**
     * The time when the device is bound to the workspace.
     */
    @ApiModelProperty(value = "The time when the device is bound to the workspace.")
    private Long boundTime;
    /**
     * The status when the device is bound to the workspace. 1: bound; 0: not bound;
     */
    @ApiModelProperty(value = "The status when the device is bound to the workspace. 1: bound; 0: not bound;")
    private Boolean boundStatus;
    /**
     * The time of the last device login.
     */
    @ApiModelProperty(value = "The time of the last device login.")
    private Long loginTime;
    /**
     *
     */
    @ApiModelProperty(value = "")
    private String deviceDesc;
    /**
     * The icon displayed on the remote control.
     */
    @ApiModelProperty(value = "The icon displayed on the remote control.")
    private String urlNormal;
    /**
     * The icon displayed on the remote control when it is selected.
     */
    @ApiModelProperty(value = "The icon displayed on the remote control when it is selected.")
    private String urlSelect;
    /**
     * 保护区ID
     */
    @ApiModelProperty(value = "保护区ID")
    private String reserveId;
    /**
     * 相机名称
     */
    @ApiModelProperty(value = "相机名称")
    private String creamaName;
    /**
     * 机巢编号
     */
    @ApiModelProperty(value = "机巢编号")
    private String machineNestSn;
    /**
     * 飞机操控密码
     */
    @ApiModelProperty(value = "飞机操控密码")
    private String operatePassword;
    /**
     * 设备状态:{"0":"空闲中","1":"现场调试","2":"远程调试","3":"固件升级中","4":"作业中","5":"待标定"}
     */
    @ApiModelProperty(value = "设备状态:{0:空闲中,1:现场调试,2:远程调试,3:固件升级中,4:作业中,5:待标定}")
    private Long modeCode;
    /**
     * 是否可移动,0=不可移动,1=可移动
     */
    @ApiModelProperty(value = "是否可移动,0=不可移动,1=可移动")
    private Byte movable;
    /**
     * 保险过期时间
     */
    @ApiModelProperty(value = "保险过期时间")
    private Date insureExpiredTime;
    /**
     * 流量剩余类型:0充足,1=流量到期,2=不足
     */
    @ApiModelProperty(value = "流量剩余类型:0充足,1=流量到期,2=不足")
    private Byte flowType;
    /**
     * 维保开始时间
     */
    @ApiModelProperty(value = "维保开始时间")
    private Date maintenanceStart;
    /**
     * 维保结束时间
     */
    @ApiModelProperty(value = "维保结束时间")
    private Date maintenanceEnd;
    /**
     * 保险开始时间
     */
    @ApiModelProperty(value = "保险开始时间")
    private Date insureStartTime;
    /**
     * 设备eid编号
     */
    @ApiModelProperty(value = "设备eid编号")
    private String eid;
    /**
     * 剩余流量(单位:GB)
     */
    @ApiModelProperty(value = "剩余流量(单位:GB)")
    private BigDecimal trafficRemaining;
    /**
     * 流量到期时间
     */
    @ApiModelProperty(value = "流量到期时间")
    private Date trafficExpireTime;
    /**
     * 内部隐藏标识(0-正常,1-下线)
     */
    @ApiModelProperty(value = "内部隐藏标识(0-正常,1-下线)")
    private Boolean hiddenFlag;
    /**
     * 部署模式:0-统一部署,1-独立部署
     */
    @ApiModelProperty(value = "部署模式:0-统一部署,1-独立部署")
    private Boolean deploymentMode;
    /**
     * 绑定机构id
     */
    @ApiModelProperty(value = "绑定机构id")
    private Long deptId;
    /**
     * 行政区域编号
     */
    @ApiModelProperty(value = "行政区域编号")
    private String areaCode;
    /**
     * 4G流量数据
     */
    @ApiModelProperty(value = "4G流量数据")
    private String trafficData;
    /**
     * DEM数据状态:0-未初始化,1-初始化中,2-初始化成功,3-初始化失败
     */
    @ApiModelProperty(value = "DEM数据状态:0-未初始化,1-初始化中,2-初始化成功,3-初始化失败")
    private Integer demStatus;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/excel/GdManageDeviceExcel.java
New file
@@ -0,0 +1,304 @@
/*
 *      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.gd.workOrder.excel;
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 lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 设备信息 Excel实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@ColumnWidth(25)
@HeadRowHeight(20)
@ContentRowHeight(18)
public class GdManageDeviceExcel implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * dock, drone, remote control
     */
    @ColumnWidth(20)
    @ExcelProperty("dock, drone, remote control")
    private String deviceSn;
    /**
     * model of the device. This parameter corresponds to the device name in the device dictionary table.
     */
    @ColumnWidth(20)
    @ExcelProperty("model of the device. This parameter corresponds to the device name in the device dictionary table.")
    private String deviceName;
    /**
     * custom name of the device
     */
    @ColumnWidth(20)
    @ExcelProperty("custom name of the device")
    private String nickname;
    /**
     * The workspace to which the current device belongs.如果为时间戳则表明该机场已被解绑
     */
    @ColumnWidth(20)
    @ExcelProperty("The workspace to which the current device belongs.如果为时间戳则表明该机场已被解绑")
    private String workspaceId;
    /**
     * This parameter corresponds to the device type in the device dictionary table.
     */
    @ColumnWidth(20)
    @ExcelProperty("This parameter corresponds to the device type in the device dictionary table.")
    private Integer deviceType;
    /**
     * This parameter corresponds to the sub type in the device dictionary table.
     */
    @ColumnWidth(20)
    @ExcelProperty("This parameter corresponds to the sub type in the device dictionary table.")
    private Integer subType;
    /**
     * 设备负载(红外,喇叭,闪光灯)
     */
    @ColumnWidth(20)
    @ExcelProperty("设备负载(红外,喇叭,闪光灯)")
    private String devicePayload;
    /**
     * 当前经度
     */
    @ColumnWidth(20)
    @ExcelProperty("当前经度")
    private Double longitude;
    /**
     * 当前纬度
     */
    @ColumnWidth(20)
    @ExcelProperty("当前纬度")
    private Double latitude;
    /**
     * The account used when the device was bound.
     */
    @ColumnWidth(20)
    @ExcelProperty("The account used when the device was bound.")
    private String userId;
    /**
     * This parameter corresponds to the domain in the device dictionary table.
     */
    @ColumnWidth(20)
    @ExcelProperty("This parameter corresponds to the domain in the device dictionary table.")
    private Integer domain;
    /**
     * firmware version of the device
     */
    @ColumnWidth(20)
    @ExcelProperty("firmware version of the device")
    private String firmwareVersion;
    /**
     * 1:一致;0:不一致;固件版本是否一致。
     */
    @ColumnWidth(20)
    @ExcelProperty("1:一致;0:不一致;固件版本是否一致。")
    private Boolean compatibleStatus;
    /**
     * version of the protocol. This field is currently not useful.
     */
    @ColumnWidth(20)
    @ExcelProperty("version of the protocol. This field is currently not useful.")
    private String version;
    /**
     * Control of the drone, A control or B control.
     */
    @ColumnWidth(20)
    @ExcelProperty("Control of the drone, A control or B control.")
    private String deviceIndex;
    /**
     * The device controlled by the gateway.
     */
    @ColumnWidth(20)
    @ExcelProperty("The device controlled by the gateway.")
    private String childSn;
    /**
     * The time when the device is bound to the workspace.
     */
    @ColumnWidth(20)
    @ExcelProperty("The time when the device is bound to the workspace.")
    private Long boundTime;
    /**
     * The status when the device is bound to the workspace. 1: bound; 0: not bound;
     */
    @ColumnWidth(20)
    @ExcelProperty("The status when the device is bound to the workspace. 1: bound; 0: not bound;")
    private Boolean boundStatus;
    /**
     * The time of the last device login.
     */
    @ColumnWidth(20)
    @ExcelProperty("The time of the last device login.")
    private Long loginTime;
    /**
     *
     */
    @ColumnWidth(20)
    @ExcelProperty("")
    private String deviceDesc;
    /**
     * The icon displayed on the remote control.
     */
    @ColumnWidth(20)
    @ExcelProperty("The icon displayed on the remote control.")
    private String urlNormal;
    /**
     * The icon displayed on the remote control when it is selected.
     */
    @ColumnWidth(20)
    @ExcelProperty("The icon displayed on the remote control when it is selected.")
    private String urlSelect;
    /**
     * 保护区ID
     */
    @ColumnWidth(20)
    @ExcelProperty("保护区ID")
    private String reserveId;
    /**
     * 相机名称
     */
    @ColumnWidth(20)
    @ExcelProperty("相机名称")
    private String creamaName;
    /**
     * 机巢编号
     */
    @ColumnWidth(20)
    @ExcelProperty("机巢编号")
    private String machineNestSn;
    /**
     * 飞机操控密码
     */
    @ColumnWidth(20)
    @ExcelProperty("飞机操控密码")
    private String operatePassword;
    /**
     * 设备状态:{"0":"空闲中","1":"现场调试","2":"远程调试","3":"固件升级中","4":"作业中","5":"待标定"}
     */
    @ColumnWidth(20)
    @ExcelProperty("设备状态:{0:空闲中,1:现场调试,2:远程调试,3:固件升级中,4:作业中,5:待标定}")
    private Long modeCode;
    /**
     * 是否可移动,0=不可移动,1=可移动
     */
    @ColumnWidth(20)
    @ExcelProperty("是否可移动,0=不可移动,1=可移动")
    private Byte movable;
    /**
     * 保险过期时间
     */
    @ColumnWidth(20)
    @ExcelProperty("保险过期时间")
    private Date insureExpiredTime;
    /**
     * 流量剩余类型:0充足,1=流量到期,2=不足
     */
    @ColumnWidth(20)
    @ExcelProperty("流量剩余类型:0充足,1=流量到期,2=不足")
    private Byte flowType;
    /**
     * 维保开始时间
     */
    @ColumnWidth(20)
    @ExcelProperty("维保开始时间")
    private Date maintenanceStart;
    /**
     * 维保结束时间
     */
    @ColumnWidth(20)
    @ExcelProperty("维保结束时间")
    private Date maintenanceEnd;
    /**
     * 保险开始时间
     */
    @ColumnWidth(20)
    @ExcelProperty("保险开始时间")
    private Date insureStartTime;
    /**
     * 设备eid编号
     */
    @ColumnWidth(20)
    @ExcelProperty("设备eid编号")
    private String eid;
    /**
     * 剩余流量(单位:GB)
     */
    @ColumnWidth(20)
    @ExcelProperty("剩余流量(单位:GB)")
    private BigDecimal trafficRemaining;
    /**
     * 流量到期时间
     */
    @ColumnWidth(20)
    @ExcelProperty("流量到期时间")
    private Date trafficExpireTime;
    /**
     * 内部隐藏标识(0-正常,1-下线)
     */
    @ColumnWidth(20)
    @ExcelProperty("内部隐藏标识(0-正常,1-下线)")
    private Boolean hiddenFlag;
    /**
     * 部署模式:0-统一部署,1-独立部署
     */
    @ColumnWidth(20)
    @ExcelProperty("部署模式:0-统一部署,1-独立部署")
    private Boolean deploymentMode;
    /**
     * 绑定机构id
     */
    @ColumnWidth(20)
    @ExcelProperty("绑定机构id")
    private Long deptId;
    /**
     * 是否删除0未删除1已删除
     */
    @ColumnWidth(20)
    @ExcelProperty("是否删除0未删除1已删除")
    private Integer isDeleted;
    /**
     * 行政区域编号
     */
    @ColumnWidth(20)
    @ExcelProperty("行政区域编号")
    private String areaCode;
    /**
     * 4G流量数据
     */
    @ColumnWidth(20)
    @ExcelProperty("4G流量数据")
    private String trafficData;
    /**
     * DEM数据状态:0-未初始化,1-初始化中,2-初始化成功,3-初始化失败
     */
    @ColumnWidth(20)
    @ExcelProperty("DEM数据状态:0-未初始化,1-初始化中,2-初始化成功,3-初始化失败")
    private Integer demStatus;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/mapper/GdManageDeviceMapper.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.gd.workOrder.mapper;
import org.sxkj.gd.workOrder.entity.GdManageDeviceEntity;
import org.sxkj.gd.workOrder.vo.GdManageDeviceVO;
import org.sxkj.gd.workOrder.excel.GdManageDeviceExcel;
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 lw
 * @since 2026-01-14
 */
public interface GdManageDeviceMapper extends BaseMapper<GdManageDeviceEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gdManageDevice
     * @return
     */
    List<GdManageDeviceVO> selectGdManageDevicePage(IPage page, GdManageDeviceVO gdManageDevice);
    /**
     * 获取导出数据
     *
     * @param queryWrapper
     * @return
     */
    List<GdManageDeviceExcel> exportGdManageDevice(@Param("ew") Wrapper<GdManageDeviceEntity> queryWrapper);
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/mapper/GdManageDeviceMapper.xml
New file
@@ -0,0 +1,65 @@
<?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.gd.workOrder.mapper.GdManageDeviceMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="gdManageDeviceResultMap" type="org.sxkj.gd.workOrder.entity.GdManageDeviceEntity">
        <result column="id" property="id"/>
        <result column="device_sn" property="deviceSn"/>
        <result column="device_name" property="deviceName"/>
        <result column="nickname" property="nickname"/>
        <result column="workspace_id" property="workspaceId"/>
        <result column="device_type" property="deviceType"/>
        <result column="sub_type" property="subType"/>
        <result column="device_payload" property="devicePayload"/>
        <result column="longitude" property="longitude"/>
        <result column="latitude" property="latitude"/>
        <result column="user_id" property="userId"/>
        <result column="domain" property="domain"/>
        <result column="firmware_version" property="firmwareVersion"/>
        <result column="compatible_status" property="compatibleStatus"/>
        <result column="version" property="version"/>
        <result column="device_index" property="deviceIndex"/>
        <result column="child_sn" property="childSn"/>
        <result column="bound_time" property="boundTime"/>
        <result column="bound_status" property="boundStatus"/>
        <result column="login_time" property="loginTime"/>
        <result column="device_desc" property="deviceDesc"/>
        <result column="url_normal" property="urlNormal"/>
        <result column="url_select" property="urlSelect"/>
        <result column="reserve_id" property="reserveId"/>
        <result column="creama_name" property="creamaName"/>
        <result column="machine_nest_sn" property="machineNestSn"/>
        <result column="operate_password" property="operatePassword"/>
        <result column="mode_code" property="modeCode"/>
        <result column="movable" property="movable"/>
        <result column="insure_expired_time" property="insureExpiredTime"/>
        <result column="flow_type" property="flowType"/>
        <result column="maintenance_start" property="maintenanceStart"/>
        <result column="maintenance_end" property="maintenanceEnd"/>
        <result column="insure_start_time" property="insureStartTime"/>
        <result column="eid" property="eid"/>
        <result column="traffic_remaining" property="trafficRemaining"/>
        <result column="traffic_expire_time" property="trafficExpireTime"/>
        <result column="hidden_flag" property="hiddenFlag"/>
        <result column="deployment_mode" property="deploymentMode"/>
        <result column="dept_id" property="deptId"/>
        <result column="create_time" property="createTime"/>
        <result column="update_time" property="updateTime"/>
        <result column="is_deleted" property="isDeleted"/>
        <result column="area_code" property="areaCode"/>
        <result column="traffic_data" property="trafficData"/>
        <result column="dem_status" property="demStatus"/>
    </resultMap>
    <select id="selectGdManageDevicePage" resultMap="gdManageDeviceResultMap">
        select * from ja_gd_manage_device where is_deleted = 0
    </select>
    <select id="exportGdManageDevice" resultType="org.sxkj.gd.workOrder.excel.GdManageDeviceExcel">
        SELECT * FROM ja_gd_manage_device ${ew.customSqlSegment}
    </select>
</mapper>
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/service/IGdManageDeviceService.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.gd.workOrder.service;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.sxkj.gd.workOrder.entity.GdManageDeviceEntity;
import org.sxkj.gd.workOrder.vo.GdManageDeviceVO;
import org.sxkj.gd.workOrder.excel.GdManageDeviceExcel;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseService;
import java.util.List;
/**
 * 设备信息 服务类
 *
 * @author lw
 * @since 2026-01-14
 */
public interface IGdManageDeviceService extends BaseService<GdManageDeviceEntity> {
    /**
     * 自定义分页
     *
     * @param page
     * @param gdManageDevice
     * @return
     */
    IPage<GdManageDeviceVO> selectGdManageDevicePage(IPage<GdManageDeviceVO> page, GdManageDeviceVO gdManageDevice);
    /**
     * 导出数据
     *
     * @param queryWrapper
     * @return
     */
    List<GdManageDeviceExcel> exportGdManageDevice(Wrapper<GdManageDeviceEntity> queryWrapper);
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/service/impl/GdManageDeviceServiceImpl.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.gd.workOrder.service.impl;
import org.sxkj.gd.workOrder.entity.GdManageDeviceEntity;
import org.sxkj.gd.workOrder.vo.GdManageDeviceVO;
import org.sxkj.gd.workOrder.excel.GdManageDeviceExcel;
import org.sxkj.gd.workOrder.mapper.GdManageDeviceMapper;
import org.sxkj.gd.workOrder.service.IGdManageDeviceService;
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 lw
 * @since 2026-01-14
 */
@Service
public class GdManageDeviceServiceImpl extends BaseServiceImpl<GdManageDeviceMapper, GdManageDeviceEntity> implements IGdManageDeviceService {
    @Override
    public IPage<GdManageDeviceVO> selectGdManageDevicePage(IPage<GdManageDeviceVO> page, GdManageDeviceVO gdManageDevice) {
        return page.setRecords(baseMapper.selectGdManageDevicePage(page, gdManageDevice));
    }
    @Override
    public List<GdManageDeviceExcel> exportGdManageDevice(Wrapper<GdManageDeviceEntity> queryWrapper) {
        List<GdManageDeviceExcel> gdManageDeviceList = baseMapper.exportGdManageDevice(queryWrapper);
        //gdManageDeviceList.forEach(gdManageDevice -> {
        //    gdManageDevice.setTypeName(DictCache.getValue(DictEnum.YES_NO, GdManageDevice.getType()));
        //});
        return gdManageDeviceList;
    }
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/vo/GdManageDeviceVO.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.gd.workOrder.vo;
import org.sxkj.gd.workOrder.entity.GdManageDeviceEntity;
import org.springblade.core.tool.node.INode;
import lombok.Data;
import lombok.EqualsAndHashCode;
/**
 * 设备信息 视图实体类
 *
 * @author lw
 * @since 2026-01-14
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class GdManageDeviceVO extends GdManageDeviceEntity {
    private static final long serialVersionUID = 1L;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workOrder/wrapper/GdManageDeviceWrapper.java
New file
@@ -0,0 +1,50 @@
/*
 *      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.gd.workOrder.wrapper;
import org.springblade.core.mp.support.BaseEntityWrapper;
import org.springblade.core.tool.utils.BeanUtil;
import org.sxkj.gd.workOrder.entity.GdManageDeviceEntity;
import org.sxkj.gd.workOrder.vo.GdManageDeviceVO;
import java.util.Objects;
/**
 * 设备信息 包装类,返回视图层所需的字段
 *
 * @author lw
 * @since 2026-01-14
 */
public class GdManageDeviceWrapper extends BaseEntityWrapper<GdManageDeviceEntity, GdManageDeviceVO>  {
    public static GdManageDeviceWrapper build() {
        return new GdManageDeviceWrapper();
     }
    @Override
    public GdManageDeviceVO entityVO(GdManageDeviceEntity gdManageDevice) {
        GdManageDeviceVO gdManageDeviceVO = Objects.requireNonNull(BeanUtil.copy(gdManageDevice, GdManageDeviceVO.class));
        //User createUser = UserCache.getUser(gdManageDevice.getCreateUser());
        //User updateUser = UserCache.getUser(gdManageDevice.getUpdateUser());
        //gdManageDeviceVO.setCreateUserName(createUser.getName());
        //gdManageDeviceVO.setUpdateUserName(updateUser.getName());
        return gdManageDeviceVO;
    }
}