|
|
@ -111,6 +111,10 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
* 身份证号列序号 |
|
|
|
*/ |
|
|
|
public static final Integer ID_CARD_COLUMN_NO = 8; |
|
|
|
/** |
|
|
|
* 手机号列序号 |
|
|
|
*/ |
|
|
|
public static final Integer MOBILE_COLUMN_NO = 7; |
|
|
|
/** |
|
|
|
* 姓名列序号 |
|
|
|
*/ |
|
|
@ -235,6 +239,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
@Excel(name = "姓名", width = 25) |
|
|
|
private String name; |
|
|
|
|
|
|
|
@Excel(name = "手机号", width = 20) |
|
|
|
private String mobile; |
|
|
|
|
|
|
|
@Excel(name = "错误信息", width = 40) |
|
|
|
private String errorInfo; |
|
|
|
} |
|
|
@ -286,6 +293,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
ErrorRow errorRow = new ErrorRow(); |
|
|
|
errorRow.setName("*"); |
|
|
|
errorRow.setIdCard("*"); |
|
|
|
errorRow.setMobile("*"); |
|
|
|
errorRows.get().get(sheet.getTableName()).add(errorRow); |
|
|
|
} |
|
|
|
} |
|
|
@ -574,6 +582,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
ErrorRow errorRow = new ErrorRow(); |
|
|
|
errorRow.setIdCard(columnAndValues.get("ID_CARD")); |
|
|
|
errorRow.setName(columnAndValues.get("NAME")); |
|
|
|
errorRow.setMobile(columnAndValues.get("MOBILE")); |
|
|
|
errorRow.setErrorInfo(errorMsg); |
|
|
|
errorRow.setTableName(tableName); |
|
|
|
errorRows.get().get(IcResiUserTableEnum.IC_RESI_USER.getTableName()).add(errorRow); |
|
|
@ -756,6 +765,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
ErrorRow errorRow = new ErrorRow(); |
|
|
|
errorRow.setName(columnAndValues.get("NAME")); |
|
|
|
errorRow.setIdCard(columnAndValues.get("ID_CARD")); |
|
|
|
errorRow.setMobile(columnAndValues.get("MOBILE")); |
|
|
|
errorRow.setErrorInfo(errorMsg); |
|
|
|
errorRow.setTableName(targetTableName); |
|
|
|
errorRows.get().get(targetTableName).add(errorRow); |
|
|
@ -784,6 +794,8 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
*/ |
|
|
|
public void singlePersistResiVirtualSheetExtraInfo(Map<String, String> columnAndValues, IcResiUserTableEnum sheetEnumObject) { |
|
|
|
String idCard = columnAndValues.get(ID_CARD_COLUMN_NO); |
|
|
|
String name = columnAndValues.get(ID_NAME_COLUMN_NO); |
|
|
|
String mobile = columnAndValues.get(MOBILE_COLUMN_NO); |
|
|
|
try { |
|
|
|
if (StringUtils.isBlank(idCard)) { |
|
|
|
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), |
|
|
@ -813,8 +825,9 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
} |
|
|
|
|
|
|
|
ErrorRow errorRow = new ErrorRow(); |
|
|
|
errorRow.setName(columnAndValues.get("NAME")); |
|
|
|
errorRow.setName(name); |
|
|
|
errorRow.setIdCard(idCard); |
|
|
|
errorRow.setMobile(mobile); |
|
|
|
errorRow.setErrorInfo(errorMsg); |
|
|
|
errorRow.setTableName(sheetEnumObject.getTableName()); |
|
|
|
errorRows.get().get(sheetEnumObject.getTableName()).add(errorRow); |
|
|
@ -927,6 +940,7 @@ public class IcResiUserImportServiceImpl implements IcResiUserImportService, Res |
|
|
|
// 这两列要提前放进去,因为有的列未填写的话,会抛异常出去,需要用这两列来做描述
|
|
|
|
target2Insert.put("ID_CARD", row.get(ID_CARD_COLUMN_NO)); |
|
|
|
target2Insert.put("NAME", row.get(ID_NAME_COLUMN_NO)); |
|
|
|
target2Insert.put("MOBILE", row.get(MOBILE_COLUMN_NO)); |
|
|
|
|
|
|
|
for (Map.Entry<String, ColumnWrapper> dbColumnMetadata : dbMetadataItemIdAndColumnWrappers.entrySet()) { |
|
|
|
|
|
|
|