| | |
| | | @Override |
| | | public IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachPageParam attach) { |
| | | // 创建部门 |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | attach.setDeptList(deptList); |
| | | List<AttachVO> attachVOS = baseMapper.selectAttachPage(page, attach); |
| | | if (!AuthUtil.isAdministrator()) { |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | attach.setDeptList(deptList); |
| | | } |
| | | List<AttachVO> attachVOS = baseMapper.selectAttachPage(page, attach); |
| | | return page.setRecords(attachVOS); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 下载附件 |
| | | * @param param 下载参数 |
| | | * |
| | | * @param param 下载参数 |
| | | * @param outputStream 输出流 |
| | | * @return |
| | | * @throws IOException |
| | |
| | | } catch (Exception e) { |
| | | log.error("创建zip文件失败", e); |
| | | return false; |
| | | }finally { |
| | | } finally { |
| | | if (outputStream != null) { |
| | | try { |
| | | outputStream.flush(); |