|
@@ -16,10 +16,8 @@ import com.ym.mec.common.page.PageInfo;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
import com.ym.mec.util.excel.POIUtil;
|
|
|
-
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
-
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -30,9 +28,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
import javax.servlet.http.HttpServletResponse;
|
|
|
-
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.OutputStream;
|
|
|
+import java.io.*;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
@@ -302,8 +298,11 @@ public class ExportController extends BaseController {
|
|
|
"signOutTime","signInStatusEnum.msg","signOutStatusEnum.msg", "remark"}, rows);
|
|
|
response.setContentType("application/octet-stream");
|
|
|
response.setHeader("Content-Disposition", "attachment;filename=lender-" + DateUtil.getDate(new Date()) + ".xls");
|
|
|
+
|
|
|
ouputStream = response.getOutputStream();
|
|
|
- workbook.write(ouputStream);
|
|
|
+
|
|
|
+ byte[] bytes = workbook.getBytes();
|
|
|
+ ouputStream.write(bytes);
|
|
|
ouputStream.flush();
|
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|