| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- package com.xunmei.system.util;
- 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;
- /**
- * @author :LuoWei
- * @date : 2023/11/28
- */
- public class OwnershipConverter implements Converter<Integer> {
- @Override
- public Class supportJavaTypeKey() {
- return null;
- }
- @Override
- public CellDataTypeEnum supportExcelTypeKey() {
- return null;
- }
- @Override
- public Integer convertToJavaData(CellData cellData, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
- return null;
- }
- @Override
- public CellData convertToExcelData(Integer s, ExcelContentProperty excelContentProperty, GlobalConfiguration globalConfiguration) throws Exception {
- if ("1".equals(s)) {
- return new CellData("部分自有+部分租赁");
- }else if ("2".equals(s)){
- return new CellData("自有");
- }else {
- return new CellData("租赁");
- }
- }
- }
|