Browse Source

bugfix:私有应收 审核通过4辆私有订单,但是私有应收中只有两条(手续费和跟单都是.

解决订单审核导出数据不全的问题

<!--        查询应收订单的时候,未结算的订单也需要能够查询出来,因此将下面两个用于区分结算状态的字段注释掉。 要解决的bug是、
            私有应收	审核通过4辆私有订单,但是私有应收中只有两条(手续费和跟单都是)
-->
<!--        <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>-->
lipf 3 months ago
parent
commit
a4c69a06ec

+ 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;
     }
 
-    public List<FeeAuditVo> queryList(FeeAuditParam param) {
+      public List<FeeAuditVo> queryList(FeeAuditParam param) {
         log.info("订单审核-任务中心,查询待审核任务。 param=[{}]", JSONUtil.toJsonStr(param));
         // 获取选中的保险公司条件
         String companyId = param.getCompanyId();
@@ -883,7 +883,13 @@ public class InsFeeAuditServiceImpl extends ServiceImpl<InsFeeAuditMapper, InsFe
      */
     @Override
     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) {
             feeAuditVo.setTotalPayablePremium(feeAuditVo.getTotalPayablePremium().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 ''
         END AS isProblem,
         io.order_source,
-        ioci.vin_no
+        ioci.vin_no,
+        ifo.*
         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_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 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_fee_orders ifo on ifo.order_no  = ifa.order_no  and ifo.is_delete = 0
         <where>
             and ifa.is_delete=0 and ifa.system_code = #{param.systemCode}
             <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")
     @Operation(summary = "导出平台协议数据")
     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));
     }
 

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

@@ -334,12 +334,6 @@
                 #{id}
             </foreach>
         </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)">
             AND ipi.jy_premium != 0
             AND ipi.jy_supervise_settlement = 0