|
|
@ -662,10 +662,15 @@ public class ScmVehRebateService extends MybatisBaseService<ScmVehRebateMapper, |
|
|
|
scmVehRebate.setCalculationStandard(info.getCalculationStandard()); |
|
|
|
if (StringUtils.isNotBlank(info.getCalculationModeValue())) { |
|
|
|
String calculationModeValue = info.getCalculationModeValue(); |
|
|
|
BigDecimal rule = new BigDecimal(info.getCalculationStandard()); |
|
|
|
if (calculationModeValue.equals("比例")) { |
|
|
|
scmVehRebate.setCalculationModeKey("001"); |
|
|
|
BigDecimal costPrice = new (baseVehicleRebateVo.getCostPrice()); |
|
|
|
BigDecimal m = rule.multiply(costPrice).divide(new BigDecimal("100")); |
|
|
|
scmVehRebate.setEstimateRebate(m.toString()); |
|
|
|
} else { |
|
|
|
scmVehRebate.setCalculationModeKey("002"); |
|
|
|
scmVehRebate.setEstimateRebate(info.getCalculationStandard()); |
|
|
|
} |
|
|
|
scmVehRebate.setCalculationModeValue(info.getCalculationModeValue()); |
|
|
|
} |
|
|
|