Explorar o código

Merge branch 'dev_jzg_lipf_v20260622'

lipf hai 3 meses
pai
achega
dbe16e9909

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

@@ -167,7 +167,7 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
         return page;
         return page;
     }
     }
 
 
-    public List<FeeAuditVo> queryList(FeeAuditParam param) {
+      public List<FeeAuditVo> queryList(FeeAuditParam param) {
         log.info("订单审核-任务中心,查询待审核任务。 param=[{}]", JSONUtil.toJsonStr(param));
         log.info("订单审核-任务中心,查询待审核任务。 param=[{}]", JSONUtil.toJsonStr(param));
         // 获取选中的保险公司条件
         // 获取选中的保险公司条件
         String companyId = param.getCompanyId();
         String companyId = param.getCompanyId();
@@ -883,7 +883,13 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
      */
      */
     @Override
     @Override
     public String exportAuditList(FeeAuditParam param) {
     public String exportAuditList(FeeAuditParam param) {
-        List<FeeAuditVo> result = queryList(param);
+        param.getPage().setPages(1);
+        param.getPage().setSize(Integer.MAX_VALUE);
+        param.setPages(1);
+        param.setSize(Integer.MAX_VALUE);
+        Page<FeeAuditVo> feeAuditVoPage = this.queryPage(param);
+        List<FeeAuditVo> result = feeAuditVoPage.getRecords();
+        log.info("审核记录导出。导出[{}]条记录。param=[{}]",CollUtil.size(result), JSONUtil.toJsonStr(param));
         for (FeeAuditVo feeAuditVo : result) {
         for (FeeAuditVo feeAuditVo : result) {
             feeAuditVo.setTotalPayablePremium(feeAuditVo.getTotalPayablePremium().setScale(2, RoundingMode.HALF_UP));
             feeAuditVo.setTotalPayablePremium(feeAuditVo.getTotalPayablePremium().setScale(2, RoundingMode.HALF_UP));
             feeAuditVo.setJyPayablePremium(feeAuditVo.getJyPayablePremium().setScale(2, RoundingMode.HALF_UP));
             feeAuditVo.setJyPayablePremium(feeAuditVo.getJyPayablePremium().setScale(2, RoundingMode.HALF_UP));

+ 3 - 1
tenant/insurance/quotation-summary/src/main/resources/mapper/InsFeeAuditMapper.xml

@@ -67,7 +67,8 @@
         ELSE ''
         ELSE ''
         END AS isProblem,
         END AS isProblem,
         io.order_source,
         io.order_source,
-        ioci.vin_no
+        ioci.vin_no,
+        ifo.*
         FROM ins_fee_audit ifa
         FROM ins_fee_audit ifa
         LEFT JOIN ins_orders io on ifa.order_no = io.id AND io.is_delete=0
         LEFT JOIN ins_orders io on ifa.order_no = io.id AND io.is_delete=0
         LEFT JOIN ins_orders_car_info ioci on io.id = ioci.order_no AND ioci.is_delete=0
         LEFT JOIN ins_orders_car_info ioci on io.id = ioci.order_no AND ioci.is_delete=0
@@ -79,6 +80,7 @@
         LEFT JOIN sys_user sua on sua.id = pa.custodian_id AND sua.is_delete=0
         LEFT JOIN sys_user sua on sua.id = pa.custodian_id AND sua.is_delete=0
         LEFT JOIN ins_orders_costs ioc on ioc.order_no = io.id AND ioc.is_delete=0
         LEFT JOIN ins_orders_costs ioc on ioc.order_no = io.id AND ioc.is_delete=0
         LEFT JOIN ins_orders_external_policy ioep on ioep.order_no = io.id AND ioep.is_delete=0
         LEFT JOIN ins_orders_external_policy ioep on ioep.order_no = io.id AND ioep.is_delete=0
+        LEFT JOIN ins_fee_orders ifo on ifo.order_no  = ifa.order_no  and ifo.is_delete = 0
         <where>
         <where>
             and ifa.is_delete=0 and ifa.system_code = #{param.systemCode}
             and ifa.is_delete=0 and ifa.system_code = #{param.systemCode}
             <if test="param.vinNo != null and param.vinNo !=''">
             <if test="param.vinNo != null and param.vinNo !=''">

+ 7 - 0
tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java

@@ -487,6 +487,13 @@ public class ReceivableController {
     @PostMapping("/exportPlatFormReceivable")
     @PostMapping("/exportPlatFormReceivable")
     @Operation(summary = "导出平台协议数据")
     @Operation(summary = "导出平台协议数据")
     public HttpResult exportPlatFormReceivable(@RequestBody ReceivableQueryVo receivableQueryVo) throws IOException {
     public HttpResult exportPlatFormReceivable(@RequestBody ReceivableQueryVo receivableQueryVo) throws IOException {
+        if (StrUtil.isBlank(receivableQueryVo.getQueryType())){
+            receivableQueryVo.setQueryType("1");
+        }
+        // 协议类型 1 平台协议  2 私有协议
+        if (StrUtil.isBlank(receivableQueryVo.getAgreementType())){
+            receivableQueryVo.setAgreementType("1");
+        }
         return HttpResult.ok(receivableService.exportPlatFormReceivable(receivableQueryVo));
         return HttpResult.ok(receivableService.exportPlatFormReceivable(receivableQueryVo));
     }
     }
 
 

+ 21 - 20
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -573,13 +573,14 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         queryWrapper.lambda().eq(InsPlyFollowInvoiceLink::getIsDelete, 0);
         queryWrapper.lambda().eq(InsPlyFollowInvoiceLink::getIsDelete, 0);
         List<InsPlyFollowInvoiceLink> insPlyFollowInvoiceLinks = insPlyFollowInvoiceLinkMapper.selectList(queryWrapper);
         List<InsPlyFollowInvoiceLink> insPlyFollowInvoiceLinks = insPlyFollowInvoiceLinkMapper.selectList(queryWrapper);
 
 
-        if (CollUtil.isNotEmpty(insPlyFollowInvoiceLinks)){
-            List<String> ids = insPlyFollowInvoiceLinks.stream().map(InsPlyFollowInvoiceLink::getId).toList();
-            List<String> followIds = insPlyFollowInvoiceLinks.stream().map(InsPlyFollowInvoiceLink::getFollowId).toList();
-            insPlyFollowInvoiceLinkMapper.deleteByIds(ids);
-            return insFeeFollowOrderMapper.deleteByIds(followIds) > 0;
+        if (CollUtil.isEmpty(insPlyFollowInvoiceLinks)){
+            return false;
         }
         }
-        return Boolean.FALSE;
+        List<String> ids = insPlyFollowInvoiceLinks.stream().map(InsPlyFollowInvoiceLink::getId).toList();
+        List<String> followIds = insPlyFollowInvoiceLinks.stream().map(InsPlyFollowInvoiceLink::getFollowId).toList();
+        insPlyFollowInvoiceLinkMapper.deleteByIds(ids);
+        insFeeFollowOrderMapper.deleteByIds(followIds);
+        return insPlyIncomeInvoiceMapper.deleteById(invoiceId) > 0;
     }
     }
 
 
     @Override
     @Override
@@ -1631,20 +1632,20 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
                         .set(InsPlyIncomeInvoice::getStatus,"0").eq(InsPlyIncomeInvoice::getId,invoiceId));
                         .set(InsPlyIncomeInvoice::getStatus,"0").eq(InsPlyIncomeInvoice::getId,invoiceId));
 
 
         // 查询中间表:使用 QueryWrapper,增加逻辑删除过滤
         // 查询中间表:使用 QueryWrapper,增加逻辑删除过滤
-        LambdaQueryWrapper<InsPlyFollowInvoiceLink> linkQueryWrapper = new LambdaQueryWrapper<>();
-        linkQueryWrapper.eq(InsPlyFollowInvoiceLink::getInvoiceId, invoiceId);
-        linkQueryWrapper.eq(InsPlyFollowInvoiceLink::getIsDelete, SETTLE_STATUS_RESET);
-        List<InsPlyFollowInvoiceLink> linkList = insPlyFollowInvoiceLinkMapper.selectList(linkQueryWrapper);
-
-        if (CollUtil.isNotEmpty(linkList)){
-            // 删除中间表
-            List<String> followLinkIds = linkList.stream().map(InsPlyFollowInvoiceLink::getId).collect(Collectors.toList());
-            insPlyFollowInvoiceLinkMapper.deleteByIds(followLinkIds);
-
-            // 删除跟单表
-            List<String> followIds = linkList.stream().map(InsPlyFollowInvoiceLink::getFollowId).collect(Collectors.toList());
-            insFeeFollowOrderMapper.deleteByIds(followIds);
-        }
+//        LambdaQueryWrapper<InsPlyFollowInvoiceLink> linkQueryWrapper = new LambdaQueryWrapper<>();
+//        linkQueryWrapper.eq(InsPlyFollowInvoiceLink::getInvoiceId, invoiceId);
+//        linkQueryWrapper.eq(InsPlyFollowInvoiceLink::getIsDelete, SETTLE_STATUS_RESET);
+//        List<InsPlyFollowInvoiceLink> linkList = insPlyFollowInvoiceLinkMapper.selectList(linkQueryWrapper);
+
+//        if (CollUtil.isNotEmpty(linkList)){
+//            // 删除中间表
+//            List<String> followLinkIds = linkList.stream().map(InsPlyFollowInvoiceLink::getId).collect(Collectors.toList());
+//            insPlyFollowInvoiceLinkMapper.deleteByIds(followLinkIds);
+//
+//            // 删除跟单表
+//            List<String> followIds = linkList.stream().map(InsPlyFollowInvoiceLink::getFollowId).collect(Collectors.toList());
+//            insFeeFollowOrderMapper.deleteByIds(followIds);
+//        }
         return insPlyIncomeInvoiceSettlementMapper.deleteById(id) > 0;
         return insPlyIncomeInvoiceSettlementMapper.deleteById(id) > 0;
     }
     }
 
 

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

@@ -334,12 +334,6 @@
                 #{id}
                 #{id}
             </foreach>
             </foreach>
         </if>
         </if>
-        <if test="receivableQueryVo.queryType != null and receivableQueryVo.queryType == 1">
-            AND ipi.supervise_settlement = 0
-        </if>
-        <if test="receivableQueryVo.queryType!= null and receivableQueryVo.queryType == 2">
-            AND ipi.other_settlement = 0
-        </if>
         <if test="receivableQueryVo.queryType!= null and (receivableQueryVo.queryType == 3 or receivableQueryVo.queryType == 4)">
         <if test="receivableQueryVo.queryType!= null and (receivableQueryVo.queryType == 3 or receivableQueryVo.queryType == 4)">
             AND ipi.jy_premium != 0
             AND ipi.jy_premium != 0
             AND ipi.jy_supervise_settlement = 0
             AND ipi.jy_supervise_settlement = 0