|
|
@ -125,57 +125,57 @@ public class ExcelInfo { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
if(value.equals("否")||value.equals("历史")||value.equals("停用")) |
|
|
|
if(value.equals("否")||value.equals("历史")||value.equals("停用")) |
|
|
|
return "0"; |
|
|
|
return "0"; |
|
|
|
if(value.equals("是")|| value.equals("正常")||value.equals("当前")||value.equals("TINYINT")) |
|
|
|
if(value.equals("是")|| value.equals("正常")||value.equals("当前")||value.equals("TINYINT")||value.equals("tinyint")) |
|
|
|
return "1"; |
|
|
|
return "1"; |
|
|
|
if(value.equals("SMALLINT")) |
|
|
|
if(value.equals("SMALLINT")||value.equals("smallint")) |
|
|
|
return "2"; |
|
|
|
return "2"; |
|
|
|
if(value.equals("MEDIUMINT")) |
|
|
|
if(value.equals("MEDIUMINT")||value.equals("mediumint")) |
|
|
|
return "3"; |
|
|
|
return "3"; |
|
|
|
if(value.equals("INT")) |
|
|
|
if(value.equals("INT")||value.equals("int")) |
|
|
|
return "4"; |
|
|
|
return "4"; |
|
|
|
if(value.equals("BIGINT")) |
|
|
|
if(value.equals("BIGINT")||value.equals("bigint")) |
|
|
|
return "5"; |
|
|
|
return "5"; |
|
|
|
if(value.equals("FLOAT")) |
|
|
|
if(value.equals("FLOAT")||value.equals("float")) |
|
|
|
return "6"; |
|
|
|
return "6"; |
|
|
|
if(value.equals("DOUBLE")) |
|
|
|
if(value.equals("DOUBLE")||value.equals("double")) |
|
|
|
return "7"; |
|
|
|
return "7"; |
|
|
|
if(value.equals("DECIMAL")) |
|
|
|
if(value.equals("DECIMAL")||value.equals("decimal")) |
|
|
|
return "8"; |
|
|
|
return "8"; |
|
|
|
if(value.equals("YEAR")||value.equals("废弃")) |
|
|
|
if(value.equals("YEAR")||value.equals("year")||value.equals("废弃")) |
|
|
|
return "9"; |
|
|
|
return "9"; |
|
|
|
if(value.equals("TIME")) |
|
|
|
if(value.equals("TIME")||value.equals("time")) |
|
|
|
return "10"; |
|
|
|
return "10"; |
|
|
|
if(value.equals("DATE")) |
|
|
|
if(value.equals("DATE")||value.equals("date")) |
|
|
|
return "11"; |
|
|
|
return "11"; |
|
|
|
if(value.equals("DATETIME")) |
|
|
|
if(value.equals("DATETIME")||value.equals("datetime")) |
|
|
|
return "12"; |
|
|
|
return "12"; |
|
|
|
if(value.equals("TIMESTAMP")) |
|
|
|
if(value.equals("TIMESTAMP")||value.equals("timestamp")) |
|
|
|
return "13"; |
|
|
|
return "13"; |
|
|
|
if(value.equals("CHAR")) |
|
|
|
if(value.equals("CHAR")||value.equals("char")) |
|
|
|
return "14"; |
|
|
|
return "14"; |
|
|
|
if(value.equals("VARCHAR")) |
|
|
|
if(value.equals("VARCHAR")||value.equals("varchar")) |
|
|
|
return "15"; |
|
|
|
return "15"; |
|
|
|
if(value.equals("BINARY")) |
|
|
|
if(value.equals("BINARY")||value.equals("binary")) |
|
|
|
return "16"; |
|
|
|
return "16"; |
|
|
|
if(value.equals("VARBINARY")) |
|
|
|
if(value.equals("VARBINARY")||value.equals("varbinary")) |
|
|
|
return "17"; |
|
|
|
return "17"; |
|
|
|
if(value.equals("BLOB")) |
|
|
|
if(value.equals("BLOB")||value.equals("blob")) |
|
|
|
return "18"; |
|
|
|
return "18"; |
|
|
|
if(value.equals("TEXT")) |
|
|
|
if(value.equals("TEXT")||value.equals("text")) |
|
|
|
return "19"; |
|
|
|
return "19"; |
|
|
|
if(value.equals("ENUM")) |
|
|
|
if(value.equals("ENUM")||value.equals("enum")) |
|
|
|
return "20"; |
|
|
|
return "20"; |
|
|
|
if(value.equals("SET")) |
|
|
|
if(value.equals("SET")||value.equals("set")) |
|
|
|
return "21"; |
|
|
|
return "21"; |
|
|
|
if(value.equals("BIT")) |
|
|
|
if(value.equals("BIT")||value.equals("bit")) |
|
|
|
return "22"; |
|
|
|
return "22"; |
|
|
|
if(value.equals("TINYBLOB")) |
|
|
|
if(value.equals("TINYBLOB")||value.equals("tinyblob")) |
|
|
|
return "23"; |
|
|
|
return "23"; |
|
|
|
if(value.equals("BLOB")) |
|
|
|
if(value.equals("BLOB")||value.equals("blob")) |
|
|
|
return "24"; |
|
|
|
return "24"; |
|
|
|
if(value.equals("MEDIUMBLOB")) |
|
|
|
if(value.equals("MEDIUMBLOB")||value.equals("mediumblob")) |
|
|
|
return "25"; |
|
|
|
return "25"; |
|
|
|
if(value.equals("LONGBLOB")) |
|
|
|
if(value.equals("LONGBLOB")||value.equals("longblob")) |
|
|
|
return "26"; |
|
|
|
return "26"; |
|
|
|
return value; |
|
|
|
return value; |
|
|
|
} |
|
|
|
} |
|
|
@ -186,6 +186,9 @@ private String zhcell(Cell cell){ |
|
|
|
DataFormatter formatter = new DataFormatter(); |
|
|
|
DataFormatter formatter = new DataFormatter(); |
|
|
|
|
|
|
|
|
|
|
|
// 清除单元格的样式
|
|
|
|
// 清除单元格的样式
|
|
|
|
|
|
|
|
if (cell==null||String.valueOf(cell).equals("")) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
cell.setCellStyle(null); |
|
|
|
cell.setCellStyle(null); |
|
|
|
//使用数据格式化器和公式求值器,将单元格的值格式化为字符串
|
|
|
|
//使用数据格式化器和公式求值器,将单元格的值格式化为字符串
|
|
|
|
String name = formatter.formatCellValue(cell, evaluator); |
|
|
|
String name = formatter.formatCellValue(cell, evaluator); |
|
|
|