parent
82a2baf72a
commit
7418665157
18 changed files with 127 additions and 42 deletions
@ -0,0 +1,44 @@ |
||||
package com.daqing.framework.utils.excel; |
||||
|
||||
import com.alibaba.excel.converters.Converter; |
||||
import com.alibaba.excel.enums.CellDataTypeEnum; |
||||
import com.alibaba.excel.metadata.CellData; |
||||
import com.alibaba.excel.metadata.GlobalConfiguration; |
||||
import com.alibaba.excel.metadata.property.ExcelContentProperty; |
||||
|
||||
/** |
||||
* 催收管理状态转换器 |
||||
* |
||||
* @auther River |
||||
* @date 2021/3/24 9:52 |
||||
*/ |
||||
public class CollectionListConverter implements Converter<Integer> { |
||||
|
||||
@Override |
||||
public Class supportJavaTypeKey() { |
||||
return Integer.class; |
||||
} |
||||
|
||||
@Override |
||||
public CellDataTypeEnum supportExcelTypeKey() { |
||||
return CellDataTypeEnum.STRING; |
||||
} |
||||
|
||||
@Override |
||||
public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
||||
return 0; |
||||
} |
||||
|
||||
@Override |
||||
public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
||||
|
||||
switch (value) { |
||||
case 1: |
||||
return new CellData("电话催收"); |
||||
case 2: |
||||
return new CellData("上门/外访"); |
||||
default: |
||||
return new CellData(String.valueOf(value)); |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue