|
|
@@ -12,6 +12,7 @@ import java.util.Set;
|
|
|
import java.util.TreeSet;
|
|
|
|
|
|
import org.apache.poi.ss.usermodel.Cell;
|
|
|
+import org.apache.poi.ss.usermodel.CellType;
|
|
|
import org.apache.poi.ss.usermodel.Row;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFSheet;
|
|
|
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
|
|
|
@@ -41,7 +42,12 @@ public class ExcelUtils {
|
|
|
cin.setCustomerStatus(checkCustomerStatus(cellIterator.next().getStringCellValue(), rowNumber));
|
|
|
cin.setCompanyIntention(checkCompanyIntention(cellIterator.next().getStringCellValue(), rowNumber));
|
|
|
cin.setContactName(checkOther(cellIterator.next().getStringCellValue(),rowNumber));
|
|
|
- cin.setContactTel(checkOther(df.format(cellIterator.next().getNumericCellValue()), rowNumber));
|
|
|
+ Cell phoneCell = cellIterator.next();
|
|
|
+ if(phoneCell.getCellTypeEnum() == CellType.NUMERIC) {
|
|
|
+ cin.setContactTel(checkOther(df.format(phoneCell.getNumericCellValue()), rowNumber));
|
|
|
+ }else if(phoneCell.getCellTypeEnum() == CellType.STRING){
|
|
|
+ cin.setContactTel(checkOther(phoneCell.getStringCellValue(), rowNumber));
|
|
|
+ }
|
|
|
if(checkRepeat(cin, result)) repeatRows.add(rowNumber);
|
|
|
result.add(cin);
|
|
|
}
|