WEB:导出数据设备

This commit is contained in:
2025-07-03 17:53:10 +08:00
parent 0271a84bc2
commit e8aee3039a
11 changed files with 339 additions and 98 deletions

View File

@ -99,4 +99,10 @@ public class Device extends TenantEntity {
@Schema(name = "绑定状态")
private Integer bindingStatus;
/**
* 创建人名称
*/
private String createByName;
}

View File

@ -0,0 +1,80 @@
package com.fuyuanshen.equipment.domain.dto;
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 com.fuyuanshen.equipment.converter.IgnoreFailedImageConverter;
import lombok.Data;
import java.net.URL;
/**
* @author: 默苍璃
* @date: 2025-06-0618:16
*/
@Data
@HeadRowHeight(20) // 表头行高
@ContentRowHeight(100) // 内容行高
public class DeviceExcelExportDTO {
@ExcelProperty("ID")
private Long id;
@ExcelProperty("设备类型")
private Long deviceType;
// @ExcelProperty("客户号")
// private Long customerId;
@ExcelProperty("所属客户")
private String customerName;
@ExcelProperty("设备名称")
@ColumnWidth(20)
private String deviceName;
@ExcelProperty(value = "设备图片", converter = IgnoreFailedImageConverter.class)
@ColumnWidth(15) // 设置图片列宽度
private URL devicePic; // 使用URL类型
@ExcelProperty("设备MAC")
@ColumnWidth(20)
private String deviceMac;
@ExcelProperty("设备IMEI")
@ColumnWidth(20)
private String deviceImei;
@ExcelProperty("经度")
private String longitude;
@ExcelProperty("纬度")
private String latitude;
@ExcelProperty("备注")
@ColumnWidth(30)
private String remark;
@ExcelProperty("设备类型名称")
@ColumnWidth(20)
private String typeName;
/**
* 设备状态
* 0 失效
* 1 正常
*/
@ExcelProperty("设备状态")
@ColumnWidth(20)
private String deviceStatus;
@ExcelProperty("创建时间")
@ColumnWidth(20)
private String createTime;
@ExcelProperty("创建人")
@ColumnWidth(20)
private String createBy;
}