导出问题

This commit is contained in:
fl 2025-04-11 17:11:15 +08:00
parent 039ad034b4
commit ccc3157ab7
3 changed files with 71 additions and 60 deletions

View File

@ -155,6 +155,7 @@ public class QualityInspectionServiceImpl implements QualityInspectionService {
list.forEach(vo -> {
vo.setId(num[0]);
num[0]++;
vo.setRectStatus( "1".equals(vo.getRectStatus())?"已整改":"待整改");
});
ExportParams exportParams = new ExportParams("质量检查", "质量检查", ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SafetyViolationVo.class, list);

View File

@ -167,6 +167,7 @@ public class SafetyViolationServiceImpl implements SafetyViolationService {
list.forEach(vo -> {
vo.setId(num[0]);
num[0]++;
vo.setRectStatus( "1".equals(vo.getRectStatus())?"已整改":"待整改");
});
ExportParams exportParams = new ExportParams("安全违章", "安全违章", ExcelType.XSSF);
Workbook workbook = ExcelExportUtil.exportExcel(exportParams, SafetyViolationVo.class, list);

View File

@ -12,6 +12,38 @@ import java.util.List;
*/
@Data
public class SafetyViolationVo extends PageEntity {
/**
* id
*/
@Excel(name = "序号", width = 20.0, orderNum = "0")
private Long id;
/**
* 工程名称
*/
@Excel(name = "工程名称", width = 20.0, orderNum = "1")
private String proName;
/**
* 工序名称
*/
@Excel(name = "工序名称", width = 20.0, orderNum = "2")
private String gxName;
/**
* 违章地点
*/
@Excel(name = "违章/检查地点", width = 20.0, orderNum = "3")
private String vioPlace;
/**
* 违章描述
*/
@Excel(name = "违章/检查描述", width = 20.0, orderNum = "4")
private String vioDesc;
/**
* 违章照片数量
*/
@Excel(name = "违章/缺陷照片数量", width = 20.0, orderNum = "5")
private String vioPhotoNum;
/**
* 检查人
*/
@ -22,6 +54,38 @@ public class SafetyViolationVo extends PageEntity {
*/
@Excel(name = "违章/检查时间", width = 20.0, orderNum = "7")
private String createTime;
/**
* 整改期限
*/
@Excel(name = "整改期限", width = 20.0, orderNum = "8")
private String rectDate;
/**
* 整改状态 0.待整改 1.已整改
*/
@Excel(name = "整改状态", width = 20.0, orderNum = "9",replace = {"待整改_0,已整改_1"})
private String rectStatus;
/**
* 整改说明
*/
@Excel(name = "整改说明", width = 20.0, orderNum = "10")
private String rectDesc;
/**
* 整改照片数量
*/
@Excel(name = "整改照片数量", width = 20.0, orderNum = "11")
private String rectPhotoNum;
/**
* 整改人
*/
@Excel(name = "整改人", width = 20.0, orderNum = "12")
private String rectUserName;
/**
* 整改时间
*/
@Excel(name = "整改时间", width = 20.0, orderNum = "13")
private String rectTime;
/**
* 创建人
*/
@ -38,16 +102,8 @@ public class SafetyViolationVo extends PageEntity {
* 工序id
*/
private Long gxId;
/**
* 工序名称
*/
@Excel(name = "工序名称", width = 20.0, orderNum = "2")
private String gxName;
/**
* id
*/
@Excel(name = "序号", width = 20.0, orderNum = "0")
private Long id;
/**
* 是否可用 1.可用 0.不可用
*/
@ -64,36 +120,8 @@ public class SafetyViolationVo extends PageEntity {
* 工程id
*/
private Long proId;
/**
* 工程名称
*/
@Excel(name = "工程名称", width = 20.0, orderNum = "1")
private String proName;
/**
* 整改期限
*/
@Excel(name = "整改期限", width = 20.0, orderNum = "8")
private String rectDate;
/**
* 整改说明
*/
@Excel(name = "整改说明", width = 20.0, orderNum = "10")
private String rectDesc;
/**
* 整改状态 0.待整改 1.已整改
*/
@Excel(name = "整改状态", width = 20.0, orderNum = "9",replace = "0=待整改,1=已整改")
private String rectStatus;
/**
* 整改时间
*/
@Excel(name = "整改时间", width = 20.0, orderNum = "13")
private String rectTime;
/**
* 整改人
*/
@Excel(name = "整改人", width = 20.0, orderNum = "12")
private String rectUserName;
/**
* 修改时间
*/
@ -111,26 +139,7 @@ public class SafetyViolationVo extends PageEntity {
* 违章时间
*/
private String vioDate;
/**
* 违章描述
*/
@Excel(name = "违章/检查描述", width = 20.0, orderNum = "4")
private String vioDesc;
/**
* 违章地点
*/
@Excel(name = "违章/检查地点", width = 20.0, orderNum = "3")
private String vioPlace;
/**
* 违章照片数量
*/
@Excel(name = "违章/缺陷照片数量", width = 20.0, orderNum = "5")
private String vioPhotoNum;
/**
* 整改照片数量
*/
@Excel(name = "整改照片数量", width = 20.0, orderNum = "11")
private String rectPhotoNum;
/**
* 违章照片