5 changed files with 54 additions and 43 deletions
@ -1,40 +0,0 @@ |
|||
package com.xr.device_car.config.common; |
|||
|
|||
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; |
|||
|
|||
public class TypeNameConverter implements Converter<String> { |
|||
@Override |
|||
public Class supportJavaTypeKey() { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public CellDataTypeEnum supportExcelTypeKey() { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public String convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
|||
return null; |
|||
} |
|||
|
|||
@Override |
|||
public CellData convertToExcelData(String s, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception { |
|||
//表计形状(0圆形指针1扇形指针2数字类表计3状态类表计
|
|||
if (s.equals("0")){ |
|||
return new CellData("圆形指针"); |
|||
}else if (s.equals("1")){ |
|||
return new CellData("扇形指针"); |
|||
}else if (s.equals("2")){ |
|||
return new CellData("数字类表计"); |
|||
}else if (s.equals("3")){ |
|||
return new CellData("状态类表计"); |
|||
}else { |
|||
return new CellData(s); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue