完善实体类

master
chen 4 years ago
parent f10a6c5b2b
commit 25e74bef09
  1. 18
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/model/response/PersonalEfficiencyListResponse.java
  2. 4
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/EasyExcelUtil.java
  3. 30
      dq-framework-utils/src/main/java/com/daqing/framework/utils/excel/TaskNodeConverter.java

@ -26,38 +26,38 @@ public class PersonalEfficiencyListResponse {
private Integer applicantId; private Integer applicantId;
@ApiModelProperty(value = "提单人") @ApiModelProperty(value = "提单人")
@ExcelProperty(value = "提单人",index = 1) @ExcelProperty(value = "提单人",index = 0)
private String applicant; private String applicant;
@ApiModelProperty("客户名称") @ApiModelProperty("客户名称")
@ExcelProperty(value = "客户名称",index = 2) @ExcelProperty(value = "客户名称",index = 1)
private String clientName; private String clientName;
@ApiModelProperty("申请日期") @ApiModelProperty("申请日期")
@ExcelProperty(value = "申请日期",index = 3) @ExcelProperty(value = "申请日期",index = 2)
private String applicationDate; private String applicationDate;
@ApiModelProperty("累计耗时") @ApiModelProperty("累计耗时")
@ExcelProperty(value = "累计耗时",index = 4) @ExcelProperty(value = "累计耗时",index = 3)
private String timeConsuming; private String timeConsuming;
@ApiModelProperty("完成时间") @ApiModelProperty("完成时间")
@ExcelProperty(value = "完成时间",index = 5) @ExcelProperty(value = "完成时间",index = 4)
private String completeTime; private String completeTime;
@ApiModelProperty("任务节点") @ApiModelProperty("任务节点")
@ExcelProperty(value = "任务节点",index = 6,converter = TaskNodeConverter.class) @ExcelProperty(value = "任务节点",index = 5,converter = TaskNodeConverter.class)
private String taskNode; private String taskNode;
@ApiModelProperty("审批状态") @ApiModelProperty("审批状态")
@ExcelProperty(value = "审批状态",index = 7,converter = ApprovalStatusConverter.class) @ExcelProperty(value = "审批状态",index = 6,converter = ApprovalStatusConverter.class)
private Integer approveStatus; private Integer approveStatus;
@ApiModelProperty("业务状态") @ApiModelProperty("业务状态")
@ExcelProperty(value = "业务状态",index = 8,converter = BusinessStatusConverter.class) @ExcelProperty(value = "业务状态",index = 7,converter = BusinessStatusConverter.class)
private Integer businessStatus; private Integer businessStatus;
@ApiModelProperty("操作状态") @ApiModelProperty("操作状态")
@ExcelProperty(value = "操作状态",index = 9,converter = OperatingStatusConverter.class) @ExcelProperty(value = "操作状态",index = 8,converter = OperatingStatusConverter.class)
private Integer operatingStatus; private Integer operatingStatus;
} }

@ -15,8 +15,8 @@ public class EasyExcelUtil {
public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException { public static void download(HttpServletResponse response, Class head, List list, String fileName, String sheetName) throws IOException {
response.setContentType("application/vnd.ms-excel"); response.setContentType("application/vnd.ms-excel");
String filePath = fileName + ".xlsx"; String filePath = fileName + ".xlsx";
fileName = new String(filePath.getBytes(), "ISO-8859-1"); String name = new String(filePath.getBytes(), "ISO-8859-1");
response.addHeader("Content-Disposition", "filename=" + fileName); response.addHeader("Content-Disposition", "filename=" + name);
EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list); EasyExcel.write(response.getOutputStream(), head).sheet(sheetName).doWrite(list);
} }
} }

@ -12,7 +12,7 @@ import com.alibaba.excel.metadata.property.ExcelContentProperty;
* @Version 1.0 * @Version 1.0
* 任务节点转换器 * 任务节点转换器
*/ */
public class TaskNodeConverter implements Converter<Integer> { public class TaskNodeConverter implements Converter<String> {
@Override @Override
public Class supportJavaTypeKey() { public Class supportJavaTypeKey() {
@ -36,9 +36,9 @@ public class TaskNodeConverter implements Converter<Integer> {
* @return * @return
*/ */
@Override @Override
public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, public String convertToJavaData(CellData cellData, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) { GlobalConfiguration globalConfiguration) {
return 0; return "";
} }
/** /**
@ -53,32 +53,32 @@ public class TaskNodeConverter implements Converter<Integer> {
* @return * @return
*/ */
@Override @Override
public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, public CellData convertToExcelData(String value, ExcelContentProperty contentProperty,
GlobalConfiguration globalConfiguration) { GlobalConfiguration globalConfiguration) {
switch (value){ switch (value){
case 1: case "1":
return new CellData("业务申请"); return new CellData("业务申请");
case 2: case "2":
return new CellData("担保部调查"); return new CellData("担保部调查");
case 3: case "3":
return new CellData("资产部调查"); return new CellData("资产部调查");
case 4: case "4":
return new CellData("信息部调查"); return new CellData("信息部调查");
case 5: case "5":
return new CellData("合规调查"); return new CellData("合规调查");
case 6: case "6":
return new CellData("工作会"); return new CellData("工作会");
case 7: case "7":
return new CellData("贷审会"); return new CellData("贷审会");
case 8: case "8":
return new CellData("担保函"); return new CellData("担保函");
case 9: case "9":
return new CellData("回款确认"); return new CellData("回款确认");
case 10: case "10":
return new CellData("放款通知"); return new CellData("放款通知");
default: default:
return new CellData(String.valueOf(value)); return new CellData("");
} }
} }

Loading…
Cancel
Save