From 2c16ba7f4cdfedf4ec05395e20caf9c87f2b5101 Mon Sep 17 00:00:00 2001
From: liusheng <337615773@qq.com>
Date: 星期三, 09 八月 2023 18:15:50 +0800
Subject: [PATCH] 修改funddetail文件上传

---
 ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
index 3cd071b..322bbe7 100644
--- a/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
+++ b/ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java
@@ -241,9 +241,13 @@
         List<RbDetailFile> parseArray = JSON.parseArray(remShare.getAnnexfiles(), RbDetailFile.class);
         for (int i = 0; i < parseArray.size(); i++) {
             RbDetailFile rbDetailFile = parseArray.get(i);
+
             log.info("filePath鐨勪慨鏀�:{}", filePath);
-            String strFile = rbDetailFile.getUrl().replaceAll("/profile/upload", filePath);
-            File filetest = new File(strFile);
+            String url = rbDetailFile.getUrl();
+            //file鐢ㄧ殑鏄粷瀵逛綅缃�
+            String substring = url.substring(url.indexOf("/profile/upload") + "/profile/upload".length());
+            String strFile = rbDetailFile.getUrl().replace(filePath, "/profile/upload");
+            File filetest = new File(filePath + substring);
             try {
                 log.info("璇锋眰绗笁鏂圭殑鍏ュ弬strFile : {}, strFUrl : {}", strFile, filePath);
                 String struploadResult = HttpClientKit.sendPostWithFile(filetest, strFUrl);

--
Gitblit v1.9.3