Browse Source

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

lipf 3 weeks ago
parent
commit
d81649cc27

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

@@ -38,26 +38,14 @@ public class ExcelContent4PrivateFollow implements Serializable {
     @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;

+ 3 - 23
commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateSupervise.java → commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateSuperviseCar.java

@@ -18,7 +18,7 @@ import java.io.Serializable;
 @EqualsAndHashCode
 @Data
 @Schema(description = "财务应收表")
-public class ExcelContent4PrivateSupervise implements Serializable {
+public class ExcelContent4PrivateSuperviseCar implements Serializable {
 
     @Serial
     private static final long serialVersionUID = 6263862008363938379L;
@@ -35,34 +35,14 @@ public class ExcelContent4PrivateSupervise implements Serializable {
     @ExcelProperty(value = "商业险保单号", index = 2)
     private String syPolicyNo;
 
-    @Schema(description = "非车险保单号")
-    @ExcelProperty(value = "非车险保单号", index = 3)
-    private String jyPolicyNo;
-
     @Schema(description = "交强险手续费比例")
-    @ExcelProperty(value = "交强险手续费比例(%)", index = 4)
+    @ExcelProperty(value = "交强险手续费比例(%)", index = 3)
     private String jqSuperviseCostsProportion;
 
-//    @Schema(description = "交强险跟单费比例")
-//    @ExcelProperty(value = "交强险跟单费比例(%)", index = 5)
-//    private String jqOtherCostsProportion;
-
 
     @Schema(description = "商业险手续费比例")
-    @ExcelProperty(value = "商业险手续费比例(%)", index = 5)
+    @ExcelProperty(value = "商业险手续费比例(%)", index = 4)
     private String sySuperviseCostsProportion;
 
-//    @Schema(description = "商业险跟单费比例")
-//    @ExcelProperty(value = "商业险跟单费比例(%)", index = 7)
-//    private String syOtherCostsProportion;
-
-
-    @Schema(description = "非车险手续费比例")
-    @ExcelProperty(value = "非车险手续费比例(%)", index = 6)
-    private String jySuperviseCostsProportion;
-
-//    @Schema(description = "非车险跟单费比例")
-//    @ExcelProperty(value = "非车险跟单费比例(%)", index = 9)
-//    private String jyOtherCostsProportion;
 
 }

+ 39 - 0
commons/src/main/java/com/jzg/commons/entity/finance/vo/importimcome/ExcelContent4PrivateSuperviseNoCar.java

@@ -0,0 +1,39 @@
+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 ExcelContent4PrivateSuperviseNoCar 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 jyPolicyNo;
+
+
+    @Schema(description = "非车险手续费比例")
+    @ExcelProperty(value = "非车险手续费比例(%)", index = 2)
+    private String jySuperviseCostsProportion;
+
+}

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

@@ -150,7 +150,7 @@ public class ReceivableController {
     /**
      * 导入应收的模板
      *
-     * @param paramVO  10 表示私有协议 20 表示平台协议 11表示私有手续费 12 表示私有跟单费
+     * @param paramVO  20 表示平台协议  11表示车险手续费 12 表示非车险手续费 13 表示车险跟单费 14 表示非车险跟单费
      * @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.ExcelContent4PrivateSupervise;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSuperviseNoCar;
 import lombok.Getter;
 
 import java.util.ArrayList;
 import java.util.List;
 
 @Getter
-public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener<ExcelContent4PrivateSupervise> {
-    private final List<ExcelContent4PrivateSupervise> dataList = new ArrayList<>();
+public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener<ExcelContent4PrivateSuperviseNoCar> {
+    private final List<ExcelContent4PrivateSuperviseNoCar> dataList = new ArrayList<>();
 
     @Override
-    public void invoke(ExcelContent4PrivateSupervise data, AnalysisContext context) {
+    public void invoke(ExcelContent4PrivateSuperviseNoCar data, AnalysisContext context) {
         dataList.add(data);
     }
 
@@ -22,7 +22,7 @@ public class InvoiceReceivbleExcel4PrivateListener extends AnalysisEventListener
         System.out.println("Total rows: " + dataList.size());
     }
 
-    public List<ExcelContent4PrivateSupervise> getDataList() {
+    public List<ExcelContent4PrivateSuperviseNoCar> 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 表示平台协议 11表示私有手续费 12 表示私有跟单费
+     * @param type  20 表示平台协议  11表示车险手续费 12 表示非车险手续费 13 表示车险跟单费 14 表示非车险跟单费
      * @author lipf
      * @date 2026/8/3 10:23
      */

+ 20 - 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 表示平台协议  11表示私有手续费 12 表示私有跟单费
+     * @param type  20 表示平台协议  11表示车险手续费 12 表示非车险手续费 13 表示车险跟单费 14 表示非车险跟单费
      * @return String 导出时的提示信息
      * @author lipf
      * @date 2026/8/3 10:23
@@ -2466,12 +2466,28 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         if("11".equals(type)){
             // 调用动态导出
             return exportBaseService.upLoadFile(
-                    ExcelContent4PrivateSupervise.class,
+                    ExcelContent4PrivateSuperviseCar.class,
                     ListUtil.empty(),
-                    "应收开票-导出模板(私有)-" + Instant.now()
+                    "应收开票-导出模板(私有车险手续费)-" + Instant.now()
             );
         }
         if("12".equals(type)){
+            // 调用动态导出
+            return exportBaseService.upLoadFile(
+                    ExcelContent4PrivateSuperviseNoCar.class,
+                    ListUtil.empty(),
+                    "应收开票-导出模板(私有非车险手续费)-" + Instant.now()
+            );
+        }
+        if("13".equals(type)){
+            // 调用动态导出
+            return exportBaseService.upLoadFile(
+                    ExcelContent4PrivateFollow.class,
+                    ListUtil.empty(),
+                    "应收开票-导出模板(私有)-" + Instant.now()
+            );
+        }
+        if("14".equals(type)){
             // 调用动态导出
             return exportBaseService.upLoadFile(
                     ExcelContent4PrivateFollow.class,
@@ -2527,7 +2543,7 @@ public class ReceivableServiceImpl extends ServiceImpl<ReceivableMapper, InsPlyI
         String userName = baseController.getUserName();
         log.info("用户[{}]导入私有应设有文件",userName);
 
-        List<ExcelContent4PrivateSupervise> excelContents = importIncomeService.parseImportExcel4Private(file);
+        List<ExcelContent4PrivateSuperviseNoCar> 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.ExcelContent4PrivateSupervise;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSuperviseNoCar;
 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<ExcelContent4PrivateSupervise> excelContents) {
+    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4PrivateSuperviseNoCar> 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<ExcelContent4PrivateSupervise> parseImportExcel4Private(MultipartFile file) {
+    public List<ExcelContent4PrivateSuperviseNoCar> parseImportExcel4Private(MultipartFile file) {
         InvoiceReceivbleExcel4PrivateListener listener = new InvoiceReceivbleExcel4PrivateListener();
         try (InputStream inputStream = file.getInputStream()) {
-            EasyExcel.read(inputStream, ExcelContent4PrivateSupervise.class, listener)
+            EasyExcel.read(inputStream, ExcelContent4PrivateSuperviseNoCar.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.ExcelContent4PrivateSupervise;
+import com.jzg.commons.entity.finance.vo.importimcome.ExcelContent4PrivateSuperviseNoCar;
 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<ExcelContent4PrivateSupervise> excelContents);
+    public List<ImportContentExt> fillExcelContent4Private(List<ExcelContent4PrivateSuperviseNoCar> excelContents);
 
     /**
      * 批量处理数据
@@ -60,7 +60,7 @@ public interface ImportIncomeService {
      * @author lipf
      * @date 2026/8/4 9:07
      */
-    public List<ExcelContent4PrivateSupervise> parseImportExcel4Private(MultipartFile file);
+    public List<ExcelContent4PrivateSuperviseNoCar> parseImportExcel4Private(MultipartFile file);
 
     /**
      * 解析并读取Excel中的内容