forked from dyf/fys-Multi-tenant
设备列表-导出excel 缺少绑定状态,excel表头顺序按列表展示
This commit is contained in:
@ -22,9 +22,6 @@ public class DeviceExcelExportDTO {
|
|||||||
// @ExcelProperty("ID")
|
// @ExcelProperty("ID")
|
||||||
// private Long id;
|
// private Long id;
|
||||||
|
|
||||||
@ExcelProperty("设备类型")
|
|
||||||
@ColumnWidth(20)
|
|
||||||
private String typeName;
|
|
||||||
|
|
||||||
// @ExcelProperty("设备类型")
|
// @ExcelProperty("设备类型")
|
||||||
// private Long deviceType;
|
// private Long deviceType;
|
||||||
@ -55,12 +52,25 @@ public class DeviceExcelExportDTO {
|
|||||||
@ColumnWidth(20)
|
@ColumnWidth(20)
|
||||||
private String deviceImei;
|
private String deviceImei;
|
||||||
|
|
||||||
|
@ExcelProperty("设备类型")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
// @ExcelProperty("经度")
|
// @ExcelProperty("经度")
|
||||||
// private String longitude;
|
// private String longitude;
|
||||||
|
|
||||||
// @ExcelProperty("纬度")
|
// @ExcelProperty("纬度")
|
||||||
// private String latitude;
|
// private String latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定状态
|
||||||
|
* 0 未绑定
|
||||||
|
* 1 已绑定
|
||||||
|
*/
|
||||||
|
@ExcelProperty("绑定状态")
|
||||||
|
@ColumnWidth(20)
|
||||||
|
private String bindingStatus;
|
||||||
|
|
||||||
@ExcelProperty("备注")
|
@ExcelProperty("备注")
|
||||||
@ColumnWidth(30)
|
@ColumnWidth(30)
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|||||||
@ -53,7 +53,9 @@ public class DeviceExportService {
|
|||||||
dto.setTypeName(device.getTypeName());
|
dto.setTypeName(device.getTypeName());
|
||||||
dto.setCreateBy(device.getCreateByName());
|
dto.setCreateBy(device.getCreateByName());
|
||||||
Integer deviceStatus = device.getDeviceStatus();
|
Integer deviceStatus = device.getDeviceStatus();
|
||||||
|
Integer bindingStatus = device.getBindingStatus();
|
||||||
// dto.setDeviceStatus(deviceStatus == 1 ? "正常" : "失效");
|
// dto.setDeviceStatus(deviceStatus == 1 ? "正常" : "失效");
|
||||||
|
dto.setBindingStatus(bindingStatus == 1 ? "已绑定" : "未绑定");
|
||||||
// 时间戳转换
|
// 时间戳转换
|
||||||
dto.setCreateTime(DateUtils.format(device.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
dto.setCreateTime(DateUtils.format(device.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
||||||
|
|
||||||
|
|||||||
@ -29,9 +29,10 @@
|
|||||||
and da.treatment_state = #{bo.treatmentState}
|
and da.treatment_state = #{bo.treatmentState}
|
||||||
</if>
|
</if>
|
||||||
<if test="bo.queryTime1 != null and bo.queryTime2 != null ">
|
<if test="bo.queryTime1 != null and bo.queryTime2 != null ">
|
||||||
and da.start_time between #{bo.queryTime1} and #{bo.queryTime2}
|
and da.start_time BETWEEN #{bo.queryTime1} AND #{bo.queryTime2}
|
||||||
</if>
|
</if>
|
||||||
</where>
|
</where>
|
||||||
|
order by da.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user