|
@@ -118,10 +118,7 @@ public class BomSpecPriceConfigServiceImpl extends ServiceImpl<BomSpecPriceConfi
|
|
|
|
|
|
|
|
|
BigDecimal embossingHeight = BigDecimal.ZERO;
|
|
|
- List<BomSpecPriceConfig> bomSpecEmbossingConfigList = configCodeMap.getOrDefault(BomSpecPriceConfigCodeEnum.EMBOSSING_CONFIG.getKey(), Collections.emptyList());
|
|
|
- BomSpecPriceConfig embossingConfig = bomSpecEmbossingConfigList.stream()
|
|
|
- .filter(item -> item.getName().contains(dto.getEmbossing()))
|
|
|
- .findAny().orElse(null);
|
|
|
+ BomSpecPriceConfig embossingConfig = configDetailMap.get(dto.getEmbossing());
|
|
|
if (embossingConfig != null) {
|
|
|
embossingHeight = embossingConfig.getHeight();
|
|
|
}
|
|
@@ -169,6 +166,17 @@ public class BomSpecPriceConfigServiceImpl extends ServiceImpl<BomSpecPriceConfi
|
|
|
BigDecimal processingFee = bomSpecProcessingFeeConfigList.stream()
|
|
|
.map(BomSpecPriceConfig::getPrice)
|
|
|
.reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
+
|
|
|
+ if (Objects.equals(categoryDetail.getName(), "热复合")) {
|
|
|
+ List<BomSpecPriceConfig> compoundingCostConfigList = configCodeMap.getOrDefault(BomSpecPriceConfigCodeEnum.COMPOUNDING_COST_CONFIG.getKey(), Collections.emptyList());
|
|
|
+ BomSpecPriceConfig priceConfig = compoundingCostConfigList.stream()
|
|
|
+ .filter(item -> this.operatorCompareTo(item.getName(), dto.getWidth()))
|
|
|
+ .findAny().orElse(null);
|
|
|
+ if (priceConfig != null) {
|
|
|
+ processingFee = processingFee.add(priceConfig.getPrice());
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
vo.setProcessingFee(processingFee);
|
|
|
|
|
|
|
|
@@ -189,7 +197,7 @@ public class BomSpecPriceConfigServiceImpl extends ServiceImpl<BomSpecPriceConfi
|
|
|
BigDecimal unitPrice = price
|
|
|
.multiply(vo.getLength().add(vo.getCropLength())
|
|
|
.multiply(vo.getWidth().add(vo.getCropWidth()))
|
|
|
- .divide(BigDecimal.valueOf(10000), 2, RoundingMode.HALF_UP))
|
|
|
+ .divide(BigDecimal.valueOf(10000), 10, RoundingMode.HALF_UP))
|
|
|
.multiply(dto.getHeight().add(vo.getEmbossingHeight()))
|
|
|
.multiply(BigDecimal.ONE.add(vo.getDepletion().multiply(BigDecimal.valueOf(0.01))))
|
|
|
.add(vo.getProcessingFee())
|