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