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

Merge remote-tracking branch 'origin/dev_jzg_lipf_v20260622'

jiakai пре 3 недеља
родитељ
комит
aa8e631838

+ 32 - 162
commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ImportContentExt.java

@@ -1,13 +1,12 @@
 package com.jzg.commons.entity.finance.vo.importimcome;
 
-import cn.hutool.core.collection.CollUtil;
+
 import cn.hutool.core.util.StrUtil;
+import com.jzg.commons.entity.finance.po.InsPlyIncome;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 import java.io.Serial;
-import java.io.Serializable;
-import java.util.Objects;
 
 /**
  * Excel 表格字段填充后的完整数据信息
@@ -15,184 +14,55 @@ import java.util.Objects;
  * @date 2026/8/4 9:14
  */
 @Data
-public class ImportContentExt implements Serializable {
+public class ImportContentExt extends ExcelContent4Platform {
     @Serial
     private static final long serialVersionUID = 8609830028190910294L;
 
-    @Schema(description = "车牌号")
-    private String licenseNo;
-
-    @Schema(description = "交强险保单号")
-    private String jqPolicyNo;
-
-    @Schema(description = "商业险保单号")
-    private String syPolicyNo;
-
-    @Schema(description = "非车险保单号")
-    private String jyPolicyNo;
-
-    @Schema(description = "交强险手续费比例")
-    private String jqSuperviseCostsProportion;
-
-    @Schema(description = "交强险跟单费比例")
-    private String jqOtherCostsProportion;
-
-    @Schema(description = "商业险手续费比例")
-    private String sySuperviseCostsProportion;
-
-    @Schema(description = "商业险跟单费比例")
-    private String syOtherCostsProportion;
-
-
-    @Schema(description = "非车险手续费比例")
-    private String jySuperviseCostsProportion;
-
-    @Schema(description = "非车险跟单费比例")
-    private String jyOtherCostsProportion;
-
-
-    @Schema(description = "交强险入口比例")
-    private String jqInletRatio;
-
-    @Schema(description = "商业险入口比例")
-    private String syInletRatio;
-
-    @Schema(description = "非车险入口比例")
-    private String jyInletRatio;
-
-    @Schema(description = "选中类型")
-    // 1 全部数据选中  2 选中部分数据
-    private String selectedType;
-
     @Schema(description = "订单号")
     private String orderNo;
 
-    @Schema(description = "id")
-    private String id;
-
-    @Schema(description = "签单时间")
-    private String signingTime;
-
-    @Schema(description = "协议类型")
-    private String agreementType;
-
-    @Schema(description = "险种名称")
-    private String productName;
-
-    @Schema(description = "被保险人姓名")
-    private String insuredPerson;
+    @Schema(description = "保险机构")
+    private String parternerCompanyId;
 
-    @Schema(description = "公司名称")
-    private String companyName;
+    @Schema(description = "应收订单的ID")
+    private String incomeId;
 
     @Schema(description = "对接人")
     private String contactPerson;
 
-    @Schema(description = "对接人手机号")
-    private String contactPersonPhone;
-
-    @Schema(description = "错误信息")
-    private String errorMessage;
-
-    @Schema(description = "协议Id")
-    private String agreementId;
-
-    @Schema(description = "协议名称")
-    private String agreementName;
-
-    @Schema(description = "租户代码")
-    private String systemCode;
-
-    @Schema(description = "保险机构")
-    private String partnerCompanyId;
-
-    @Schema(description = "交强保费")
-    private String jqPremium;
-
-    @Schema(description = "商业保费")
-    private String syPremium;
+    @Schema(description = "应收订单")
+    private InsPlyIncome insPlyIncome;
 
-    @Schema(description = "驾意保费")
-    private String jyPremium;
+    //  20 表示平台协议  11表示车险手续费 12 表示非车险手续费
+    @Schema(description = "类型")
+    private String type;
 
     public ImportResultVo checkEmpty(){
-        ImportResultVo resultVo = new ImportResultVo();
-        resultVo.setSuccess(false);
-        // 基础必填字段校验
-        if (StrUtil.isBlank(this.getSigningTime())) {
-            resultVo.getMessage().add("签单时间不能为空");
-        }
-        if (StrUtil.isBlank(this.getOrderNo())) {
-            resultVo.getMessage().add("订单号不能为空");
-        }
-        if (StrUtil.isBlank(this.getLicenseNo())) {
-            resultVo.getMessage().add("车牌号不能为空");
-        }
-        if (StrUtil.isBlank(this.getProductName())) {
-            resultVo.getMessage().add("险种名称不能为空");
+        ImportResultVo vo = new ImportResultVo();
+        if(StrUtil.isEmpty(this.orderNo)){
+            vo.addMessage(String.format("订单不存在,车牌号是[%s]",this.getLicenseNo()));
+            return vo;
         }
-//        if (StrUtil.isBlank(this.getInsuredPerson())) {
-//            resultVo.getMessage().add("被保险人姓名不能为空");
-//        }
-        if (StrUtil.isBlank(this.getAgreementType())) {
-            resultVo.getMessage().add("协议类型不能为空");
+        if (StrUtil.isEmpty(this.incomeId)) {
+            vo.addMessage(String.format("订单没有进入应收,车牌号是[%s]",this.getLicenseNo()));
+            return vo;
         }
-//        if (StrUtil.isBlank(this.getContactPerson())) {
-//            resultVo.getMessage().add("对接人不能为空");
-//        }
-//        if (StrUtil.isBlank(this.getAgreementType())) {
-//            resultVo.getMessage().add("对接人手机号不能为空");
-//        }
-
-        // 交强险:有保单号 → 手续费、跟单费必填
-//        if (StrUtil.isNotBlank(this.getJqPolicyNo())
-//                || StrUtil.isNotBlank(this.getJqSuperviseCostsProportion())
-//                || StrUtil.isNotBlank(this.getJqOtherCostsProportion())) {
-//            if (StrUtil.isBlank(this.getJqPolicyNo())) {
-//                resultVo.getMessage().add("交强险保单号不能为空");
-//            }
-//            if (StrUtil.isBlank(this.getJqSuperviseCostsProportion())) {
-//                resultVo.getMessage().add("交强险手续费比例不能为空");
-//            }
-//            if (StrUtil.isBlank(this.getJqOtherCostsProportion())) {
-//                resultVo.getMessage().add("交强险跟单费比例不能为空");
-//            }
-//        }
-
-        // 商业险:有保单号 → 手续费、跟单费必填
-//        if (StrUtil.isNotBlank(this.getSyPolicyNo())
-//                || StrUtil.isNotBlank(this.getSySuperviseCostsProportion())
-//                || StrUtil.isNotBlank(this.getSyOtherCostsProportion())) {
-//            if (StrUtil.isBlank(this.getJqPolicyNo())) {
-//                resultVo.getMessage().add("商业险保单号不能为空");
-//            }
-//            if (StrUtil.isBlank(this.getSySuperviseCostsProportion())) {
-//                resultVo.getMessage().add("商业险手续费比例不能为空");
-//            }
-//            if (StrUtil.isBlank(this.getSyOtherCostsProportion())) {
-//                resultVo.getMessage().add("商业险跟单费比例不能为空");
-//            }
-//        }
-
-        // 非车险:有保单号 → 手续费、跟单费必填
-        if (StrUtil.isNotBlank(this.getJyPolicyNo())
-                || StrUtil.isNotBlank(this.getJySuperviseCostsProportion())
-                || StrUtil.isNotBlank(this.getJyOtherCostsProportion())) {
-            if (StrUtil.isBlank(this.getJqPolicyNo())) {
-                resultVo.getMessage().add("非车险保单号不能为空");
-            }
-            if (StrUtil.isBlank(this.getJySuperviseCostsProportion())) {
-                resultVo.getMessage().add("非车险手续费比例不能为空");
-            }
-            if (StrUtil.isBlank(this.getJyOtherCostsProportion())) {
-                resultVo.getMessage().add("非车险跟单费比例不能为空");
-            }
+        if(this.insPlyIncome == null){
+            vo.addMessage(String.format("根据订单号没有匹配到应收数据. 车牌号是[%s],订单号是[%s]",this.getLicenseNo(),this.getOrderNo()));
+            return vo;
         }
 
-        if(CollUtil.isEmpty(resultVo.getMessage())){
-            resultVo.setSuccess(true);
+        // TODO 校验手续费比例等信息表格里面的和数据库 ins_ply_income 里面是否一致
+        if("11".equals(this.type)){
+
+        }else if("20".equals(this.type)){
+
+        }else if ("12".equals(this.type)) {
+
+        }else{
+
         }
-        return resultVo;
+        return vo;
     }
 
 }

+ 5 - 0
commons/src/main/java/com/jzg/commons/entity/quote/vo/aggregated/QuoteEchoVo.java

@@ -27,6 +27,7 @@ import lombok.AllArgsConstructor;
 import lombok.Data;
 import lombok.NoArgsConstructor;
 import org.springframework.beans.BeanUtils;
+import org.springframework.format.annotation.DateTimeFormat;
 
 import java.io.Serial;
 import java.math.BigDecimal;
@@ -299,9 +300,13 @@ public class QuoteEchoVo extends QuoteVo {
 
     @Schema(description = "是否是疑问订单")
     private boolean isProblem;
+
     @Schema(description = "疑问订单原因")
     private String problemReason;
+
     @Schema(description = "设为疑问订单的时间")
+    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
     private LocalDateTime problemTime;
 
     @Schema(description = "权益信息")

+ 21 - 0
commons/src/main/java/com/jzg/commons/entity/vo/CostExternalListVo.java

@@ -14,6 +14,14 @@ public class CostExternalListVo {
 
     private String id;
 
+    @Schema(description = "加投比例")
+    private String addThrow;
+
+    @Schema(description = "内部协议id")
+    private String ptlAgreementId;
+
+    @Schema(description = "跟单比例")
+    private String keepPointRatio;
 
     @Schema(description = "协议代码")
     private String agreementCode;
@@ -76,9 +84,22 @@ public class CostExternalListVo {
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private String auditTime;
 
+    @Schema(description = "修改时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private String updateTime;
+
     @Schema(description = "审核人")
     private String auditPerson;
 
+    @Schema(description = "修改人")
+    private String updateBy;
+
+    @Schema(description = "是否有效")
+    private String isDelete;
+
+    @Schema(description = "所属机构编码")
+    private String systemCode;
+
     @Schema(description = "审核描述")
     private String reviewDescription;
 

+ 1 - 1
commons/src/main/java/com/jzg/commons/util/SchemaDescriptionParser.java

@@ -113,6 +113,6 @@ public class SchemaDescriptionParser {
     // --- 测试主函数 ---
     public static void main(String[] args) {
         Map<String, String> result = SchemaDescriptionParser.getSchemaMap();
-        //result.forEach((k, v) -> System.out.println(k + " = " + v));
+        result.forEach((k, v) -> System.out.println(k + " = " + v));
     }
 }

+ 5 - 49
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -2561,7 +2561,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
             } else {
                 existPolicyNoSet.add(policyNo);
             }
-            existCompanyIdSet.add(vo.getCompanyName());
+            existCompanyIdSet.add(vo.getParternerCompanyId());
         }
 
         // 导入只能一个保司
@@ -2570,27 +2570,6 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
             throw new SystemException("导入数据不能包含多个保险公司");
         }
 
-        // 处理数据
-        for (ImportContentExt vo : datas) {
-            // 1. 空数据校验
-            ImportResultVo resultVo = vo.checkEmpty();
-            if (!resultVo.isSuccess()) {
-                vo.setErrorMessage(resultVo.convert2Str());
-                failedExcel.add(vo);
-                continue;
-            }
-
-            // 2. Excel内部保单号重复
-            if (repeatPolicyNoSet.contains(vo.getJqPolicyNo())) {
-                vo.setErrorMessage("保单号重复");
-                failedExcel.add(vo);
-                continue;
-            }
-            ImportContentExt errVO = importIncomeService.spliceData(vo, insertExcel, updateExcel);
-            if(errVO != null){
-                failedExcel.add(errVO);
-            }
-        }
 
         // 执行批量更新
         ImportUpdateExcelResultVo importExcelResultVo = importIncomeService.getDataManipulationResult(updateExcel, insertExcel,failedExcel);
@@ -2609,21 +2588,15 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
      */
     private List<ImportContentExt> parseAndFillContent(MultipartFile file, String type) {
         log.info("解析Excel内容并填充缺失的字段. type=[{}]", type);
-
         if("11".equals(type)){
             List<ExcelContent4PrivateSuperviseCar> excelContents2 = importIncomeService.parseImportExcel4PrivateCar(file);
             return importIncomeService.fillExcelContent4All(excelContents2);
         } if("12".equals(type)){
             List<ExcelContent4PrivateSuperviseNoCar> excelContents3 = importIncomeService.parseImportExcel4PrivateNoCar(file);
             return importIncomeService.fillExcelContent4All(excelContents3);
-//        } if("20".equals(type)){
-//            List<ExcelContent4Platform> excelContents = importIncomeService.parseImportExcel4Platform(file);
-//            return importIncomeService.fillExcelContent4All(excelContents);
         }else{
             List<ExcelContent4Platform> excelContents = importIncomeService.parseImportExcel4Platform(file);
             return importIncomeService.fillExcelContent4All(excelContents);
-//            log.info("解析Excel内容并填充缺失的字段.类型不支持 type=[{}]", type);
-//            return Collections.emptyList();
         }
     }
 
@@ -6230,27 +6203,10 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
      */
     @Override
     public Page<ReceiverSettlementReportDto> receiverSettlementReportWithSettlemetnDate(Page page, SettlementReportQueryVo vo) {
-        log.info("平台协议应收-结算报表-对接人结算报表查询。結算时间不为空 settlementReportQueryVo=[{}]", JSONUtil.toJsonStr(vo));
-        Page<InsPlyIncomeInvoiceSettlement> pageRes = insPlyIncomeInvoiceSettlementMapper.querySettlementBySettlementDate(page,vo);
-        List<InsPlyIncomeInvoiceSettlement> records = pageRes.getRecords();
-        Map<String, List<InsPlyIncomeInvoiceSettlement>> res =  records.stream()
-                .collect(Collectors.groupingBy(InsPlyIncomeInvoiceSettlement::getContactPerson));
-        Page<ReceiverSettlementReportDto> pagDto = new Page<>(page.getPages(), page.getSize());
-        List<ReceiverSettlementReportDto> dtos = new ArrayList<>();
-        for (String s : res.keySet()) {
-            ReceiverSettlementReportDto dto = new ReceiverSettlementReportDto();
-            dto.setReceiver(s);
-            List<InsPlyIncomeInvoiceSettlement> settlements = res.get(s);
-            BigDecimal diffAmount = settlements.stream().map(InsPlyIncomeInvoiceSettlement::getSettlementPaymentDifference).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
-            BigDecimal actualReceivedAmount = settlements.stream().map(InsPlyIncomeInvoiceSettlement::getActualReceivedAmount).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
-            dto.setSettledAmount(actualReceivedAmount.toString());
-            dto.setUnSettledAmount(BigDecimal.ZERO.toString());
-            dto.setTotalReceivable(BigDecimalUtil.add(diffAmount, actualReceivedAmount).toString());
-            dto.setTotalPaymentDifference(diffAmount);
-            dtos.add(dto);
-        }
-        pagDto.setRecords(dtos);
-        return pagDto;
+        // 改为复用全量查询方法,从 ins_ply_income 出发,保持数据口径一致
+        // 时间范围通过 vo.startTime / vo.endTime 由 getReceiverSettlementReport SQL 中的 ipii.invoice_time 过滤
+        log.info("平台协议应收-结算报表-对接人结算报表查询(按时间范围)。settlementReportQueryVo=[{}]", JSONUtil.toJsonStr(vo));
+        return this.receiverSettlementReport(page, vo);
     }
 
     /**

+ 24 - 119
tenant/organization/src/main/java/com/jzg/organization/service/impl/importincome/ImportIncomeServiceImpl.java

@@ -5,21 +5,12 @@ import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.util.StrUtil;
 import com.alibaba.excel.EasyExcel;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.jzg.commons.constants.ProductsType;
-import com.jzg.commons.core.base.BaseController;
-import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.finance.po.InsPlyIncome;
 import com.jzg.commons.entity.finance.vo.importimcome.*;
 import com.jzg.commons.entity.orders.po.InsOrdersPolicy;
-import com.jzg.commons.entity.quote.vo.orders.InsOrdersVo;
-import com.jzg.commons.entity.vo.AgreementVo;
-import com.jzg.commons.entity.vo.InsFeeOrdersVo;
-import com.jzg.commons.util.idgen.IdGenerate;
-import com.jzg.organization.client.InsOrdersClient;
 import com.jzg.organization.excel.listener.InvoiceReceivbleExcel4AllListener;
 import com.jzg.organization.mapper.InsOrdersPolicyMapper;
 import com.jzg.organization.mapper.InsPlyIncomeMapper;
-import com.jzg.organization.mapper.PtlAgreementMapper;
 import com.jzg.organization.service.impl.ExportBaseServiceImpl;
 import com.jzg.organization.service.importincome.ImportIncomeService;
 import org.slf4j.Logger;
@@ -30,8 +21,6 @@ import org.springframework.web.multipart.MultipartFile;
 
 import java.io.InputStream;
 import java.time.Instant;
-import java.time.LocalDateTime;
-import java.time.format.DateTimeFormatter;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -45,13 +34,9 @@ public class ImportIncomeServiceImpl implements ImportIncomeService {
     @Autowired
     private ExportBaseServiceImpl exportBaseService;
     @Autowired
-    private BaseController baseController;
-    @Autowired
-    private InsOrdersClient insOrdersClient;
-    @Autowired
     private InsOrdersPolicyMapper insOrdersPolicyMapper;
     @Autowired
-    private PtlAgreementMapper ptlAgreementMapper;
+    private InsPlyIncomeMapper insPlyIncomeMapper;
 
     private static final Logger log = LoggerFactory.getLogger(ImportIncomeServiceImpl.class);
 
@@ -107,89 +92,6 @@ public class ImportIncomeServiceImpl implements ImportIncomeService {
         return importExcelResultVo;
     }
 
-    /**
-     * 对表格中的内容进行扩展
-     *
-     * @param excelContents
-     * @author lipf
-     * @date 2026/8/4 9:22
-     */
-    @Override
-    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4PrivateSuperviseNoCar> excelContents) {
-        log.info("为私有订单填充数据:excelContents.size=[{}]", CollUtil.size(excelContents));
-        return List.of();
-    }
-
-    /**
-     * 批量处理数据
-     * @param updateExcel 要修改的数据
-     * @param insertExcel 要新增的数据
-     */
-    @Override
-    public ImportContentExt spliceData(ImportContentExt vo,
-                                        List<InsPlyIncome> insertExcel,
-                                        List<InsPlyIncome> updateExcel) {
-
-        // 查询数据库中是否已存在该保单号
-        InsPlyIncome existIncome = baseMapper.selectOne(new LambdaQueryWrapper<InsPlyIncome>()
-                .eq(InsPlyIncome::getJqPolicyNo, vo.getJqPolicyNo()));
-
-        // 封装修改数据
-        InsPlyIncome insPlyIncome = new InsPlyIncome();
-        BeanUtil.copyProperties(vo,insPlyIncome);
-        insPlyIncome.setId(IdGenerate.nextId());
-        insPlyIncome.setLicenseNo(vo.getLicenseNo());
-        insPlyIncome.setJqPolicyNo(vo.getJqPolicyNo());
-        insPlyIncome.setJqSuperviseCostsProportion(vo.getJqSuperviseCostsProportion());
-        insPlyIncome.setJqOtherCostsProportion(vo.getJqOtherCostsProportion());
-        insPlyIncome.setSyPolicyNo(vo.getSyPolicyNo());
-        insPlyIncome.setSySuperviseCostsProportion(vo.getSySuperviseCostsProportion());
-        insPlyIncome.setSyOtherCostsProportion(vo.getSyOtherCostsProportion());
-        insPlyIncome.setJyPolicyNo(vo.getJyPolicyNo());
-        insPlyIncome.setJySuperviseCostsProportion(vo.getJySuperviseCostsProportion());
-        insPlyIncome.setJyOtherCostsProportion(vo.getJyOtherCostsProportion());
-        // 签单时间
-        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
-        insPlyIncome.setSigningTime(LocalDateTime.parse(vo.getSigningTime(), formatter));
-//        // 协议编号
-//        insPlyIncome.setAgreementId(ptlAgreement.getId());
-//        insPlyIncome.setAgreementName(ptlAgreement.getAgreementName());
-//        insPlyIncome.setAgreementType(ptlAgreement.getAgreementType().toString());
-//        insPlyIncome.setSystemCode(ptlAgreement.getSystemCode());
-        // 险种编号
-        insPlyIncome.setProductId(ProductsType.getCodeByDesc(vo.getProductName()));
-        // 险种名称
-        insPlyIncome.setProductName(vo.getProductName());
-        // 被保险人姓名
-        insPlyIncome.setInsuredPerson(vo.getInsuredPerson());
-        // 对接人信息
-        insPlyIncome.setContactPerson(vo.getContactPerson());
-        insPlyIncome.setContactPersonPhone(vo.getContactPersonPhone());
-        // 数据库不存在 → 直接失败
-        if (Objects.isNull(existIncome)) {
-            // 加入修改列表
-            // 机构id
-            insPlyIncome.setDeptId(baseController.getUserDeptId());
-            insPlyIncome.setOrderNo(vo.getOrderNo());
-            insertExcel.add(insPlyIncome);
-        }else{
-            // 数据库已存在 → 继续后续校验
-            // 判断已开票 / 已结算
-            String settlementFlag = "1";
-            if (settlementFlag.equals(existIncome.getSuperviseSettlement()) || settlementFlag.equals(existIncome.getOtherSettlement())
-                    || settlementFlag.equals(existIncome.getJySuperviseSettlement()) || settlementFlag.equals(existIncome.getJyOtherSettlement())
-                    || settlementFlag.equals(existIncome.getPlatformSuperviseSettlement()) || settlementFlag.equals(existIncome.getPlatformOtherSettlement())) {
-                vo.setErrorMessage("应收数据已结算");
-                return vo;
-            }
-            insPlyIncome.setId(existIncome.getId());
-            // 加入修改列表
-            updateExcel.add(insPlyIncome);
-        }
-        return null;
-    }
-
-
     /**
      * 对表格中的内容进行扩展
      * <p>
@@ -244,28 +146,31 @@ public class ImportIncomeServiceImpl implements ImportIncomeService {
             }
             log.info("处理订单号是[{}]的订单",orderNO);
             ext.setOrderNo(orderNO);
-            HttpResult<InsOrdersVo> insOrdersVoHttpResult = insOrdersClient.selectById(orderNO);
-            InsOrdersVo data = insOrdersVoHttpResult.getData();
-            if (data!= null){
-                BeanUtil.copyProperties(data,ext);
-                if(data.getSigningTime() != null){
-                    ext.setSigningTime(data.getSigningTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
-                }
-                String agreementId = data.getAgreementId();
-                if(StrUtil.isNotEmpty(agreementId)){
-                    AgreementVo agreementVo = ptlAgreementMapper.queryById(agreementId);
-                    if(agreementVo != null){
-                        ext.setPartnerCompanyId(agreementVo.getPartnerCompanyId());
-                    }
-                }
-                InsFeeOrdersVo feeOrdersVo = data.getFeeOrdersVo();
-                if(BeanUtil.isEmpty(feeOrdersVo)){
-                    ext.setJqPremium(feeOrdersVo.getJqPremium());
-                    ext.setSyPremium(feeOrdersVo.getSyPremium());
-                    ext.setJyPremium(feeOrdersVo.getJyPremium());
-                }
 
+            LambdaQueryWrapper<InsPlyIncome> wrapper = new LambdaQueryWrapper();
+            wrapper.eq(InsPlyIncome::getOrderNo,orderNO);
+            List<InsPlyIncome> insPlyIncomes = insPlyIncomeMapper.selectList(wrapper);
+            if(CollUtil.isEmpty(insPlyIncomes)){
+                log.info("订单号为[{}]的数据没有进入应收",orderNO);
+                continue;
             }
+            InsPlyIncome insPlyIncome = insPlyIncomes.get(0);
+
+            ext.setIncomeId(insPlyIncome.getId());
+            ext.setContactPerson(insPlyIncome.getContactPerson());
+            ext.setParternerCompanyId(insPlyIncome.getPartnerCompanyId());
+
+
+            // 校验 手续费等比例是否一致
+            String jqSuperviseCostsProportion = insPlyIncome.getJqSuperviseCostsProportion();
+            String sySuperviseCostsProportion = insPlyIncome.getSySuperviseCostsProportion();
+            String jySuperviseCostsProportion = insPlyIncome.getJySuperviseCostsProportion();
+            String jqOtherCostsProportion = insPlyIncome.getJqOtherCostsProportion();
+            String syOtherCostsProportion = insPlyIncome.getSyOtherCostsProportion();
+            String jyOtherCostsProportion = insPlyIncome.getJyOtherCostsProportion();
+
+
+
             res.add(ext);
         }
         return res;

+ 0 - 17
tenant/organization/src/main/java/com/jzg/organization/service/importincome/ImportIncomeService.java

@@ -24,23 +24,6 @@ public interface ImportIncomeService {
      */
     <T extends InsuranceData> List<ImportContentExt> fillExcelContent4All(List<T> excelContents);
 
-    /**
-     * 对表格中的内容进行扩展
-     *
-     * @author lipf
-     * @date 2026/8/4 9:22
-     */
-    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4PrivateSuperviseNoCar> excelContents);
-
-    /**
-     * 批量处理数据
-     * @param updateExcel
-     * @param insertExcel
-     */
-    public ImportContentExt spliceData(ImportContentExt vo,
-                                       List<InsPlyIncome> insertExcel,
-                                       List<InsPlyIncome> updateExcel);
-
     /**
      * <p>
      * 1. 获取保司名称

+ 25 - 5
tenant/organization/src/main/resources/mapper/PtlAgreementCostExternalMapper.xml

@@ -32,6 +32,7 @@
 
     <resultMap id="ExternalListVoMap" type="com.jzg.commons.entity.vo.CostExternalListVo">
         <result column="id" property="id" />
+        <result column="ptl_agreement_id" property="ptlAgreementId" />
         <result column="agreement_code" property="agreementCode" />
         <result column="agreement_abbreviation" property="agreementAbbreviation" />
         <result column="product_name" property="productName" />
@@ -40,15 +41,23 @@
         <result column="is_inquiry" property="isInquiry" />
         <result column="effective_time" property="effectiveTime" />
         <result column="failure_time" property="failureTime" />
-        <result column="effective" property="effective" />
+        <result column="audit_method" property="auditMethod" />
         <result column="audit_status" property="auditStatus" />
         <result column="is_enabled" property="isEnabled" />
+        <result column="review_description" property="reviewDescription" />
         <result column="contact_person" property="contactPerson" />
         <result column="contact_mobile" property="contactMobile" />
-        <result column="audit_method" property="auditMethod" />
+        <result column="audit_person" property="auditPerson" />
+        <result column="audit_time" property="auditTime" />
         <result column="priority_level" property="priorityLevel" />
+        <result column="add_throw" property="addThrow" />
+        <result column="keep_point_ratio" property="keepPointRatio" />
         <result column="create_time" property="createTime" />
         <result column="create_by" property="createBy" />
+        <result column="update_time" property="updateTime" />
+        <result column="update_by" property="updateBy" />
+        <result column="is_delete" property="isDelete" />
+        <result column="system_code" property="systemCode" />
         <collection property="costExternalTypeAdds" column="id" ofType="com.jzg.commons.entity.vo.CostExternalTypeVo" select="selectCostExternalTypeVo" />
     </resultMap>
 
@@ -121,19 +130,30 @@
     <select id="pageList" resultMap="ExternalListVoMap">
         SELECT
         ce.id,
+        ce.ptl_agreement_id,
         ce.product_name,
         ce.product_id,
-        ce.cost_describe,
-        ce.is_inquiry,
         ce.effective_time,
         ce.failure_time,
+        ce.audit_method,
         ce.audit_status,
         ce.is_enabled,
+        ce.review_description,
+        ce.is_inquiry,
+        ce.cost_describe,
         ce.contact_person,
         ce.contact_mobile,
-        ce.audit_method,
+        ce.audit_person,
+        ce.audit_time,
         ce.create_time,
         ce.create_by,
+        ce.update_time,
+        ce.update_by,
+        ce.is_delete,
+        ce.system_code,
+        ce.priority_level,
+        ce.add_throw,
+        ce.keep_point_ratio,
         pa.agreement_code,
         pa.agreement_abbreviation
         FROM