|
|
@@ -748,17 +748,8 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
|
|
|
final List<FjnxOrg> topOrgList = list.stream().filter(x -> ObjectUtil.isEmpty(x.getOrgParent())).collect(Collectors.toList());
|
|
|
|
|
|
topOrgList.forEach(topOrg -> {
|
|
|
-
|
|
|
changeOrgHierarchical(topOrg, list);
|
|
|
-// List<FjnxOrg> childOrgList = list.stream().filter(x -> topOrg.getOrgCode().equals(x.getOrgParent())).collect(Collectors.toList());
|
|
|
-// if(needAddCustomOrg(childOrgList))
|
|
|
-// {
|
|
|
-// FjnxOrg customOrg= CreateCustomOrg(topOrg,"机关部门");
|
|
|
-// changeOrgHierarchical(childOrgList,customOrg);
|
|
|
-// list.add(customOrg);
|
|
|
-// }
|
|
|
});
|
|
|
-
|
|
|
return list;
|
|
|
}
|
|
|
|
|
|
@@ -769,10 +760,12 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
|
|
|
if (childOrgList.size() == 0)
|
|
|
return;
|
|
|
|
|
|
+ final List<FjnxOrg> nendChangeOrgHierarchical =new ArrayList<>();
|
|
|
List<FjnxOrg> deptOrgList = childOrgList.stream().filter(x -> ObjectUtil.isNotEmpty(x.getOrgCode()) && x.getOrgCode().toLowerCase().startsWith("m")).collect(Collectors.toList());
|
|
|
if (deptOrgList.size() > 0) {
|
|
|
|
|
|
- List<FjnxOrg> nendChangeOrgHierarchical = deptOrgList.stream().filter(x -> !x.getOrgName().endsWith("地区行社") && !x.getOrgName().endsWith("办事处")).collect(Collectors.toList());
|
|
|
+ final List<FjnxOrg> collect = deptOrgList.stream().filter(x -> !x.getOrgName().endsWith("地区行社") && !x.getOrgName().endsWith("办事处")).collect(Collectors.toList());
|
|
|
+ nendChangeOrgHierarchical.addAll(collect);
|
|
|
if (nendChangeOrgHierarchical.size() > 0) {
|
|
|
FjnxOrg customOrg = findCustomAddOrg(parentOrg, "机关部门",list);
|
|
|
list.add(customOrg);
|
|
|
@@ -783,6 +776,10 @@ public class FJNXSyncServiceImpl implements IFJNXSyncService {
|
|
|
}
|
|
|
}
|
|
|
childOrgList.forEach(org->{
|
|
|
+ if(nendChangeOrgHierarchical.stream().anyMatch(changeOrg->changeOrg.getOrgCode().equals(org.getOrgCode())))
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
changeOrgHierarchical(org,list);
|
|
|
});
|
|
|
}
|