diff --git a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java index 0b03da74..ca8a1d2e 100644 --- a/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java +++ b/dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java @@ -26,38 +26,38 @@ public class PersonalEfficiencyListResponse { private Integer applicantId; @ApiModelProperty(value = "提单人") - @ExcelProperty(value = "提单人",index = 1) + @ExcelProperty(value = "提单人",index = 0) private String applicant; @ApiModelProperty("客户名称") - @ExcelProperty(value = "客户名称",index = 2) + @ExcelProperty(value = "客户名称",index = 1) private String clientName; @ApiModelProperty("申请日期") - @ExcelProperty(value = "申请日期",index = 3) + @ExcelProperty(value = "申请日期",index = 2) private String applicationDate; @ApiModelProperty("累计耗时") - @ExcelProperty(value = "累计耗时",index = 4) + @ExcelProperty(value = "累计耗时",index = 3) private String timeConsuming; @ApiModelProperty("完成时间") - @ExcelProperty(value = "完成时间",index = 5) + @ExcelProperty(value = "完成时间",index = 4) private String completeTime; @ApiModelProperty("任务节点") - @ExcelProperty(value = "任务节点",index = 6,converter = TaskNodeConverter.class) + @ExcelProperty(value = "任务节点",index = 5,converter = TaskNodeConverter.class) private String taskNode; @ApiModelProperty("审批状态") - @ExcelProperty(value = "审批状态",index = 7,converter = ApprovalStatusConverter.class) + @ExcelProperty(value = "审批状态",index = 6,converter = ApprovalStatusConverter.class) private Integer approveStatus; @ApiModelProperty("业务状态") - @ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class) + @ExcelProperty(value = "业务状态",index = 7,converter = BusinessStatusConverter.class) private Integer businessStatus; @ApiModelProperty("操作状态") - @ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class) + @ExcelProperty(value = "操作状态",index = 8,converter = OperatingStatusConverter.class) private Integer operatingStatus; } diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java index 28eeea34..34a9e56a 100644 --- a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java +++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java @@ -15,8 +15,8 @@ public class EasyExcelUtil { public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException { response.setContentType("application/vnd.ms-excel"); String filePath = fileName + ".xlsx"; - fileName = new String(filePath.getBytes(), "ISO-8859-1"); - response.addHeader("Content-Disposition", "filename=" + fileName); + String name = new String(filePath.getBytes(), "ISO-8859-1"); + response.addHeader("Content-Disposition", "filename=" + name); EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list); } } diff --git a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/TaskNodeConverter.java b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/TaskNodeConverter.java index 8df4881c..37a2bf4e 100644 --- a/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/TaskNodeConverter.java +++ b/dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/TaskNodeConverter.java @@ -12,7 +12,7 @@ import com.alibaba.excel.metadata.property.ExcelContentProperty; * @Version 1.0 * 任务节点转换器 */ -public class TaskNodeConverter implements Converter { +public class TaskNodeConverter implements Converter { @Override public Class supportJavaTypeKey() { @@ -36,9 +36,9 @@ public class TaskNodeConverter implements Converter { * @return */ @Override - public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, + public String convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { - return 0; + return ""; } /** @@ -53,32 +53,32 @@ public class TaskNodeConverter implements Converter { * @return */ @Override - public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, + public CellData convertToExcelData(String value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) { switch (value){ - case 1: + case "1": return new CellData("业务申请"); - case 2: + case "2": return new CellData("担保部调查"); - case 3: + case "3": return new CellData("资产部调查"); - case 4: + case "4": return new CellData("信息部调查"); - case 5: + case "5": return new CellData("合规调查"); - case 6: + case "6": return new CellData("工作会"); - case 7: + case "7": return new CellData("贷审会"); - case 8: + case "8": return new CellData("担保函"); - case 9: + case "9": return new CellData("回款确认"); - case 10: + case "10": return new CellData("放款通知"); default: - return new CellData(String.valueOf(value)); + return new CellData(""); } }