From a1efde5b01eba7c5341d9176c0bb6c91c8b9311e Mon Sep 17 00:00:00 2001 From: liusheng <337615773@qq.com> Date: 星期二, 15 八月 2023 16:05:45 +0800 Subject: [PATCH] 代码提交 --- ruoyi-project/src/main/java/com/ruoyi/project/service/impl/ServiceReimbursementServiceImpl.java | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 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..e46998b 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 @@ -148,7 +148,7 @@ Map<String, Object> columnMap = new HashMap<>(); columnMap.put("rbid", id); //鑾峰彇璇︽儏鏁版嵁 - List<ServiceReimbursementdetail> details = serviceReimbursementdetailMapper.selectByMap(columnMap); + List<ServiceReimbursementdetail> details = serviceReimbursementdetailMapper.selectByMap(columnMap); log.info("serviceReimbursementdetailMapper.selectByMap鏂规硶鐨勮繑鍙傚弬 :{}", CollectionUtils.isEmpty(details) ? null : details.size()); //鑾峰彇鏀粯鏁版嵁 List<ServiceReimbursementpayee> serviceReimbursementpayees = reimbursementpayeeMapper.selectByMap(columnMap); @@ -241,9 +241,14 @@ 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"); + System.out.println("reimbursement鏈嶅姟鐨刦ilePath + substring鏄贡鐮佸悧: " + filePath + substring); + File filetest = new File(filePath + substring); try { log.info("璇锋眰绗笁鏂圭殑鍏ュ弬strFile : {}, strFUrl : {}", strFile, filePath); String struploadResult = HttpClientKit.sendPostWithFile(filetest, strFUrl); -- Gitblit v1.9.3