Ver Fonte

Merge branch 'dev_jzg_lipf_v20260622'

lipf há 3 meses atrás
pai
commit
e13151330c

+ 15 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/aop/aspect/QuoteVerificationAspect.java

@@ -243,6 +243,21 @@ public class QuoteVerificationAspect {
         PtlAgreementCostTypeVo syCostType = getCostTypeByTypeName(costTypeList, "商业险");
         PtlAgreementCostTypeVo jyCostType = getCostTypeByTypeName(costTypeList, "驾意险");
 
+
+        // add by lipf, 2026年6月23日18:32:24 按照财务和田智沟通后的结果,当入口手续费比例大于入口比例的时候,强制设置入口手续费比例为入口比例。
+        BigDecimal jqInlet = BigDecimalUtil.divide(jqCostType.getInlet(), new BigDecimal(100));
+        if(BigDecimalUtil.subtract(jqEntranceFeeRatio,jqInlet).compareTo(BigDecimal.ZERO) >0){
+            jqEntranceFeeRatio = jqInlet;
+        }
+        BigDecimal syInlet = BigDecimalUtil.divide(syCostType.getInlet(), new BigDecimal(100));
+        if(BigDecimalUtil.subtract(syEntranceFeeRatio,syInlet).compareTo(BigDecimal.ZERO) >0){
+            syEntranceFeeRatio = syInlet;
+        }
+        BigDecimal jyInlet = BigDecimalUtil.divide(jqCostType.getInlet(), new BigDecimal(100));
+        if(BigDecimalUtil.subtract(jyEntranceFeeRatio,jyInlet).compareTo(BigDecimal.ZERO) >0){
+            jyEntranceFeeRatio = jyInlet;
+        }
+
         // 4. 计算跟单费比例(入口比例 - 手续费比例)
         BigDecimal jqFollowRatio = calculateFollowRatio(jqCostType, jqEntranceFeeRatio);
         BigDecimal syFollowRatio = calculateFollowRatio(syCostType, syEntranceFeeRatio);

+ 22 - 0
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsFeeOrdersServiceImpl.java

@@ -99,6 +99,28 @@ public class InsFeeOrdersServiceImpl extends ServiceImpl<InsFeeOrdersMapper, Ins
         // 获取费用信息
         InsFeeOrders insFeeOrders = insFeeOrdersMapper.selectById(insOrders.getId());
 
+        // add by lipf, 2026年6月23日18:32:24 按照财务和田智沟通后的结果,当入口手续费比例大于入口比例的时候,强制设置入口手续费比例为入口比例。
+        BigDecimal jqInletRatio = insFeeOrders.getJqInletRatio();
+        BigDecimal syInletRatio = insFeeOrders.getSyInletRatio();
+        BigDecimal jyInletRatio = insFeeOrders.getJyInletRatio();
+
+        BigDecimal jqCommissionRatio = insFeeOrders.getJqCommissionRatio();
+        BigDecimal syCommissionRatio = insFeeOrders.getSyCommissionRatio();
+        BigDecimal jyCommissionRatio = insFeeOrders.getJyCommissionRatio();
+
+        if(BigDecimalUtil.subtract(jqCommissionRatio,jqInletRatio).compareTo(BigDecimal.ZERO)>0){
+            insFeeOrders.setJqCommissionRatio(jqInletRatio);
+            insFeeOrders.setJqFollowRatio(BigDecimal.ZERO);
+        }
+        if(BigDecimalUtil.subtract(syCommissionRatio,syInletRatio).compareTo(BigDecimal.ZERO)>0){
+            insFeeOrders.setSyCommissionRatio(syInletRatio);
+            insFeeOrders.setSyFollowRatio(BigDecimal.ZERO);
+        }
+        if(BigDecimalUtil.subtract(jyCommissionRatio,jyInletRatio).compareTo(BigDecimal.ZERO)>0){
+            insFeeOrders.setJyCommissionRatio(jyInletRatio);
+            insFeeOrders.setJyFollowRatio(BigDecimal.ZERO);
+        }
+
         // 关键:获取是否含税标识
         Integer withTax = ptlAgreement.getWithTax(); // 0-否 1-是