Browse Source

feat(all): 修改开单时带不出干线路径价格问题

master
zhaoqiaobo 4 months ago
parent
commit
1ec97eb51b
  1. 31
      blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

31
blade-service/logpm-basicdata/src/main/java/com/logpm/basicdata/service/impl/BasicdataPriceServiceImpl.java

@ -463,6 +463,19 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
Map<Integer, List<BasicdataPriceGeneralEntity>> generalMap = new HashMap<>(); Map<Integer, List<BasicdataPriceGeneralEntity>> generalMap = new HashMap<>();
buildDetailMap(priceEntity, fullMap, basicMap, warehouseMap, dispatchMap, generalMap); buildDetailMap(priceEntity, fullMap, basicMap, warehouseMap, dispatchMap, generalMap);
String serviceType = templateEntity.getServiceType(); String serviceType = templateEntity.getServiceType();
LambdaQueryWrapper<BasicdataPriceRouteEntity> wrapper = 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())) {
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())) { if (StrUtil.contains(serviceType, ServiceTypeEnums.PICK_UP.getCode().toString())) {
// 提货不按区域计费 // 提货不按区域计费
@ -471,13 +484,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
priceClientVO.setPickup(initPickUp(priceEntity, templateEntity, fullMap.get(FullVehicleTypeEnums.PICK_UP.getCode()), basicMap.get(ServiceTypeEnums.PICK_UP.getCode()), generalMap.get(GeneralServiceTypeEnums.PICK_UP.getCode()))); priceClientVO.setPickup(initPickUp(priceEntity, templateEntity, fullMap.get(FullVehicleTypeEnums.PICK_UP.getCode()), basicMap.get(ServiceTypeEnums.PICK_UP.getCode()), generalMap.get(GeneralServiceTypeEnums.PICK_UP.getCode())));
} else { } else {
// 按区域计费,查询路径,返回价格 // 按区域计费,查询路径,返回价格
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(Wrappers.<BasicdataPriceRouteEntity>lambdaQuery() wrapper.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode());
.eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId()) List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(wrapper);
.eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId())
.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId())
.eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId())
.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.PICK_UP.getCode())
);
if (CollUtil.isNotEmpty(routeEntities)) { if (CollUtil.isNotEmpty(routeEntities)) {
PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId()); PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId());
PricePickupVO pickup = new PricePickupVO(); PricePickupVO pickup = new PricePickupVO();
@ -500,13 +508,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
basicMap.get(ServiceTypeEnums.TRUNK_LINE.getCode()), generalMap.get(GeneralServiceTypeEnums.TRUNK_LINE.getCode()))); basicMap.get(ServiceTypeEnums.TRUNK_LINE.getCode()), generalMap.get(GeneralServiceTypeEnums.TRUNK_LINE.getCode())));
} else { } else {
// 按区域计费,查询路径,返回价格 // 按区域计费,查询路径,返回价格
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(Wrappers.<BasicdataPriceRouteEntity>lambdaQuery() wrapper.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode());
.eq(BasicdataPriceRouteEntity::getPriceId, priceEntity.getId()) List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(wrapper);
.eq(BasicdataPriceRouteEntity::getSendOrgId, param.getSendOrgId())
.eq(BasicdataPriceRouteEntity::getStartCountyId, param.getStartCountyId())
.eq(BasicdataPriceRouteEntity::getEndCountyId, param.getEndCountyId())
.eq(BasicdataPriceRouteEntity::getServiceType, ServiceTypeEnums.TRUNK_LINE.getCode())
);
if (CollUtil.isNotEmpty(routeEntities)) { if (CollUtil.isNotEmpty(routeEntities)) {
PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId()); PriceRouteVO detail = basicdataPriceRouteService.detail(routeEntities.get(0).getId());
PriceTrunkLineVO trunkLineVO = new PriceTrunkLineVO(); PriceTrunkLineVO trunkLineVO = new PriceTrunkLineVO();

Loading…
Cancel
Save