xiongwanxiong 1 тиждень тому
батько
коміт
af8ff3ddb3

+ 10 - 3
wxjy-wxjy-service/src/main/java/cn/gov/customs/wxjy/statReport/controller/CustomMStatFController.java

@@ -1,5 +1,6 @@
 package cn.gov.customs.wxjy.statReport.controller;
 
+import java.io.IOException;
 import java.util.List;
 import javax.servlet.http.HttpServletResponse;
 
@@ -37,7 +38,10 @@ public class CustomMStatFController extends BaseController {
      */
     @PostMapping("/get-list")
     public Result<PageInfo<CustomMStatF>> list(@RequestBody CustomMStatFQuery query) {
-        PageHelper.startPage(query.getPageIndex(), query.getPageSize());
+//        PageHelper.startPage(query.getPageIndex(), query.getPageSize());
+        if(StringUtils.isNotEmpty(query.getBeginDate())){
+            query.setBeginDate(query.getBeginDate().replace("-", ""));
+        }
         PageInfo<CustomMStatF> list = customMStatFService.selectPageList(query);
         return Result.success(list);
     }
@@ -95,9 +99,12 @@ public class CustomMStatFController extends BaseController {
      * 导出按业务现场关区分类列表
      */
     @PostMapping("/get-customMStatF-export")
-    public void export(HttpServletResponse response, @RequestBody CustomMStatFQuery query) {
+    public void export(HttpServletResponse response, @RequestBody CustomMStatFQuery query) throws IOException {
+        if(StringUtils.isNotEmpty(query.getBeginDate())){
+            query.setBeginDate(query.getBeginDate().replace("-", ""));
+        }
         List<CustomMStatF> list = customMStatFService.selectList(query);
-        ExcelUtil<CustomMStatF> util = new ExcelUtil<CustomMStatF>(CustomMStatF. class);
+        ExcelUtil<CustomMStatF> util = new ExcelUtil<CustomMStatF>(CustomMStatF.class);
         util.exportExcel(response, list, "按业务现场关区分类数据");
     }
 

+ 32 - 32
wxjy-wxjy-service/src/main/java/cn/gov/customs/wxjy/statReport/pojo/CustomMStatF.java

@@ -20,11 +20,11 @@ private static final long serialVersionUID = 1L;
     private String ID;
 
     /** 月度 */
-    @Excel(name = "月度")
+//    @Excel(name = "月度")
     private String MONTH;
 
     /** 业务现场关区代码 */
-    @Excel(name = "业务现场关区代码")
+    @Excel(name = "所属海关",dictType = "customs_info")
     private String customCode;
 
     /** 进口单数 */
@@ -36,63 +36,63 @@ private static final long serialVersionUID = 1L;
     private String impManDeclCount;
 
     /** 进口接单(人工审单)单数 */
-    @Excel(name = "进口接单", readConverterExp = "人=工审单")
+    @Excel(name = "进口接单单")
     private String impManualAuditDeclCount;
 
     /** 上个月进口单数 */
-    @Excel(name = "上个月进口单数")
+//    @Excel(name = "上个月进口单数")
     private String impDeclCountLm;
 
     /** 去年12月进口单数 */
-    @Excel(name = "去年12月进口单数")
+//    @Excel(name = "去年12月进口单数")
     private String impDeclCountLyDec;
 
     /** 今年截止当月总进口单数 */
-    @Excel(name = "今年截止当月总进口单数")
+//    @Excel(name = "今年截止当月总进口单数")
     private String impDeclCountCuryear;
 
     /** 前年总进口单数 */
-    @Excel(name = "前年总进口单数")
+//    @Excel(name = "前年总进口单数")
     private String impDeclCountYbl;
 
     /** 进口平均整体通关时间(小时) */
-    @Excel(name = "进口平均整体通关时间", readConverterExp = "小=时")
+    @Excel(name = "进口平均整体通关时间(小时)")
     private String impTotalCost;
 
     /** 进口平均整体通关时间-上月 */
-    @Excel(name = "进口平均整体通关时间-上月")
+//    @Excel(name = "进口平均整体通关时间-上月")
     private String impTotalCostLm;
 
     /** 进口平均整体通关时间-去年12月 */
-    @Excel(name = "进口平均整体通关时间-去年12月")
+//    @Excel(name = "进口平均整体通关时间-去年12月")
     private String impTotalCostLyDec;
 
     /** 进口平均整体通关时间-1至当月 */
-    @Excel(name = "进口平均整体通关时间-1至当月")
+//    @Excel(name = "进口平均整体通关时间-1至当月")
     private String impTotalCostCy;
 
     /** 进口平均整体通关时间-前年 */
-    @Excel(name = "进口平均整体通关时间-前年")
+//    @Excel(name = "进口平均整体通关时间-前年")
     private String impTotalCostYbl;
 
     /** 进口平均海关通关时间(小时) */
-    @Excel(name = "进口平均海关通关时间", readConverterExp = "小=时")
+    @Excel(name = "进口平均海关通关时间(小时)")
     private String impCuCost;
 
     /** 进口平均海关通关时间(小时)-上月 */
-    @Excel(name = "进口平均海关通关时间", readConverterExp = "小=时")
+//    @Excel(name = "进口平均海关通关时间", readConverterExp = "小=时")
     private String impCuCostLm;
 
     /** 进口平均海关通关时间-去年12月 */
-    @Excel(name = "进口平均海关通关时间-去年12月")
+//    @Excel(name = "进口平均海关通关时间-去年12月")
     private String impCuCostLyDec;
 
     /** 进口平均海关通关时间-1至当月 */
-    @Excel(name = "进口平均海关通关时间-1至当月")
+//    @Excel(name = "进口平均海关通关时间-1至当月")
     private String impCuCostCy;
 
     /** 进口平均海关通关时间-前年 */
-    @Excel(name = "进口平均海关通关时间-前年")
+//    @Excel(name = "进口平均海关通关时间-前年")
     private String impCuCostYbl;
 
     /** 出口单数 */
@@ -104,63 +104,63 @@ private static final long serialVersionUID = 1L;
     private String expManDeclCount;
 
     /** 出口接单(人工审单)单数 */
-    @Excel(name = "出口接单", readConverterExp = "人=工审单")
+    @Excel(name = "出口接单单")
     private String expManualAuditDeclCount;
 
     /** 上个月出口单数 */
-    @Excel(name = "上个月出口单数")
+//    @Excel(name = "上个月出口单数")
     private String expDeclCountLm;
 
     /** 去年12月进口单数 */
-    @Excel(name = "去年12月进口单数")
+//    @Excel(name = "去年12月进口单数")
     private String expDeclCountLyDec;
 
     /** 今年截止当月总出口单数 */
-    @Excel(name = "今年截止当月总出口单数")
+//    @Excel(name = "今年截止当月总出口单数")
     private String expDeclCountCuryear;
 
     /** 前年总出口单数 */
-    @Excel(name = "前年总出口单数")
+//    @Excel(name = "前年总出口单数")
     private String expDeclCountYbl;
 
     /** 出口平均整体通关时间(小时) */
-    @Excel(name = "出口平均整体通关时间", readConverterExp = "小=时")
+    @Excel(name = "出口平均整体通关时间(小时)")
     private String expTotalCost;
 
     /** 出口平均整体通关时间(小时)-上月 */
-    @Excel(name = "出口平均整体通关时间", readConverterExp = "小=时")
+//    @Excel(name = "出口平均整体通关时间", readConverterExp = "小=时")
     private String expTotalCostLm;
 
     /** 出口平均整体通关时间-去年12月 */
-    @Excel(name = "出口平均整体通关时间-去年12月")
+//    @Excel(name = "出口平均整体通关时间-去年12月")
     private String expTotalCostLyDec;
 
     /** 出口平均整体通关时间-1至当月 */
-    @Excel(name = "出口平均整体通关时间-1至当月")
+//    @Excel(name = "出口平均整体通关时间-1至当月")
     private String expTotalCostCy;
 
     /** 出口平均整体通关时间-前年 */
-    @Excel(name = "出口平均整体通关时间-前年")
+//    @Excel(name = "出口平均整体通关时间-前年")
     private String expTotalCostYbl;
 
     /** 出口平均海关通关时间(小时) */
-    @Excel(name = "出口平均海关通关时间", readConverterExp = "小=时")
+    @Excel(name = "出口平均海关通关时间(小时)")
     private String expCuCost;
 
     /** 出口平均海关通关时间(小时)-上月 */
-    @Excel(name = "出口平均海关通关时间", readConverterExp = "小=时")
+//    @Excel(name = "出口平均海关通关时间", readConverterExp = "小=时")
     private String expCuCostLm;
 
     /** 出口平均海关通关时间-去年12月 */
-    @Excel(name = "出口平均海关通关时间-去年12月")
+//    @Excel(name = "出口平均海关通关时间-去年12月")
     private String expCuCostLyDec;
 
     /** 出口平均海关通关时间-1至当月 */
-    @Excel(name = "出口平均海关通关时间-1至当月")
+//    @Excel(name = "出口平均海关通关时间-1至当月")
     private String expCuCostCy;
 
     /** 出口平均海关通关时间-前年 */
-    @Excel(name = "出口平均海关通关时间-前年")
+//    @Excel(name = "出口平均海关通关时间-前年")
     private String expCuCostYbl;
 
 }

+ 38 - 40
wxjy-wxjy-service/src/main/java/cn/gov/customs/wxjy/statReport/pojo/CustomMStatFQuery.java

@@ -18,118 +18,116 @@ public class CustomMStatFQuery implements Serializable {
     private String ID;
 
     /** 月度 */
-                    private String MONTH;
+    private String MONTH;
 
     /** 业务现场关区代码 */
-                    private String customCode;
+    private String customCode;
 
     /** 进口单数 */
-                    private String impDeclCount;
+    private String impDeclCount;
 
     /** 进口查验单数 */
-                    private String impManDeclCount;
+    private String impManDeclCount;
 
     /** 进口接单(人工审单)单数 */
-                    private String impManualAuditDeclCount;
+    private String impManualAuditDeclCount;
 
     /** 上个月进口单数 */
-                    private String impDeclCountLm;
+    private String impDeclCountLm;
 
     /** 去年12月进口单数 */
-                    private String impDeclCountLyDec;
+    private String impDeclCountLyDec;
 
     /** 今年截止当月总进口单数 */
-                    private String impDeclCountCuryear;
+    private String impDeclCountCuryear;
 
     /** 前年总进口单数 */
-                    private String impDeclCountYbl;
+    private String impDeclCountYbl;
 
     /** 进口平均整体通关时间(小时) */
-                    private String impTotalCost;
+    private String impTotalCost;
 
     /** 进口平均整体通关时间-上月 */
-                    private String impTotalCostLm;
+    private String impTotalCostLm;
 
     /** 进口平均整体通关时间-去年12月 */
-                    private String impTotalCostLyDec;
+    private String impTotalCostLyDec;
 
     /** 进口平均整体通关时间-1至当月 */
-                    private String impTotalCostCy;
+    private String impTotalCostCy;
 
     /** 进口平均整体通关时间-前年 */
-                    private String impTotalCostYbl;
+    private String impTotalCostYbl;
 
     /** 进口平均海关通关时间(小时) */
-                    private String impCuCost;
+    private String impCuCost;
 
     /** 进口平均海关通关时间(小时)-上月 */
-                    private String impCuCostLm;
+    private String impCuCostLm;
 
     /** 进口平均海关通关时间-去年12月 */
-                    private String impCuCostLyDec;
+    private String impCuCostLyDec;
 
     /** 进口平均海关通关时间-1至当月 */
-                    private String impCuCostCy;
+    private String impCuCostCy;
 
     /** 进口平均海关通关时间-前年 */
-                    private String impCuCostYbl;
+    private String impCuCostYbl;
 
     /** 出口单数 */
-                    private String expDeclCount;
+    private String expDeclCount;
 
     /** 出口查验单数 */
-                    private String expManDeclCount;
+    private String expManDeclCount;
 
     /** 出口接单(人工审单)单数 */
-                    private String expManualAuditDeclCount;
+    private String expManualAuditDeclCount;
 
     /** 上个月出口单数 */
-                    private String expDeclCountLm;
+    private String expDeclCountLm;
 
     /** 去年12月进口单数 */
-                    private String expDeclCountLyDec;
+    private String expDeclCountLyDec;
 
     /** 今年截止当月总出口单数 */
-                    private String expDeclCountCuryear;
+    private String expDeclCountCuryear;
 
     /** 前年总出口单数 */
-                    private String expDeclCountYbl;
+    private String expDeclCountYbl;
 
     /** 出口平均整体通关时间(小时) */
-                    private String expTotalCost;
+    private String expTotalCost;
 
     /** 出口平均整体通关时间(小时)-上月 */
-                    private String expTotalCostLm;
+    private String expTotalCostLm;
 
     /** 出口平均整体通关时间-去年12月 */
-                    private String expTotalCostLyDec;
+    private String expTotalCostLyDec;
 
     /** 出口平均整体通关时间-1至当月 */
-                    private String expTotalCostCy;
+    private String expTotalCostCy;
 
     /** 出口平均整体通关时间-前年 */
-                    private String expTotalCostYbl;
+    private String expTotalCostYbl;
 
     /** 出口平均海关通关时间(小时) */
-                    private String expCuCost;
+    private String expCuCost;
 
     /** 出口平均海关通关时间(小时)-上月 */
-                    private String expCuCostLm;
+    private String expCuCostLm;
 
     /** 出口平均海关通关时间-去年12月 */
-                    private String expCuCostLyDec;
+    private String expCuCostLyDec;
 
     /** 出口平均海关通关时间-1至当月 */
-                    private String expCuCostCy;
+    private String expCuCostCy;
 
     /** 出口平均海关通关时间-前年 */
-                    private String expCuCostYbl;
+    private String expCuCostYbl;
 
 
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Date beginDate;
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Date endDate;
+    private String beginDate;
+    private String endDate;
     private int pageIndex;
     private int pageSize;
 }

+ 74 - 111
wxjy-wxjy-service/src/main/resources/mapper/statReport/CustomMStatFMapper.xml

@@ -50,117 +50,80 @@
     </sql>
 
     <select id="selectList" parameterType="CustomMStatFQuery" resultMap="CustomMStatFResult">
-        <include refid="baseVo"/>
-        <where>
-        <if test="MONTH != null  and MONTH != ''">
-            and MONTH = #{MONTH}
-        </if>
-        <if test="customCode != null  and customCode != ''">
-            and CUSTOM_CODE = #{customCode}
-        </if>
-        <if test="impDeclCount != null  and impDeclCount != ''">
-            and IMP_DECL_COUNT = #{impDeclCount}
-        </if>
-        <if test="impManDeclCount != null  and impManDeclCount != ''">
-            and IMP_MAN_DECL_COUNT = #{impManDeclCount}
-        </if>
-        <if test="impManualAuditDeclCount != null  and impManualAuditDeclCount != ''">
-            and IMP_MANUAL_AUDIT_DECL_COUNT = #{impManualAuditDeclCount}
-        </if>
-        <if test="impDeclCountLm != null  and impDeclCountLm != ''">
-            and IMP_DECL_COUNT_LM = #{impDeclCountLm}
-        </if>
-        <if test="impDeclCountLyDec != null  and impDeclCountLyDec != ''">
-            and IMP_DECL_COUNT_LY_DEC = #{impDeclCountLyDec}
-        </if>
-        <if test="impDeclCountCuryear != null  and impDeclCountCuryear != ''">
-            and IMP_DECL_COUNT_CURYEAR = #{impDeclCountCuryear}
-        </if>
-        <if test="impDeclCountYbl != null  and impDeclCountYbl != ''">
-            and IMP_DECL_COUNT_YBL = #{impDeclCountYbl}
-        </if>
-        <if test="impTotalCost != null  and impTotalCost != ''">
-            and IMP_TOTAL_COST = #{impTotalCost}
-        </if>
-        <if test="impTotalCostLm != null  and impTotalCostLm != ''">
-            and IMP_TOTAL_COST_LM = #{impTotalCostLm}
-        </if>
-        <if test="impTotalCostLyDec != null  and impTotalCostLyDec != ''">
-            and IMP_TOTAL_COST_LY_DEC = #{impTotalCostLyDec}
-        </if>
-        <if test="impTotalCostCy != null  and impTotalCostCy != ''">
-            and IMP_TOTAL_COST_CY = #{impTotalCostCy}
-        </if>
-        <if test="impTotalCostYbl != null  and impTotalCostYbl != ''">
-            and IMP_TOTAL_COST_YBL = #{impTotalCostYbl}
-        </if>
-        <if test="impCuCost != null  and impCuCost != ''">
-            and IMP_CU_COST = #{impCuCost}
-        </if>
-        <if test="impCuCostLm != null  and impCuCostLm != ''">
-            and IMP_CU_COST_LM = #{impCuCostLm}
-        </if>
-        <if test="impCuCostLyDec != null  and impCuCostLyDec != ''">
-            and IMP_CU_COST_LY_DEC = #{impCuCostLyDec}
-        </if>
-        <if test="impCuCostCy != null  and impCuCostCy != ''">
-            and IMP_CU_COST_CY = #{impCuCostCy}
-        </if>
-        <if test="impCuCostYbl != null  and impCuCostYbl != ''">
-            and IMP_CU_COST_YBL = #{impCuCostYbl}
-        </if>
-        <if test="expDeclCount != null  and expDeclCount != ''">
-            and EXP_DECL_COUNT = #{expDeclCount}
-        </if>
-        <if test="expManDeclCount != null  and expManDeclCount != ''">
-            and EXP_MAN_DECL_COUNT = #{expManDeclCount}
-        </if>
-        <if test="expManualAuditDeclCount != null  and expManualAuditDeclCount != ''">
-            and EXP_MANUAL_AUDIT_DECL_COUNT = #{expManualAuditDeclCount}
-        </if>
-        <if test="expDeclCountLm != null  and expDeclCountLm != ''">
-            and EXP_DECL_COUNT_LM = #{expDeclCountLm}
-        </if>
-        <if test="expDeclCountLyDec != null  and expDeclCountLyDec != ''">
-            and EXP_DECL_COUNT_LY_DEC = #{expDeclCountLyDec}
-        </if>
-        <if test="expDeclCountCuryear != null  and expDeclCountCuryear != ''">
-            and EXP_DECL_COUNT_CURYEAR = #{expDeclCountCuryear}
-        </if>
-        <if test="expDeclCountYbl != null  and expDeclCountYbl != ''">
-            and EXP_DECL_COUNT_YBL = #{expDeclCountYbl}
-        </if>
-        <if test="expTotalCost != null  and expTotalCost != ''">
-            and EXP_TOTAL_COST = #{expTotalCost}
-        </if>
-        <if test="expTotalCostLm != null  and expTotalCostLm != ''">
-            and EXP_TOTAL_COST_LM = #{expTotalCostLm}
-        </if>
-        <if test="expTotalCostLyDec != null  and expTotalCostLyDec != ''">
-            and EXP_TOTAL_COST_LY_DEC = #{expTotalCostLyDec}
-        </if>
-        <if test="expTotalCostCy != null  and expTotalCostCy != ''">
-            and EXP_TOTAL_COST_CY = #{expTotalCostCy}
-        </if>
-        <if test="expTotalCostYbl != null  and expTotalCostYbl != ''">
-            and EXP_TOTAL_COST_YBL = #{expTotalCostYbl}
-        </if>
-        <if test="expCuCost != null  and expCuCost != ''">
-            and EXP_CU_COST = #{expCuCost}
-        </if>
-        <if test="expCuCostLm != null  and expCuCostLm != ''">
-            and EXP_CU_COST_LM = #{expCuCostLm}
-        </if>
-        <if test="expCuCostLyDec != null  and expCuCostLyDec != ''">
-            and EXP_CU_COST_LY_DEC = #{expCuCostLyDec}
-        </if>
-        <if test="expCuCostCy != null  and expCuCostCy != ''">
-            and EXP_CU_COST_CY = #{expCuCostCy}
-        </if>
-        <if test="expCuCostYbl != null  and expCuCostYbl != ''">
-            and EXP_CU_COST_YBL = #{expCuCostYbl}
-        </if>
-        </where>
+        select '4700' as custom_code, nvl(sum(imp_decl_count), 0) as imp_decl_count,nvl(sum(IMP_MAN_DECL_COUNT), 0) as IMP_MAN_DECL_COUNT,
+        nvl(sum(IMP_MANUAL_AUDIT_DECL_COUNT), 0) as IMP_MANUAL_AUDIT_DECL_COUNT,nvl(sum(IMP_DECL_COUNT_LM), 0) as IMP_DECL_COUNT_LM,
+        nvl(sum(IMP_DECL_COUNT_LY_DEC), 0) as IMP_DECL_COUNT_LY_DEC,
+        nvl(sum(IMP_DECL_COUNT_CURYEAR), 0) as IMP_DECL_COUNT_CURYEAR,nvl(sum(IMP_DECL_COUNT_YBL), 0) as IMP_DECL_COUNT_YBL,
+        round(nvl(decode(sum(imp_decl_count) ,0 ,0, sum(imp_decl_count * imp_total_cost) / sum(imp_decl_count)), 0),2) as imp_total_cost,
+        round(nvl(decode(sum(IMP_DECL_COUNT_LM) ,0 ,0, sum(IMP_DECL_COUNT_LM * IMP_TOTAL_COST_LM) / sum(IMP_DECL_COUNT_LM)), 0),2) as IMP_TOTAL_COST_LM,
+        round(nvl(decode(sum(IMP_DECL_COUNT_LY_DEC) ,0 ,0, sum(IMP_DECL_COUNT_LY_DEC * IMP_TOTAL_COST_LY_DEC) / sum(IMP_DECL_COUNT_LY_DEC)), 0),2) as IMP_TOTAL_COST_LY_DEC,
+        round(nvl(decode(sum(IMP_DECL_COUNT_CURYEAR) ,0 ,0, sum(IMP_DECL_COUNT_CURYEAR * IMP_TOTAL_COST_CY) / sum(IMP_DECL_COUNT_CURYEAR)), 0),2) as IMP_TOTAL_COST_CY,
+        round(nvl(decode(sum(IMP_DECL_COUNT_YBL) ,0 ,0, sum(IMP_DECL_COUNT_YBL * IMP_TOTAL_COST_YBL) / sum(IMP_DECL_COUNT_YBL)), 0),2) as IMP_TOTAL_COST_YBL,
+        round(nvl(decode(sum(imp_decl_count) ,0 ,0, sum(imp_decl_count * IMP_CU_COST) / sum(imp_decl_count)), 0),2) as IMP_CU_COST,
+        round(nvl(decode(sum(IMP_DECL_COUNT_LM) ,0 ,0, sum(IMP_DECL_COUNT_LM * IMP_CU_COST_LM) / sum(IMP_DECL_COUNT_LM)), 0),2) as IMP_CU_COST_LM,
+        round(nvl(decode(sum(IMP_DECL_COUNT_LY_DEC), 0, 0, sum(IMP_DECL_COUNT_LY_DEC * IMP_CU_COST_LY_DEC) / sum(IMP_DECL_COUNT_LY_DEC)), 0),2) as IMP_CU_COST_LY_DEC,
+        round(nvl(decode(sum(IMP_DECL_COUNT_CURYEAR), 0, 0, sum(IMP_DECL_COUNT_CURYEAR * IMP_CU_COST_CY) / sum(IMP_DECL_COUNT_CURYEAR)), 0),2) as IMP_CU_COST_CY,
+        round(nvl(decode(sum(IMP_DECL_COUNT_YBL) ,0 ,0, sum(IMP_DECL_COUNT_YBL * IMP_CU_COST_YBL) / sum(IMP_DECL_COUNT_YBL)), 0),2) as IMP_CU_COST_YBL,
+        nvl(sum(exp_decl_count), 0) as exp_decl_count,nvl(sum(EXP_MAN_DECL_COUNT), 0) as EXP_MAN_DECL_COUNT,
+        nvl(sum(EXP_MANUAL_AUDIT_DECL_COUNT), 0) as EXP_MANUAL_AUDIT_DECL_COUNT,nvl(sum(EXP_DECL_COUNT_LM), 0) as EXP_DECL_COUNT_LM,
+        nvl(sum(EXP_DECL_COUNT_LY_DEC), 0) as EXP_DECL_COUNT_LY_DEC,
+        nvl(sum(EXP_DECL_COUNT_CURYEAR), 0) as EXP_DECL_COUNT_CURYEAR,nvl(sum(EXP_DECL_COUNT_YBL), 0) as EXP_DECL_COUNT_YBL,
+        round(nvl(decode(sum(exp_decl_count) ,0 ,0, sum(exp_decl_count * exp_total_cost) / sum(exp_decl_count)), 0),2) as exp_total_cost,
+        round(nvl(decode(sum(EXP_DECL_COUNT_LM) ,0 ,0, sum(EXP_DECL_COUNT_LM * EXP_TOTAL_COST_LM) / sum(EXP_DECL_COUNT_LM)), 0),2) as EXP_TOTAL_COST_LM,
+        round(nvl(decode(sum(EXP_DECL_COUNT_LY_DEC) ,0 ,0, sum(EXP_DECL_COUNT_LY_DEC * EXP_TOTAL_COST_LY_DEC) / sum(EXP_DECL_COUNT_LY_DEC)), 0),2) as EXP_TOTAL_COST_LY_DEC,
+        round(nvl(decode(sum(EXP_DECL_COUNT_CURYEAR) ,0 ,0, sum(EXP_DECL_COUNT_CURYEAR * EXP_TOTAL_COST_CY) / sum(EXP_DECL_COUNT_CURYEAR)), 0),2) as EXP_TOTAL_COST_CY,
+        round(nvl(decode(sum(EXP_DECL_COUNT_YBL) ,0 ,0, sum(EXP_DECL_COUNT_YBL * EXP_TOTAL_COST_YBL) / sum(EXP_DECL_COUNT_YBL)), 0),2) as EXP_TOTAL_COST_YBL,
+        round(nvl(decode(sum(exp_decl_count) ,0 ,0, sum(exp_decl_count * EXP_CU_COST) / sum(exp_decl_count)), 0),2) as EXP_CU_COST,
+        round(nvl(decode(sum(EXP_DECL_COUNT_LM) ,0 ,0, sum(EXP_DECL_COUNT_LM * EXP_CU_COST_LM) / sum(EXP_DECL_COUNT_LM)), 0),2) as EXP_CU_COST_LM,
+        round(nvl(decode(sum(EXP_DECL_COUNT_LY_DEC), 0, 0, sum(EXP_DECL_COUNT_LY_DEC * EXP_CU_COST_LY_DEC) / sum(EXP_DECL_COUNT_LY_DEC)), 0),2) as EXP_CU_COST_LY_DEC,
+        round(nvl(decode(sum(EXP_DECL_COUNT_CURYEAR), 0, 0, sum(EXP_DECL_COUNT_CURYEAR * EXP_CU_COST_CY) / sum(EXP_DECL_COUNT_CURYEAR)), 0),2) as EXP_CU_COST_CY,
+        round(nvl(decode(sum(EXP_DECL_COUNT_YBL) ,0 ,0, sum(EXP_DECL_COUNT_YBL * IMP_CU_COST_YBL) / sum(EXP_DECL_COUNT_YBL)), 0),2) as EXP_CU_COST_YBL
+        from  WXJY_CUSTOM_M_STAT_F where custom_code != '4700'
+        <if test="beginDate != null and beginDate != ''">
+            and month = #{beginDate}
+        </if>
+        union all
+        select * from (select a.custom_code,
+        nvl(a.imp_decl_count,0) imp_decl_count,
+        nvl(a.IMP_MAN_DECL_COUNT,0) IMP_MAN_DECL_COUNT,
+        nvl(a.IMP_MANUAL_AUDIT_DECL_COUNT,0) IMP_MANUAL_AUDIT_DECL_COUNT,
+        nvl(a.IMP_DECL_COUNT_LM,0) IMP_DECL_COUNT_LM,
+        nvl(a.IMP_DECL_COUNT_LY_DEC,0) IMP_DECL_COUNT_LY_DEC,
+        nvl(a.IMP_DECL_COUNT_CURYEAR,0) IMP_DECL_COUNT_CURYEAR,
+        nvl(a.IMP_DECL_COUNT_YBL,0) IMP_DECL_COUNT_YBL,
+        round(nvl(a.imp_total_cost,0), 2) imp_total_cost,
+        round(nvl(a.imp_total_cost_lm,0), 2) imp_total_cost_lm,
+        round(nvl(a.imp_total_cost_ly_dec,0), 2) imp_total_cost_ly_dec,
+        round(nvl(a.IMP_TOTAL_COST_CY,0), 2) IMP_TOTAL_COST_CY,
+        round(nvl(a.IMP_TOTAL_COST_YBL,0), 2) IMP_TOTAL_COST_YBL,
+        round(nvl(a.IMP_CU_COST,0), 2) IMP_CU_COST,
+        round(nvl(a.IMP_CU_COST_LM,0), 2) IMP_CU_COST_LM,
+        round(nvl(a.IMP_CU_COST_LY_DEC,0), 2) IMP_CU_COST_LY_DEC,
+        round(nvl(a.IMP_CU_COST_CY,0), 2) IMP_CU_COST_CY,
+        round(nvl(a.IMP_CU_COST_YBL,0), 2) IMP_CU_COST_YBL,
+        nvl(a.exp_decl_count,0) exp_decl_count,
+        nvl(a.EXP_MAN_DECL_COUNT,0) EXP_MAN_DECL_COUNT,
+        nvl(a.EXP_MANUAL_AUDIT_DECL_COUNT,0) EXP_MANUAL_AUDIT_DECL_COUNT,
+        nvl(a.EXP_DECL_COUNT_LM,0) EXP_DECL_COUNT_LM,
+        nvl(a.EXP_DECL_COUNT_LY_DEC,0) EXP_DECL_COUNT_LY_DEC,
+        nvl(a.EXP_DECL_COUNT_CURYEAR,0) EXP_DECL_COUNT_CURYEAR,
+        nvl(a.EXP_DECL_COUNT_YBL,0) EXP_DECL_COUNT_YBL,
+        round(nvl(a.exp_total_cost,0), 2) exp_total_cost,
+        round(nvl(a.exp_total_cost_lm,0), 2) exp_total_cost_lm,
+        round(nvl(a.exp_total_cost_ly_dec,0), 2) exp_total_cost_ly_dec,
+        round(nvl(a.EXP_TOTAL_COST_CY,0), 2) EXP_TOTAL_COST_CY,
+        round(nvl(a.EXP_TOTAL_COST_YBL,0), 2) EXP_TOTAL_COST_YBL,
+        round(nvl(a.EXP_CU_COST,0), 2) EXP_CU_COST,
+        round(nvl(a.EXP_CU_COST_LM,0), 2) EXP_CU_COST_LM,
+        round(nvl(a.EXP_CU_COST_LY_DEC,0), 2) EXP_CU_COST_LY_DEC,
+        round(nvl(a.EXP_CU_COST_CY,0), 2) EXP_CU_COST_CY,
+        round(nvl(a.EXP_CU_COST_YBL,0), 2) EXP_CU_COST_YBL
+        from WXJY_CUSTOM_M_STAT_F a
+        where custom_code != '4700'
+        <if test="beginDate != null and beginDate != ''">
+            and month = #{beginDate}
+        </if>
+        order by a.custom_code)
     </select>
 
     <select id="selectByID" parameterType="String"

+ 2 - 4
wxjy-wxjy-service/src/main/resources/vm/java/pojoQuery.java.vm

@@ -56,10 +56,8 @@ public class ${ClassName}Query implements Serializable {
 
     #end
 
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Date beginDate;
-    @JsonFormat(pattern = "yyyy-MM-dd")
-    private Date endDate;
+    private String beginDate;
+    private String endDate;
     private int pageIndex;
     private int pageSize;
 }

+ 4 - 4
wxjy-wxjy-service/src/main/resources/vm/js/api.js.vm

@@ -12,25 +12,25 @@ export async function getList(query: ${ClassName}Query): Promise<Result<PageInfo
   return res.data
 }
 
-// 获取采购入库单详情
+// 获取${functionName}详情
 export async function getDetail(${pkColumn.javaField}: ${pkColumn.javaType.toLowerCase()}): Promise<Result<${ClassName}>> {
   const res: AxiosResponse<Result<${ClassName}>> = await request.get(`${contextPath}/get-detail?${pkColumn.javaField}=${${pkColumn.javaField}}`)
   return res.data
 }
 
-// 新增采购入库单
+// 新增${functionName}
 export async function insert(row: ${ClassName}): Promise<Result<number>> {
   const res: AxiosResponse<Result<number>> = await request.post(`${contextPath}/insert-${className}`, row)
   return res.data
 }
 
-// 更新采购入库单
+// 更新${functionName}
 export async function update(row: ${ClassName}): Promise<Result<number>> {
   const res: AxiosResponse<Result<number>> = await request.post(`${contextPath}/update-${className}`, row)
   return res.data
 }
 
-// 删除采购入库单
+// 删除${functionName}
 export async function remove(${className}s: ${pkColumn.javaType.toLowerCase()} | ${pkColumn.javaType.toLowerCase()}[]): Promise<Result<number>> {
   // 统一转换为数组格式
   const ids = Array.isArray(${className}s) ? ${className}s : [${className}s];

+ 1 - 1
wxjy-wxjy-web/src/App.vue

@@ -38,7 +38,7 @@
             <el-icon><Setting /></el-icon>  <!-- 父菜单图标 -->
             <span>统计报表</span>  <!-- 父菜单名称 -->
           </template>
-          <router-link to="/statReport-customMstatF">
+          <router-link to="/statReport-customMStatF">
             <el-menu-item index="CustomMStatF" class="menu-item">
               <el-icon>
                 <ScaleToOriginal />

+ 18 - 0
wxjy-wxjy-web/src/apis/statReport/CustomMStatF.ts

@@ -1,8 +1,10 @@
 import type { AxiosResponse } from 'axios'
 import type { PageInfo, Result } from '@cacp/ui'
 import request from '@/utils/request'
+import download from 'js-file-download'
 
 import type {CustomMStatF,CustomMStatFQuery}  from '@/types/statReport/CustomMStatF'
+import dayjs from 'dayjs'
 
 const contextPath = '/statReport/CustomMStatF'
 
@@ -39,3 +41,19 @@ export async function remove(customMStatFs: string | string[]): Promise<Result<n
   )
   return res.data
 }
+
+// 导出
+export async function dataExport(query: CustomMStatFQuery): Promise<void> {
+  try {
+    const res = await request.post(`${contextPath}/get-customMStatF-export`,query, {
+      responseType: 'arraybuffer'
+    })
+    if (res.status === 200) {
+      // 使用js-file-download下载
+      download(res.data, '按业务现场关区分类数据_'+query.beginDate+'.xlsx', 'application/octet-stream')
+    }
+  } catch (error) {
+    console.error('导出失败:', error)
+    throw error
+  }
+}

+ 3 - 3
wxjy-wxjy-web/src/router/app-router.ts

@@ -79,12 +79,12 @@ const routers: Array<RouteRecordRaw> = [
     }
   },
   {
-    path: '/statReport-customMstatF',
-    name: 'CustomMstatF',
+    path: '/statReport-customMStatF',
+    name: 'CustomMStatF',
     component: () => import('@/views/statReport/CustomMStatF.vue'),
     meta: {
       title: '申报地海关报表',
-      permissions:"CUSTOMS_STATF_VIEW_BT"
+      permissions:"CUSTOMS_STAT_F_VIEW_BT"
     }
   },
 ]

+ 338 - 862
wxjy-wxjy-web/src/views/statReport/CustomMStatF.vue

@@ -2,13 +2,21 @@
   <cacp-search-layout>
     <template #search>
       <cacp-search-panel-layout
