|
|
|
@ -231,6 +231,9 @@ public class BDPrizeCalculatorDefaultImpl implements BDPrizeCalculator {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private int getKpiPrizeLevel(BigDecimal transactionAmount,BigDecimal kpiAmount){
|
|
|
|
|
if (kpiAmount.equals(BigDecimal.ZERO)){//未设置kpi金额的按照最小完成度来计算
|
|
|
|
|
return 1;
|
|
|
|
|
}
|
|
|
|
|
BigDecimal rate = transactionAmount.divide(kpiAmount,2,BigDecimal.ROUND_HALF_DOWN);
|
|
|
|
|
if (rate.compareTo(BigDecimal.valueOf(0.5))<0){
|
|
|
|
|
return 1;
|
|
|
|
|