Merge pull request '人员身份证号码导入BUG修复' (#155) from feature/dxf into develop

Reviewed-on: #155
feature/mogen^2
dxfeng 2 years ago
commit 9ef15079b0

@ -232,7 +232,7 @@ public class HrmImportAdaptExcelE9 extends BaseBean implements IHrmImportAdapt {
if ("accounttype".equalsIgnoreCase(voFields[i])) { if ("accounttype".equalsIgnoreCase(voFields[i])) {
accounttypeIndex = i; accounttypeIndex = i;
} }
if (keyFieldIndex != 2 && certificateNumIndex != 29) break; //if (keyFieldIndex != 2 && certificateNumIndex != 29) break;
} }
try { try {
Workbook workbook; Workbook workbook;
@ -292,10 +292,12 @@ public class HrmImportAdaptExcelE9 extends BaseBean implements IHrmImportAdapt {
fieldList.add(cellValue); fieldList.add(cellValue);
if (keyFieldIndex == k) //如果重复性验证标准数据库字段下标与标准excel模板下标相等则找到对应的excel验证列 if (keyFieldIndex == k) //如果重复性验证标准数据库字段下标与标准excel模板下标相等则找到对应的excel验证列
keyColumn = i; keyColumn = i;
if (certificateNumIndex == k) { // if (certificateNumIndex == k) {
if ("身份证号码".equals(cellValue)) {
certificateNumColumn = i; certificateNumColumn = i;
} }
if (accounttypeIndex == k) { // if (accounttypeIndex == k) {
if ("账号类型".equals(cellValue)) {
accounttypeColumn = i; accounttypeColumn = i;
} }
flag = true; flag = true;
@ -550,7 +552,12 @@ public class HrmImportAdaptExcelE9 extends BaseBean implements IHrmImportAdapt {
if (certificateNumColumn == -1) if (certificateNumColumn == -1)
return false; return false;
String certificateNum = getCellValue(row.getCell((short) certificateNumColumn)).trim(); String certificateNum = getCellValue(row.getCell((short) certificateNumColumn)).trim();
String accounttype = getCellValue(row.getCell((short) accounttypeColumn)).trim(); String accounttype;
if (accounttypeColumn == -1) {
accounttype = "";
} else {
accounttype = getCellValue(row.getCell((short) accounttypeColumn)).trim();
}
String key = getCellValue(row.getCell((short) keyColumn)).trim(); String key = getCellValue(row.getCell((short) keyColumn)).trim();
if (voFields[fieldsMap.get(keyColumn)].equals("")) if (voFields[fieldsMap.get(keyColumn)].equals(""))
key = getCellValue(row.getCell((short) 0)).trim() + ">" + getCellValue(row.getCell((short) 1)).trim() + "_" + key; key = getCellValue(row.getCell((short) 0)).trim() + ">" + getCellValue(row.getCell((short) 1)).trim() + "_" + key;

Loading…
Cancel
Save