From 1ec97eb51ba98e05c96e63716f4c28181ee38905 Mon Sep 17 00:00:00 2001 From: zhaoqiaobo <583671871@qq.com> Date: Fri, 13 Sep 2024 11:32:27 +0800 Subject: [PATCH] =?UTF-8?q?feat(all):=20=E4=BF=AE=E6=94=B9=E5=BC=80?= =?UTF-8?q?=E5=8D=95=E6=97=B6=E5=B8=A6=E4=B8=8D=E5=87=BA=E5=B9=B2=E7=BA=BF?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=BB=B7=E6=A0=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/BasicdataPriceServiceImpl.java | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java index 59ba9d2a6..eef064488 100644 --- a/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java +++ b/blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java @@ -463,6 +463,19 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl> generalMap = new HashMap<>(); buildDetailMap(priceEntity, fullMap, basicMap, warehouseMap, dispatchMap, generalMap); String serviceType = templateEntity.getServiceType(); + LambdaQueryWrapper wrapper = Wrappers.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())) { + wrapper.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId()); + } + if (ObjectUtil.isNotEmpty(param.getEndCountyId())) { + wrapper.eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId()); + } // 提货费 if (StrUtil.contains(serviceType, ServiceTypeEnums.PICK_UP.getCode().toString())) { // 提货不按区域计费 @@ -471,13 +484,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl routeEntities = basicdataPriceRouteService.list(Wrappers.lambdaQuery() - .eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId()) - .eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId()) - .eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId()) - .eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId()) - .eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.PICK_UP.getCode()) - ); + wrapper.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode()); + List routeEntities = basicdataPriceRouteService.list(wrapper); if (CollUtil.isNotEmpty(routeEntities)) { PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId()); PricePickupVO pickup = new PricePickupVO(); @@ -500,13 +508,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl routeEntities = basicdataPriceRouteService.list(Wrappers.lambdaQuery() - .eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId()) - .eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId()) - .eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId()) - .eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId()) - .eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode()) - ); + wrapper.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode()); + List routeEntities = basicdataPriceRouteService.list(wrapper); if (CollUtil.isNotEmpty(routeEntities)) { PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId()); PriceTrunkLineVO trunkLineVO = new PriceTrunkLineVO();