From 4b6c4d5c3d3922baf02fcfa72117f107cd472b1d Mon Sep 17 00:00:00 2001 From: Chengliang <1546584672@qq.com> Date: Thu, 21 Sep 2023 15:15:18 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=9D=E6=B5=8B=E8=AF=95=E2=80=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../web/ExportCommonController.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/com/engine/organization/web/ExportCommonController.java b/src/com/engine/organization/web/ExportCommonController.java index 51ad74a6..a004e687 100644 --- a/src/com/engine/organization/web/ExportCommonController.java +++ b/src/com/engine/organization/web/ExportCommonController.java @@ -57,6 +57,31 @@ public class ExportCommonController { } +// @GET +// @Path("/department/export") +// @Produces(MediaType.APPLICATION_OCTET_STREAM) +// public Response departmentExport(@Context HttpServletRequest request, @Context HttpServletResponse response) { +// User user = HrmUserVarify.getUser(request, response); +// XSSFWorkbook workbook = getExportCommonWrapper(user).departmentExport(request, response); +// String time = LocalDate.now().toString(); +// String fileName = "人员导出" + time; +// try { +// fileName = URLEncoder.encode(fileName + ".xlsx", "UTF-8"); +// } catch (UnsupportedEncodingException e) { +// e.printStackTrace(); +// } +// StreamingOutput output = outputStream -> { +// workbook.write(outputStream); +// outputStream.flush(); +// }; +// response.setContentType("application/octet-stream"); +// return Response.ok(output).header("Content-disposition", "attachment;filename=" + fileName).header("Cache-Control", "no-cache").build(); +// } + + + + + private HrmResourceSearchParam buildResourceParam(HttpServletRequest request) { HrmResourceSearchParam param = new HrmResourceSearchParam();