| | |
| | | @ApiAccessLog(operateType = EXPORT) |
| | | public void exportArchiveExcel(@Valid MesPdArchivePageReqVO pageReqVO, |
| | | HttpServletResponse response) throws IOException { |
| | | // 导出需要传入 Page 对象:分组查询走 XML mapper,Page 为 null 时 MyBatis-Plus 会抛 |
| | | // MybatisPlusException: can't found IPage for args!(此前这里传 null 直接导致 500) |
| | | pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); |
| | | IPage<MesPdArchiveGroupRespVO> archivePage = archiveService.getArchivePageGroupByProject(pageReqVO, null); |
| | | Page<MesPdArchiveGroupRespVO> page = new Page<>(pageReqVO.getPageNo(), pageReqVO.getPageSize()); |
| | | IPage<MesPdArchiveGroupRespVO> archivePage = archiveService.getArchivePageGroupByProject(pageReqVO, page); |
| | | ExcelUtils.write(response, "归档台账.xls", "数据", MesPdArchiveRespVO.class, |
| | | buildArchiveRespVOList(archivePage.getRecords())); |
| | | } |