Преглед изворни кода

在ins_ply_income 表里面添加了一个支公司的公司id

partner_company_id
lipf пре 1 месец
родитељ
комит
2c8aea99a0

+ 8 - 3
commons/src/main/java/com/jzg/commons/entity/finance/po/InsPlyIncome.java

@@ -82,11 +82,17 @@ public class InsPlyIncome extends BaseModel {
     @ExcelProperty("保司名称")
     private String companyName;
 
-    @Schema(description = "保司名称")
+    @Schema(description = "保险机构(多级名称)")
     @TableField(exist = false)
-    @ExcelProperty("保司名称")
+    @ExcelProperty("保险机构(多级名称)")
     private String partnerCompanyName;
 
+    @Schema(description = "保险机构")
+    @TableField(exist = false)
+    @ExcelProperty("保险机构")
+    private String partnerCompanySimplyName;
+
+
     @Schema(description = "协议Id")
     @ExcelProperty("协议Id")
     @ExcelIgnore
@@ -387,7 +393,6 @@ public class InsPlyIncome extends BaseModel {
     @ExcelProperty("非车应收金额")
     private BigDecimal jyTotalPremiums;
 
-    @TableField(exist = false)
     @Schema(description = "合作保险公司ID")
     @ExcelIgnore
     private String partnerCompanyId;

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

@@ -1209,7 +1209,3 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         return res.getRecords();
     }
 }
-
-
-
-

+ 12 - 2
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -1383,9 +1383,13 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         records.forEach(insPlyIncome -> {
             if(StrUtil.isNotEmpty(insPlyIncome.getPartnerCompanyId())){
                 insPlyIncome.setPartnerCompanyName(allCompanyHierarchyPaths.getOrDefault(insPlyIncome.getPartnerCompanyId(),insPlyIncome.getPartnerCompanyId()));
+                if(StrUtil.isNotEmpty(insPlyIncome.getPartnerCompanyName())){
+                    String[] split = insPlyIncome.getPartnerCompanyName().split("/");
+                    if(split.length > 0){
+                        insPlyIncome.setPartnerCompanySimplyName(split[split.length-1]);
+                    }
+                }
             }
-
-
             if("0".equals(insPlyIncome.getSettlementStatus())){
                 insPlyIncome.setSettlementStatusName("未结算");
             }else if("1".equals(insPlyIncome.getSettlementStatus())){
@@ -1750,7 +1754,13 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
             InsPlyIncomeInvoice invoice = new InsPlyIncomeInvoice();
             BeanUtils.copyProperties(invoicingVo, invoice);
             invoice.setId(IdGenerate.nextId());
+
+//            String incomeId = invoicingVo.getIncomeIds().get(0);
+
+            // 这里的公司应该是支公司的公司
             invoice.setCompanyId(invoicingVo.getCompanyId());
+
+            
             invoice.setInvoiceType(invoicingVo.getInvoiceType());
             //  开票类型  1、手续费  2、跟单费  3、驾意险手续费 4、驾意险跟单费 5、平台应收-车险 6、平台应收-非车险
             if("1".equals(invoicingVo.getInvoiceType()) || "2".equals(invoicingVo.getInvoiceType())){

+ 1 - 0
tenant/organization/src/main/resources/mapper/ReceivableMapper.xml

@@ -165,6 +165,7 @@
         pa.id AS agreement_id,
         pa.agreement_name,
         pa.agreement_type,
+        pa.partner_company_id,
         io.product_id,
         io.product_name,
         io.pay_time,