|
|
@ -139,6 +139,8 @@ public class AppUsersServiceImpl extends ServiceImpl<AppUsersMapper, AppUsers> i |
|
|
|
|
|
|
|
|
ArrayList<Long> notAddressIds = new ArrayList<>(); |
|
|
ArrayList<Long> notAddressIds = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
List<AppletAddress> addressList = new ArrayList<>(); |
|
|
|
|
|
|
|
|
LambdaQueryChainWrapper<AppletAddress> addressQW = appletAddressService.lambdaQuery(); |
|
|
LambdaQueryChainWrapper<AppletAddress> addressQW = appletAddressService.lambdaQuery(); |
|
|
|
|
|
|
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
|
|
@ -189,7 +191,7 @@ public class AppUsersServiceImpl extends ServiceImpl<AppUsersMapper, AppUsers> i |
|
|
BigDecimal lngMax = orderLng.add(lngRange); |
|
|
BigDecimal lngMax = orderLng.add(lngRange); |
|
|
|
|
|
|
|
|
// 查询所有有效的地址,并且在15公里范围内 |
|
|
// 查询所有有效的地址,并且在15公里范围内 |
|
|
List<AppletAddress> addressList = appletAddressService.lambdaQuery() |
|
|
|
|
|
|
|
|
addressList = appletAddressService.lambdaQuery() |
|
|
.eq(AppletAddress::getStatus, "true") |
|
|
.eq(AppletAddress::getStatus, "true") |
|
|
.notIn(!notAddressIds.isEmpty(), AppletAddress::getId, notAddressIds) |
|
|
.notIn(!notAddressIds.isEmpty(), AppletAddress::getId, notAddressIds) |
|
|
.ge(AppletAddress::getLatitude, latMin.toString()) |
|
|
.ge(AppletAddress::getLatitude, latMin.toString()) |
|
|
@ -230,6 +232,7 @@ public class AppUsersServiceImpl extends ServiceImpl<AppUsersMapper, AppUsers> i |
|
|
qualifiedTechnicians = appUsersMapper.selectList( |
|
|
qualifiedTechnicians = appUsersMapper.selectList( |
|
|
Wrappers.<AppUsers>lambdaQuery() |
|
|
Wrappers.<AppUsers>lambdaQuery() |
|
|
.eq(ObjectUtils.isNotEmpty(filterVo.getCompanionLevel()),AppUsers::getUserBcsRole, filterVo.getCompanionLevel()) |
|
|
.eq(ObjectUtils.isNotEmpty(filterVo.getCompanionLevel()),AppUsers::getUserBcsRole, filterVo.getCompanionLevel()) |
|
|
|
|
|
.eq(AppUsers::getUserBcs, 1) |
|
|
// .and(ObjectUtils.isNotEmpty(filterVo.getCompanionLevel()), n -> { |
|
|
// .and(ObjectUtils.isNotEmpty(filterVo.getCompanionLevel()), n -> { |
|
|
// n.eq(AppUsers::getUserBcsRole, filterVo.getCompanionLevel()) |
|
|
// n.eq(AppUsers::getUserBcsRole, filterVo.getCompanionLevel()) |
|
|
// .or() |
|
|
// .or() |
|
|
@ -239,6 +242,14 @@ public class AppUsersServiceImpl extends ServiceImpl<AppUsersMapper, AppUsers> i |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
for (AppUsers users : qualifiedTechnicians) { |
|
|
|
|
|
|
|
|
|
|
|
List<AppletAddress> address = addressList.stream().filter(n -> n.getUserId().equals(users.getUserId())) |
|
|
|
|
|
.collect(Collectors.toList()); |
|
|
|
|
|
|
|
|
|
|
|
users.setAppletAddresseList(address); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
return qualifiedTechnicians; |
|
|
return qualifiedTechnicians; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|