demand: TMS系统 - 提成管理 - 销售计提比例配置 - 销售支持及占比允许为空

committer: heyu
This commit is contained in:
aike 2025-11-05 11:34:19 +08:00
parent 2c6efb973c
commit ff2cbd8a5a

View File

@ -109,9 +109,17 @@ public class EmisSalesCommissionRatioServiceImpl implements IEmisSalesCommission
*/ */
@Override @Override
public boolean checkRatioValid(EmisSalesCommissionRatio entity) { public boolean checkRatioValid(EmisSalesCommissionRatio entity) {
java.math.BigDecimal sum = entity.getSalesExecutiveRatio() BigDecimal executiveRatio = entity.getSalesExecutiveRatio() != null
.add(entity.getSalesmenRatio()) ? entity.getSalesExecutiveRatio()
.add(entity.getSalesSupportRatio()); : BigDecimal.ZERO;
return sum.compareTo(new java.math.BigDecimal("100.00")) <= 0; 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;
} }
} }