Explorar o código

修改bug:
1、私有应收,有非车时,结算报表-保险公司报表数据只有非车的,没有车险的
2、私有应收,结算报表-保险公司报表,加个筛选项,筛选车险与非车险,,数据根据筛选项变动

jiakai hai 2 meses
pai
achega
78b6a9147d

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

@@ -52,6 +52,9 @@ public class SettlementReportQueryVo extends PageRequest {
     @Schema(description = "开票类型 1 手续费  2 跟单费  3 驾意险手续费 4 驾意险跟单费")
     private List<String> invoiceTypes;
 
+    @Schema(description = "开票类型 1 手续费  2 跟单费  3 驾意险手续费 4 驾意险跟单费")
+    private String invoiceType;
+
     @Schema(description = "上级公司id")
     private String parentId;
 

+ 11 - 2
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -827,12 +827,14 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
             String partnerCompanyId = splitArr[0];
             String year = splitArr[1];
             String month = splitArr[2];
+            String invoiceType = splitArr[3];
             List<FollowCompanyFeeVO> voList = entry.getValue();
 
             FollowCompanyFeeVO vo = new FollowCompanyFeeVO();
             vo.setPartnerCompanyId(partnerCompanyId);
             vo.setYear(year);
             vo.setMonth(month);
+            vo.setInvoiceType(invoiceType);
             vo.setCompanyName(getCompanyName(partnerCompanyId, companyMap));
 
             // 汇总当前分组所有followId、settlementId
@@ -904,9 +906,16 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
     }
 
     /**
-     * 构建分组Key:partnerCompanyId_year_month
+     * 构建分组Key:partnerCompanyId_year_month_invoiceType
      */
     private String buildGroupKey(FollowCompanyFeeVO vo) {
+        return StrUtil.format("{}_{}_{}_{}", vo.getPartnerCompanyId(), vo.getYear(), vo.getMonth(), vo.getInvoiceType());
+    }
+
+    /**
+     * 构建分组Key:partnerCompanyId_year_month
+     */
+    private String buildFillGroupKey(FollowCompanyFeeVO vo) {
         return StrUtil.format("{}_{}_{}", vo.getPartnerCompanyId(), vo.getYear(), vo.getMonth());
     }
 
@@ -1023,7 +1032,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         // 现有结果集Key缓存
         Map<String, FollowCompanyFeeVO> existVoMap = resultList.stream()
                 .collect(Collectors.toMap(
-                        this::buildGroupKey,
+                        this::buildFillGroupKey,
                         Function.identity(),
                         (oldVal, newVal) -> oldVal
                 ));

+ 3 - 0
tenant/organization/src/main/resources/mapper/InsFeeFollowOrderMapper.xml

@@ -92,6 +92,9 @@
             <if test="query.settlementStartTime != null and query.settlementStartTime != '' and query.settlementEndTime != null and query.settlementEndTime != ''">
                 AND sett.create_time BETWEEN #{query.settlementStartTime} AND #{query.settlementEndTime}
             </if>
+            <if test="query.invoiceType != null and query.invoiceType != ''">
+                AND ffo.invoice_type = #{query.invoiceType}
+            </if>
         </where>
     </select>