yubo
2026-04-08 d90db860b7ea15a6d6c58a3e77b649966f3ab6bf
febs-server/febs-server-hr/src/main/java/cc/mrbird/febs/server/hr/controller/EmpBaseInfoController.java
@@ -27,6 +27,7 @@
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
@@ -341,7 +342,9 @@
    @ApiOperation(value = "导出社保四险员工")
    @PostMapping(value = "export/insurance")
    @ControllerEndpoint(operation = "导出社保四险数据", exceptionMessage = "导出 Excel 失败")
    public void exportInsuranceWithField(QueryRequest request, HttpServletResponse response, String exportField, EmpBaseInfo empBaseinfo) throws IOException {
    public void exportInsuranceWithField(QueryRequest request, HttpServletRequest httpRequest, HttpServletResponse response, EmpBaseInfo empBaseinfo) throws IOException {
        String exportField = httpRequest.getParameter("exportField");
        log.info("exportField: {}", exportField);
        request.setPageSize(25535);
        request.setPageNum(1);
        List<EmpBaseInfo> exportList = this.empBaseInfoService.findInsuranceEmpBaseInfos(request, empBaseinfo).getRecords();
@@ -400,6 +403,8 @@
     * @throws IOException IO 异常
     */
    private void exportExcel(HttpServletResponse response, String exportField, List<EmpBaseInfo> exportList, String fileName) throws IOException {
        log.info("导出Excel - exportField: {}", exportField);
        log.info("导出Excel - exportList size: {}", exportList != null ? exportList.size() : 0);
        List<Map<String, Object>> allList = PoiExportExcel.getDataList(exportField, exportList, null);
        Date currentDate = new Date();
        String dateStr = DateUtil.formatDate(currentDate);