zhizhijie
5 天以前 89a0e7cd7ec202e57e6971e27559b85c3c971aaf
traffic-audit-server/src/main/java/com/trafficaudit/reportexport/controller/ReportExportController.java
@@ -1,6 +1,7 @@
package com.trafficaudit.reportexport.controller;
import com.trafficaudit.common.Result;
import com.trafficaudit.reportexport.calc.FreightReadinessCheck;
import com.trafficaudit.reportexport.service.ReportExportService;
import com.trafficaudit.reportexport.service.ReportExportTaskService;
import com.trafficaudit.system.service.OperationLogService;
@@ -26,6 +27,8 @@
    @Resource
    private ReportExportService reportService;
    @Resource
    private FreightReadinessCheck freightReadinessCheck;
    @Resource
    private ReportExportTaskService exportTaskService;
    @Resource
@@ -89,6 +92,24 @@
    }
    /** 生成_道路运输量汇总表.xlsx(汇总工作簿 P0-P1 骨架:整本复制母版,页签/公式/2025 缓存保留) */
    /** 货运口径导出前体检(B4):只读返回命中的问题清单。 */
    @GetMapping("/summaryWorkbook/freightCheck")
    public Result<java.util.List<String>> freightCheck(@RequestParam("period") String period) {
        return Result.ok(freightReadinessCheck.check(period));
    }
    /** 汇总大表按月扩列(Step 1,只做版式、数据留空):返回下一月版式 xlsx。 */
    @GetMapping("/export/summaryWorkbook/expand")
    public ResponseEntity<byte[]> expandSummaryWorkbook(@RequestParam("period") String period,
                                                        @RequestParam(value = "titlesOnly", defaultValue = "false") boolean titlesOnly) throws Exception {
        if (titlesOnly) {
            byte[] titled = reportService.fixSummaryTitles(period);
            return buildResponse(titled, String.format("标题修正_道路运输量汇总表_%s.xlsx", period));
        }
        byte[] data = reportService.expandSummaryWorkbook(period);
        return buildResponse(data, String.format("扩列_道路运输量汇总表_%s_待确认.xlsx", period));
    }
    @GetMapping("/export/summaryWorkbook")
    public ResponseEntity<byte[]> exportSummaryWorkbook(@RequestParam("period") String period,
                                                        @RequestParam(value = "mode", defaultValue = "month") String mode,