-          :model="state.queryData"
-          ref="queryFormRef"
-          label-position="left"
-          label-width="auto"
-          :gutter="30"
-          :colSpan="6"
+        :model="state.queryData"
+        ref="queryFormRef"
+        label-position="left"
+        label-width="auto"
+        :gutter="30"
+        :colSpan="6"
       >
+        <el-form-item label="月度">
+          <el-date-picker
+            type="month"
+            value-format="YYYY-MM"
+            v-model="state.queryData.beginDate"
+            placeholder="开始时间"
+          />
+        </el-form-item>
         <template #buttonGroup>
           <el-button type="primary" @click="onSearch">查询</el-button>
           <el-button type="info" @click="onReset">重置</el-button>
@@ -17,878 +25,346 @@
     </template>
 
     <cacp-complex-table
-        :actions="actions"
-        :data="tableData"
-        :pagination="tablePagination"
-        :actionsWidth="120"
-        @selection-change="handleSelectionChange"
-        @on-page-change="onPageChange"
-        @on-size-change="onSizeChange"
-        :loading="loading"
+      :actions="actions"
+      :data="tableData"
+      :actionsWidth="120"
+      @selection-change="handleSelectionChange"
+      @on-page-change="onPageChange"
+      @on-size-change="onSizeChange"
+      :loading="loading"
     >
