|
|
|
@ -120,7 +120,7 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|
|
|
|
// 判断有无重复数据
|
|
|
|
|
List<ManagerDetachPO> detachListById = getMangeDetachMapper().getDetachListById(ecManager);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(detachListById)) {
|
|
|
|
|
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById);
|
|
|
|
|
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById, param.getId());
|
|
|
|
|
noRepeatRoleLevels.addAll(Arrays.asList(noRepeatRoleLevel.split(",")));
|
|
|
|
|
noRepeatRoleLevel = StringUtils.join(noRepeatRoleLevels, ",");
|
|
|
|
|
List<Long> collect = detachListById.stream().map(ManagerDetachPO::getId).map(Long::valueOf).collect(Collectors.toList());
|
|
|
|
@ -149,7 +149,7 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|
|
|
|
// 判断有无重复数据
|
|
|
|
|
List<ManagerDetachPO> detachListById = getMangeDetachMapper().getDetachListById(ecManager);
|
|
|
|
|
if (CollectionUtils.isNotEmpty(detachListById)) {
|
|
|
|
|
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById);
|
|
|
|
|
Set<String> noRepeatRoleLevels = getNoRepeatRoleLevels(detachListById,param.getId());
|
|
|
|
|
noRepeatRoleLevels.addAll(Arrays.asList(noRepeatRoleLevel.split(",")));
|
|
|
|
|
noRepeatRoleLevel = StringUtils.join(noRepeatRoleLevels, ",");
|
|
|
|
|
List<Long> collect = detachListById.stream().map(ManagerDetachPO::getId).map(Long::valueOf).collect(Collectors.toList());
|
|
|
|
@ -226,11 +226,15 @@ public class ManagerDetachServiceImpl extends Service implements ManagerDetachSe
|
|
|
|
|
* 获得无重复角色级别
|
|
|
|
|
*
|
|
|
|
|
* @param detachList detachList
|
|
|
|
|
* @param id
|
|
|
|
|
* @return return
|
|
|
|
|
*/
|
|
|
|
|
private Set<String> getNoRepeatRoleLevels(List<ManagerDetachPO> detachList) {
|
|
|
|
|
private Set<String> getNoRepeatRoleLevels(List<ManagerDetachPO> detachList, Integer id) {
|
|
|
|
|
Set<String> ecRoleLevels = new HashSet<>();
|
|
|
|
|
for (ManagerDetachPO managerDetach : detachList) {
|
|
|
|
|
if (null != id && id.equals(managerDetach.getId())) {
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
Set<String> ids = Stream.of(managerDetach.getJclRolelevel().split(",")).collect(Collectors.toSet());
|
|
|
|
|
if (CollectionUtils.isNotEmpty(ids)) {
|
|
|
|
|
ecRoleLevels.addAll(ids);
|
|
|
|
|