|
|
@ -13,6 +13,7 @@ import javax.servlet.http.HttpServletResponse;
|
|
|
|
import javax.ws.rs.GET;
|
|
|
|
import javax.ws.rs.GET;
|
|
|
|
import javax.ws.rs.Path;
|
|
|
|
import javax.ws.rs.Path;
|
|
|
|
import javax.ws.rs.Produces;
|
|
|
|
import javax.ws.rs.Produces;
|
|
|
|
|
|
|
|
import javax.ws.rs.QueryParam;
|
|
|
|
import javax.ws.rs.core.Context;
|
|
|
|
import javax.ws.rs.core.Context;
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
import javax.ws.rs.core.MediaType;
|
|
|
|
import javax.ws.rs.core.Response;
|
|
|
|
import javax.ws.rs.core.Response;
|
|
|
@ -20,6 +21,7 @@ import javax.ws.rs.core.StreamingOutput;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
import java.net.URLEncoder;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
import java.time.LocalDate;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* @Author weaver_cl
|
|
|
|
* @Author weaver_cl
|
|
|
@ -36,10 +38,11 @@ public class ExportCommonController {
|
|
|
|
@GET
|
|
|
|
@GET
|
|
|
|
@Path("/resource/export")
|
|
|
|
@Path("/resource/export")
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
@Produces(MediaType.APPLICATION_OCTET_STREAM)
|
|
|
|
public Response resourceExport(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
|
|
|
public Response resourceExport(@Context HttpServletRequest request, @Context HttpServletResponse response,
|
|
|
|
HrmResourceSearchParam param = buildResourceParam(request);
|
|
|
|
@QueryParam("ids") List<Long> ids) {
|
|
|
|
|
|
|
|
//HrmResourceSearchParam param = buildResourceParam(request);
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
User user = HrmUserVarify.getUser(request, response);
|
|
|
|
XSSFWorkbook workbook = getExportCommonWrapper(user).resourceExport(param);
|
|
|
|
XSSFWorkbook workbook = getExportCommonWrapper(user).resourceExport(ids);
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
String time = LocalDate.now().toString();
|
|
|
|
String fileName = "人员导出" + time;
|
|
|
|
String fileName = "人员导出" + time;
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|