From f5f5c261338326da3054a5613032f45a8188824e Mon Sep 17 00:00:00 2001 From: dxfeng Date: Wed, 1 Mar 2023 09:54:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BA=BA=E5=91=98=E8=BA=AB=E4=BB=BD=E8=AF=81?= =?UTF-8?q?=E5=8F=B7=E7=A0=81=E5=AF=BC=E5=85=A5BUG=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hrmimport/HrmImportAdaptExcelE9.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/com/engine/organization/util/saveimport/hrmimport/HrmImportAdaptExcelE9.java b/src/com/engine/organization/util/saveimport/hrmimport/HrmImportAdaptExcelE9.java index 2beb177d..194ac3d9 100644 --- a/src/com/engine/organization/util/saveimport/hrmimport/HrmImportAdaptExcelE9.java +++ b/src/com/engine/organization/util/saveimport/hrmimport/HrmImportAdaptExcelE9.java @@ -232,7 +232,7 @@ public class HrmImportAdaptExcelE9 extends BaseBean implements IHrmImportAdapt { if ("accounttype".equalsIgnoreCase(voFields[i])) { accounttypeIndex = i; } - if (keyFieldIndex != 2 && certificateNumIndex != 29) break; + //if (keyFieldIndex != 2 && certificateNumIndex != 29) break; } try { Workbook workbook; @@ -292,10 +292,12 @@ public class HrmImportAdaptExcelE9 extends BaseBean implements IHrmImportAdapt { fieldList.add(cellValue); if (keyFieldIndex == k) //如果重复性验证标准数据库字段下标与标准excel模板下标相等,则找到对应的excel验证列 keyColumn = i; - if (certificateNumIndex == k) { + // if (certificateNumIndex == k) { + if ("身份证号码".equals(cellValue)) { certificateNumColumn = i; } - if (accounttypeIndex == k) { + // if (accounttypeIndex == k) { + if ("账号类型".equals(cellValue)) { accounttypeColumn = i; } flag = true; @@ -550,7 +552,12 @@ public class HrmImportAdaptExcelE9 extends BaseBean implements IHrmImportAdapt { if (certificateNumColumn == -1) return false; 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(); if (voFields[fieldsMap.get(keyColumn)].equals("")) key = getCellValue(row.getCell((short) 0)).trim() + ">" + getCellValue(row.getCell((short) 1)).trim() + "_" + key;