|
|
|
@ -307,8 +307,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
if (StrUtil.contains(serviceType, ServiceTypeEnums.PICK_UP.getCode().toString())) { |
|
|
|
|
// 提货不按区域计费
|
|
|
|
|
Integer pickupIsUnifyAreaBill = templateEntity.getPickupIsUnifyAreaBill(); |
|
|
|
|
if (ObjectUtil.equal(pickupIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode())) { |
|
|
|
|
priceClientVO.setPickup(initPickUp(priceEntity, templateEntity, fullMap.get(1), basicMap.get(1), generalMap.get(1))); |
|
|
|
|
if (ObjectUtil.equal(pickupIsUnifyAreaBill, BooleanZeroOneEnums.YES.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 { |
|
|
|
|
// 按区域计费,查询路径,返回价格
|
|
|
|
|
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(Wrappers.<BasicdataPriceRouteEntity>lambdaQuery() |
|
|
|
@ -336,7 +336,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
Integer trunklineIsUnifyAreaBill = templateEntity.getTrunklineIsUnifyAreaBill(); |
|
|
|
|
// 干线不按区域计费
|
|
|
|
|
if (ObjectUtil.equal(trunklineIsUnifyAreaBill, BooleanZeroOneEnums.NO.getCode())) { |
|
|
|
|
priceClientVO.setTrunkLine(initTrunkLine(priceEntity, templateEntity, fullMap.get(2), basicMap.get(3), generalMap.get(3))); |
|
|
|
|
priceClientVO.setTrunkLine(initTrunkLine(priceEntity, templateEntity, fullMap.get(FullVehicleTypeEnums.TRUNK_LINE.getCode()), |
|
|
|
|
basicMap.get(ServiceTypeEnums.TRUNK_LINE.getCode()), generalMap.get(GeneralServiceTypeEnums.TRUNK_LINE.getCode()))); |
|
|
|
|
} else { |
|
|
|
|
// 按区域计费,查询路径,返回价格
|
|
|
|
|
List<BasicdataPriceRouteEntity> routeEntities = basicdataPriceRouteService.list(Wrappers.<BasicdataPriceRouteEntity>lambdaQuery() |
|
|
|
@ -365,7 +366,8 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
} |
|
|
|
|
// 配送费
|
|
|
|
|
if (StrUtil.contains(serviceType, ServiceTypeEnums.DISPATCH.getCode().toString())) { |
|
|
|
|
priceClientVO.setDispatch(initDispatch(priceEntity, templateEntity, fullMap.get(3), dispatchMap, generalMap.get(5), generalMap.get(6))); |
|
|
|
|
priceClientVO.setDispatch(initDispatch(priceEntity, templateEntity, fullMap.get(FullVehicleTypeEnums.DISPATCH.getCode()), |
|
|
|
|
dispatchMap, generalMap.get(GeneralServiceTypeEnums.DISPATCH.getCode()), generalMap.get(GeneralServiceTypeEnums.DISPATCH_LEAVE_BEHIND.getCode()))); |
|
|
|
|
} |
|
|
|
|
priceClientVO.setTemplate(templateEntity); |
|
|
|
|
return priceClientVO; |
|
|
|
@ -455,7 +457,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
String dispatchPricingType = templateEntity.getDispatchPricingType(); |
|
|
|
|
//品类
|
|
|
|
|
Map<Integer, List<BasicdataPriceCategoryDispatchEntity>> categoryBasicMap = new HashMap<>(); |
|
|
|
|
List<BasicdataPriceCategoryDispatchEntity> dispatchEntities = dispatchMap.get(1); |
|
|
|
|
List<BasicdataPriceCategoryDispatchEntity> dispatchEntities = dispatchMap.get(CostTypeEnums.NOMAL.getCode()); |
|
|
|
|
if (CollUtil.isNotEmpty(dispatchEntities)) { |
|
|
|
|
// 将数据放到categoryBasicMap中
|
|
|
|
|
dispatchEntities.forEach(item -> { |
|
|
|
@ -560,7 +562,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
priceDispatchVO.setTonKilometerCost(basicVOList); |
|
|
|
|
} |
|
|
|
|
//附加费
|
|
|
|
|
List<BasicdataPriceCategoryDispatchEntity> dispatchEntities1 = dispatchMap.get(2); |
|
|
|
|
List<BasicdataPriceCategoryDispatchEntity> dispatchEntities1 = dispatchMap.get(CostTypeEnums.ADD.getCode()); |
|
|
|
|
if (CollUtil.isNotEmpty(dispatchEntities1)) { |
|
|
|
|
List<PriceDispatchAdditionalVO> basicVOList = new ArrayList<>(); |
|
|
|
|
dispatchEntities1.forEach(item -> { |
|
|
|
@ -592,7 +594,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
PriceWarehouseVO priceWarehouseVO = new PriceWarehouseVO(); |
|
|
|
|
Integer warehousePricingType = templateEntity.getWarehousePricingType(); |
|
|
|
|
Map<Integer, List<BasicdataPriceCategoryWarehouseEntity>> categoryBasicMap = new HashMap<>(); |
|
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities = warehouseMap.get(1); |
|
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities = warehouseMap.get(CostTypeEnums.NOMAL.getCode()); |
|
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities)) { |
|
|
|
|
warehouseEntities.forEach(item -> { |
|
|
|
|
Integer type = item.getType(); |
|
|
|
@ -647,7 +649,7 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// 附加费
|
|
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities1 = warehouseMap.get(2); |
|
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities1 = warehouseMap.get(CostTypeEnums.ADD.getCode()); |
|
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities1)) { |
|
|
|
|
List<PriceWarehouseAdditionalVO> additionalVOS = warehouseEntities1.stream().map(item -> { |
|
|
|
|
PriceWarehouseAdditionalVO additionalVO = new PriceWarehouseAdditionalVO(); |
|
|
|
|