吉安感知网项目-后端
linwei
2026-01-28 dab98d2c0f573d8e17a7786a879e595e6d535a9a
drone-ops/drone-resource/src/main/java/org/sxkj/resource/service/impl/AttachServiceImpl.java
@@ -115,7 +115,10 @@
   @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);
   }
@@ -786,18 +789,11 @@
    * @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;
      }