标准预警模块导出excel缺少条款内容

This commit is contained in:
zhangjun
2022-09-29 15:00:09 +08:00
parent 97f12bdef1
commit d105dce3a5
3 changed files with 18 additions and 6 deletions
@@ -150,7 +150,13 @@ public class EarlyWarningEOController extends BaseController<EarlyWarningEO> {
// List<StandWarningEO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
List<WarningExportVO> exportExcel = earlyWarningEOService.getExportExcel(excelVO);
for (WarningExportVO warningExportVO : exportExcel){
String condition = warningExportVO.getTermsConditions();
if (condition != null && condition.length() > 32001){
condition = condition.substring(0,32000);
warningExportVO.setTermsConditions(condition);
}
}
// 这里需要设置不关闭流
EasyExcel.write(response.getOutputStream(), WarningExportVO.class).autoCloseStream(Boolean.FALSE).sheet("sheet1")
@@ -60,7 +60,7 @@ public class EarlyWarningEO extends BaseEntity {
@TableField(exist = false)
private String standName;
@ExcelProperty(value = "发布日期",index = 5)
@ExcelProperty(value = "发布日期",index = 6)
@ColumnWidth(20)
@ApiModelProperty("发布日期")
@TableField(exist = false)
@@ -98,6 +98,12 @@ public class EarlyWarningEO extends BaseEntity {
@TableField(exist = false)
private String itemsName;
@ExcelProperty(value = "条款内容",index = 5)
@ColumnWidth(60)
@ApiModelProperty("条款内容")
@TableField(exist = false)
private String termsConditions;
@ExcelIgnore
@TableField("POLICY_ID")
private String policyId;
@@ -11,18 +11,18 @@ public class WarningExportVO extends EarlyWarningEO {
@ExcelProperty(value = "实施日期",index = 6)
@ExcelProperty(value = "实施日期",index = 7)
@ColumnWidth(20)
@ApiModelProperty("实施日期")
private String SSRQ;
@ExcelProperty(value = "新车型实施日期",index = 7)
@ExcelProperty(value = "新车型实施日期",index = 8)
@ColumnWidth(20)
@ApiModelProperty("新车型实施日期")
private String XCXSSRQ;
@ExcelProperty(value = "在产车实施日期",index = 8)
@ExcelProperty(value = "在产车实施日期",index = 9)
@ColumnWidth(20)
@ApiModelProperty("在产车实施日期")
private String ZCCSSRQ;
@@ -31,7 +31,7 @@ public class WarningExportVO extends EarlyWarningEO {
@ApiModelProperty("标准类别显示")
private String standTypeShow;
@ExcelProperty(value = "适用车型",index = 9)
@ExcelProperty(value = "适用车型",index = 10)
@ColumnWidth(20)
@ApiModelProperty("适用车型展示")
private String applyTypeShow;