|
@@ -303,7 +303,7 @@ public class QuoteVerificationAspect {
|
|
|
calculateTotalPremium(insFeeOrders);
|
|
calculateTotalPremium(insFeeOrders);
|
|
|
|
|
|
|
|
// 8. 计算分销费用
|
|
// 8. 计算分销费用
|
|
|
- calculateDistributionFee(insOrdersCosts,insFeeOrders, insOrders);
|
|
|
|
|
|
|
+// calculateDistributionFee(insOrdersCosts,insFeeOrders, insOrders);
|
|
|
|
|
|
|
|
insFeeOrdersService.save(insFeeOrders);
|
|
insFeeOrdersService.save(insFeeOrders);
|
|
|
return insFeeOrders;
|
|
return insFeeOrders;
|
|
@@ -386,7 +386,7 @@ public class QuoteVerificationAspect {
|
|
|
BigDecimal addThrowPercent = convertPercent(costType.getAddThrow());
|
|
BigDecimal addThrowPercent = convertPercent(costType.getAddThrow());
|
|
|
BigDecimal exportPercent = convertPercent(costType.getExport());
|
|
BigDecimal exportPercent = convertPercent(costType.getExport());
|
|
|
|
|
|
|
|
- // 计算应收金额
|
|
|
|
|
|
|
+ // 去税保费金额
|
|
|
BigDecimal taxablePremium = premium.divide(taxFactor,5,RoundingMode.HALF_EVEN);
|
|
BigDecimal taxablePremium = premium.divide(taxFactor,5,RoundingMode.HALF_EVEN);
|
|
|
|
|
|
|
|
// 计算应付金额(保费 * 出口比例,保留2位小数)
|
|
// 计算应付金额(保费 * 出口比例,保留2位小数)
|
|
@@ -395,18 +395,24 @@ public class QuoteVerificationAspect {
|
|
|
// 计算各类费用并设置到订单对象
|
|
// 计算各类费用并设置到订单对象
|
|
|
setPayable.accept(insFeeOrders, payable);
|
|
setPayable.accept(insFeeOrders, payable);
|
|
|
BigDecimal commission = taxablePremium.multiply(commissionRatio).setScale(5, RoundingMode.HALF_EVEN);
|
|
BigDecimal commission = taxablePremium.multiply(commissionRatio).setScale(5, RoundingMode.HALF_EVEN);
|
|
|
- BigDecimal follow = taxablePremium.multiply(followRatio).setScale(5, RoundingMode.HALF_EVEN);
|
|
|
|
|
|
|
+
|
|
|
setCommission.accept(insFeeOrders, commission);
|
|
setCommission.accept(insFeeOrders, commission);
|
|
|
- setFollow.accept(insFeeOrders, follow);
|
|
|
|
|
|
|
+
|
|
|
// modify by lipf, 2026年6月16日15:35:09 加投比例,不需要根据平台/私有进行1.06的计算
|
|
// modify by lipf, 2026年6月16日15:35:09 加投比例,不需要根据平台/私有进行1.06的计算
|
|
|
|
|
|
|
|
BigDecimal addAmount = premium.multiply(addThrowPercent).setScale(5, RoundingMode.HALF_EVEN);
|
|
BigDecimal addAmount = premium.multiply(addThrowPercent).setScale(5, RoundingMode.HALF_EVEN);
|
|
|
setAdditional.accept(insFeeOrders,addAmount);
|
|
setAdditional.accept(insFeeOrders,addAmount);
|
|
|
|
|
|
|
|
- BigDecimal receivable = BigDecimalUtil.add(commission,follow);
|
|
|
|
|
|
|
+ //应付金额计算
|
|
|
|
|
+ BigDecimal receivableRadio = commissionRatio.add(followRatio);
|
|
|
|
|
+ BigDecimal receivable = taxablePremium.multiply(receivableRadio).setScale(5,RoundingMode.HALF_EVEN);
|
|
|
receivable = receivable.setScale(5, RoundingMode.HALF_EVEN);
|
|
receivable = receivable.setScale(5, RoundingMode.HALF_EVEN);
|
|
|
setReceivable.accept(insFeeOrders, receivable);
|
|
setReceivable.accept(insFeeOrders, receivable);
|
|
|
|
|
|
|
|
|
|
+ // 修改 应收-手续费 = 跟单费
|
|
|
|
|
+ BigDecimal follow = receivable.subtract(commission);
|
|
|
|
|
+ setFollow.accept(insFeeOrders, follow);
|
|
|
|
|
+
|
|
|
// 设置留点比例 入口比例/taxFactor+加投比例-出口比例
|
|
// 设置留点比例 入口比例/taxFactor+加投比例-出口比例
|
|
|
BigDecimal keepPointRateCal = BigDecimalUtil.subtract(BigDecimalUtil.add(BigDecimalUtil.divide(inletPercent,taxFactor),addThrowPercent),exportPercent)
|
|
BigDecimal keepPointRateCal = BigDecimalUtil.subtract(BigDecimalUtil.add(BigDecimalUtil.divide(inletPercent,taxFactor),addThrowPercent),exportPercent)
|
|
|
.setScale(5,RoundingMode.HALF_EVEN);
|
|
.setScale(5,RoundingMode.HALF_EVEN);
|
|
@@ -506,12 +512,18 @@ public class QuoteVerificationAspect {
|
|
|
insFeeOrders.setJyInletRatio(jyCostType != null
|
|
insFeeOrders.setJyInletRatio(jyCostType != null
|
|
|
? convertPercent(jyCostType.getInlet() != null ? jyCostType.getInlet() : BigDecimal.ZERO) : BigDecimal.ZERO);
|
|
? convertPercent(jyCostType.getInlet() != null ? jyCostType.getInlet() : BigDecimal.ZERO) : BigDecimal.ZERO);
|
|
|
// 跟单比例
|
|
// 跟单比例
|
|
|
- insFeeOrders.setJqFollowRatio(jqCostType != null ?
|
|
|
|
|
- calculateFollowRatio(jqCostType, convertPercent(agreementInfoVo.getAgreement().getJqEntranceFeeRatio())) : BigDecimal.ZERO);
|
|
|
|
|
- insFeeOrders.setSyFollowRatio(syCostType != null ?
|
|
|
|
|
- calculateFollowRatio(syCostType, convertPercent(agreementInfoVo.getAgreement().getSyEntranceFeeRatio())) : BigDecimal.ZERO);
|
|
|
|
|
- insFeeOrders.setJyFollowRatio(jyCostType != null ?
|
|
|
|
|
- calculateFollowRatio(jyCostType, convertPercent(agreementInfoVo.getAgreement().getJyEntranceFeeRatio())) : BigDecimal.ZERO);
|
|
|
|
|
|
|
+ insFeeOrders.setJqFollowRatio(Objects.nonNull(insFeeOrders.getJqFollowRatio()) ?
|
|
|
|
|
+ insFeeOrders.getJqFollowRatio() : BigDecimal.ZERO);
|
|
|
|
|
+ insFeeOrders.setSyFollowRatio(Objects.nonNull(insFeeOrders.getSyFollowRatio()) ?
|
|
|
|
|
+ insFeeOrders.getSyFollowRatio() : BigDecimal.ZERO);
|
|
|
|
|
+ insFeeOrders.setJyFollowRatio(Objects.nonNull(insFeeOrders.getJyFollowRatio()) ?
|
|
|
|
|
+ insFeeOrders.getJyFollowRatio() : BigDecimal.ZERO);
|
|
|
|
|
+// insFeeOrders.setJqFollowRatio(jqCostType != null ?
|
|
|
|
|
+// calculateFollowRatio(jqCostType, convertPercent(agreementInfoVo.getAgreement().getJqEntranceFeeRatio())) : BigDecimal.ZERO);
|
|
|
|
|
+// insFeeOrders.setSyFollowRatio(syCostType != null ?
|
|
|
|
|
+// calculateFollowRatio(syCostType, convertPercent(agreementInfoVo.getAgreement().getSyEntranceFeeRatio())) : BigDecimal.ZERO);
|
|
|
|
|
+// insFeeOrders.setJyFollowRatio(jyCostType != null ?
|
|
|
|
|
+// calculateFollowRatio(jyCostType, convertPercent(agreementInfoVo.getAgreement().getJyEntranceFeeRatio())) : BigDecimal.ZERO);
|
|
|
// 加投比例
|
|
// 加投比例
|
|
|
insFeeOrders.setJqAdditionalRatio(jqCostType != null
|
|
insFeeOrders.setJqAdditionalRatio(jqCostType != null
|
|
|
? convertPercent(jqCostType.getAddThrow() != null ? jqCostType.getAddThrow() : BigDecimal.ZERO)
|
|
? convertPercent(jqCostType.getAddThrow() != null ? jqCostType.getAddThrow() : BigDecimal.ZERO)
|
|
@@ -523,15 +535,14 @@ public class QuoteVerificationAspect {
|
|
|
? convertPercent(jyCostType.getAddThrow() != null ? jyCostType.getAddThrow() : BigDecimal.ZERO)
|
|
? convertPercent(jyCostType.getAddThrow() != null ? jyCostType.getAddThrow() : BigDecimal.ZERO)
|
|
|
: BigDecimal.ZERO);
|
|
: BigDecimal.ZERO);
|
|
|
// 留点比例
|
|
// 留点比例
|
|
|
- insFeeOrders.setJqKeepPointRatio(jqCostType != null
|
|
|
|
|
- ? convertPercent(jqCostType.getKeepPointRatio() != null ? jqCostType.getKeepPointRatio() : BigDecimal.ZERO)
|
|
|
|
|
- : BigDecimal.ZERO);
|
|
|
|
|
- insFeeOrders.setSyKeepPointRatio(syCostType != null
|
|
|
|
|
- ? convertPercent(syCostType.getKeepPointRatio() != null ? syCostType.getKeepPointRatio() : BigDecimal.ZERO)
|
|
|
|
|
- : BigDecimal.ZERO);
|
|
|
|
|
- insFeeOrders.setJyKeepPointRatio(jyCostType != null
|
|
|
|
|
- ? convertPercent(jyCostType.getKeepPointRatio() != null ? jyCostType.getKeepPointRatio() : BigDecimal.ZERO)
|
|
|
|
|
- : BigDecimal.ZERO);
|
|
|
|
|
|
|
+ insFeeOrders.setJqKeepPointRatio(Objects.nonNull(insFeeOrders.getJqKeepPointRatio())
|
|
|
|
|
+ ? insFeeOrders.getJqKeepPointRatio() : BigDecimal.ZERO);
|
|
|
|
|
+
|
|
|
|
|
+ insFeeOrders.setSyKeepPointRatio(Objects.nonNull(insFeeOrders.getSyKeepPointRatio())
|
|
|
|
|
+ ? insFeeOrders.getSyKeepPointRatio() : BigDecimal.ZERO);
|
|
|
|
|
+
|
|
|
|
|
+ insFeeOrders.setJyKeepPointRatio(Objects.nonNull(insFeeOrders.getJyKeepPointRatio())
|
|
|
|
|
+ ? insFeeOrders.getJyKeepPointRatio() : BigDecimal.ZERO);
|
|
|
|
|
|
|
|
// 出口比例
|
|
// 出口比例
|
|
|
insFeeOrders.setJqExportRatio(jqCostType != null
|
|
insFeeOrders.setJqExportRatio(jqCostType != null
|