许鹏程
2023-08-16 8bb87356a3aadf27cdde58ca79ad2773cdf02205
src/main/java/com/product/file/service/FileManagerService.java
@@ -406,8 +406,8 @@
      String viewOnlineSign = attachmentFse.getString(CmnConst.VIEW_ONLINE_SIGN);
      boolean encrptSignFlag = "1".equals(attachmentFse.getString(CmnConst.ENCRPT_SIGN));
      boolean needOnlineViewFlag = "1".equals(fse.getString(CmnConst.NEED_ONLINE_VIEW)) && "1".equals(viewOnlineSign);
      if (needOnlineViewFlag) {
         // 需要在线预览且转换之后才能在线预览
      if (needOnlineViewFlag && !realFileName.endsWith(".xlsx") && !realFileName.endsWith(".xls")) {
         // 需要在线预览且转换之后才能在线预览 excel 文件不需要转换直接输出预览
         dir += File.separator + CmnConst.TRANSFER_DIR_NAME;
      }
@@ -560,7 +560,8 @@
    */
   public byte[] getFileContent(FieldSetEntity attachmentFse) throws BaseException {
      if (attachmentFse == null || !CmnConst.PRODUCT_SYS_ATTACHMENTS.equals(attachmentFse.getTableName())) {
         return new byte[16];
         //返回一个空的字节数组
         return new byte[0];
      }
      try (ByteArrayOutputStream os = new ByteArrayOutputStream();) {
         FTPService ftpService = new FTPService();