0
0

设备列表-导出excel 缺少绑定状态,excel表头顺序按列表展示

This commit is contained in:
2025-09-26 09:32:42 +08:00
parent e124694e67
commit 3bdabb04e2
3 changed files with 17 additions and 4 deletions

View File

@ -22,9 +22,6 @@ public class DeviceExcelExportDTO {
// @ExcelProperty("ID")
// private Long id;
@ExcelProperty("设备类型")
@ColumnWidth(20)
private String typeName;
// @ExcelProperty("设备类型")
// private Long deviceType;
@ -55,12 +52,25 @@ public class DeviceExcelExportDTO {
@ColumnWidth(20)
private String deviceImei;
@ExcelProperty("设备类型")
@ColumnWidth(20)
private String typeName;
// @ExcelProperty("经度")
// private String longitude;
// @ExcelProperty("纬度")
// private String latitude;
/**
* 绑定状态
* 0 未绑定
* 1 已绑定
*/
@ExcelProperty("绑定状态")
@ColumnWidth(20)
private String bindingStatus;
@ExcelProperty("备注")
@ColumnWidth(30)
private String remark;

View File

@ -53,7 +53,9 @@ public class DeviceExportService {
dto.setTypeName(device.getTypeName());
dto.setCreateBy(device.getCreateByName());
Integer deviceStatus = device.getDeviceStatus();
Integer bindingStatus = device.getBindingStatus();
// dto.setDeviceStatus(deviceStatus == 1 ? "正常" : "失效");
dto.setBindingStatus(bindingStatus == 1 ? "已绑定" : "未绑定");
// 时间戳转换
dto.setCreateTime(DateUtils.format(device.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));