-      <el-table-column type="selection" width="36" fixed="left" />
-              <el-table-column property="ID" label="主键" width="100" :show-overflow-tooltip="true" />
-              <el-table-column property="MONTH" label="月度" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="customCode" label="业务现场关区代码" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impDeclCount" label="进口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impManDeclCount" label="进口查验单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impManualAuditDeclCount" label="进口接单" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impDeclCountLm" label="上个月进口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impDeclCountLyDec" label="去年12月进口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impDeclCountCuryear" label="今年截止当月总进口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impDeclCountYbl" label="前年总进口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impTotalCost" label="进口平均整体通关时间" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impTotalCostLm" label="进口平均整体通关时间-上月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impTotalCostLyDec" label="进口平均整体通关时间-去年12月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impTotalCostCy" label="进口平均整体通关时间-1至当月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impTotalCostYbl" label="进口平均整体通关时间-前年" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impCuCost" label="进口平均海关通关时间" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impCuCostLm" label="进口平均海关通关时间" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impCuCostLyDec" label="进口平均海关通关时间-去年12月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impCuCostCy" label="进口平均海关通关时间-1至当月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="impCuCostYbl" label="进口平均海关通关时间-前年" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expDeclCount" label="出口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expManDeclCount" label="出口查验单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expManualAuditDeclCount" label="出口接单" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expDeclCountLm" label="上个月出口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expDeclCountLyDec" label="去年12月进口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expDeclCountCuryear" label="今年截止当月总出口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expDeclCountYbl" label="前年总出口单数" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expTotalCost" label="出口平均整体通关时间" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expTotalCostLm" label="出口平均整体通关时间" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expTotalCostLyDec" label="出口平均整体通关时间-去年12月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expTotalCostCy" label="出口平均整体通关时间-1至当月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expTotalCostYbl" label="出口平均整体通关时间-前年" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expCuCost" label="出口平均海关通关时间" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expCuCostLm" label="出口平均海关通关时间" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expCuCostLyDec" label="出口平均海关通关时间-去年12月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expCuCostCy" label="出口平均海关通关时间-1至当月" width="120" :show-overflow-tooltip="true" />
-              <el-table-column property="expCuCostYbl" label="出口平均海关通关时间-前年" width="120" :show-overflow-tooltip="true" />
+      <el-table-column label="序号" property="index" width="60" align="center" >
+        <template #default="scope">
+          {{scope.$index + 1}}
+        </template>
+      </el-table-column>
+      <el-table-column property="customCode" label="所属海关" width="120" :show-overflow-tooltip="true" >
+        <template #default="scope">
+          <dict-tag :options="dict.customs_info"  :dictValue="scope.row.customCode" />
+        </template>
+      </el-table-column>
+      <el-table-column property="impDeclCount" label="进口单数" width="120" :show-overflow-tooltip="true" />
+      <el-table-column property="impManDeclCount" label="进口查验单数" width="120" :show-overflow-tooltip="true" />
+      <el-table-column property="impManualAuditDeclCount" label="进口接单单数" width="120" :show-overflow-tooltip="true" />
+<!--      <el-table-column property="impDeclCountLm" label="上个月进口单数" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impDeclCountLyDec" label="去年12月进口单数" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impDeclCountCuryear" label="今年截止当月总进口单数" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impDeclCountYbl" label="前年总进口单数" width="120" :show-overflow-tooltip="true" />-->
+      <el-table-column property="impTotalCost" label="进口平均整体通关时间(小时)" width="120" :show-overflow-tooltip="true" />
+<!--      <el-table-column property="impTotalCostLm" label="进口平均整体通关时间-上月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impTotalCostLyDec" label="进口平均整体通关时间-去年12月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impTotalCostCy" label="进口平均整体通关时间-1至当月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impTotalCostYbl" label="进口平均整体通关时间-前年" width="120" :show-overflow-tooltip="true" />-->
+      <el-table-column property="impCuCost" label="进口平均海关通关时间(小时)" width="120" :show-overflow-tooltip="true" />
+<!--      <el-table-column property="impCuCostLm" label="进口平均海关通关时间" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impCuCostLyDec" label="进口平均海关通关时间-去年12月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impCuCostCy" label="进口平均海关通关时间-1至当月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="impCuCostYbl" label="进口平均海关通关时间-前年" width="120" :show-overflow-tooltip="true" />-->
+      <el-table-column property="expDeclCount" label="出口单数" width="120" :show-overflow-tooltip="true" />
+      <el-table-column property="expManDeclCount" label="出口查验单数" width="120" :show-overflow-tooltip="true" />
+      <el-table-column property="expManualAuditDeclCount" label="出口接单单数" width="120" :show-overflow-tooltip="true" />
+<!--      <el-table-column property="expDeclCountLm" label="上个月出口单数" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expDeclCountLyDec" label="去年12月进口单数" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expDeclCountCuryear" label="今年截止当月总出口单数" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expDeclCountYbl" label="前年总出口单数" width="120" :show-overflow-tooltip="true" />-->
+      <el-table-column property="expTotalCost" label="出口平均整体通关时间(小时)" width="120" :show-overflow-tooltip="true" />
+<!--      <el-table-column property="expTotalCostLm" label="出口平均整体通关时间" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expTotalCostLyDec" label="出口平均整体通关时间-去年12月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expTotalCostCy" label="出口平均整体通关时间-1至当月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expTotalCostYbl" label="出口平均整体通关时间-前年" width="120" :show-overflow-tooltip="true" />-->
+      <el-table-column property="expCuCost" label="出口平均海关通关时间(小时)" width="120" :show-overflow-tooltip="true" />
+<!--      <el-table-column property="expCuCostLm" label="出口平均海关通关时间" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expCuCostLyDec" label="出口平均海关通关时间-去年12月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expCuCostCy" label="出口平均海关通关时间-1至当月" width="120" :show-overflow-tooltip="true" />-->
+<!--      <el-table-column property="expCuCostYbl" label="出口平均海关通关时间-前年" width="120" :show-overflow-tooltip="true" />-->
     </cacp-complex-table>
   </cacp-search-layout>
