Qchen 3 месяцев назад
Родитель
Сommit
f0caf17069

+ 12 - 0
commons/src/main/java/com/jzg/commons/entity/po/InsFeeOrders.java

@@ -224,6 +224,10 @@ public class InsFeeOrders {
     @Schema(description = "一级分销员id")
     private String firstDistributorId;
 
+    @Schema(description = "一级分销员")
+    @TableField(exist = false)
+    private String firstDistributorName;
+
     @Schema(description = "一级分销比例")
     private BigDecimal firstDistributionRatio;
 
@@ -233,6 +237,10 @@ public class InsFeeOrders {
     @Schema(description = "二级分销员id")
     private String secondDistributorId;
 
+    @Schema(description = "二级分销员")
+    @TableField(exist = false)
+    private String secondDistributorName;
+
     @Schema(description = "二级分销比例")
     private BigDecimal secondDistributionRatio;
 
@@ -242,6 +250,10 @@ public class InsFeeOrders {
     @Schema(description = "三级分销员id")
     private String thirdDistributorId;
 
+    @Schema(description = "三级分销员")
+    @TableField(exist = false)
+    private String thirdDistributorName;
+
     @Schema(description = "三级分销比例")
     private BigDecimal thirdDistributionRatio;
 

+ 39 - 0
commons/src/main/java/com/jzg/commons/entity/vo/InsFeeOrdersVo.java

@@ -148,6 +148,33 @@ public class InsFeeOrdersVo {
     @Schema(description = "驾意险出口留点费用")
     private String jyExportKeepPointPremium;
 
+    @Schema(description = "一级分销费")
+    private String firstDistributionPremium;
+
+    @Schema(description = "二级分销费")
+    private String secondDistributionPremium;
+
+    @Schema(description = "三级分销费")
+    private String thirdDistributionPremium;
+
+    @Schema(description = "一级分销比例")
+    private BigDecimal firstDistributionRatio;
+
+    @Schema(description = "二级分销比例")
+    private BigDecimal secondDistributionRatio;
+
+    @Schema(description = "三级分销比例")
+    private BigDecimal thirdDistributionRatio;
+
+    @Schema(description = "一级分销员")
+    private String firstDistributionMember;
+
+    @Schema(description = "二级分销员")
+    private String secondDistributionMember;
+
+    @Schema(description = "三级分销员")
+    private String thirdDistributionMember;
+
     @Schema(description = "权益相关:可用金额<可用金额=出口费用➖出口人留点费用>")
     private BigDecimal availableAmount;
 
@@ -207,6 +234,18 @@ public class InsFeeOrdersVo {
         this.syExportKeepPointPremium = insFeeOrders.getSyExportKeepPointPremium() != null ? insFeeOrders.getSyExportKeepPointPremium().toString() : "0.00";
         this.jyExportKeepPointPremium = insFeeOrders.getJyExportKeepPointPremium() != null ? insFeeOrders.getJyExportKeepPointPremium().toString() : "0.00";
 
+        this.firstDistributionPremium = insFeeOrders.getFirstDistributionFee() != null ? insFeeOrders.getFirstDistributionFee().toString() : "0.00";
+        this.secondDistributionPremium = insFeeOrders.getSecondDistributionFee() != null ? insFeeOrders.getSecondDistributionFee().toString() : "0.00";
+        this.thirdDistributionPremium = insFeeOrders.getThirdDistributionFee() != null ? insFeeOrders.getThirdDistributionFee().toString() : "0.00";
+
+        this.firstDistributionRatio = insFeeOrders.getFirstDistributionRatio() != null ? insFeeOrders.getFirstDistributionRatio() : BigDecimal.ZERO;
+        this.secondDistributionRatio = insFeeOrders.getSecondDistributionRatio() != null ? insFeeOrders.getSecondDistributionRatio() : BigDecimal.ZERO;
+        this.thirdDistributionRatio = insFeeOrders.getThirdDistributionRatio() != null ? insFeeOrders.getThirdDistributionRatio() : BigDecimal.ZERO;
+
+        this.firstDistributionMember = insFeeOrders.getFirstDistributorName() != null ? insFeeOrders.getFirstDistributorName() : "";
+        this.secondDistributionMember = insFeeOrders.getSecondDistributorName() != null ? insFeeOrders.getSecondDistributorName() : "";
+        this.thirdDistributionMember = insFeeOrders.getThirdDistributorName() != null ? insFeeOrders.getThirdDistributorName() : "";
+
         this.availableAmount = insFeeOrders.getAvailableAmount() != null ? insFeeOrders.getAvailableAmount() : BigDecimal.ZERO;
         this.remainingAmount = insFeeOrders.getRemainingAmount() != null ? insFeeOrders.getRemainingAmount() : BigDecimal.ZERO;
         this.usedAmount = insFeeOrders.getUsedAmount() != null ? insFeeOrders.getUsedAmount() : BigDecimal.ZERO;

+ 27 - 2
tenant/insurance/quotation-summary/src/main/java/com/jzg/quotation/summary/service/impl/InsOrdersServiceImpl.java

@@ -520,8 +520,20 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         // 费用信息
         InsFeeOrders insFeeOrders = insFeeOrdersMapper.selectOne(new LambdaQueryWrapper<InsFeeOrders>()
                 .eq(InsFeeOrders::getOrderNo, insOrdersVo.getInsOrders().getId()));
-        // 比例信息
+        // 比例信息 分销员信息
         if (insFeeOrders != null) {
+            HttpResult<SysUserJzgInfo> firstDistributor = orgClient.getUserInfoById(insFeeOrders.getFirstDistributorId());
+            HttpResult<SysUserJzgInfo> secondDistributor = orgClient.getUserInfoById(insFeeOrders.getSecondDistributorId());
+            HttpResult<SysUserJzgInfo> thirdDistributor = orgClient.getUserInfoById(insFeeOrders.getThirdDistributorId());
+            if (firstDistributor.getData() != null) {
+                insFeeOrders.setFirstDistributorName(firstDistributor.getData().getName());
+            }
+            if (secondDistributor.getData() != null) {
+                insFeeOrders.setSecondDistributorName(secondDistributor.getData().getName());
+            }
+            if (thirdDistributor.getData() != null) {
+                insFeeOrders.setThirdDistributorName(thirdDistributor.getData().getName());
+            }
             insOrdersVo.setCostRatio(new PtlAgreementCostRatioVo(insFeeOrders));
             insOrdersVo.setFeeOrdersVo(new InsFeeOrdersVo(insFeeOrders));
         }
@@ -1356,8 +1368,21 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         // 费用信息
         InsFeeOrders insFeeOrders = insFeeOrdersMapper.selectOne(new LambdaQueryWrapper<InsFeeOrders>()
                 .eq(InsFeeOrders::getOrderNo, ordersNo));
-        // 比例信息
+
+        // 比例信息 分销员信息
         if (insFeeOrders != null) {
+            HttpResult<SysUserJzgInfo> firstDistributor = orgClient.getUserInfoById(insFeeOrders.getFirstDistributorId());
+            HttpResult<SysUserJzgInfo> secondDistributor = orgClient.getUserInfoById(insFeeOrders.getSecondDistributorId());
+            HttpResult<SysUserJzgInfo> thirdDistributor = orgClient.getUserInfoById(insFeeOrders.getThirdDistributorId());
+            if (firstDistributor.getData() != null) {
+                insFeeOrders.setFirstDistributorName(firstDistributor.getData().getName());
+            }
+            if (secondDistributor.getData() != null) {
+                insFeeOrders.setSecondDistributorName(secondDistributor.getData().getName());
+            }
+            if (thirdDistributor.getData() != null) {
+                insFeeOrders.setThirdDistributorName(thirdDistributor.getData().getName());
+            }
             resultVo.setCostRatio(new PtlAgreementCostRatioVo(insFeeOrders));
             resultVo.setInsFeeOrders(new InsFeeOrdersVo(insFeeOrders));
         }