From a55b77017e8763d0fe044a30b39f37dc9ebb9dbb Mon Sep 17 00:00:00 2001 From: liuxm <liuxm_a@163.com> Date: 星期二, 21 五月 2024 14:19:28 +0800 Subject: [PATCH] 返回文件原始名和扩展名 --- pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java | 8 ++++++-- pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductFile.java | 5 +++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductFile.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductFile.java index 9d6f9aa..3f5c80f 100644 --- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductFile.java +++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/pojoPlt/PltProductFile.java @@ -48,4 +48,9 @@ @TableField(exist = false) public String webUrl; + @TableField(exist = false) + public String orgName; + @TableField(exist = false) + public String extName; + } \ No newline at end of file diff --git a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java index 1078260..1512b4a 100644 --- a/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java +++ b/pms-parent/pms-web-platform/src/main/java/com/dy/pmsPlatform/product/ProductSv.java @@ -166,8 +166,12 @@ Stream.concat(pro.processDocuments.stream(), pro.materials.stream()) ) .forEach(doc -> { - String webUrl = getFilePathWithWebUrl(doc.fileId); - doc.webUrl = webUrl; + OthFile file = othFileMapper.selectByPrimaryKey(doc.fileId); + FileRestVo fileRestVo = fileOperate.parseHashcode(fmUrl, file.hash); + + doc.webUrl = fileRestVo.fileWebUrl + file.filePath; + doc.orgName = file.orgName; + doc.extName = file.extName; }); } return pro; -- Gitblit v1.8.0