bug5144,版本号批量刷新校验PAL数据是否重复机制调整,只校验Excel中包含的数据
This commit is contained in:
parent
00d5b8a776
commit
4bdb5aeaa9
Binary file not shown.
@ -285,18 +285,21 @@ public class VersionNoExcelImportWeb extends ActionWeb {
|
||||
|
||||
// 按照Excel中的所有分类校验对应分类下PAL的模型名称是否重复
|
||||
Map<String, Map<String, String>> palNameMap = new HashMap<>();
|
||||
Set<String> methodSet = new HashSet<>();
|
||||
Map<String, List<String>> 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<String, String> 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<String, String> palNameMap, String methodId) {
|
||||
private ResponseObject checkRepositoryNameRepeat(Map<String, String> palNameMap, String methodId, List<String> list) {
|
||||
boolean isOk = true;
|
||||
Map<String, List<String>> map = new HashMap<>();
|
||||
for (Map.Entry<String, String> 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<>());
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user