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 42235b22f..4e463b418 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 @@ -21,6 +21,7 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.convert.Convert; import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateUtil; +import cn.hutool.core.text.CharSequenceUtil; import cn.hutool.core.util.NumberUtil; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; @@ -1541,12 +1542,14 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl { Integer type = item.getType(); - List collect = fullMap.get(type); - if (ObjectUtil.isEmpty(collect)) { - collect = new ArrayList<>(); + if (ObjectUtil.isNotNull(fullMap)) { + List collect = fullMap.get(type); + if (ObjectUtil.isEmpty(collect)) { + collect = new ArrayList<>(); + } + collect.add(item); + fullMap.put(type, collect); } - collect.add(item); - fullMap.put(type, collect); }); } // 获取品类数据 @@ -1630,97 +1633,99 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl basicVOList = new ArrayList<>(); - fullVehicleEntities.forEach(item -> { - BasicdataPriceFullVehicleVO basicVO = new BasicdataPriceFullVehicleVO(); - BeanUtil.copyProperties(item, basicVO); - basicVOList.add(basicVO); - }); - priceDispatchVO.setFullVehicle(basicVOList); - } - } - // 按件 - if (dispatchPricingType.contains(DispatchPricingTypeEnums.PIECE.getCode().toString())) { - List basicVOList = new ArrayList<>(); - List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.PIECE.getCode()); - if (CollUtil.isNotEmpty(basicEntities)) { - basicEntities.forEach(item -> { - PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); - BeanUtil.copyProperties(item, basicVO); - basicVOList.add(basicVO); - }); - } - priceDispatchVO.setPieceCategory(basicVOList); - } - // 按重量 - if (dispatchPricingType.contains(DispatchPricingTypeEnums.WEIGHT.getCode().toString())) { - List basicVOList = new ArrayList<>(); - List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.WEIGHT.getCode()); - if (CollUtil.isNotEmpty(basicEntities)) { - basicEntities.forEach(item -> { - PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); - BeanUtil.copyProperties(item, basicVO); - basicVOList.add(basicVO); - }); - } - priceDispatchVO.setWeightCategory(basicVOList); - } - // 按方 - if (dispatchPricingType.contains(DispatchPricingTypeEnums.CUBE.getCode().toString())) { - List basicVOList = new ArrayList<>(); - List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.CUBE.getCode()); - if (CollUtil.isNotEmpty(basicEntities)) { - basicEntities.forEach(item -> { - PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); - BeanUtil.copyProperties(item, basicVO); - basicVOList.add(basicVO); - }); - } - priceDispatchVO.setCubeCategory(basicVOList); - } - // 按公里 - if (dispatchPricingType.contains(DispatchPricingTypeEnums.KILOMETER.getCode().toString())) { - List basicVOList = new ArrayList<>(); - List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.KILOMETER.getCode()); - if (CollUtil.isNotEmpty(basicEntities)) { - basicEntities.forEach(item -> { - PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); - BeanUtil.copyProperties(item, basicVO); - basicVOList.add(basicVO); - }); - } - priceDispatchVO.setKilometerCost(basicVOList); - } - // 按吨 - if (dispatchPricingType.contains(DispatchPricingTypeEnums.TON.getCode().toString())) { - List basicVOList = new ArrayList<>(); - List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.TON.getCode()); - if (CollUtil.isNotEmpty(basicEntities)) { - basicEntities.forEach(item -> { - PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); - BeanUtil.copyProperties(item, basicVO); - basicVOList.add(basicVO); - }); - } - priceDispatchVO.setTonCost(basicVOList); - } - //按吨公里 - if (dispatchPricingType.contains(DispatchPricingTypeEnums.TON_PER_KILOMETER.getCode().toString())) { - List basicVOList = new ArrayList<>(); - List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.TON_PER_KILOMETER.getCode()); - if (CollUtil.isNotEmpty(basicEntities)) { - basicEntities.forEach(item -> { - PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); - BeanUtil.copyProperties(item, basicVO); - basicVOList.add(basicVO); - }); + if (ObjectUtil.isNotEmpty(dispatchPricingType)) { + //整车 + if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { + if (CollUtil.isNotEmpty(fullVehicleEntities)) { + List basicVOList = new ArrayList<>(); + fullVehicleEntities.forEach(item -> { + BasicdataPriceFullVehicleVO basicVO = new BasicdataPriceFullVehicleVO(); + BeanUtil.copyProperties(item, basicVO); + basicVOList.add(basicVO); + }); + priceDispatchVO.setFullVehicle(basicVOList); + } + } + // 按件 + if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.PIECE.getCode().toString())) { + List basicVOList = new ArrayList<>(); + List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.PIECE.getCode()); + if (CollUtil.isNotEmpty(basicEntities)) { + basicEntities.forEach(item -> { + PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); + BeanUtil.copyProperties(item, basicVO); + basicVOList.add(basicVO); + }); + } + priceDispatchVO.setPieceCategory(basicVOList); + } + // 按重量 + if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.WEIGHT.getCode().toString())) { + List basicVOList = new ArrayList<>(); + List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.WEIGHT.getCode()); + if (CollUtil.isNotEmpty(basicEntities)) { + basicEntities.forEach(item -> { + PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); + BeanUtil.copyProperties(item, basicVO); + basicVOList.add(basicVO); + }); + } + priceDispatchVO.setWeightCategory(basicVOList); + } + // 按方 + if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.CUBE.getCode().toString())) { + List basicVOList = new ArrayList<>(); + List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.CUBE.getCode()); + if (CollUtil.isNotEmpty(basicEntities)) { + basicEntities.forEach(item -> { + PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); + BeanUtil.copyProperties(item, basicVO); + basicVOList.add(basicVO); + }); + } + priceDispatchVO.setCubeCategory(basicVOList); + } + // 按公里 + if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.KILOMETER.getCode().toString())) { + List basicVOList = new ArrayList<>(); + List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.KILOMETER.getCode()); + if (CollUtil.isNotEmpty(basicEntities)) { + basicEntities.forEach(item -> { + PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); + BeanUtil.copyProperties(item, basicVO); + basicVOList.add(basicVO); + }); + } + priceDispatchVO.setKilometerCost(basicVOList); + } + // 按吨 + if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.TON.getCode().toString())) { + List basicVOList = new ArrayList<>(); + List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.TON.getCode()); + if (CollUtil.isNotEmpty(basicEntities)) { + basicEntities.forEach(item -> { + PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); + BeanUtil.copyProperties(item, basicVO); + basicVOList.add(basicVO); + }); + } + priceDispatchVO.setTonCost(basicVOList); + } + //按吨公里 + if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.TON_PER_KILOMETER.getCode().toString())) { + List basicVOList = new ArrayList<>(); + List basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.TON_PER_KILOMETER.getCode()); + if (CollUtil.isNotEmpty(basicEntities)) { + basicEntities.forEach(item -> { + PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); + BeanUtil.copyProperties(item, basicVO); + basicVOList.add(basicVO); + }); + } + priceDispatchVO.setTonKilometerCost(basicVOList); } - priceDispatchVO.setTonKilometerCost(basicVOList); } + //附加费 List dispatchEntities1 = dispatchMap.get(CostTypeEnums.ADD.getCode()); if (CollUtil.isNotEmpty(dispatchEntities1)) { @@ -1748,9 +1753,11 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl warehouseEntities1 = categoryBasicMap.get(WarehousePricingTypeEnums.PIECE.getCode()); - if (CollUtil.isNotEmpty(warehouseEntities1)) { - List basicVOS = warehouseEntities1.stream().map(item -> { - PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); - BeanUtil.copyProperties(item, basicVO); - return basicVO; - }).collect(Collectors.toList()); - priceWarehouseVO.setCatergory(basicVOS); - } - } else if (warehousePricingType.equals(WarehousePricingTypeEnums.CUBE.getCode())) { - List warehouseEntities2 = categoryBasicMap.get(WarehousePricingTypeEnums.CUBE.getCode()); - if (CollUtil.isNotEmpty(warehouseEntities2)) { - List basicVOS = warehouseEntities2.stream().map(item -> { - PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); - BeanUtil.copyProperties(item, basicVO); - return basicVO; - }).collect(Collectors.toList()); - priceWarehouseVO.setCatergory(basicVOS); - } - } else if (warehousePricingType.equals(WarehousePricingTypeEnums.WEIGHT.getCode())) { - List warehouseEntities3 = categoryBasicMap.get(WarehousePricingTypeEnums.WEIGHT.getCode()); - if (CollUtil.isNotEmpty(warehouseEntities3)) { - List basicVOS = warehouseEntities3.stream().map(item -> { - PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); - BeanUtil.copyProperties(item, basicVO); - return basicVO; - }).collect(Collectors.toList()); - priceWarehouseVO.setCatergory(basicVOS); - } - } else if (warehousePricingType.equals(WarehousePricingTypeEnums.TONNE.getCode())) { - List warehouseEntities4 = categoryBasicMap.get(WarehousePricingTypeEnums.TONNE.getCode()); - if (CollUtil.isNotEmpty(warehouseEntities4)) { - List basicVOS = warehouseEntities4.stream().map(item -> { - PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); - BeanUtil.copyProperties(item, basicVO); - return basicVO; - }).collect(Collectors.toList()); - priceWarehouseVO.setCatergory(basicVOS); + if (ObjectUtil.isNotEmpty(warehousePricingType)) { + // 按件 + if (ObjectUtil.equal(warehousePricingType, WarehousePricingTypeEnums.PIECE.getCode())) { + List warehouseEntities1 = categoryBasicMap.get(WarehousePricingTypeEnums.PIECE.getCode()); + if (CollUtil.isNotEmpty(warehouseEntities1)) { + List basicVOS = warehouseEntities1.stream().map(item -> { + PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); + BeanUtil.copyProperties(item, basicVO); + return basicVO; + }).collect(Collectors.toList()); + priceWarehouseVO.setCatergory(basicVOS); + } + } else if (ObjectUtil.equal(warehousePricingType, WarehousePricingTypeEnums.CUBE.getCode())) { + List warehouseEntities2 = categoryBasicMap.get(WarehousePricingTypeEnums.CUBE.getCode()); + if (CollUtil.isNotEmpty(warehouseEntities2)) { + List basicVOS = warehouseEntities2.stream().map(item -> { + PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); + BeanUtil.copyProperties(item, basicVO); + return basicVO; + }).collect(Collectors.toList()); + priceWarehouseVO.setCatergory(basicVOS); + } + } else if (ObjectUtil.equal(warehousePricingType, WarehousePricingTypeEnums.WEIGHT.getCode())) { + List warehouseEntities3 = categoryBasicMap.get(WarehousePricingTypeEnums.WEIGHT.getCode()); + if (CollUtil.isNotEmpty(warehouseEntities3)) { + List basicVOS = warehouseEntities3.stream().map(item -> { + PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); + BeanUtil.copyProperties(item, basicVO); + return basicVO; + }).collect(Collectors.toList()); + priceWarehouseVO.setCatergory(basicVOS); + } + } else if (ObjectUtil.equal(warehousePricingType, WarehousePricingTypeEnums.TONNE.getCode())) { + List warehouseEntities4 = categoryBasicMap.get(WarehousePricingTypeEnums.TONNE.getCode()); + if (CollUtil.isNotEmpty(warehouseEntities4)) { + List basicVOS = warehouseEntities4.stream().map(item -> { + PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); + BeanUtil.copyProperties(item, basicVO); + return basicVO; + }).collect(Collectors.toList()); + priceWarehouseVO.setCatergory(basicVOS); + } } } + // 附加费 List warehouseEntities1 = warehouseMap.get(CostTypeEnums.ADD.getCode()); if (CollUtil.isNotEmpty(warehouseEntities1)) { @@ -1832,50 +1842,52 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl fullVehicleVOS = fullVehicleEntities.stream().map(item -> { - BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); - BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); - return basicdataPriceFullVehicleVO; - }).collect(Collectors.toList()); - priceTrunkLineVO.setFullVehicle(fullVehicleVOS); - } - } - // 设置按件 - if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.PIECE.getCode().toString())) { - List categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.PIECE.getCode()); - if (CollUtil.isNotEmpty(categoryBasicEntityList)) { - List pieceCategoryVOS = categoryBasicEntityList.stream().map(item -> { - PriceBasicVO priceBasicVO = new PriceBasicVO(); - BeanUtil.copyProperties(item, priceBasicVO); - return priceBasicVO; - }).collect(Collectors.toList()); - priceTrunkLineVO.setPieceCategory(pieceCategoryVOS); - } - } - // 设置按方 - if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.CUBE.getCode().toString())) { - List categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.CUBE.getCode()); - if (CollUtil.isNotEmpty(categoryBasicEntityList)) { - List cubeCategoryVOS = categoryBasicEntityList.stream().map(item -> { - PriceBasicVO priceBasicVO = new PriceBasicVO(); - BeanUtil.copyProperties(item, priceBasicVO); - return priceBasicVO; - }).collect(Collectors.toList()); - priceTrunkLineVO.setCubeCategory(cubeCategoryVOS); - } - } - // 设置重量 - if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.WEIGHT.getCode().toString())) { - List categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.WEIGHT.getCode()); - if (CollUtil.isNotEmpty(categoryBasicEntityList)) { - List weightCategoryVOS = categoryBasicEntityList.stream().map(item -> { - PriceBasicVO priceBasicVO = new PriceBasicVO(); - BeanUtil.copyProperties(item, priceBasicVO); - return priceBasicVO; - }).collect(Collectors.toList()); - priceTrunkLineVO.setWeightCategory(weightCategoryVOS); + if (StrUtil.isNotEmpty(trunklinePricingType)) { + if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { + if (CollUtil.isNotEmpty(fullVehicleEntities)) { + List fullVehicleVOS = fullVehicleEntities.stream().map(item -> { + BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); + BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); + return basicdataPriceFullVehicleVO; + }).collect(Collectors.toList()); + priceTrunkLineVO.setFullVehicle(fullVehicleVOS); + } + } + // 设置按件 + if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.PIECE.getCode().toString())) { + List categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.PIECE.getCode()); + if (CollUtil.isNotEmpty(categoryBasicEntityList)) { + List pieceCategoryVOS = categoryBasicEntityList.stream().map(item -> { + PriceBasicVO priceBasicVO = new PriceBasicVO(); + BeanUtil.copyProperties(item, priceBasicVO); + return priceBasicVO; + }).collect(Collectors.toList()); + priceTrunkLineVO.setPieceCategory(pieceCategoryVOS); + } + } + // 设置按方 + if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.CUBE.getCode().toString())) { + List categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.CUBE.getCode()); + if (CollUtil.isNotEmpty(categoryBasicEntityList)) { + List cubeCategoryVOS = categoryBasicEntityList.stream().map(item -> { + PriceBasicVO priceBasicVO = new PriceBasicVO(); + BeanUtil.copyProperties(item, priceBasicVO); + return priceBasicVO; + }).collect(Collectors.toList()); + priceTrunkLineVO.setCubeCategory(cubeCategoryVOS); + } + } + // 设置重量 + if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.WEIGHT.getCode().toString())) { + List categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.WEIGHT.getCode()); + if (CollUtil.isNotEmpty(categoryBasicEntityList)) { + List weightCategoryVOS = categoryBasicEntityList.stream().map(item -> { + PriceBasicVO priceBasicVO = new PriceBasicVO(); + BeanUtil.copyProperties(item, priceBasicVO); + return priceBasicVO; + }).collect(Collectors.toList()); + priceTrunkLineVO.setWeightCategory(weightCategoryVOS); + } } } Integer pickupIsMinCost = templateEntity.getPickupIsMinCost(); @@ -1900,50 +1912,52 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl fullVehicleVOS = fullVehicleEntities.stream().map(item -> { - BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); - BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); - return basicdataPriceFullVehicleVO; - }).collect(Collectors.toList()); - pricePickupVO.setFullVehicle(fullVehicleVOS); - } - } - // 按件 - if (pickupPricingType.contains(PickupPricingTypeEnums.PIECE.getCode().toString())) { - List categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.PIECE.getCode()); - if (CollUtil.isNotEmpty(categoryBasicEntityList)) { - List basicVOS = categoryBasicEntities.stream().map(item -> { - PriceBasicVO basicVO = new PriceBasicVO(); - BeanUtil.copyProperties(item, basicVO); - return basicVO; - }).collect(Collectors.toList()); - pricePickupVO.setPieceCategory(basicVOS); - } - } - // 按方 - if (pickupPricingType.contains(PickupPricingTypeEnums.CUBE.getCode().toString())) { - List categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.CUBE.getCode()); - if (CollUtil.isNotEmpty(categoryBasicEntityList)) { - List basicVOS = categoryBasicEntityList.stream().map(item -> { - PriceBasicVO basicVO = new PriceBasicVO(); - BeanUtil.copyProperties(item, basicVO); - return basicVO; - }).collect(Collectors.toList()); - pricePickupVO.setCubeCategory(basicVOS); - } - } - // 按重量 - if (pickupPricingType.contains(PickupPricingTypeEnums.WEIGHT.getCode().toString())) { - List categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.WEIGHT.getCode()); - if (CollUtil.isNotEmpty(categoryBasicEntityList)) { - List basicVOS = categoryBasicEntityList.stream().map(item -> { - PriceBasicVO basicVO = new PriceBasicVO(); - BeanUtil.copyProperties(item, basicVO); - return basicVO; - }).collect(Collectors.toList()); - pricePickupVO.setWeightCategory(basicVOS); + if (StrUtil.isNotEmpty(pickupPricingType)) { + if (pickupPricingType.contains(PickupPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { + if (CollUtil.isNotEmpty(fullVehicleEntities)) { + List fullVehicleVOS = fullVehicleEntities.stream().map(item -> { + BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); + BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); + return basicdataPriceFullVehicleVO; + }).collect(Collectors.toList()); + pricePickupVO.setFullVehicle(fullVehicleVOS); + } + } + // 按件 + if (pickupPricingType.contains(PickupPricingTypeEnums.PIECE.getCode().toString())) { + List categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.PIECE.getCode()); + if (CollUtil.isNotEmpty(categoryBasicEntityList)) { + List basicVOS = categoryBasicEntities.stream().map(item -> { + PriceBasicVO basicVO = new PriceBasicVO(); + BeanUtil.copyProperties(item, basicVO); + return basicVO; + }).collect(Collectors.toList()); + pricePickupVO.setPieceCategory(basicVOS); + } + } + // 按方 + if (pickupPricingType.contains(PickupPricingTypeEnums.CUBE.getCode().toString())) { + List categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.CUBE.getCode()); + if (CollUtil.isNotEmpty(categoryBasicEntityList)) { + List basicVOS = categoryBasicEntityList.stream().map(item -> { + PriceBasicVO basicVO = new PriceBasicVO(); + BeanUtil.copyProperties(item, basicVO); + return basicVO; + }).collect(Collectors.toList()); + pricePickupVO.setCubeCategory(basicVOS); + } + } + // 按重量 + if (pickupPricingType.contains(PickupPricingTypeEnums.WEIGHT.getCode().toString())) { + List categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.WEIGHT.getCode()); + if (CollUtil.isNotEmpty(categoryBasicEntityList)) { + List basicVOS = categoryBasicEntityList.stream().map(item -> { + PriceBasicVO basicVO = new PriceBasicVO(); + BeanUtil.copyProperties(item, basicVO); + return basicVO; + }).collect(Collectors.toList()); + pricePickupVO.setWeightCategory(basicVOS); + } } } Integer pickupIsMinCost = templateEntity.getPickupIsMinCost();