lxw
2022-09-28 3fc31d16addf18a8ba30354b0dbcbba1f5c3e244
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
package com.whyc.controller;
 
import cn.afterturn.easypoi.excel.ExcelExportUtil;
import cn.afterturn.easypoi.excel.entity.TemplateExportParams;
import com.google.common.collect.Maps;
import com.whyc.dto.ResTestReportDTO;
import com.whyc.service.ExcelExportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.web.bind.annotation.*;
 
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.net.URLEncoder;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
 
@Api(tags = "excel导出")
@RestController
@RequestMapping("excelExport")
public class ExcelExportController {
 
    @Autowired
    private ExcelExportService service;
 
    @ApiOperation("内阻计测试")
    @GetMapping("resTestReport")
    public void resTestReport(@RequestParam String fileId, HttpServletResponse response){
        service.resTestReport(fileId,response);
    }
 
}