Ver Fonte

费用因子bug 调整

785834757 há 2 anos atrás
pai
commit
e5e1e9699c

+ 4 - 0
src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceImpl.java

@@ -2791,6 +2791,10 @@ public class FeeRuleSchemeServiceImpl implements FeeRuleSchemeService {
         BigDecimal noTaxEntranceTotalProportion = entranceTotalProportion.divide(taxRate,2,RoundingMode.DOWN);
         //出口的总比例
         BigDecimal exportTotalProportion = noTaxEntranceTotalProportion.subtract(deptTotalProportion).subtract(retailTotalProportion);
+        if(exportTotalProportion.compareTo(BigDecimal.ZERO) < 0 ){
+            //出口比例为负数了
+            exportTotalProportion = new BigDecimal(0);
+        }
         //如果手续费 大于 总比例 则出口手续费等于总比例
         if(superviseCostsProportion.compareTo(exportTotalProportion) >= 0 ){
             superviseCostsProportion = exportTotalProportion;

+ 4 - 4
src/main/java/com/ydtech/modules/fee/service/impl/FeeRuleSchemeServiceNewImpl.java

@@ -406,8 +406,8 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
             if (esmRetail != null) {
                 BigDecimal sumPremium = insFeeOrderNew.getJqPremium().add(insFeeOrderNew.getSyPremium()).add(insFeeOrderNew.getNoPremium());
                 if(Integer.parseInt(esmRetail.getRetailtype()) >= 3){
-                    insFeeOrderNew.setFirstDetailProportion(new BigDecimal(esmRetail.getDisrate1()));
-                    insFeeOrderNew.setFirstDetailPremiums(sumPremium.multiply(new BigDecimal(esmRetail.getDisrate1())).divide(new BigDecimal("100")));
+                    insFeeOrderNew.setThirdDetailProportion(new BigDecimal(esmRetail.getDisrate1()));
+                    insFeeOrderNew.setThirdDetailPremiums(sumPremium.multiply(new BigDecimal(esmRetail.getDisrate1())).divide(new BigDecimal("100")));
                     if(parents != null && parents.size() > 2){
                         insFeeOrderNew.setThreeLevelUserId(parents.get(2).getId());
                     }
@@ -420,8 +420,8 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
                     }
                 }
                 if(Integer.parseInt(esmRetail.getRetailtype()) >= 1){
-                    insFeeOrderNew.setThirdDetailProportion(new BigDecimal(esmRetail.getDisrate3()));
-                    insFeeOrderNew.setThirdDetailPremiums(sumPremium.multiply(new BigDecimal(esmRetail.getDisrate3())).divide(new BigDecimal("100")));
+                    insFeeOrderNew.setFirstDetailProportion(new BigDecimal(esmRetail.getDisrate3()));
+                    insFeeOrderNew.setFirstDetailPremiums(sumPremium.multiply(new BigDecimal(esmRetail.getDisrate3())).divide(new BigDecimal("100")));
                     if(parents != null && parents.size() > 0) {
                         insFeeOrderNew.setFirstLevelUserId(parents.get(0).getId());
                     }

+ 2 - 2
src/main/resources/mapper/modules/order/InsAreaCompanyMapper.xml

@@ -202,10 +202,10 @@
             and io.deptid like "${params.houseId}%"
         </if>
         <if test="params.operatorId != null and params.operatorId != ''">
-            and iac.operator_id = #{params.operatorId}
+            and io.userid = #{params.operatorId}
         </if>
         <if test="params.operatorName != null and params.operatorName != ''">
-            and iac.operator_name = #{params.operatorName}
+            and io.username = #{params.operatorName}
         </if>
         <if test="params.auditId != null and params.auditId != ''">
             and iac.new_operator_id = #{params.auditId}