diff --git a/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar b/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar index e1dd3e95..e9483c0f 100644 Binary files a/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar and b/com.actionsoft.apps.coe.pal.datamigration/lib/com.actionsoft.apps.coe.pal.datamigration.jar differ diff --git a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/versionNo/web/VersionNoExcelImportWeb.java b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/versionNo/web/VersionNoExcelImportWeb.java index 30db4acf..afd236bf 100644 --- a/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/versionNo/web/VersionNoExcelImportWeb.java +++ b/com.actionsoft.apps.coe.pal.datamigration/src/com/actionsoft/apps/coe/pal/datamigration/versionNo/web/VersionNoExcelImportWeb.java @@ -285,18 +285,21 @@ public class VersionNoExcelImportWeb extends ActionWeb { // 按照Excel中的所有分类校验对应分类下PAL的模型名称是否重复 Map> palNameMap = new HashMap<>(); - Set methodSet = new HashSet<>(); + Map> methodMap = new HashMap<>(); for (VersionNoExcelModel model : excelModelList) { String processType = model.getProcessType(); if (UtilString.isNotEmpty(processType)) { if (map.containsKey(processType)) { - methodSet.add(map.get(processType)); + if (!methodMap.containsKey(map.get(processType))) { + methodMap.put(map.get(processType), new ArrayList<>()); + } + methodMap.get(map.get(processType)).add(model.getProcessName()); } } } - for (String methodId : methodSet) { + for (String methodId : methodMap.keySet()) { Map palNameMap2 = ProcessUtil.getPalRepositoryNameMap(wsId, methodId);// 获取模型以及模型的名称 - ResponseObject checkRepeatPalNameRo = checkRepositoryNameRepeat(palNameMap2, methodId); + ResponseObject checkRepeatPalNameRo = checkRepositoryNameRepeat(palNameMap2, methodId, methodMap.get(methodId)); if (!checkRepeatPalNameRo.isOk()) { msg = Constant.LOG_ERROR + checkRepeatPalNameRo.getMsg() + "," + Constant.IMPORT_STOP_MSG; updateErrLog(msg, msg); @@ -344,12 +347,15 @@ public class VersionNoExcelImportWeb extends ActionWeb { * @param palNameMap * @return */ - private ResponseObject checkRepositoryNameRepeat(Map palNameMap, String methodId) { + private ResponseObject checkRepositoryNameRepeat(Map palNameMap, String methodId, List list) { boolean isOk = true; Map> map = new HashMap<>(); for (Map.Entry entry : palNameMap.entrySet()) { String palId = entry.getKey(); String name = entry.getValue(); + if (!list.contains(name)) {// 只校验excel中存在的相关模型名称 + continue; + } if (!map.containsKey(name)) { map.put(name, new ArrayList<>()); }