Просмотр исходного кода

平台应收 结算报表-对接人报表,结算时间筛选项筛选结果不对
平台应收 结算报表-对接人报表,结算状态筛选项筛选结果不对,没结清但是在已结清中筛选出来了

lipf 1 месяц назад
Родитель
Сommit
a02e73a5b6

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

@@ -847,6 +847,7 @@ public class ReceivableController {
             }
             }
             settlementReportQueryVo.setStartTime(null);
             settlementReportQueryVo.setStartTime(null);
             settlementReportQueryVo.setEndTime(null);
             settlementReportQueryVo.setEndTime(null);
+            // 备注一下: 对于结算时间不为空的时候,查询出来的结算状态都是已结算的数据
             // 当勾选了结算时间后,需要反着进行查询, 并且将结算金额为0的数据过滤掉
             // 当勾选了结算时间后,需要反着进行查询, 并且将结算金额为0的数据过滤掉
             return HttpResult.ok(receivableService.receiverSettlementReportWithSettlemetnDate(page,settlementReportQueryVo));
             return HttpResult.ok(receivableService.receiverSettlementReportWithSettlemetnDate(page,settlementReportQueryVo));
         }
         }

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

@@ -33,6 +33,7 @@
         ipiis.invoice_id = ipii.id
         ipiis.invoice_id = ipii.id
         <where>
         <where>
             ipii.invoice_type in (5, 6)
             ipii.invoice_type in (5, 6)
+            and ipiis.is_delete = 0
             and ipiis.create_time &gt;= #{vo.settlementStartTime} and ipiis.create_time &lt;= #{vo.settlementEndTime}
             and ipiis.create_time &gt;= #{vo.settlementStartTime} and ipiis.create_time &lt;= #{vo.settlementEndTime}
             <if test="vo.contactPerson != null and vo.contactPerson != ''">
             <if test="vo.contactPerson != null and vo.contactPerson != ''">
                 and ipii.contact_person = #{vo.contactPerson}
                 and ipii.contact_person = #{vo.contactPerson}

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

@@ -1978,6 +1978,16 @@
             <if test="settlementReportQueryVo.companyId != null and settlementReportQueryVo.companyId != ''">
             <if test="settlementReportQueryVo.companyId != null and settlementReportQueryVo.companyId != ''">
                 AND ipi.company_id = #{settlementReportQueryVo.companyId}
                 AND ipi.company_id = #{settlementReportQueryVo.companyId}
             </if>
             </if>
+            <if test="settlementReportQueryVo.settlementStatus != null ">
+                <choose >
+                    <when test=" 1 == settlementReportQueryVo.settlementStatus">
+                        and ipi.settlement_status = 1
+                    </when>
+                    <otherwise>
+                        and ipi.settlement_status != 1
+                    </otherwise>
+                </choose>
+            </if>
             <if test="settlementReportQueryVo.receiver != null and settlementReportQueryVo.receiver != ''">
             <if test="settlementReportQueryVo.receiver != null and settlementReportQueryVo.receiver != ''">
                 AND ipi.contact_person = #{settlementReportQueryVo.receiver}
                 AND ipi.contact_person = #{settlementReportQueryVo.receiver}
             </if>
             </if>