| @@ -85,6 +85,7 @@ public class ExcelImportForkJoinWork extends RecursiveTask<ExcelImportResult> { | |||||
| ExcelImportResult result = new ExcelImportResult(); | ExcelImportResult result = new ExcelImportResult(); | ||||
| result.setFailList(new ArrayList()); | result.setFailList(new ArrayList()); | ||||
| result.setList(new ArrayList()); | result.setList(new ArrayList()); | ||||
| boolean isMap = Map.class.equals(pojoClass); | |||||
| for (int i = startRow; i <= endRow; i++) { | for (int i = startRow; i <= endRow; i++) { | ||||
| row = sheet.getRow(i); | row = sheet.getRow(i); | ||||
| errorMsg = new StringBuilder(); | errorMsg = new StringBuilder(); | ||||
| @@ -97,7 +98,7 @@ public class ExcelImportForkJoinWork extends RecursiveTask<ExcelImportResult> { | |||||
| for (Integer cn : keys) { | for (Integer cn : keys) { | ||||
| Cell cell = row.getCell(cn); | Cell cell = row.getCell(cn); | ||||
| String titleString = (String) titlemap.get(cn); | String titleString = (String) titlemap.get(cn); | ||||
| if (excelParams.containsKey(titleString) || Map.class.equals(pojoClass)) { | |||||
| if (excelParams.containsKey(titleString) || isMap) { | |||||
| try { | try { | ||||
| importService.saveFieldValue(params, object, cell, excelParams, titleString, row); | importService.saveFieldValue(params, object, cell, excelParams, titleString, row); | ||||
| } catch (ExcelImportException e) { | } catch (ExcelImportException e) { | ||||
| @@ -111,7 +112,7 @@ public class ExcelImportForkJoinWork extends RecursiveTask<ExcelImportResult> { | |||||
| if (object instanceof IExcelDataModel) { | if (object instanceof IExcelDataModel) { | ||||
| ((IExcelDataModel) object).setRowNum(row.getRowNum()); | ((IExcelDataModel) object).setRowNum(row.getRowNum()); | ||||
| } | } | ||||
| if (importService.verifyingDataValidity(object, row, params, pojoClass, errorMsg)) { | |||||
| if (importService.verifyingDataValidity(object, row, params, isMap, errorMsg)) { | |||||
| result.getList().add(object); | result.getList().add(object); | ||||
| } else { | } else { | ||||
| result.getFailList().add(object); | result.getFailList().add(object); | ||||