1:修改删除id对应关系时报错的问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
package com.nis.listener;
|
package com.nis.listener;
|
||||||
|
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
@@ -172,9 +173,9 @@ public class CompileGroupRegionRela extends ContextLoaderListener {
|
|||||||
Set<Long> list = maatRelation.getCompileAndGroupMap().get(compileId);
|
Set<Long> list = maatRelation.getCompileAndGroupMap().get(compileId);
|
||||||
|
|
||||||
if (list != null && list.size() > 0) {
|
if (list != null && list.size() > 0) {
|
||||||
for (Long groupId : list) {
|
Iterator<Long> iterator = list.iterator();
|
||||||
// }
|
while (iterator.hasNext()) {
|
||||||
// for (Long groupId: list.size()) {
|
Long groupId = iterator.next();
|
||||||
if (maatRelation.getGroupAndCompileMap().containsKey(groupId)) {
|
if (maatRelation.getGroupAndCompileMap().containsKey(groupId)) {
|
||||||
// && maatRelation.getGroupAndCompileMap().get(groupId).size() == 1
|
// && maatRelation.getGroupAndCompileMap().get(groupId).size() == 1
|
||||||
// && maatRelation.getGroupAndCompileMap().get(groupId).get(0).longValue() ==
|
// && maatRelation.getGroupAndCompileMap().get(groupId).get(0).longValue() ==
|
||||||
@@ -192,7 +193,8 @@ public class CompileGroupRegionRela extends ContextLoaderListener {
|
|||||||
// maatRelation.getCompileAndGroupMap().get(compileId)
|
// maatRelation.getCompileAndGroupMap().get(compileId)
|
||||||
// list.remove(maatRelation.getCompileAndGroupMap().get(compileId).indexOf(groupId));//
|
// list.remove(maatRelation.getCompileAndGroupMap().get(compileId).indexOf(groupId));//
|
||||||
// 删除编译下面的组
|
// 删除编译下面的组
|
||||||
list.remove(groupId);// 删除编译下面的组
|
// list.remove(groupId);// 删除编译下面的组
|
||||||
|
iterator.remove();// 删除编译下面的组
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -203,8 +205,8 @@ public class CompileGroupRegionRela extends ContextLoaderListener {
|
|||||||
// maatRelation.getGroupAndCompileMap().get(groupId)
|
// maatRelation.getGroupAndCompileMap().get(groupId)
|
||||||
// .remove(maatRelation.getGroupAndCompileMap().get(groupId).indexOf(compileId));//
|
// .remove(maatRelation.getGroupAndCompileMap().get(groupId).indexOf(compileId));//
|
||||||
// 删除分组关系中的组和编译关系
|
// 删除分组关系中的组和编译关系
|
||||||
|
// list.remove(groupId);// 删除编译下面的这个组
|
||||||
list.remove(groupId);// 删除编译下面的这个组
|
iterator.remove();// 删除编译下面的这个组
|
||||||
maatRelation.getGroupAndCompileMap().get(groupId).remove(compileId);
|
maatRelation.getGroupAndCompileMap().get(groupId).remove(compileId);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user