| | |
| | | |
| | | @Override |
| | | public IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachPageParam attach) { |
| | | List<AttachVO> attachVOS = baseMapper.selectAttachPage(page, attach); |
| | | // 创建部门 |
| | | List<Long> deptList = SysCache.getDeptChildIds(Long.valueOf(AuthUtil.getDeptId())); |
| | | attach.setDeptList(deptList); |
| | | List<AttachVO> attachVOS = baseMapper.selectAttachPage(page, attach); |
| | | return page.setRecords(attachVOS); |
| | | } |
| | | |
| | |
| | | * @throws IOException |
| | | */ |
| | | @Override |
| | | public Boolean downloadByByte(AttachmentDownloadParam param, OutputStream outputStream) throws IOException { |
| | | // 如果附件id集合并且任务id集合参数都为空,就判断起止时间是否都有为空,如果都为空,则返回错误 |
| | | param.setAreaCode(HeaderUtils.formatAreaCode(param.getAreaCode())); |
| | | if (CollectionUtils.isEmpty(param.getAttachIds())) { |
| | | // 判断起止时间是否为空 |
| | | if (StringUtils.isEmpty(param.getStartTime()) || StringUtils.isEmpty(param.getEndTime())) { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public Boolean downloadByByte(String param, OutputStream outputStream) throws IOException { |
| | | AttachmentDownloadParam attachmentDownloadParam = new AttachmentDownloadParam(); |
| | | attachmentDownloadParam.setAttachIds(Func.toLongList(param)); |
| | | // 获取附件列表 |
| | | List<AttachVO> attachList = getAttachList(param); |
| | | List<AttachVO> attachList = getAttachList(attachmentDownloadParam); |
| | | if (CollectionUtils.isEmpty(attachList)) { |
| | | return false; |
| | | } |