|
|
@ -21,6 +21,7 @@ import cn.hutool.core.collection.CollUtil; |
|
|
|
import cn.hutool.core.convert.Convert; |
|
|
|
import cn.hutool.core.convert.Convert; |
|
|
|
import cn.hutool.core.date.DateTime; |
|
|
|
import cn.hutool.core.date.DateTime; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
import cn.hutool.core.date.DateUtil; |
|
|
|
|
|
|
|
import cn.hutool.core.text.CharSequenceUtil; |
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
import cn.hutool.core.util.NumberUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
|
import cn.hutool.core.util.StrUtil; |
|
|
@ -1541,12 +1542,14 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
// 按类型分组放到fullMap中
|
|
|
|
// 按类型分组放到fullMap中
|
|
|
|
list.forEach(item -> { |
|
|
|
list.forEach(item -> { |
|
|
|
Integer type = item.getType(); |
|
|
|
Integer type = item.getType(); |
|
|
|
List<BasicdataPriceFullVehicleEntity> collect = fullMap.get(type); |
|
|
|
if (ObjectUtil.isNotNull(fullMap)) { |
|
|
|
if (ObjectUtil.isEmpty(collect)) { |
|
|
|
List<BasicdataPriceFullVehicleEntity> collect = fullMap.get(type); |
|
|
|
collect = new ArrayList<>(); |
|
|
|
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<BasicdataPriceMap |
|
|
|
categoryBasicMap.put(type, collect); |
|
|
|
categoryBasicMap.put(type, collect); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(dispatchPricingType)) { |
|
|
|
//整车
|
|
|
|
//整车
|
|
|
|
if (dispatchPricingType.contains(DispatchPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
if (CollUtil.isNotEmpty(fullVehicleEntities)) { |
|
|
|
if (CollUtil.isNotEmpty(fullVehicleEntities)) { |
|
|
|
List<BasicdataPriceFullVehicleVO> basicVOList = new ArrayList<>(); |
|
|
|
List<BasicdataPriceFullVehicleVO> basicVOList = new ArrayList<>(); |
|
|
|
fullVehicleEntities.forEach(item -> { |
|
|
|
fullVehicleEntities.forEach(item -> { |
|
|
|
BasicdataPriceFullVehicleVO basicVO = new BasicdataPriceFullVehicleVO(); |
|
|
|
BasicdataPriceFullVehicleVO basicVO = new BasicdataPriceFullVehicleVO(); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
priceDispatchVO.setFullVehicle(basicVOList); |
|
|
|
priceDispatchVO.setFullVehicle(basicVOList); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 按件
|
|
|
|
// 按件
|
|
|
|
if (dispatchPricingType.contains(DispatchPricingTypeEnums.PIECE.getCode().toString())) { |
|
|
|
if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.PIECE.getCode().toString())) { |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.PIECE.getCode()); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.PIECE.getCode()); |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
priceDispatchVO.setPieceCategory(basicVOList); |
|
|
|
priceDispatchVO.setPieceCategory(basicVOList); |
|
|
|
} |
|
|
|
} |
|
|
|
// 按重量
|
|
|
|
// 按重量
|
|
|
|
if (dispatchPricingType.contains(DispatchPricingTypeEnums.WEIGHT.getCode().toString())) { |
|
|
|
if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.WEIGHT.getCode().toString())) { |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.WEIGHT.getCode()); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.WEIGHT.getCode()); |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
priceDispatchVO.setWeightCategory(basicVOList); |
|
|
|
priceDispatchVO.setWeightCategory(basicVOList); |
|
|
|
} |
|
|
|
} |
|
|
|
// 按方
|
|
|
|
// 按方
|
|
|
|
if (dispatchPricingType.contains(DispatchPricingTypeEnums.CUBE.getCode().toString())) { |
|
|
|
if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.CUBE.getCode().toString())) { |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.CUBE.getCode()); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.CUBE.getCode()); |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
priceDispatchVO.setCubeCategory(basicVOList); |
|
|
|
priceDispatchVO.setCubeCategory(basicVOList); |
|
|
|
} |
|
|
|
} |
|
|
|
// 按公里
|
|
|
|
// 按公里
|
|
|
|
if (dispatchPricingType.contains(DispatchPricingTypeEnums.KILOMETER.getCode().toString())) { |
|
|
|
if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.KILOMETER.getCode().toString())) { |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.KILOMETER.getCode()); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.KILOMETER.getCode()); |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
priceDispatchVO.setKilometerCost(basicVOList); |
|
|
|
priceDispatchVO.setKilometerCost(basicVOList); |
|
|
|
} |
|
|
|
} |
|
|
|
// 按吨
|
|
|
|
// 按吨
|
|
|
|
if (dispatchPricingType.contains(DispatchPricingTypeEnums.TON.getCode().toString())) { |
|
|
|
if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.TON.getCode().toString())) { |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.TON.getCode()); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.TON.getCode()); |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
priceDispatchVO.setTonCost(basicVOList); |
|
|
|
priceDispatchVO.setTonCost(basicVOList); |
|
|
|
} |
|
|
|
} |
|
|
|
//按吨公里
|
|
|
|
//按吨公里
|
|
|
|
if (dispatchPricingType.contains(DispatchPricingTypeEnums.TON_PER_KILOMETER.getCode().toString())) { |
|
|
|
if (ObjectUtil.contains(dispatchPricingType, DispatchPricingTypeEnums.TON_PER_KILOMETER.getCode().toString())) { |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<PriceDispatchBasicVO> basicVOList = new ArrayList<>(); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.TON_PER_KILOMETER.getCode()); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> basicEntities = categoryBasicMap.get(DispatchPricingTypeEnums.TON_PER_KILOMETER.getCode()); |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
if (CollUtil.isNotEmpty(basicEntities)) { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
basicEntities.forEach(item -> { |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
PriceDispatchBasicVO basicVO = new PriceDispatchBasicVO(); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
basicVOList.add(basicVO); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
priceDispatchVO.setTonKilometerCost(basicVOList); |
|
|
|
} |
|
|
|
} |
|
|
|
priceDispatchVO.setTonKilometerCost(basicVOList); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//附加费
|
|
|
|
//附加费
|
|
|
|
List<BasicdataPriceCategoryDispatchEntity> dispatchEntities1 = dispatchMap.get(CostTypeEnums.ADD.getCode()); |
|
|
|
List<BasicdataPriceCategoryDispatchEntity> dispatchEntities1 = dispatchMap.get(CostTypeEnums.ADD.getCode()); |
|
|
|
if (CollUtil.isNotEmpty(dispatchEntities1)) { |
|
|
|
if (CollUtil.isNotEmpty(dispatchEntities1)) { |
|
|
@ -1748,9 +1753,11 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 设置基础费用
|
|
|
|
// 设置基础费用
|
|
|
|
priceDispatchVO.setDispatchUpwardJudgment(priceEntity.getDispatchUpwardJudgment()); |
|
|
|
if (ObjectUtil.isNotEmpty(priceEntity)) { |
|
|
|
priceDispatchVO.setDispatchUpwardJudgmentCost(priceEntity.getDispatchUpwardJudgmentCost()); |
|
|
|
priceDispatchVO.setDispatchUpwardJudgment(priceEntity.getDispatchUpwardJudgment()); |
|
|
|
priceDispatchVO.setDispatchStairsCarryingCharge(priceEntity.getDispatchStairsCarryingCharge()); |
|
|
|
priceDispatchVO.setDispatchUpwardJudgmentCost(priceEntity.getDispatchUpwardJudgmentCost()); |
|
|
|
|
|
|
|
priceDispatchVO.setDispatchStairsCarryingCharge(priceEntity.getDispatchStairsCarryingCharge()); |
|
|
|
|
|
|
|
} |
|
|
|
return priceDispatchVO; |
|
|
|
return priceDispatchVO; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1770,48 +1777,51 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
categoryBasicMap.put(type, collect); |
|
|
|
categoryBasicMap.put(type, collect); |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
// 按件
|
|
|
|
if (ObjectUtil.isNotEmpty(warehousePricingType)) { |
|
|
|
if (warehousePricingType.equals(WarehousePricingTypeEnums.PIECE.getCode())) { |
|
|
|
// 按件
|
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities1 = categoryBasicMap.get(WarehousePricingTypeEnums.PIECE.getCode()); |
|
|
|
if (ObjectUtil.equal(warehousePricingType, WarehousePricingTypeEnums.PIECE.getCode())) { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities1)) { |
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities1 = categoryBasicMap.get(WarehousePricingTypeEnums.PIECE.getCode()); |
|
|
|
List<PriceWarehouseBasicVO> basicVOS = warehouseEntities1.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities1)) { |
|
|
|
PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); |
|
|
|
List<PriceWarehouseBasicVO> basicVOS = warehouseEntities1.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); |
|
|
|
return basicVO; |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicVO; |
|
|
|
priceWarehouseVO.setCatergory(basicVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
priceWarehouseVO.setCatergory(basicVOS); |
|
|
|
} else if (warehousePricingType.equals(WarehousePricingTypeEnums.CUBE.getCode())) { |
|
|
|
} |
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities2 = categoryBasicMap.get(WarehousePricingTypeEnums.CUBE.getCode()); |
|
|
|
} else if (ObjectUtil.equal(warehousePricingType, WarehousePricingTypeEnums.CUBE.getCode())) { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities2)) { |
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities2 = categoryBasicMap.get(WarehousePricingTypeEnums.CUBE.getCode()); |
|
|
|
List<PriceWarehouseBasicVO> basicVOS = warehouseEntities2.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities2)) { |
|
|
|
PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); |
|
|
|
List<PriceWarehouseBasicVO> basicVOS = warehouseEntities2.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); |
|
|
|
return basicVO; |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicVO; |
|
|
|
priceWarehouseVO.setCatergory(basicVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
priceWarehouseVO.setCatergory(basicVOS); |
|
|
|
} else if (warehousePricingType.equals(WarehousePricingTypeEnums.WEIGHT.getCode())) { |
|
|
|
} |
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities3 = categoryBasicMap.get(WarehousePricingTypeEnums.WEIGHT.getCode()); |
|
|
|
} else if (ObjectUtil.equal(warehousePricingType, WarehousePricingTypeEnums.WEIGHT.getCode())) { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities3)) { |
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities3 = categoryBasicMap.get(WarehousePricingTypeEnums.WEIGHT.getCode()); |
|
|
|
List<PriceWarehouseBasicVO> basicVOS = warehouseEntities3.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities3)) { |
|
|
|
PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); |
|
|
|
List<PriceWarehouseBasicVO> basicVOS = warehouseEntities3.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); |
|
|
|
return basicVO; |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicVO; |
|
|
|
priceWarehouseVO.setCatergory(basicVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
priceWarehouseVO.setCatergory(basicVOS); |
|
|
|
} else if (warehousePricingType.equals(WarehousePricingTypeEnums.TONNE.getCode())) { |
|
|
|
} |
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities4 = categoryBasicMap.get(WarehousePricingTypeEnums.TONNE.getCode()); |
|
|
|
} else if (ObjectUtil.equal(warehousePricingType, WarehousePricingTypeEnums.TONNE.getCode())) { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities4)) { |
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities4 = categoryBasicMap.get(WarehousePricingTypeEnums.TONNE.getCode()); |
|
|
|
List<PriceWarehouseBasicVO> basicVOS = warehouseEntities4.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities4)) { |
|
|
|
PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); |
|
|
|
List<PriceWarehouseBasicVO> basicVOS = warehouseEntities4.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
PriceWarehouseBasicVO basicVO = new PriceWarehouseBasicVO(); |
|
|
|
return basicVO; |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicVO; |
|
|
|
priceWarehouseVO.setCatergory(basicVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
priceWarehouseVO.setCatergory(basicVOS); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 附加费
|
|
|
|
// 附加费
|
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities1 = warehouseMap.get(CostTypeEnums.ADD.getCode()); |
|
|
|
List<BasicdataPriceCategoryWarehouseEntity> warehouseEntities1 = warehouseMap.get(CostTypeEnums.ADD.getCode()); |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities1)) { |
|
|
|
if (CollUtil.isNotEmpty(warehouseEntities1)) { |
|
|
@ -1832,50 +1842,52 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
initCategoryBasicMap(categoryBasicEntities, categoryBasicMap); |
|
|
|
initCategoryBasicMap(categoryBasicEntities, categoryBasicMap); |
|
|
|
// 设置整车
|
|
|
|
// 设置整车
|
|
|
|
String trunklinePricingType = templateEntity.getTrunklinePricingType(); |
|
|
|
String trunklinePricingType = templateEntity.getTrunklinePricingType(); |
|
|
|
if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
if (StrUtil.isNotEmpty(trunklinePricingType)) { |
|
|
|
if (CollUtil.isNotEmpty(fullVehicleEntities)) { |
|
|
|
if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
List<BasicdataPriceFullVehicleVO> fullVehicleVOS = fullVehicleEntities.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(fullVehicleEntities)) { |
|
|
|
BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); |
|
|
|
List<BasicdataPriceFullVehicleVO> fullVehicleVOS = fullVehicleEntities.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); |
|
|
|
BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); |
|
|
|
return basicdataPriceFullVehicleVO; |
|
|
|
BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicdataPriceFullVehicleVO; |
|
|
|
priceTrunkLineVO.setFullVehicle(fullVehicleVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
priceTrunkLineVO.setFullVehicle(fullVehicleVOS); |
|
|
|
} |
|
|
|
} |
|
|
|
// 设置按件
|
|
|
|
} |
|
|
|
if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.PIECE.getCode().toString())) { |
|
|
|
// 设置按件
|
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.PIECE.getCode()); |
|
|
|
if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.PIECE.getCode().toString())) { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.PIECE.getCode()); |
|
|
|
List<PriceBasicVO> pieceCategoryVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
PriceBasicVO priceBasicVO = new PriceBasicVO(); |
|
|
|
List<PriceBasicVO> pieceCategoryVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, priceBasicVO); |
|
|
|
PriceBasicVO priceBasicVO = new PriceBasicVO(); |
|
|
|
return priceBasicVO; |
|
|
|
BeanUtil.copyProperties(item, priceBasicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return priceBasicVO; |
|
|
|
priceTrunkLineVO.setPieceCategory(pieceCategoryVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
priceTrunkLineVO.setPieceCategory(pieceCategoryVOS); |
|
|
|
} |
|
|
|
} |
|
|
|
// 设置按方
|
|
|
|
} |
|
|
|
if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.CUBE.getCode().toString())) { |
|
|
|
// 设置按方
|
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.CUBE.getCode()); |
|
|
|
if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.CUBE.getCode().toString())) { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.CUBE.getCode()); |
|
|
|
List<PriceBasicVO> cubeCategoryVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
PriceBasicVO priceBasicVO = new PriceBasicVO(); |
|
|
|
List<PriceBasicVO> cubeCategoryVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, priceBasicVO); |
|
|
|
PriceBasicVO priceBasicVO = new PriceBasicVO(); |
|
|
|
return priceBasicVO; |
|
|
|
BeanUtil.copyProperties(item, priceBasicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return priceBasicVO; |
|
|
|
priceTrunkLineVO.setCubeCategory(cubeCategoryVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
priceTrunkLineVO.setCubeCategory(cubeCategoryVOS); |
|
|
|
} |
|
|
|
} |
|
|
|
// 设置重量
|
|
|
|
} |
|
|
|
if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.WEIGHT.getCode().toString())) { |
|
|
|
// 设置重量
|
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.WEIGHT.getCode()); |
|
|
|
if (trunklinePricingType.contains(TrunkLinePricingTypeEnums.WEIGHT.getCode().toString())) { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(TrunkLinePricingTypeEnums.WEIGHT.getCode()); |
|
|
|
List<PriceBasicVO> weightCategoryVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
PriceBasicVO priceBasicVO = new PriceBasicVO(); |
|
|
|
List<PriceBasicVO> weightCategoryVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, priceBasicVO); |
|
|
|
PriceBasicVO priceBasicVO = new PriceBasicVO(); |
|
|
|
return priceBasicVO; |
|
|
|
BeanUtil.copyProperties(item, priceBasicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return priceBasicVO; |
|
|
|
priceTrunkLineVO.setWeightCategory(weightCategoryVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
priceTrunkLineVO.setWeightCategory(weightCategoryVOS); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Integer pickupIsMinCost = templateEntity.getPickupIsMinCost(); |
|
|
|
Integer pickupIsMinCost = templateEntity.getPickupIsMinCost(); |
|
|
@ -1900,50 +1912,52 @@ public class BasicdataPriceServiceImpl extends BaseServiceImpl<BasicdataPriceMap |
|
|
|
// 设置整车
|
|
|
|
// 设置整车
|
|
|
|
// fullVehicleEntities转为BasicdataPriceFullVehicleVO
|
|
|
|
// fullVehicleEntities转为BasicdataPriceFullVehicleVO
|
|
|
|
String pickupPricingType = templateEntity.getPickupPricingType(); |
|
|
|
String pickupPricingType = templateEntity.getPickupPricingType(); |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
if (StrUtil.isNotEmpty(pickupPricingType)) { |
|
|
|
if (CollUtil.isNotEmpty(fullVehicleEntities)) { |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.COMPLETE_VEHICLE.getCode().toString())) { |
|
|
|
List<BasicdataPriceFullVehicleVO> fullVehicleVOS = fullVehicleEntities.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(fullVehicleEntities)) { |
|
|
|
BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); |
|
|
|
List<BasicdataPriceFullVehicleVO> fullVehicleVOS = fullVehicleEntities.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); |
|
|
|
BasicdataPriceFullVehicleVO basicdataPriceFullVehicleVO = new BasicdataPriceFullVehicleVO(); |
|
|
|
return basicdataPriceFullVehicleVO; |
|
|
|
BeanUtil.copyProperties(item, basicdataPriceFullVehicleVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicdataPriceFullVehicleVO; |
|
|
|
pricePickupVO.setFullVehicle(fullVehicleVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
pricePickupVO.setFullVehicle(fullVehicleVOS); |
|
|
|
} |
|
|
|
} |
|
|
|
// 按件
|
|
|
|
} |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.PIECE.getCode().toString())) { |
|
|
|
// 按件
|
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.PIECE.getCode()); |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.PIECE.getCode().toString())) { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.PIECE.getCode()); |
|
|
|
List<PriceBasicVO> basicVOS = categoryBasicEntities.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
PriceBasicVO basicVO = new PriceBasicVO(); |
|
|
|
List<PriceBasicVO> basicVOS = categoryBasicEntities.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
PriceBasicVO basicVO = new PriceBasicVO(); |
|
|
|
return basicVO; |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicVO; |
|
|
|
pricePickupVO.setPieceCategory(basicVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
pricePickupVO.setPieceCategory(basicVOS); |
|
|
|
} |
|
|
|
} |
|
|
|
// 按方
|
|
|
|
} |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.CUBE.getCode().toString())) { |
|
|
|
// 按方
|
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.CUBE.getCode()); |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.CUBE.getCode().toString())) { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.CUBE.getCode()); |
|
|
|
List<PriceBasicVO> basicVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
PriceBasicVO basicVO = new PriceBasicVO(); |
|
|
|
List<PriceBasicVO> basicVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
PriceBasicVO basicVO = new PriceBasicVO(); |
|
|
|
return basicVO; |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicVO; |
|
|
|
pricePickupVO.setCubeCategory(basicVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
pricePickupVO.setCubeCategory(basicVOS); |
|
|
|
} |
|
|
|
} |
|
|
|
// 按重量
|
|
|
|
} |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.WEIGHT.getCode().toString())) { |
|
|
|
// 按重量
|
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.WEIGHT.getCode()); |
|
|
|
if (pickupPricingType.contains(PickupPricingTypeEnums.WEIGHT.getCode().toString())) { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
List<BasicdataPriceCategoryBasicEntity> categoryBasicEntityList = categoryBasicMap.get(PickupPricingTypeEnums.WEIGHT.getCode()); |
|
|
|
List<PriceBasicVO> basicVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
if (CollUtil.isNotEmpty(categoryBasicEntityList)) { |
|
|
|
PriceBasicVO basicVO = new PriceBasicVO(); |
|
|
|
List<PriceBasicVO> basicVOS = categoryBasicEntityList.stream().map(item -> { |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
PriceBasicVO basicVO = new PriceBasicVO(); |
|
|
|
return basicVO; |
|
|
|
BeanUtil.copyProperties(item, basicVO); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return basicVO; |
|
|
|
pricePickupVO.setWeightCategory(basicVOS); |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
|
|
|
|
pricePickupVO.setWeightCategory(basicVOS); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Integer pickupIsMinCost = templateEntity.getPickupIsMinCost(); |
|
|
|
Integer pickupIsMinCost = templateEntity.getPickupIsMinCost(); |
|
|
|