lead
6 天以前 bc00242ee0410684eb9f4c5fe0aa486dfebb3162
yudao-module-mes/src/main/java/cn/iocoder/yudao/module/mes/controller/admin/pd/archive/MesPdArchiveController.java
@@ -106,8 +106,11 @@
    @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()));
    }