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

私有手续费和跟单费导出不同的模板

lipf 3 недель назад
Родитель
Сommit
0277eee67e

+ 65 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateFollow.java

@@ -0,0 +1,65 @@
+package com.jzg.commons.entity.finance.vo.importimcome;
+
+import com.alibaba.excel.annotation.ExcelProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+import java.io.Serializable;
+
+/**
+ * 私有跟单费
+ * @author tz
+ * @description 应收查询VO
+ * @date 2024-06-26 10:49:31
+ */
+@EqualsAndHashCode
+@Data
+@Schema(description = "财务应收表")
+public class ExcelContent4PrivateFollow implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 6263862008363938379L;
+
+    @Schema(description = "车牌号")
+    @ExcelProperty(value = "车牌号", index = 0)
+    private String licenseNo;
+
+    @Schema(description = "交强险保单号")
+    @ExcelProperty(value = "交强险保单号", index = 1)
+    private String jqPolicyNo;
+
+    @Schema(description = "商业险保单号")
+    @ExcelProperty(value = "商业险保单号", index = 2)
+    private String syPolicyNo;
+
+    @Schema(description = "非车险保单号")
+    @ExcelProperty(value = "非车险保单号", index = 3)
+    private String jyPolicyNo;
+
+//    @Schema(description = "交强险手续费比例")
+//    @ExcelProperty(value = "交强险手续费比例(%)", index = 4)
+//    private String jqSuperviseCostsProportion;
+//
+    @Schema(description = "交强险跟单费比例")
+    @ExcelProperty(value = "交强险跟单费比例(%)", index = 4)
+    private String jqOtherCostsProportion;
+
+//    @Schema(description = "商业险手续费比例")
+//    @ExcelProperty(value = "商业险手续费比例(%)", index = 5)
+//    private String sySuperviseCostsProportion;
+
+    @Schema(description = "商业险跟单费比例")
+    @ExcelProperty(value = "商业险跟单费比例(%)", index = 5)
+    private String syOtherCostsProportion;
+
+
+//    @Schema(description = "非车险手续费比例")
+//    @ExcelProperty(value = "非车险手续费比例(%)", index = 6)
+//    private String jySuperviseCostsProportion;
+    @Schema(description = "非车险跟单费比例")
+    @ExcelProperty(value = "非车险跟单费比例(%)", index = 6)
+    private String jyOtherCostsProportion;
+
+}

+ 15 - 13
commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4Private.java → commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateSupervise.java

@@ -9,14 +9,16 @@ import java.io.Serial;
 import java.io.Serializable;
 
 /**
+ * 私有手续费
+ *
  * @author tz
  * @description 应收查询VO
- * @createDate 2024-06-26 10:49:31
+ * @date 2024-06-26 10:49:31
  */
 @EqualsAndHashCode
 @Data
 @Schema(description = "财务应收表")
