|
@@ -363,21 +363,21 @@ public class QuoteVerificationAspect {
|
|
|
insFeeOrders,
|
|
insFeeOrders,
|
|
|
InsFeeOrders::setJqReceivablePremium, InsFeeOrders::setJqPayablePremium,
|
|
InsFeeOrders::setJqReceivablePremium, InsFeeOrders::setJqPayablePremium,
|
|
|
InsFeeOrders::setJqCommissionPremium, InsFeeOrders::setJqFollowPremium, InsFeeOrders::setJqAdditionalPremium,
|
|
InsFeeOrders::setJqCommissionPremium, InsFeeOrders::setJqFollowPremium, InsFeeOrders::setJqAdditionalPremium,
|
|
|
- InsFeeOrders::setJqKeepPointRatio,InsFeeOrders::setJqKeepPointPremium);
|
|
|
|
|
|
|
+ InsFeeOrders::setJqKeepPointRatio,InsFeeOrders::setJqKeepPointPremium, isrecordByLeader);
|
|
|
|
|
|
|
|
processInsuranceType(
|
|
processInsuranceType(
|
|
|
insOrdersCosts.getSyPremium(), syCostType, syEntranceFeeRatio, syFollowRatio, taxFactor,
|
|
insOrdersCosts.getSyPremium(), syCostType, syEntranceFeeRatio, syFollowRatio, taxFactor,
|
|
|
insFeeOrders,
|
|
insFeeOrders,
|
|
|
InsFeeOrders::setSyReceivablePremium, InsFeeOrders::setSyPayablePremium,
|
|
InsFeeOrders::setSyReceivablePremium, InsFeeOrders::setSyPayablePremium,
|
|
|
InsFeeOrders::setSyCommissionPremium, InsFeeOrders::setSyFollowPremium, InsFeeOrders::setSyAdditionalPremium,
|
|
InsFeeOrders::setSyCommissionPremium, InsFeeOrders::setSyFollowPremium, InsFeeOrders::setSyAdditionalPremium,
|
|
|
- InsFeeOrders::setSyKeepPointRatio,InsFeeOrders::setSyKeepPointPremium);
|
|
|
|
|
|
|
+ InsFeeOrders::setSyKeepPointRatio,InsFeeOrders::setSyKeepPointPremium, isrecordByLeader);
|
|
|
|
|
|
|
|
processInsuranceType(
|
|
processInsuranceType(
|
|
|
insOrdersCosts.getJyPremium(), jyCostType, jyEntranceFeeRatio, jyFollowRatio, taxFactor,
|
|
insOrdersCosts.getJyPremium(), jyCostType, jyEntranceFeeRatio, jyFollowRatio, taxFactor,
|
|
|
insFeeOrders,
|
|
insFeeOrders,
|
|
|
InsFeeOrders::setJyReceivablePremium, InsFeeOrders::setJyPayablePremium,
|
|
InsFeeOrders::setJyReceivablePremium, InsFeeOrders::setJyPayablePremium,
|
|
|
InsFeeOrders::setJyCommissionPremium, InsFeeOrders::setJyFollowPremium, InsFeeOrders::setJyAdditionalPremium,
|
|
InsFeeOrders::setJyCommissionPremium, InsFeeOrders::setJyFollowPremium, InsFeeOrders::setJyAdditionalPremium,
|
|
|
- InsFeeOrders::setJyKeepPointRatio,InsFeeOrders::setJyKeepPointPremium);
|
|
|
|
|
|
|
+ InsFeeOrders::setJyKeepPointRatio,InsFeeOrders::setJyKeepPointPremium, isrecordByLeader);
|
|
|
|
|
|
|
|
// 7. 计算分销费用 返回分销的差值
|
|
// 7. 计算分销费用 返回分销的差值
|
|
|
BigDecimal distributionDiff = calculateDistributionFee(insOrdersCosts,insFeeOrders, insOrders);
|
|
BigDecimal distributionDiff = calculateDistributionFee(insOrdersCosts,insFeeOrders, insOrders);
|
|
@@ -429,19 +429,20 @@ public class QuoteVerificationAspect {
|
|
|
/**
|
|
/**
|
|
|
* 处理单个险种的费用计算(核心复用方法)
|
|
* 处理单个险种的费用计算(核心复用方法)
|
|
|
*
|
|
*
|
|
|
- * @param premium 险种保费
|
|
|
|
|
- * @param costType 险种费用类型配置
|
|
|
|
|
- * @param commissionRatio 手续费比例
|
|
|
|
|
- * @param followRatio 跟单费比例
|
|
|
|
|
- * @param taxFactor 税率因子(平台协议为1,私有协议为1/1.06)
|
|
|
|
|
- * @param insFeeOrders 费用订单对象
|
|
|
|
|
- * @param setReceivable 应收金额setter
|
|
|
|
|
- * @param setPayable 应付金额setter
|
|
|
|
|
- * @param setCommission 手续费setter
|
|
|
|
|
- * @param setFollow 跟单费setter
|
|
|
|
|
- * @param setAdditional 加投费setter
|
|
|
|
|
- * @param keepPointRate 留点比例
|
|
|
|
|
|
|
+ * @param premium 险种保费
|
|
|
|
|
+ * @param costType 险种费用类型配置
|
|
|
|
|
+ * @param commissionRatio 手续费比例
|
|
|
|
|
+ * @param followRatio 跟单费比例
|
|
|
|
|
+ * @param taxFactor 税率因子(平台协议为1,私有协议为1/1.06)
|
|
|
|
|
+ * @param insFeeOrders 费用订单对象
|
|
|
|
|
+ * @param setReceivable 应收金额setter
|
|
|
|
|
+ * @param setPayable 应付金额setter
|
|
|
|
|
+ * @param setCommission 手续费setter
|
|
|
|
|
+ * @param setFollow 跟单费setter
|
|
|
|
|
+ * @param setAdditional 加投费setter
|
|
|
|
|
+ * @param keepPointRate 留点比例
|
|
|
* @param keepPointPremium 留点费用
|
|
* @param keepPointPremium 留点费用
|
|
|
|
|
+ * @param isrecordByLeader 是否是代课录单
|
|
|
*/
|
|
*/
|
|
|
private void processInsuranceType(
|
|
private void processInsuranceType(
|
|
|
BigDecimal premium,
|
|
BigDecimal premium,
|
|
@@ -456,7 +457,8 @@ public class QuoteVerificationAspect {
|
|
|
BiConsumer<InsFeeOrders, BigDecimal> setFollow,
|
|
BiConsumer<InsFeeOrders, BigDecimal> setFollow,
|
|
|
BiConsumer<InsFeeOrders, BigDecimal> setAdditional,
|
|
BiConsumer<InsFeeOrders, BigDecimal> setAdditional,
|
|
|
BiConsumer<InsFeeOrders, BigDecimal> keepPointRate,
|
|
BiConsumer<InsFeeOrders, BigDecimal> keepPointRate,
|
|
|
- BiConsumer<InsFeeOrders, BigDecimal> keepPointPremium) {
|
|
|
|
|
|
|
+ BiConsumer<InsFeeOrders, BigDecimal> keepPointPremium,
|
|
|
|
|
+ boolean isrecordByLeader) {
|
|
|
// 若险种配置为空,默认应收应付为0
|
|
// 若险种配置为空,默认应收应付为0
|
|
|
if (costType == null) {
|
|
if (costType == null) {
|
|
|
setReceivable.accept(insFeeOrders, BigDecimal.ZERO);
|
|
setReceivable.accept(insFeeOrders, BigDecimal.ZERO);
|
|
@@ -472,6 +474,11 @@ public class QuoteVerificationAspect {
|
|
|
BigDecimal addThrowPercent = convertPercent(costType.getAddThrow());
|
|
BigDecimal addThrowPercent = convertPercent(costType.getAddThrow());
|
|
|
BigDecimal exportPercent = convertPercent(costType.getExport());
|
|
BigDecimal exportPercent = convertPercent(costType.getExport());
|
|
|
|
|
|
|
|
|
|
+ if(isrecordByLeader){
|
|
|
|
|
+ // 如果是代客录单,出口比例减去一个百分比,也就是 0.01 2026年7月11日09:30:09
|
|
|
|
|
+ exportPercent = BigDecimalUtil.subtract(exportPercent, new BigDecimal("0.01"));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// 去税保费金额
|
|
// 去税保费金额
|
|
|
BigDecimal taxablePremium = premium.divide(taxFactor,5,RoundingMode.HALF_EVEN);
|
|
BigDecimal taxablePremium = premium.divide(taxFactor,5,RoundingMode.HALF_EVEN);
|
|
|
|
|
|