demand: TMS系统 - 提成管理 - 销售计提比例配置 - 销售支持及占比允许为空
committer: heyu
This commit is contained in:
parent
2c6efb973c
commit
ff2cbd8a5a
@ -109,9 +109,17 @@ public class EmisSalesCommissionRatioServiceImpl implements IEmisSalesCommission
|
||||
*/
|
||||
@Override
|
||||
public boolean checkRatioValid(EmisSalesCommissionRatio entity) {
|
||||
java.math.BigDecimal sum = entity.getSalesExecutiveRatio()
|
||||
.add(entity.getSalesmenRatio())
|
||||
.add(entity.getSalesSupportRatio());
|
||||
return sum.compareTo(new java.math.BigDecimal("100.00")) <= 0;
|
||||
BigDecimal executiveRatio = entity.getSalesExecutiveRatio() != null
|
||||
? entity.getSalesExecutiveRatio()
|
||||
: BigDecimal.ZERO;
|
||||
BigDecimal salesmenRatio = entity.getSalesmenRatio() != null
|
||||
? entity.getSalesmenRatio()
|
||||
: BigDecimal.ZERO;
|
||||
BigDecimal supportRatio = entity.getSalesSupportRatio() != null
|
||||
? entity.getSalesSupportRatio()
|
||||
: BigDecimal.ZERO;
|
||||
|
||||
BigDecimal sum = executiveRatio.add(salesmenRatio).add(supportRatio);
|
||||
return sum.compareTo(new BigDecimal("100.00")) <= 0;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user