-public class ExcelContent4Private implements Serializable {
+public class ExcelContent4PrivateSupervise implements Serializable {
 
     @Serial
     private static final long serialVersionUID = 6263862008363938379L;
@@ -41,26 +43,26 @@ public class ExcelContent4Private implements Serializable {
     @ExcelProperty(value = "交强险手续费比例(%)", index = 4)
     private String jqSuperviseCostsProportion;
 
-    @Schema(description = "交强险跟单费比例")
-    @ExcelProperty(value = "交强险跟单费比例(%)", index = 5)
-    private String jqOtherCostsProportion;
+//    @Schema(description = "交强险跟单费比例")
+//    @ExcelProperty(value = "交强险跟单费比例(%)", index = 5)
+//    private String jqOtherCostsProportion;
 
 
     @Schema(description = "商业险手续费比例")
-    @ExcelProperty(value = "商业险手续费比例(%)", index = 6)
+    @ExcelProperty(value = "商业险手续费比例(%)", index = 5)
     private String sySuperviseCostsProportion;
 
-    @Schema(description = "商业险跟单费比例")
-    @ExcelProperty(value = "商业险跟单费比例(%)", index = 7)
-    private String syOtherCostsProportion;
+//    @Schema(description = "商业险跟单费比例")
+//    @ExcelProperty(value = "商业险跟单费比例(%)", index = 7)
+//    private String syOtherCostsProportion;
 
 
     @Schema(description = "非车险手续费比例")
-    @ExcelProperty(value = "非车险手续费比例(%)", index = 8)
+    @ExcelProperty(value = "非车险手续费比例(%)", index = 6)
     private String jySuperviseCostsProportion;
 
-    @Schema(description = "非车险跟单费比例")
-    @ExcelProperty(value = "非车险跟单费比例(%)", index = 9)
-    private String jyOtherCostsProportion;
+//    @Schema(description = "非车险跟单费比例")
+//    @ExcelProperty(value = "非车险跟单费比例(%)", index = 9)
+//    private String jyOtherCostsProportion;
 
 }

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

@@ -150,7 +150,7 @@ public class ReceivableController {
     /**
      * 导入应收的模板
      *
-     * @param paramVO  10 表示私有协议 20 表示平台协议
+     * @param paramVO  10 表示私有协议 20 表示平台协议 11表示私有手续费 12 表示私有跟单费
      * @author lipf
      * @date 2026/8/3 10:23
      */

+ 5 - 5
tenant/organization/src/main/java/com/jzg/organization/excel/listener/InvoiceReceivbleExcel4PrivateListener.java

@@ -2,18 +2,18 @@ package com.jzg.organization.excel.listener;
 
 import com.alibaba.excel.context.AnalysisContext;
 import com.alibaba.excel.event.AnalysisEventListener;
-import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Private;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSupervise;
 import lombok.Getter;
 
 import java.util.ArrayList;
 import java.util.List;
 
 @Getter
-public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener<ExcelContent4Private> {
-    private final List<ExcelContent4Private> dataList = new ArrayList<>();
+public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener<ExcelContent4PrivateSupervise> {
+    private final List<ExcelContent4PrivateSupervise> dataList = new ArrayList<>();
 
     @Override
-    public void invoke(ExcelContent4Private data, AnalysisContext context) {
+    public void invoke(ExcelContent4PrivateSupervise data, AnalysisContext context) {
         dataList.add(data);
     }
 
@@ -22,7 +22,7 @@ public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener
         System.out.println("Total rows: " + dataList.size());
     }
 
-    public List<ExcelContent4Private> getDataList() {
+    public List<ExcelContent4PrivateSupervise> getDataList() {
         return dataList;
     }
 }

+ 1 - 1
tenant/organization/src/main/java/com/jzg/organization/service/ReceivableService.java

@@ -431,7 +431,7 @@ public interface ReceivableService extends IService<InsPlyIncome> {
     /**
      * 导入应收的模板
      *
-     * @param type  10 表示私有协议 20 表示平台协议
+     * @param type  10 表示私有协议 20 表示平台协议 11表示私有手续费 12 表示私有跟单费
      * @author lipf
      * @date 2026/8/3 10:23
      */

+ 12 - 4
tenant/organization/src/main/java/com/jzg/organization/service/impl/ReceivableServiceImpl.java

@@ -2453,7 +2453,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
     /**
      * 导出应收开票模板
      *
-     * @param type  10 表示私有协议 20 表示平台协议
+     * @param type  10 表示私有协议 20 表示平台协议  11表示私有手续费 12 表示私有跟单费
      * @return String 导出时的提示信息
      * @author lipf
      * @date 2026/8/3 10:23
@@ -2463,10 +2463,18 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         log.info("导出模板: type=[{}]",type);
         // List<InvoiceReceivableExportExcelVo4Private> emptyList = ListUtil.empty();
 
-        if("10".equals(type)){
+        if("11".equals(type)){
             // 调用动态导出
             return exportBaseService.upLoadFile(
-                    ExcelContent4Private.class,
+                    ExcelContent4PrivateSupervise.class,
+                    ListUtil.empty(),
+                    "应收开票-导出模板(私有)-" + Instant.now()
+            );
+        }
+        if("12".equals(type)){
+            // 调用动态导出
+            return exportBaseService.upLoadFile(
+                    ExcelContent4PrivateFollow.class,
                     ListUtil.empty(),
                     "应收开票-导出模板(私有)-" + Instant.now()
             );
@@ -2519,7 +2527,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         String userName = baseController.getUserName();
         log.info("用户[{}]导入私有应设有文件",userName);
 
-        List<ExcelContent4Private> excelContents = importIncomeService.parseImportExcel4Private(file);
+        List<ExcelContent4PrivateSupervise> excelContents = importIncomeService.parseImportExcel4Private(file);
         if (CollUtil.isEmpty(excelContents)){
             throw new SystemException("数据不能为空,导入失败");
         }

+ 4 - 4
tenant/organization/src/main/java/com/jzg/organization/service/impl/importincome/ImportIncomeServiceImpl.java

@@ -9,7 +9,7 @@ import com.jzg.commons.constants.ProductsType;
 import com.jzg.commons.core.base.BaseController;
 import com.jzg.commons.core.page.HttpResult;
 import com.jzg.commons.entity.finance.po.InsPlyIncome;
-import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Private;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSupervise;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportUpdateExcelResultVo;
 import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Platform;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportContentExt;
@@ -119,7 +119,7 @@ public class ImportIncomeServiceImpl implements ImportIncomeService {
      * @date 2026/8/4 9:22
      */
     @Override
-    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4Private> excelContents) {
+    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4PrivateSupervise> excelContents) {
         log.info("为私有订单填充数据:excelContents.size=[{}]", CollUtil.size(excelContents));
         return List.of();
     }
@@ -292,10 +292,10 @@ public class ImportIncomeServiceImpl implements ImportIncomeService {
      * @author lipf
      * @date 2026/8/4 9:07
      */
-    public List<ExcelContent4Private> parseImportExcel4Private(MultipartFile file) {
+    public List<ExcelContent4PrivateSupervise> parseImportExcel4Private(MultipartFile file) {
         InvoiceReceivbleExcel4PrivateListener listener = new InvoiceReceivbleExcel4PrivateListener();
         try (InputStream inputStream = file.getInputStream()) {
-            EasyExcel.read(inputStream, ExcelContent4Private.class, listener)
+            EasyExcel.read(inputStream, ExcelContent4PrivateSupervise.class, listener)
                     .sheet()
                     .doRead();
             return listener.getDataList();

+ 3 - 3
tenant/organization/src/main/java/com/jzg/organization/service/importincome/ImportIncomeService.java

@@ -1,7 +1,7 @@
 package com.jzg.organization.service.importincome;
 
 import com.jzg.commons.entity.finance.po.InsPlyIncome;
-import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Private;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSupervise;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportUpdateExcelResultVo;
 import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4Platform;
 import com.jzg.commons.entity.finance.vo.importimcome.ImportContentExt;
@@ -27,7 +27,7 @@ public interface ImportIncomeService {
      * @author lipf
      * @date 2026/8/4 9:22
      */
-    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4Private> excelContents);
+    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4PrivateSupervise> excelContents);
 
     /**
      * 批量处理数据
@@ -60,7 +60,7 @@ public interface ImportIncomeService {
      * @author lipf
      * @date 2026/8/4 9:07
      */
-    public List<ExcelContent4Private> parseImportExcel4Private(MultipartFile file);
+    public List<ExcelContent4PrivateSupervise> parseImportExcel4Private(MultipartFile file);
 
     /**
      * 解析并读取Excel中的内容