Ver código fonte

修改bug:
bug1145,私有应收 跟单结算报表-保险公司报表,查看明细-结算明细,7月份的跳转过去,是这个保司机构全部的结算记录
bug1146,私有应收 跟单结算报表-保险公司报表,查看明细-开票明细,7月份的跳转过去,是这个保司机构全部的开票记录

jiakai 1 mês atrás
pai
commit
b0bf11f801

+ 6 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/FollowCompanyFeeVO.java

@@ -80,4 +80,10 @@ public class FollowCompanyFeeVO {
     @Schema(description = "是否结算完成 0:未结算 1:已结算")
     private String settlementIdentification;
 
+    /**
+     * 年月,格式:YYYY-MM
+     */
+    @Schema(description = "年月")
+    private String signMonth;
+
 }

+ 7 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/InvoiceRecordQueryVo.java

@@ -1,6 +1,7 @@
 package com.jzg.commons.entity.finance.vo;
 
 import com.jzg.commons.core.base.PageRequest;
+import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
 
 import java.util.List;
@@ -81,4 +82,10 @@ public class InvoiceRecordQueryVo extends PageRequest {
      * 租户代码
      */
     private String systemCode;
+
+    /**
+     * 签署月份,格式:2026-07
+     */
+    @Schema(description = "签署月份")
+    private String signMonth;
 }

+ 7 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/SettlementQueryVo.java

@@ -85,4 +85,11 @@ public class SettlementQueryVo extends PageRequest {
 
     @Schema(description = "租户代码")
     private String systemCode;
+
+
+    /**
+     * 签署月份,格式:2026-07
+     */
+    @Schema(description = "签署月份")
+    private String signMonth;
 }

+ 14 - 0
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -971,6 +971,18 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
                 .flatMap(List::stream)
                 .collect(Collectors.toList());
 
+        // ============新增:给signMonth赋值 year+month,月份补两位 2026-7 → "202607"============
+        resultList.stream()
+                .filter(vo -> StrUtil.isNotBlank(vo.getYear()) && StrUtil.isNotBlank(vo.getMonth()))
+                .forEach(vo -> {
+                    String year = vo.getYear();
+                    String month = vo.getMonth();
+                    String monthPad = StrUtil.padPre(month, 2, "0");
+                    // 格式 yyyy‑MM
+                    String signMonth = year + "-" + monthPad;
+                    vo.setSignMonth(signMonth);
+                });
+
         return resultList;
     }
 
@@ -5128,8 +5140,10 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
             invoiceRecordQueryVo.setCompanyIds(companyIds.getData());
         }
         if (invoiceRecordQueryVo.getInvoiceTypes().contains("2") || invoiceRecordQueryVo.getInvoiceTypes().contains("4")){
+            // 跟单费
             invoiceRecordList = baseMapper.getFollowInvoiceRecordList(invoiceRecordQueryVo.getPage(), invoiceRecordQueryVo);
         }else if(invoiceRecordQueryVo.getInvoiceTypes().contains("1") || invoiceRecordQueryVo.getInvoiceTypes().contains("3")){
+            // 手续费
             invoiceRecordList = baseMapper.getInvoiceRecordList(invoiceRecordQueryVo.getPage(), invoiceRecordQueryVo);
         }
         List<InvoiceRecordResult> records = invoiceRecordList.getRecords();

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

@@ -843,8 +843,12 @@
             <if test="settlementQueryVo.settlementDateStart != null and settlementQueryVo.settlementDateStart != ''">
                 AND ipiis.create_time >= date(#{settlementQueryVo.settlementDateStart})
             </if>
-            <if test="settlementQueryVo.settlementDateEndStr != null and settlementQueryVo.settlementDateEndStr != ''">
-                AND ipiis.create_time &lt;= date(#{settlementQueryVo.settlementDateEndStr})
+            <if test="settlementQueryVo.settlementDateEnd != null and settlementQueryVo.settlementDateEnd != ''">
+                AND ipiis.create_time &lt;= date(#{settlementQueryVo.settlementDateEnd})
+            </if>
+            <if test="settlementQueryVo.signMonth != null and settlementQueryVo.signMonth != ''">
+                AND fo.year = SUBSTRING(#{settlementQueryVo.signMonth},1,4)
+                AND fo.month = SUBSTRING(#{settlementQueryVo.signMonth},6,2)
             </if>
         </where>
         GROUP BY ipiis.id
@@ -1678,6 +1682,10 @@
             <if test="invoiceRecordQueryVo.partnerCompanyId != null and invoiceRecordQueryVo.partnerCompanyId != ''">
                 AND iffo.partner_company_id = #{invoiceRecordQueryVo.partnerCompanyId}
             </if>
+            <if test="invoiceRecordQueryVo.signMonth != null and invoiceRecordQueryVo.signMonth != ''">
+                AND iffo.year = SUBSTRING(#{invoiceRecordQueryVo.signMonth},1,4)
+                AND iffo.month = SUBSTRING(#{invoiceRecordQueryVo.signMonth},6,2)
+            </if>
         </where>
         GROUP BY
         ipii.id,