|
|
|
@ -3061,12 +3061,12 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
if (ObjectUtil.isNotEmpty(param.getStartCountyId())) { |
|
|
|
|
wrapper.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId()); |
|
|
|
|
} else { |
|
|
|
|
wrapper.eq(BasicdataPriceRouteEntity::getStartCountyId, null); |
|
|
|
|
wrapper.isNull(BasicdataPriceRouteEntity::getStartCountyId); |
|
|
|
|
} |
|
|
|
|
if (ObjectUtil.isNotEmpty(param.getEndCountyId())) { |
|
|
|
|
wrapper.eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId()); |
|
|
|
|
} else { |
|
|
|
|
wrapper.eq(BasicdataPriceRouteEntity::getEndCountyId, null); |
|
|
|
|
wrapper.isNull(BasicdataPriceRouteEntity::getEndCountyId); |
|
|
|
|
} |
|
|
|
|
// 提货费
|
|
|
|
|
if (StrUtil.contains(serviceType, ServiceTypeEnums.PICK_UP.getCode().toString())) { |
|
|
|
@ -3078,6 +3078,24 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
// 按区域计费,查询路径,返回价格
|
|
|
|
|
wrapper.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.PICK_UP.getCode()); |
|
|
|
|
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(wrapper); |
|
|
|
|
// 如果到区没有查到价格,就到市
|
|
|
|
|
if (CollUtil.isEmpty(routeEntities) && ObjectUtil.isNotEmpty(param.getEndCountyId())) { |
|
|
|
|
LambdaQueryWrapper<BasicdataPriceRouteEntity> wrapper1= Wrappers.<BasicdataPriceRouteEntity>lambdaQuery() |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getStartProvinceId, param.getStartProvinceId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getStartCityId, param.getStartCityId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getEndProvinceId, param.getEndProvinceId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getEndCityId, param.getEndCityId()); |
|
|
|
|
if (ObjectUtil.isNotEmpty(param.getStartCountyId())) { |
|
|
|
|
wrapper1.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId()); |
|
|
|
|
} else { |
|
|
|
|
wrapper1.isNull(BasicdataPriceRouteEntity::getStartCountyId); |
|
|
|
|
} |
|
|
|
|
wrapper1.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.PICK_UP.getCode()); |
|
|
|
|
wrapper1.isNull(BasicdataPriceRouteEntity::getEndCountyId); |
|
|
|
|
routeEntities = basicdataPriceRouteService.list(wrapper1); |
|
|
|
|
} |
|
|
|
|
if (CollUtil.isNotEmpty(routeEntities)) { |
|
|
|
|
PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId()); |
|
|
|
|
PricePickupVO pickup = new PricePickupVO(); |
|
|
|
@ -3102,6 +3120,23 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
// 按区域计费,查询路径,返回价格
|
|
|
|
|
wrapper.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode()); |
|
|
|
|
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(wrapper); |
|
|
|
|
if (CollUtil.isEmpty(routeEntities) && ObjectUtil.isNotEmpty(param.getEndCountyId())) { |
|
|
|
|
LambdaQueryWrapper<BasicdataPriceRouteEntity> wrapper1= Wrappers.<BasicdataPriceRouteEntity>lambdaQuery() |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getStartProvinceId, param.getStartProvinceId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getStartCityId, param.getStartCityId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getEndProvinceId, param.getEndProvinceId()) |
|
|
|
|
.eq(BasicdataPriceRouteEntity::getEndCityId, param.getEndCityId()); |
|
|
|
|
if (ObjectUtil.isNotEmpty(param.getStartCountyId())) { |
|
|
|
|
wrapper1.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId()); |
|
|
|
|
} else { |
|
|
|
|
wrapper1.isNull(BasicdataPriceRouteEntity::getStartCountyId); |
|
|
|
|
} |
|
|
|
|
wrapper1.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode()); |
|
|
|
|
wrapper1.isNull(BasicdataPriceRouteEntity::getEndCountyId); |
|
|
|
|
routeEntities = basicdataPriceRouteService.list(wrapper1); |
|
|
|
|
} |
|
|
|
|
if (CollUtil.isNotEmpty(routeEntities)) { |
|
|
|
|
PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId()); |
|
|
|
|
PriceTrunkLineVO trunkLineVO = new PriceTrunkLineVO(); |
|
|
|
|