Forráskód Böngészése

外部订单修改

wks 2 éve
szülő
commit
f7de305a45

+ 2 - 2
src/main/java/com/ydtech/modules/fee/service/FeeRuleSchemeService.java

@@ -63,7 +63,7 @@ public interface FeeRuleSchemeService {
      * @param level5Proportion 五级比例
      * @return
      */
-    public FeeOrderNewVo.DeptManagerFee calcDeptManagerFee(BigDecimal premium, BigDecimal level1Proportion, BigDecimal level2Proportion,
+     FeeOrderNewVo.DeptManagerFee calcDeptManagerFee(BigDecimal premium, BigDecimal level1Proportion, BigDecimal level2Proportion,
                                                            BigDecimal level3Proportion, BigDecimal level4Proportion, BigDecimal level5Proportion);
 
     /**
@@ -77,7 +77,7 @@ public interface FeeRuleSchemeService {
      * @param taxRate                  税率
      * @return
      */
-    public FeeOrderNewVo.ExportFee calcExportFee(BigDecimal premium, BigDecimal superviseCostsProportion, BigDecimal entranceTotalProportion,
+     FeeOrderNewVo.ExportFee calcExportFee(BigDecimal premium, BigDecimal superviseCostsProportion, BigDecimal entranceTotalProportion,
                                                  BigDecimal deptTotalProportion, BigDecimal retailTotalProportion, BigDecimal taxRate, BigDecimal enterProportion);
 
     /**

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

@@ -616,7 +616,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
                 jqDeptRadio,
                 jqRetailRadio,
                 taxRadio,
-                enterProportion
+                jqReCalcuLateProportion.getProxyProportion()
         );
 
         //商业出口手续费比例
@@ -627,8 +627,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
                 syDeptRadio,
                 syRetailRadio,
                 taxRadio,
-                enterProportion
-
+                syReCalcuLateProportion.getProxyProportion()
         );
 
         //非车出口手续费比例
@@ -639,7 +638,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
                 noDeptRadio,
                 noRetailRadio,
                 taxRadio,
-                enterProportion
+                noReCalcuLateProportion.getProxyProportion()
         );
 
         //出口手续费用
@@ -652,7 +651,6 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
         insFeeOrderNew.setSyExportOtherCostsProportion(twoPeople(syExportFee.getOtherCostsProportion()));
         insFeeOrderNew.setNoExportOtherCostsProportion(twoPeople(noExportFee.getOtherCostsProportion()));
 
-
         //出口其他费用
         insFeeOrderNew.setJqExportOtherCostsPremiums(twoPeople(jqExportFee.getOtherCostsPremiums()));
         insFeeOrderNew.setSyExportOtherCostsPremiums(twoPeople(syExportFee.getOtherCostsPremiums()));
@@ -663,6 +661,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
         insFeeOrderNew.setSyCostsExportProportion(twoPeople(syExportFee.getSuperviseCosts()));
         insFeeOrderNew.setNoCostsExportProportion(twoPeople(noExportFee.getSuperviseCosts()));
 
+        // 外部费用
         insFeeOrderNew.setJqExternalProportion(jqExportFee.getExternalProportion());
         insFeeOrderNew.setJqExportOtherCostsPremiums(jqExportFee.getExternalPremiums());
 
@@ -1313,7 +1312,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
                             retailProportion.getSyRetailLevel1Proportion(),
                             retailProportion.getNoRetailLevel1Proportion());
                     insFeeOrderNew.setFirstDetailPremiums(retailFeeLevel1.getTotalRetailPremiums());
-                    if (parents != null && parents.size() > 0) {
+                    if (parents != null && !parents.isEmpty()) {
                         insFeeOrderNew.setFirstLevelUserId(parents.get(0).getId());
                     }
                 } else {
@@ -1393,15 +1392,15 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
 
         //交强出口手续费比例
         FeeOrderNewVo.ExportFee jqExportFee = feeRuleSchemeService.calcExportFee(insFeeOrderNew.getJqPremium(), new BigDecimal(ptlAgreementProductCostsNew.getJqCostsExportProportion()),
-                insFeeOrderNew.getJqCostsProportion(), jqDeptRadio, retailRadio, taxRadio, enterProportion);
+                insFeeOrderNew.getJqCostsProportion(), jqDeptRadio, retailRadio, taxRadio, jqReCalcuLateProportion.getProxyProportion());
 
         //商业出口手续费比例
         FeeOrderNewVo.ExportFee syExportFee = feeRuleSchemeService.calcExportFee(insFeeOrderNew.getSyPremium(), new BigDecimal(ptlAgreementProductCostsNew.getSyCostsExportProportion()),
-                insFeeOrderNew.getSyCostsProportion(), syDeptRadio, retailRadio, taxRadio, enterProportion);
+                insFeeOrderNew.getSyCostsProportion(), syDeptRadio, retailRadio, taxRadio, syReCalcuLateProportion.getProxyProportion());
 
         //非车出口手续费比例
         FeeOrderNewVo.ExportFee noExportFee = feeRuleSchemeService.calcExportFee(insFeeOrderNew.getNoPremium(), new BigDecimal(ptlAgreementProductCostsNew.getNoCostsExportProportion()),
-                insFeeOrderNew.getNoCostsProportion(), noDeptRadio, retailRadio, taxRadio, enterProportion);
+                insFeeOrderNew.getNoCostsProportion(), noDeptRadio, retailRadio, taxRadio, noReCalcuLateProportion.getProxyProportion());
 
         //出口手续费用
         insFeeOrderNew.setJqExportSuperviseCostsPremiums(twoPeople(jqExportFee.getSuperviseCostsPremiums()));
@@ -1423,7 +1422,7 @@ public class FeeRuleSchemeServiceNewImpl implements FeeRuleSchemeNewService {
         insFeeOrderNew.setSyCostsExportProportion(twoPeople(syExportFee.getSuperviseCosts()));
         insFeeOrderNew.setNoCostsExportProportion(twoPeople(noExportFee.getSuperviseCosts()));
 
-
+        // 外部订单费用
         insFeeOrderNew.setJqExternalProportion(jqExportFee.getExternalProportion());
         insFeeOrderNew.setJqExportOtherCostsPremiums(jqExportFee.getExternalPremiums());
 

+ 1 - 1
src/main/java/com/ydtech/modules/order/aop/aspect/QuoteVerificationAspect.java

@@ -223,7 +223,7 @@ public class QuoteVerificationAspect {
                         List<PtlTaxSourceNew> taxSourceDtoList = ptlTaxSourceNewMapper.selectList(new LambdaQueryWrapper<PtlTaxSourceNew>()
                                 .eq(PtlTaxSourceNew::getInsCompanyId, companyId)
                                 .eq(PtlTaxSourceNew::getDefaultFlag,"1"));
-                        if(taxSourceDtoList!=null && taxSourceDtoList.size()>0){
+                        if(taxSourceDtoList!=null && !taxSourceDtoList.isEmpty()){
                             //throw new SystemException("配置默认协议且部门未排除应走默认逻辑,操作错误,请联系管理员!!");
                           //强制走默认状态
                             String taxAgreementId = ptlTaxSourceNewService.getAgreementId(deptId, userId, companyId, quoteInfo,insuranceRisk.getCode(),orderno);

+ 2 - 0
src/main/java/com/ydtech/modules/order/entity/vo/FeeOrderNewVo.java

@@ -16,6 +16,8 @@ import java.util.List;
 @Data
 public class FeeOrderNewVo implements Serializable {
 
+    private static final long serialVersionUID = -1351499340097428564L;
+
     @ApiModelProperty("费用id")
     private String costsId;
 

+ 16 - 19
src/main/java/com/ydtech/modules/protocols/service/impl/PtlAgreementProductCostsNewServiceImpl.java

@@ -1457,7 +1457,6 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                         .add(jqReCalcuLateProportion.getDept_level_3_proportion())
                         .add(jqReCalcuLateProportion.getDept_level_4_proportion())
                         .add(jqReCalcuLateProportion.getDept_level_5_proportion());
-
         FeeOrderNewVo.DeptManagerFee jqDeptManagerFee = feeRuleSchemeService.calcDeptManagerFee(
                 insFeeOrderNew.getJqPremium(),
                 jqReCalcuLateProportion.getDept_level_1_proportion(),
@@ -1465,17 +1464,12 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                 jqReCalcuLateProportion.getDept_level_3_proportion(),
                 jqReCalcuLateProportion.getDept_level_4_proportion(),
                 jqReCalcuLateProportion.getDept_level_5_proportion());
-
-        jqDeptManagerFee.setInsuranceType("交强险");
-        deptManagerFeeList.add(jqDeptManagerFee);
-
         BigDecimal syDeptRadio =
                 syReCalcuLateProportion.getDept_level_1_proportion()
                         .add(syReCalcuLateProportion.getDept_level_2_proportion())
                         .add(syReCalcuLateProportion.getDept_level_3_proportion())
                         .add(syReCalcuLateProportion.getDept_level_4_proportion())
                         .add(syReCalcuLateProportion.getDept_level_5_proportion());
-
         FeeOrderNewVo.DeptManagerFee syDeptManagerFee = feeRuleSchemeService.calcDeptManagerFee(
                 insFeeOrderNew.getSyPremium(),
                 syReCalcuLateProportion.getDept_level_1_proportion(),
@@ -1483,17 +1477,12 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                 syReCalcuLateProportion.getDept_level_3_proportion(),
                 syReCalcuLateProportion.getDept_level_4_proportion(),
                 syReCalcuLateProportion.getDept_level_5_proportion());
-
-        syDeptManagerFee.setInsuranceType("商业险");
-        deptManagerFeeList.add(syDeptManagerFee);
-
         BigDecimal noDeptRadio =
                 noReCalcuLateProportion.getDept_level_1_proportion()
                         .add(noReCalcuLateProportion.getDept_level_2_proportion())
                         .add(noReCalcuLateProportion.getDept_level_3_proportion())
                         .add(noReCalcuLateProportion.getDept_level_4_proportion())
                         .add(noReCalcuLateProportion.getDept_level_5_proportion());
-
         FeeOrderNewVo.DeptManagerFee noDeptManagerFee = feeRuleSchemeService.calcDeptManagerFee(
                 insFeeOrderNew.getNoPremium(),
                 noReCalcuLateProportion.getDept_level_1_proportion(),
@@ -1501,13 +1490,7 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
                 noReCalcuLateProportion.getDept_level_3_proportion(),
                 noReCalcuLateProportion.getDept_level_4_proportion(),
                 noReCalcuLateProportion.getDept_level_5_proportion());
-
-        noDeptManagerFee.setInsuranceType("非车险");
-        deptManagerFeeList.add(noDeptManagerFee);
-
         insFeeOrderNew.assignDept(jqDeptManagerFee, syDeptManagerFee, noDeptManagerFee);
-
-
         //endregion
 
         //region 出口费用
@@ -1528,7 +1511,6 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         jqExportFee.setInsuranceType("交强险");
         exportFeeList.add(jqExportFee);
 
-
         //商业出口费用
         FeeOrderNewVo.ExportFee syExportFee = feeRuleSchemeService.calcExportFee(
                 insFeeOrderNew.getSyPremium(),
@@ -1560,6 +1542,22 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
 
         //endregion
 
+        //region 外部订单费用
+        jqDeptManagerFee.setExternalPremiums(jqExportFee.getExternalPremiums());
+        jqDeptManagerFee.setExternalProportion(jqExportFee.getExternalProportion());
+        jqDeptManagerFee.setInsuranceType("交强险");
+        deptManagerFeeList.add(jqDeptManagerFee);
+        syDeptManagerFee.setInsuranceType("商业险");
+        syDeptManagerFee.setExternalPremiums(syExportFee.getExternalPremiums());
+        syDeptManagerFee.setExternalProportion(syExportFee.getExternalProportion());
+        deptManagerFeeList.add(syDeptManagerFee);
+        noDeptManagerFee.setInsuranceType("非车险");
+        noDeptManagerFee.setExternalPremiums(noExportFee.getExternalPremiums());
+        noDeptManagerFee.setExternalProportion(noExportFee.getExternalProportion());
+        deptManagerFeeList.add(noDeptManagerFee);
+        //endregion
+
+        // 外部订单
         insFeeOrderNew.setJqExternalProportion(jqExportFee.getExternalProportion());
         insFeeOrderNew.setJqExportOtherCostsPremiums(jqExportFee.getExternalPremiums());
 
@@ -1574,7 +1572,6 @@ public class PtlAgreementProductCostsNewServiceImpl extends ServiceImpl<PtlAgree
         resultFeeOrderNewVo.setExportFee(exportFeeList);
 //        resultFeeOrderNewVo.setRetailFee(distributionLevelVoList);
 
-
         //ins_fee_order_new 保存新的费用
         //入口
         insFeeOrderNew.setJqCostsProportion(entranceFeeList.get(0).getTotalProportion());