-
-  <!--新增、编辑弹框-->
-  <cacp-dialog
-      v-model="state.dialogVisible"
-      :resizable="false"
-      :title="state.title"
-      width="60%"
-      @closed="onDialogClosed"
-  >
-    <el-form
-        :model="state.formData"
-        ref="dialogFormRef"
-        :rules="infoRules"
-        label-width="auto"
-        label-position="left"
-        :disabled="!state.isEdit"
-    >
-    <el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="月度" prop="MONTH">
-                    <el-input v-model="state.formData.MONTH" placeholder="请输入月度" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="业务现场关区代码" prop="customCode">
-                    <el-input v-model="state.formData.customCode" placeholder="请输入业务现场关区代码" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="进口单数" prop="impDeclCount">
-                    <el-input v-model="state.formData.impDeclCount" placeholder="请输入进口单数" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="进口查验单数" prop="impManDeclCount">
-                    <el-input v-model="state.formData.impManDeclCount" placeholder="请输入进口查验单数" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="进口接单" prop="impManualAuditDeclCount">
-                    <el-input v-model="state.formData.impManualAuditDeclCount" placeholder="请输入进口接单" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="上个月进口单数" prop="impDeclCountLm">
-                    <el-input v-model="state.formData.impDeclCountLm" placeholder="请输入上个月进口单数" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="去年12月进口单数" prop="impDeclCountLyDec">
-                    <el-input v-model="state.formData.impDeclCountLyDec" placeholder="请输入去年12月进口单数" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="今年截止当月总进口单数" prop="impDeclCountCuryear">
-                    <el-input v-model="state.formData.impDeclCountCuryear" placeholder="请输入今年截止当月总进口单数" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="前年总进口单数" prop="impDeclCountYbl">
-                    <el-input v-model="state.formData.impDeclCountYbl" placeholder="请输入前年总进口单数" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="进口平均整体通关时间" prop="impTotalCost">
-                    <el-input v-model="state.formData.impTotalCost" placeholder="请输入进口平均整体通关时间" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="进口平均整体通关时间-上月" prop="impTotalCostLm">
-                    <el-input v-model="state.formData.impTotalCostLm" placeholder="请输入进口平均整体通关时间-上月" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="进口平均整体通关时间-去年12月" prop="impTotalCostLyDec">
-                    <el-input v-model="state.formData.impTotalCostLyDec" placeholder="请输入进口平均整体通关时间-去年12月" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="进口平均整体通关时间-1至当月" prop="impTotalCostCy">
-                    <el-input v-model="state.formData.impTotalCostCy" placeholder="请输入进口平均整体通关时间-1至当月" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="进口平均整体通关时间-前年" prop="impTotalCostYbl">
-                    <el-input v-model="state.formData.impTotalCostYbl" placeholder="请输入进口平均整体通关时间-前年" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="进口平均海关通关时间" prop="impCuCost">
-                    <el-input v-model="state.formData.impCuCost" placeholder="请输入进口平均海关通关时间" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="进口平均海关通关时间" prop="impCuCostLm">
-                    <el-input v-model="state.formData.impCuCostLm" placeholder="请输入进口平均海关通关时间" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="进口平均海关通关时间-去年12月" prop="impCuCostLyDec">
-                    <el-input v-model="state.formData.impCuCostLyDec" placeholder="请输入进口平均海关通关时间-去年12月" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="进口平均海关通关时间-1至当月" prop="impCuCostCy">
-                    <el-input v-model="state.formData.impCuCostCy" placeholder="请输入进口平均海关通关时间-1至当月" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="进口平均海关通关时间-前年" prop="impCuCostYbl">
-                    <el-input v-model="state.formData.impCuCostYbl" placeholder="请输入进口平均海关通关时间-前年" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="出口单数" prop="expDeclCount">
-                    <el-input v-model="state.formData.expDeclCount" placeholder="请输入出口单数" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="出口查验单数" prop="expManDeclCount">
-                    <el-input v-model="state.formData.expManDeclCount" placeholder="请输入出口查验单数" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="出口接单" prop="expManualAuditDeclCount">
-                    <el-input v-model="state.formData.expManualAuditDeclCount" placeholder="请输入出口接单" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="上个月出口单数" prop="expDeclCountLm">
-                    <el-input v-model="state.formData.expDeclCountLm" placeholder="请输入上个月出口单数" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="去年12月进口单数" prop="expDeclCountLyDec">
-                    <el-input v-model="state.formData.expDeclCountLyDec" placeholder="请输入去年12月进口单数" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="今年截止当月总出口单数" prop="expDeclCountCuryear">
-                    <el-input v-model="state.formData.expDeclCountCuryear" placeholder="请输入今年截止当月总出口单数" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="前年总出口单数" prop="expDeclCountYbl">
-                    <el-input v-model="state.formData.expDeclCountYbl" placeholder="请输入前年总出口单数" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="出口平均整体通关时间" prop="expTotalCost">
-                    <el-input v-model="state.formData.expTotalCost" placeholder="请输入出口平均整体通关时间" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="出口平均整体通关时间" prop="expTotalCostLm">
-                    <el-input v-model="state.formData.expTotalCostLm" placeholder="请输入出口平均整体通关时间" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="出口平均整体通关时间-去年12月" prop="expTotalCostLyDec">
-                    <el-input v-model="state.formData.expTotalCostLyDec" placeholder="请输入出口平均整体通关时间-去年12月" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="出口平均整体通关时间-1至当月" prop="expTotalCostCy">
-                    <el-input v-model="state.formData.expTotalCostCy" placeholder="请输入出口平均整体通关时间-1至当月" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="出口平均整体通关时间-前年" prop="expTotalCostYbl">
-                    <el-input v-model="state.formData.expTotalCostYbl" placeholder="请输入出口平均整体通关时间-前年" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="出口平均海关通关时间" prop="expCuCost">
-                    <el-input v-model="state.formData.expCuCost" placeholder="请输入出口平均海关通关时间" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="出口平均海关通关时间" prop="expCuCostLm">
-                    <el-input v-model="state.formData.expCuCostLm" placeholder="请输入出口平均海关通关时间" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="出口平均海关通关时间-去年12月" prop="expCuCostLyDec">
-                    <el-input v-model="state.formData.expCuCostLyDec" placeholder="请输入出口平均海关通关时间-去年12月" />
-                  </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-                  <el-form-item label="出口平均海关通关时间-1至当月" prop="expCuCostCy">
-                    <el-input v-model="state.formData.expCuCostCy" placeholder="请输入出口平均海关通关时间-1至当月" />
-                  </el-form-item>
-            </el-col>
-                <el-col :span="12">
-                  <el-form-item label="出口平均海关通关时间-前年" prop="expCuCostYbl">
-                    <el-input v-model="state.formData.expCuCostYbl" placeholder="请输入出口平均海关通关时间-前年" />
-                  </el-form-item>
-            </el-col>
-    </el-row>
-
-    </el-form>
-    <template #footer v-if="state.isEdit">
-      <el-button @click="onDialogClosed">取消</el-button>
-      <el-button type="primary" @click="onSubmit">确定</el-button>
-    </template>
-  </cacp-dialog>
-
-  <!--查看弹框-->
-  <cacp-dialog
-      v-model="state.viewDialogVisible"
-      :resizable="false"
-      :title="state.viewTitle"
-      width="50%"
-  >
-    <el-form
-        :model="state.viewForm"
-        label-width="auto"
-        label-position="left"
-        :disabled="true"
-    >
-    <el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="月度:" prop="MONTH">
-                <span>{{ state.viewForm.MONTH || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="业务现场关区代码:" prop="customCode">
-                <span>{{ state.viewForm.customCode || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="进口单数:" prop="impDeclCount">
-                <span>{{ state.viewForm.impDeclCount || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="进口查验单数:" prop="impManDeclCount">
-                <span>{{ state.viewForm.impManDeclCount || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="进口接单:" prop="impManualAuditDeclCount">
-                <span>{{ state.viewForm.impManualAuditDeclCount || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="上个月进口单数:" prop="impDeclCountLm">
-                <span>{{ state.viewForm.impDeclCountLm || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="去年12月进口单数:" prop="impDeclCountLyDec">
-                <span>{{ state.viewForm.impDeclCountLyDec || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="今年截止当月总进口单数:" prop="impDeclCountCuryear">
-                <span>{{ state.viewForm.impDeclCountCuryear || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="前年总进口单数:" prop="impDeclCountYbl">
-                <span>{{ state.viewForm.impDeclCountYbl || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="进口平均整体通关时间:" prop="impTotalCost">
-                <span>{{ state.viewForm.impTotalCost || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="进口平均整体通关时间-上月:" prop="impTotalCostLm">
-                <span>{{ state.viewForm.impTotalCostLm || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="进口平均整体通关时间-去年12月:" prop="impTotalCostLyDec">
-                <span>{{ state.viewForm.impTotalCostLyDec || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="进口平均整体通关时间-1至当月:" prop="impTotalCostCy">
-                <span>{{ state.viewForm.impTotalCostCy || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="进口平均整体通关时间-前年:" prop="impTotalCostYbl">
-                <span>{{ state.viewForm.impTotalCostYbl || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="进口平均海关通关时间:" prop="impCuCost">
-                <span>{{ state.viewForm.impCuCost || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="进口平均海关通关时间:" prop="impCuCostLm">
-                <span>{{ state.viewForm.impCuCostLm || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="进口平均海关通关时间-去年12月:" prop="impCuCostLyDec">
-                <span>{{ state.viewForm.impCuCostLyDec || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="进口平均海关通关时间-1至当月:" prop="impCuCostCy">
-                <span>{{ state.viewForm.impCuCostCy || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="进口平均海关通关时间-前年:" prop="impCuCostYbl">
-                <span>{{ state.viewForm.impCuCostYbl || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="出口单数:" prop="expDeclCount">
-                <span>{{ state.viewForm.expDeclCount || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="出口查验单数:" prop="expManDeclCount">
-                <span>{{ state.viewForm.expManDeclCount || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="出口接单:" prop="expManualAuditDeclCount">
-                <span>{{ state.viewForm.expManualAuditDeclCount || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="上个月出口单数:" prop="expDeclCountLm">
-                <span>{{ state.viewForm.expDeclCountLm || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="去年12月进口单数:" prop="expDeclCountLyDec">
-                <span>{{ state.viewForm.expDeclCountLyDec || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="今年截止当月总出口单数:" prop="expDeclCountCuryear">
-                <span>{{ state.viewForm.expDeclCountCuryear || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="前年总出口单数:" prop="expDeclCountYbl">
-                <span>{{ state.viewForm.expDeclCountYbl || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="出口平均整体通关时间:" prop="expTotalCost">
-                <span>{{ state.viewForm.expTotalCost || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="出口平均整体通关时间:" prop="expTotalCostLm">
-                <span>{{ state.viewForm.expTotalCostLm || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="出口平均整体通关时间-去年12月:" prop="expTotalCostLyDec">
-                <span>{{ state.viewForm.expTotalCostLyDec || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="出口平均整体通关时间-1至当月:" prop="expTotalCostCy">
-                <span>{{ state.viewForm.expTotalCostCy || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="出口平均整体通关时间-前年:" prop="expTotalCostYbl">
-                <span>{{ state.viewForm.expTotalCostYbl || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="出口平均海关通关时间:" prop="expCuCost">
-                <span>{{ state.viewForm.expCuCost || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="出口平均海关通关时间:" prop="expCuCostLm">
-                <span>{{ state.viewForm.expCuCostLm || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="出口平均海关通关时间-去年12月:" prop="expCuCostLyDec">
-                <span>{{ state.viewForm.expCuCostLyDec || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                </el-row><el-row :gutter="20">
-                <el-col :span="12">
-              <el-form-item label="出口平均海关通关时间-1至当月:" prop="expCuCostCy">
-                <span>{{ state.viewForm.expCuCostCy || '-' }}</span>
-              </el-form-item>
-            </el-col>
-                <el-col :span="12">
-              <el-form-item label="出口平均海关通关时间-前年:" prop="expCuCostYbl">
-                <span>{{ state.viewForm.expCuCostYbl || '-' }}</span>
-              </el-form-item>
-            </el-col>
-    </el-row>
-    </el-form>
-  </cacp-dialog>
 </template>
 
 <script lang="ts" setup>
-  import { onMounted, reactive, ref } from 'vue'
-  import type { FormInstance } from 'element-plus'
-  import { ElMessage, ElMessageBox, type FormRules } from 'element-plus'
-  import config from '@/config'
-  import {
-    SuccessResultCode,
-    useComplexTable,
-    type Result,
-    type SearchPanelLayoutInstance,
-    type TableAction,
-    useLoading
-  } from '@cacp/ui'
-  import type { CustomMStatF, CustomMStatFQuery } from '@/types/statReport/CustomMStatF'
-  import { insert, getList, getDetail, remove, update } from '@/apis/statReport/CustomMStatF'
-  import { permissionStatus } from '@/utils/globalPermission'
-
-  // 表单引用
-  const queryFormRef = ref<SearchPanelLayoutInstance>()
-  const dialogFormRef = ref<FormInstance>()
-
-  // 加载状态
-  const { loading, setLoading } = useLoading()
-
-  // 表格 Hook
-  const tableHooks = useComplexTable<CustomMStatF>(config)
-  const { tableData, tablePagination, setPagination, setPageIndex, setPageSizes } = tableHooks
-
-  // 响应式数据
-  interface State {
-    queryData: CustomMStatFQuery
-    formData: CustomMStatF
-    viewForm: CustomMStatF
-    viewTitle: string
-    viewDialogVisible: boolean
-    title: string
-    isEdit: boolean
-    dialogVisible: boolean
-  }
-
-  const state = reactive<State>({
-    queryData: {
-                MONTH: '',
-                customCode: '',
-                impDeclCount: '',
-                impManDeclCount: '',
-                impManualAuditDeclCount: '',
-                impDeclCountLm: '',
-                impDeclCountLyDec: '',
-                impDeclCountCuryear: '',
-                impDeclCountYbl: '',
-                impTotalCost: '',
-                impTotalCostLm: '',
-                impTotalCostLyDec: '',
-                impTotalCostCy: '',
-                impTotalCostYbl: '',
-                impCuCost: '',
-                impCuCostLm: '',
-                impCuCostLyDec: '',
-                impCuCostCy: '',
-                impCuCostYbl: '',
-                expDeclCount: '',
-                expManDeclCount: '',
-                expManualAuditDeclCount: '',
-                expDeclCountLm: '',
-                expDeclCountLyDec: '',
-                expDeclCountCuryear: '',
-                expDeclCountYbl: '',
-                expTotalCost: '',
-                expTotalCostLm: '',
-                expTotalCostLyDec: '',
-                expTotalCostCy: '',
-                expTotalCostYbl: '',
-                expCuCost: '',
-                expCuCostLm: '',
-                expCuCostLyDec: '',
-                expCuCostCy: '',
-                expCuCostYbl: '',
+import { onMounted, reactive, ref } from 'vue'
+// import type { FormInstance } from 'element-plus'
+import { ElMessage, ElMessageBox } from 'element-plus'
+import config from '@/config'
+import {
+  SuccessResultCode,
+  useComplexTable,
+  type SearchPanelLayoutInstance,
+  type TableAction,
+  useLoading
+} from '@cacp/ui'
+import type { CustomMStatF, CustomMStatFQuery } from '@/types/statReport/CustomMStatF'
+import { dataExport, getList } from '@/apis/statReport/CustomMStatF'
+import { permissionStatus } from '@/utils/globalPermission'
+import DictTag from '@/components/DictTag/dictTag.vue'
+import { useDictType } from '@/components/useDict'
+import dayjs from 'dayjs'
+const { dict } = useDictType('customs_info')
+
+// 表单引用
+const queryFormRef = ref<SearchPanelLayoutInstance>()
+// const dialogFormRef = ref<FormInstance>()
+
+// 加载状态
+const { loading, setLoading } = useLoading()
+
+// 表格 Hook
+const tableHooks = useComplexTable<CustomMStatF>(config)
+const { tableData, tablePagination, setPagination, setPageIndex, setPageSizes } = tableHooks
+
+// 响应式数据
+interface State {
+  queryData: CustomMStatFQuery
+  formData: CustomMStatF
+  viewForm: CustomMStatF
+  viewTitle: string
+  viewDialogVisible: boolean
+  title: string
+  isEdit: boolean
+  dialogVisible: boolean
+}
+
+const state = reactive<State>({
+  queryData: {
+    MONTH: '',
+    customCode: '',
+    impDeclCount: '',
+    impManDeclCount: '',
+    impManualAuditDeclCount: '',
+    impDeclCountLm: '',
+    impDeclCountLyDec: '',
+    impDeclCountCuryear: '',
+    impDeclCountYbl: '',
+    impTotalCost: '',
+    impTotalCostLm: '',
+    impTotalCostLyDec: '',
+    impTotalCostCy: '',
+    impTotalCostYbl: '',
+    impCuCost: '',
+    impCuCostLm: '',
+    impCuCostLyDec: '',
+    impCuCostCy: '',
+    impCuCostYbl: '',
+    expDeclCount: '',
+    expManDeclCount: '',
+    expManualAuditDeclCount: '',
+    expDeclCountLm: '',
+    expDeclCountLyDec: '',
+    expDeclCountCuryear: '',
+    expDeclCountYbl: '',
+    expTotalCost: '',
+    expTotalCostLm: '',
+    expTotalCostLyDec: '',
+    expTotalCostCy: '',
+    expTotalCostYbl: '',
+    expCuCost: '',
+    expCuCostLm: '',
+    expCuCostLyDec: '',
+    expCuCostCy: '',
+    expCuCostYbl: '',
+    beginDate: dayjs().startOf('month').format('YYYY-MM'),
+    pageIndex: tablePagination.currentPage,
+    pageSize: tablePagination.pageSize
+  },
+  formData: {
+    ID: '',
+    MONTH: '',
+    customCode: '',
+    impDeclCount: '',
+    impManDeclCount: '',
+    impManualAuditDeclCount: '',
+    impDeclCountLm: '',
+    impDeclCountLyDec: '',
+    impDeclCountCuryear: '',
+    impDeclCountYbl: '',
+    impTotalCost: '',
+    impTotalCostLm: '',
+    impTotalCostLyDec: '',
+    impTotalCostCy: '',
+    impTotalCostYbl: '',
+    impCuCost: '',
+    impCuCostLm: '',
+    impCuCostLyDec: '',
+    impCuCostCy: '',
+    impCuCostYbl: '',
+    expDeclCount: '',
+    expManDeclCount: '',
+    expManualAuditDeclCount: '',
+    expDeclCountLm: '',
+    expDeclCountLyDec: '',
+    expDeclCountCuryear: '',
+    expDeclCountYbl: '',
+    expTotalCost: '',
+    expTotalCostLm: '',
+    expTotalCostLyDec: '',
+    expTotalCostCy: '',
+    expTotalCostYbl: '',
+    expCuCost: '',
+    expCuCostLm: '',
+    expCuCostLyDec: '',
+    expCuCostCy: '',
+    expCuCostYbl: '',
+  } as CustomMStatF,
+  viewForm: {} as CustomMStatF,
+  viewTitle: '',
+  viewDialogVisible: false,
+  title: '',
+  isEdit: false,
+  dialogVisible: false,
+})
+
+// 表格操作按钮配置
+const actions = <Array<TableAction>>[
+  {
+    key: 'export',
+    text: '导出',
+    onclick: onExpot,
+    limit: permissionStatus('none', 'CUSTOMS_STAT_F_EXPORT_BT'),
+    type: 'primary'
+  },
+  // {
+  //   key: 'refresh',
+  //   type: 'primary',
+  //   text: '刷新',
+  //   onclick: onRefresh,
+  //   limit: 'none',
+  //   position: 'right',
+  //   plain: true
+  // }
+]
+
+// 选中项的 ID 数组
+const ids = ref<string[]>([])
+
+// 多选框选中数据
+function handleSelectionChange(selection: CustomMStatF[]) {
+  ids.value = selection
+    .map(item => item.ID)
+    .filter((id): id is string => id != null && id !== undefined)
+}
+
+// 搜索方法
+const onSearch = () => {
+  setPageIndex(1)
+  onLoadData()
+}
+
+// 重置方法
+const onReset = () => {
+  queryFormRef.value?.resetFields()
+  onPageChange(1)
+}
+
+// 每页显示条数变化
+const onSizeChange = (size: number) => {
+  setPageSizes(size)
+  onLoadData()
+}
+
+// 翻页查询
+const onPageChange = (currentPage: number) => {
+  setPageIndex(currentPage)
+  onLoadData()
+}
+
+/*// 重置表单
+function resetForm() {
+  state.formData = {
+    ID: '',
+    MONTH: '',
+    customCode: '',
+    impDeclCount: '',
+    impManDeclCount: '',
+    impManualAuditDeclCount: '',
+    impDeclCountLm: '',
+    impDeclCountLyDec: '',
+    impDeclCountCuryear: '',
+    impDeclCountYbl: '',
+    impTotalCost: '',
+    impTotalCostLm: '',
+    impTotalCostLyDec: '',
+    impTotalCostCy: '',
+    impTotalCostYbl: '',
+    impCuCost: '',
+    impCuCostLm: '',
+    impCuCostLyDec: '',
+    impCuCostCy: '',
+    impCuCostYbl: '',
+    expDeclCount: '',
+    expManDeclCount: '',
+    expManualAuditDeclCount: '',
+    expDeclCountLm: '',
+    expDeclCountLyDec: '',
+    expDeclCountCuryear: '',
+    expDeclCountYbl: '',
+    expTotalCost: '',
+    expTotalCostLm: '',
+    expTotalCostLyDec: '',
+    expTotalCostCy: '',
+    expTotalCostYbl: '',
+    expCuCost: '',
+    expCuCostLm: '',
+    expCuCostLyDec: '',
+    expCuCostCy: '',
+    expCuCostYbl: '',
+  } as CustomMStatF
+  dialogFormRef.value?.resetFields()
+}*/
+
+// 刷新方法
+function onRefresh() {
+  onReset()
+}
+
+// 导出
+async function onExpot() {
+  try {
+    await ElMessageBox.confirm('确定要导出申报地海关报表吗?', '提示', {
+      confirmButtonText: '确定',
+      cancelButtonText: '取消',
+      type: 'warning'
+    })
+    const query = {
+      ...state.queryData,
       pageIndex: tablePagination.currentPage,
       pageSize: tablePagination.pageSize
-    },
-    formData: {
-            ID: '',
-            MONTH: '',
-            customCode: '',
-            impDeclCount: '',
-            impManDeclCount: '',
-            impManualAuditDeclCount: '',
-            impDeclCountLm: '',
-            impDeclCountLyDec: '',
-            impDeclCountCuryear: '',
-            impDeclCountYbl: '',
-            impTotalCost: '',
-            impTotalCostLm: '',
-            impTotalCostLyDec: '',
-            impTotalCostCy: '',
-            impTotalCostYbl: '',
-            impCuCost: '',
-            impCuCostLm: '',
-            impCuCostLyDec: '',
-            impCuCostCy: '',
-            impCuCostYbl: '',
-            expDeclCount: '',
-            expManDeclCount: '',
-            expManualAuditDeclCount: '',
-            expDeclCountLm: '',
-            expDeclCountLyDec: '',
-            expDeclCountCuryear: '',
-            expDeclCountYbl: '',
-            expTotalCost: '',
-            expTotalCostLm: '',
-            expTotalCostLyDec: '',
-            expTotalCostCy: '',
-            expTotalCostYbl: '',
-            expCuCost: '',
-            expCuCostLm: '',
-            expCuCostLyDec: '',
-            expCuCostCy: '',
-            expCuCostYbl: '',
-    } as CustomMStatF,
-    viewForm: {} as CustomMStatF,
-    viewTitle: '',
-    viewDialogVisible: false,
-    title: '',
-    isEdit: false,
-    dialogVisible: false,
-  })
-
-  // 表单验证规则
-  const infoRules = reactive<FormRules<CustomMStatF>>({
-                  ID: [
-              { required: true, message: '主键不能为空', trigger: 'blur' }
-            ],
-  })
-
-  // 表格操作按钮配置
-  const actions = <Array<TableAction>>[
-    {
-      key: 'create',
-      text: '新增',
-      onclick: onCreate,
-      limit: permissionStatus('none', 'STATREPORT_CUSTOMMSTATF_ADD_BT'),
-      position: 'left',
-      type: 'primary',
-    },
-    {
-      key: 'view',
-      text: '查看',
-      onclick: onView,
-      limit: permissionStatus('one', 'STATREPORT_CUSTOMMSTATF_VIEW_BT'),
-      type: 'primary'
-    },
-    {
-      key: 'edit',
-      text: '修改',
-      onclick: onEdit,
-      limit: permissionStatus('one', 'STATREPORT_CUSTOMMSTATF_EDIT_BT'),
-      type: 'primary'
-    },
-    {
-      key: 'delete',
-      text: '删除',
-      onclick: onDelete,
-      confirm: true,
-      limit: permissionStatus('none', 'STATREPORT_CUSTOMMSTATF_DELETE_BT'),
-      type: 'primary'
-    },
-    {
-      key: 'refresh',
-      type: 'primary',
-      text: '刷新',
-      onclick: onRefresh,
-      limit: 'none',
-      position: 'left',
-      plain: true
     }
-  ]
-
-  // 选中项的 ID 数组
-  const ids = ref<string[]>([])
-
-  // 多选框选中数据
-  function handleSelectionChange(selection: CustomMStatF[]) {
-    ids.value = selection
-        .map(item => item.ID)
-        .filter((id): id is string => id != null && id !== undefined)
-  }
-
-  // 搜索方法
-  const onSearch = () => {
-    setPageIndex(1)
-    onLoadData()
-  }
-
-  // 重置方法
-  const onReset = () => {
-    queryFormRef.value?.resetFields()
-    onPageChange(1)
-  }
-
-  // 每页显示条数变化
-  const onSizeChange = (size: number) => {
-    setPageSizes(size)
-    onLoadData()
-  }
-
-  // 翻页查询
-  const onPageChange = (currentPage: number) => {
-    setPageIndex(currentPage)
-    onLoadData()
+    await dataExport(query);
+  } catch{
+    // 用户取消删除
   }
-
-  // 弹框关闭方法
-  function onDialogClosed() {
-    state.dialogVisible = false
-    resetForm()
-  }
-
-  // 重置表单
-  function resetForm() {
-    state.formData = {
-            ID: '',
-            MONTH: '',
-            customCode: '',
-            impDeclCount: '',
-            impManDeclCount: '',
-            impManualAuditDeclCount: '',
-            impDeclCountLm: '',
-            impDeclCountLyDec: '',
-            impDeclCountCuryear: '',
-            impDeclCountYbl: '',
-            impTotalCost: '',
-            impTotalCostLm: '',
-            impTotalCostLyDec: '',
-            impTotalCostCy: '',
-            impTotalCostYbl: '',
-            impCuCost: '',
-            impCuCostLm: '',
-            impCuCostLyDec: '',
-            impCuCostCy: '',
-            impCuCostYbl: '',
-            expDeclCount: '',
-            expManDeclCount: '',
-            expManualAuditDeclCount: '',
-            expDeclCountLm: '',
-            expDeclCountLyDec: '',
-            expDeclCountCuryear: '',
-            expDeclCountYbl: '',
-            expTotalCost: '',
-            expTotalCostLm: '',
-            expTotalCostLyDec: '',
-            expTotalCostCy: '',
-            expTotalCostYbl: '',
-            expCuCost: '',
-            expCuCostLm: '',
-            expCuCostLyDec: '',
-            expCuCostCy: '',
-            expCuCostYbl: '',
-    } as CustomMStatF
-    dialogFormRef.value?.resetFields()
-  }
-
-  // 刷新方法
-  function onRefresh() {
-    onReset()
-  }
-
-  // 新增
-  function onCreate() {
-    resetForm()
-    state.dialogVisible = true
-    state.isEdit = true
-    state.title = '新增按业务现场关区分类'
-  }
-
-  // 查看
-  function onView(row: CustomMStatF) {
-    state.viewForm = { ...row }
-    state.viewDialogVisible = true
-    state.viewTitle = '查看按业务现场关区分类详情'
-  }
-
-  // 编辑
-  async function onEdit(row: CustomMStatF) {
-    const res = await getDetail(row.ID)
+}
+
+// 数据查询
+async function onLoadData() {
+  setLoading(true)
+  try {
+    const query = {
+      ...state.queryData,
+      pageIndex: tablePagination.currentPage,
+      pageSize: tablePagination.pageSize
+    }
+    const res = await getList(query)
     if (res.code === SuccessResultCode) {
-      state.formData = res.data
-      state.dialogVisible = true
-      state.isEdit = true
-      state.title = '修改按业务现场关区分类'
+      setPagination(res.data)
     } else {
-      ElMessage.error(res.message || '数据获取异常')
-    }
-  }
-
-  // 删除
-  async function onDelete(row: CustomMStatF) {
-    const deleteIds = row.ID || ids.value
-    if (!deleteIds || deleteIds.length === 0) {
-      ElMessage.warning('请选择要删除的数据')
-      return
-    }
-
-    try {
-      await ElMessageBox.confirm('确定要删除选中的按业务现场关区分类吗?', '提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-
-      const res = await remove(deleteIds)
-      if (res.code === SuccessResultCode) {
-        ElMessage.success('删除成功')
-        onPageChange(1)
-      } else {
-        ElMessage.error(res.message || '删除失败')
-      }
-    } catch{
-      // 用户取消删除
-    }
-  }
-
-
-  // 新增/修改提交
-  async function onSubmit() {
-    if (!dialogFormRef.value) return
-
-    const isValid = await dialogFormRef.value.validate()
-    if (!isValid) return
-
-    try {
-
-
-      let res: Result<any>
-      if (state.formData.ID) {
-        res = await update(state.formData)
-      } else {
-        res = await insert(state.formData)
-      }
-
-      if (res.code === SuccessResultCode) {
-        ElMessage.success(state.formData.ID ? '修改成功' : '新增成功')
-        state.dialogVisible = false
-        onPageChange(1)
-      } else {
-        ElMessage.error(res.message || '操作失败')
-      }
-    } catch (error) {
-      console.error('提交失败:', error)
-      ElMessage.error('操作失败')
-    }
-  }
-
-  // 数据查询
-  async function onLoadData() {
-    setLoading(true)
-    try {
-      const query = {
-        ...state.queryData,
-        pageIndex: tablePagination.currentPage,
-        pageSize: tablePagination.pageSize
-      }
-      const res = await getList(query)
-      if (res.code === SuccessResultCode) {
-        setPagination(res.data)
-      } else {
-        ElMessage.error(res.message || '查询失败')
-      }
-    } catch (error) {
-      console.error('查询失败:', error)
-      ElMessage.error('查询失败')
-    } finally {
-      setLoading(false)
+      ElMessage.error(res.message || '查询失败')
     }
+  } catch (error) {
+    console.error('查询失败:', error)
+    ElMessage.error('查询失败')
+  } finally {
+    setLoading(false)
   }
+}
 
 
-  // 组件挂载时加载数据
-  onMounted(() => {
-    onLoadData()
-  })
+// 组件挂载时加载数据
+onMounted(() => {
+  onLoadData()
+})
 </script>
 
 <style scoped>
-  /* 自定义样式 */
-</style>
+/* 自定义样式 */
+</style>