| | |
| | | import com.sinata.common.exception.ServiceException; |
| | | import com.sinata.common.utils.BeanUtils; |
| | | import com.sinata.common.utils.StringUtils; |
| | | import com.sinata.system.config.AutoColumnWidthStrategy; |
| | | import com.sinata.system.domain.MwStagingRoom; |
| | | import com.sinata.system.domain.dto.MwStagingRoomDTO; |
| | | import com.sinata.system.domain.excel.MwCheckoutRecordExcel; |
| | |
| | | // 这里URLEncoder.encode可以防止中文乱码 当然和easyexcel没有关系 |
| | | String fileName = URLEncoder.encode("暂存间入库记录", "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | FastExcel.write(response.getOutputStream(), MwStorageRecordVO.class).sheet("暂存间入库记录").doWrite(list); |
| | | FastExcel.write(response.getOutputStream(), MwStorageRecordVO.class) |
| | | .registerWriteHandler(new AutoColumnWidthStrategy()) |
| | | .sheet("暂存间入库记录").doWrite(list); |
| | | } |
| | | |
| | | /** |
| | |
| | | response.setCharacterEncoding("utf-8"); |
| | | String fileName = URLEncoder.encode("暂存间出库记录", "UTF-8").replaceAll("\\+", "%20"); |
| | | response.setHeader("Content-disposition", "attachment;filename*=utf-8''" + fileName + ".xlsx"); |
| | | FastExcel.write(response.getOutputStream(), MwCheckoutRecordExcel.class).sheet("暂存间出库记录").doWrite(mwCheckoutRecordExcels); |
| | | FastExcel.write(response.getOutputStream(), MwCheckoutRecordExcel.class) |
| | | .registerWriteHandler(new AutoColumnWidthStrategy()) |
| | | .sheet("暂存间出库记录") |
| | | .doWrite(mwCheckoutRecordExcels); |
| | | } |
| | | |
| | | @Override |