From 95082232a68f3d58a4348eee3d5f2bc546e67ad0 Mon Sep 17 00:00:00 2001 From: XaoLi717 <144221124+XaoLi717@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:00:25 +0800 Subject: [PATCH] =?UTF-8?q?OnlyOffice=E7=9A=84Bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../module/only/controller/admin/only/onlyofController.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/only/controller/admin/only/onlyofController.java b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/only/controller/admin/only/onlyofController.java index 47bd38a..0d94a38 100644 --- a/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/only/controller/admin/only/onlyofController.java +++ b/yudao-module-bpm/yudao-module-bpm-biz/src/main/java/cn/iocoder/yudao/module/only/controller/admin/only/onlyofController.java @@ -173,6 +173,7 @@ public class onlyofController { public void download(String name, String cDate,HttpServletResponse response) { cDate = cDate.equals("") ? cDate : cDate + "\\"; // System.out.println("download: "+name+"---"+response+"---"+uuid); + System.out.println("cDate:"+cDate); try { FileUtil.downLoadFile(name,filePath+cDate,response); } catch (IOException e) { @@ -205,12 +206,13 @@ public class onlyofController { @GetMapping("/editStatus") @Operation(summary = "文件状态") @PreAuthorize("@ss.hasPermission('only:onlyof:editStatus')") - public ResponseEntity getDoucmentEditStatus(String name) throws ParseException { + public ResponseEntity getDoucmentEditStatus(String name,String cDate) throws ParseException { + cDate = (cDate != null && !cDate.isEmpty()) ? cDate + "\\" : cDate; // System.out.println("editStatus"); String url = officeUrl+officeCommand; Map map = new HashMap(); map.put("c", "forcesave"); - String docFileMd5 = Md5Utils.getFileMd5(new File(filePath+name)); + String docFileMd5 = Md5Utils.getFileMd5(new File(filePath+cDate+name)); if (StringUtils.isBlank(docFileMd5)) { // throw new DocumentException(ErrorCodeEnum.DOC_FILE_MD5_ERROR); }