|
|
|
|
@ -25,6 +25,8 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
|
import java.util.List; |
|
|
|
|
import java.util.Set; |
|
|
|
|
import java.util.stream.Collectors; |
|
|
|
|
|
|
|
|
|
@RequiredArgsConstructor |
|
|
|
|
@Service |
|
|
|
|
@ -47,17 +49,20 @@ public class RpcApplySuperviseService extends ServiceImpl<RpcApplySuperviseMappe
|
|
|
|
|
System.out.println(queryParam.getDepartId()); |
|
|
|
|
UserAuth user = UserContextHolder.getCurrentUser(); |
|
|
|
|
QueryWrapper<RpcApplySupervise> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
|
|
|
|
|
if (!AppConstants.USER_TYPE_SUPER.equals(user.getUserType())) { |
|
|
|
|
// Set<String> departIds = rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet());
|
|
|
|
|
List<String> orgIds = new ArrayList<>(); |
|
|
|
|
if(StrUtil.isNotBlank(user.getDepartId())){ |
|
|
|
|
orgIds.add(user.getDepartId()); |
|
|
|
|
List<RpcRightPerson> rightPeoples = rpcRightPersonService.list(user.getUserName()); |
|
|
|
|
if (rightPeoples.isEmpty()) { |
|
|
|
|
return new Page<RpcApplyVo>().setTotal(0).setRecords(new ArrayList<>()); |
|
|
|
|
} |
|
|
|
|
if(CollectionUtil.isNotEmpty(orgIds)){ |
|
|
|
|
log.info("'user-data--------'"+user.getDepartId()); |
|
|
|
|
orgIds.addAll(departService.getAllNodeIds(user.getAuthDepartIds())); |
|
|
|
|
// 是否是市局维权专干
|
|
|
|
|
if (rightPeoples.stream().noneMatch(item -> "1".equals(item.getCouncil()))) { |
|
|
|
|
Set<String> departIds = rightPeoples.stream().map(RpcRightPerson::getDepartId).collect(Collectors.toSet()); |
|
|
|
|
List<String> childrenIds = departService.getAllNodeIds(departIds); |
|
|
|
|
queryWrapper.in("a.handle_depart_id", childrenIds); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
//待处理维权
|
|
|
|
|
if("1".equals(queryParam.getActiveName())){ |
|
|
|
|
queryWrapper.eq("a.verified","0"); |
|
|
|
|
|