|
|
@@ -69,18 +69,23 @@ public class ServiceHallManagerImpl extends AbstractUserwManager implements Serv |
|
|
|
public Pagination query(ServiceHallPageRequestDTO reqDto) throws ServiceHandleException { |
|
|
|
ServiceHallPageRequest request = copyProperties(reqDto, new ServiceHallPageRequest()); |
|
|
|
String agencyId = findAgencyIdByToken(reqDto.getAccessToken()); |
|
|
|
if (hasText(reqDto.getAgencyName())) { |
|
|
|
//渠道迷糊查出id |
|
|
|
List<String> agencyIds = agencyRepo.listByName("%"+reqDto.getAgencyName()+"%"); |
|
|
|
request.setAgencyIds(agencyIds); |
|
|
|
} |
|
|
|
if (!QTZL_AGENCY_ID.equals(agencyId)){ |
|
|
|
//非黔通员工,只能看自己渠道网点 |
|
|
|
List<String> agencyIds = new ArrayList<>(); |
|
|
|
agencyIds.add(agencyId); |
|
|
|
request.setAgencyIds(agencyIds); |
|
|
|
} |
|
|
|
Pagination page = serviceHallRepo.page(request); |
|
|
|
if (hasText(reqDto.getAgencyName())) { |
|
|
|
//渠道迷糊查出id |
|
|
|
List<String> agencyIds = agencyRepo.listByName("%"+reqDto.getAgencyName()+"%"); |
|
|
|
if (hasText(reqDto.getAgencyId())){ |
|
|
|
List<String> agencyIds = new ArrayList<>(); |
|
|
|
agencyIds.add(reqDto.getAgencyId()); |
|
|
|
request.setAgencyIds(agencyIds); |
|
|
|
} |
|
|
|
Pagination page = serviceHallRepo.page(request); |
|
|
|
// 提取并去重上级网点编号 |
|
|
|
List<String> superIds = page.getResult(QtkServiceHall.class).stream().map(QtkServiceHall::getSuperServiceHallId) |
|
|
|
.distinct().collect(Collectors.toList()); |