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

Merge remote-tracking branch 'origin/dev_jzg_lipf_v20260622' into dev_jzg_lipf_v20260622

jiakai 1 месяц назад
Родитель
Сommit
4d371995ea

+ 5 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/SettlementReportQueryVo.java

@@ -48,6 +48,11 @@ public class SettlementReportQueryVo extends PageRequest {
     @Schema(description = "结算开始时间")
     private String settlementStartTime;
 
+    @Schema(description = "回款开始时间")
+    private String receivePaymentDateBegin;
+    @Schema(description = "回款结束时间")
+    private String receivePaymentDateEnd;
+
     @Schema(description = "开票结束时间")
     private String settlementEndTime;
 

+ 26 - 15
tenant/organization/src/main/java/com/jzg/organization/controller/ReceivableController.java

@@ -830,26 +830,37 @@ public class ReceivableController {
 
     @PostMapping("receiverSettlementReport")
     @Operation(summary = "对接人结算报表")
-    public HttpResult<Page<ReceiverSettlementReportDto>> receiverSettlementReport(@RequestBody SettlementReportQueryVo settlementReportQueryVo) {
-        Page page = settlementReportQueryVo.getPage();
-        settlementReportQueryVo.setSettlementStartTime(settlementReportQueryVo.getStartTime());
-        settlementReportQueryVo.setSettlementEndTime(settlementReportQueryVo.getEndTime());
-        if(StrUtil.isEmpty(settlementReportQueryVo.getSettlementEndTime()) && StrUtil.isEmpty(settlementReportQueryVo.getSettlementStartTime()) )  {
-            return HttpResult.ok(receivableService.receiverSettlementReport(page,settlementReportQueryVo));
+    public HttpResult<Page<ReceiverSettlementReportDto>> receiverSettlementReport(@RequestBody SettlementReportQueryVo vo) {
+        Page page = vo.getPage();
+        vo.setSettlementStartTime(vo.getStartTime());
+        vo.setSettlementEndTime(vo.getEndTime());
+        if(StrUtil.isEmpty(vo.getSettlementEndTime()) && StrUtil.isEmpty(vo.getSettlementStartTime()) && StrUtil.isEmpty(vo.getReceivePaymentDateBegin()) && StrUtil.isEmpty(vo.getReceivePaymentDateEnd()))  {
+            return HttpResult.ok(receivableService.receiverSettlementReport(page,vo));
         }else{
-            if(StrUtil.isNotEmpty(settlementReportQueryVo.getSettlementStartTime())){
-                LocalDateTime localDateTime = LocalDate.parse(settlementReportQueryVo.getSettlementStartTime()).atStartOfDay();
-                settlementReportQueryVo.setSettlementStartTime(DateUtil.formatLocalDateTime(localDateTime));
+            if(StrUtil.isNotEmpty(vo.getSettlementStartTime())){
+                LocalDateTime localDateTime = LocalDate.parse(vo.getSettlementStartTime()).atStartOfDay();
+                vo.setSettlementStartTime(DateUtil.formatLocalDateTime(localDateTime));
             }
-            if(StrUtil.isNotEmpty(settlementReportQueryVo.getSettlementEndTime())){
-                LocalDateTime localDateTime = LocalDate.parse(settlementReportQueryVo.getSettlementEndTime()).plusDays(1).atStartOfDay();
-                settlementReportQueryVo.setSettlementEndTime(DateUtil.formatLocalDateTime(localDateTime));
+            if(StrUtil.isNotEmpty(vo.getSettlementEndTime())){
+                LocalDateTime localDateTime = LocalDate.parse(vo.getSettlementEndTime()).plusDays(1).atStartOfDay();
+                vo.setSettlementEndTime(DateUtil.formatLocalDateTime(localDateTime));
             }
-            settlementReportQueryVo.setStartTime(null);
-            settlementReportQueryVo.setEndTime(null);
+
+
+            if(StrUtil.isNotEmpty(vo.getReceivePaymentDateBegin())){
+                LocalDateTime localDateTime = LocalDate.parse(vo.getReceivePaymentDateBegin()).atStartOfDay();
+                vo.setReceivePaymentDateBegin(DateUtil.formatLocalDateTime(localDateTime));
+            }
+            if(StrUtil.isNotEmpty(vo.getReceivePaymentDateEnd())){
+                LocalDateTime localDateTime = LocalDate.parse(vo.getReceivePaymentDateEnd()).plusDays(1).atStartOfDay();
+                vo.setReceivePaymentDateEnd(DateUtil.formatLocalDateTime(localDateTime));
+            }
+
+            vo.setStartTime(null);
+            vo.setEndTime(null);
             // 备注一下: 对于结算时间不为空的时候,查询出来的结算状态都是已结算的数据
             // 当勾选了结算时间后,需要反着进行查询, 并且将结算金额为0的数据过滤掉
-            return HttpResult.ok(receivableService.receiverSettlementReportWithSettlemetnDate(page,settlementReportQueryVo));
+            return HttpResult.ok(receivableService.receiverSettlementReportWithSettlemetnDate(page,vo));
         }
     }
 

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

@@ -34,7 +34,12 @@
         <where>
             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}
+            <if test="vo.settlementStartTime!= null">
+                and ipiis.create_time &gt;= #{vo.settlementStartTime} and ipiis.create_time &lt; #{vo.settlementEndTime}
+            </if>
+            <if test="vo.receivePaymentDateBegin != null">
+                and ipiis.receive_payment_date &gt;= #{vo.receivePaymentDateBegin} and ipiis.receive_payment_date &lt; #{vo.receivePaymentDateEnd}
+            </if>
             <if test="vo.contactPerson != null and vo.contactPerson != ''">
                 and ipii.contact_person = #{vo.contactPerson}
             </if>