From 4f99f59668c9160ca60958b7347944def26f2228 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期日, 27 四月 2025 10:58:53 +0800
Subject: [PATCH] 回退配置

---
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/dyFile/FileOperate.java |   63 ++++++++++++++++++++++++++++---
 1 files changed, 56 insertions(+), 7 deletions(-)

diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/dyFile/FileOperate.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/dyFile/FileOperate.java
index ae52a49..5d00701 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/dyFile/FileOperate.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/dyFile/FileOperate.java
@@ -79,23 +79,44 @@
 
 	/**
 	 * 閫氳繃鐓х墖璺緞锛屽緱鍒板搴旂缉鐣ュ浘鐨勮矾寰�
-	 * @param imgPath
+	 * @param filePath
 	 * @return
 	 */
-	public String getImgFileZipPath(String imgPath){
+	public String getFileZipPath(String filePath){
 		String path_ = null ;
 		String prePath = null ;
 		String tailPath = null ;
-		if(imgPath != null && !imgPath.trim().equals("")) {
-			int lastDotIndex = imgPath.lastIndexOf('.');
+		if(filePath != null && !filePath.trim().equals("")) {
+			int lastDotIndex = filePath.lastIndexOf('.');
 			if (lastDotIndex >= 0) {
-				prePath = imgPath.substring(0, lastDotIndex);
-				tailPath = imgPath.substring(lastDotIndex);
+				prePath = filePath.substring(0, lastDotIndex);
+				tailPath = filePath.substring(lastDotIndex);
 				path_ = prePath + "_" + tailPath ;
 			}
 		}
 		if(path_ == null){
-			path_ = imgPath ;
+			path_ = filePath;
+		}
+		return path_ ;
+	}
+
+	/**
+	 * 閫氳繃瑙嗛璺緞锛屽緱鍒板搴旂缉鐣ュ浘鐨勮矾寰�
+	 * @param filePath
+	 * @return
+	 */
+	public String getFileZipPath(String filePath, String extName){
+		String path_ = null ;
+		String prePath = null ;
+		if(filePath != null && !filePath.trim().equals("")) {
+			int lastDotIndex = filePath.lastIndexOf('.');
+			if (lastDotIndex >= 0) {
+				prePath = filePath.substring(0, lastDotIndex);
+				path_ = prePath + "_." + extName ;
+			}
+		}
+		if(path_ == null){
+			path_ = filePath;
 		}
 		return path_ ;
 	}
@@ -277,6 +298,34 @@
 	}
 
 	/**
+	 * 瑙f瀽鏂囦欢鍝堝笇鍊�
+	 * @param fmUrl
+	 * @param hashCodes
+	 * @return
+	 */
+	public  List<FileRestVo> parseHashcode(String fmUrl, List<Integer> hashCodes){
+		List<FileRestVo> rList = null ;
+		if(hashCodes != null && hashCodes.size() > 0) {
+			// 鍑嗗璇锋眰鏁版嵁
+			MultiValueMap<String, Object> multipartRequestData = new LinkedMultiValueMap<>();
+			multipartRequestData.add(FileConstant.fmPostMapping_parseHashcodeList_paramName, hashCodes);
+
+			// 璁剧疆璇锋眰澶撮儴锛岃繖閲屽亣璁炬湇鍔″櫒鎺ユ敹multipart/form-data绫诲瀷鐨勬暟鎹�
+			HttpHeaders headers = new HttpHeaders();
+			headers.setContentType(MediaType.MULTIPART_FORM_DATA);
+
+			// 灏佽璇锋眰浣�
+			HttpEntity<MultiValueMap<String, Object>> requestEntity = new HttpEntity<>(multipartRequestData, headers);
+
+			String webUrl = fmUrl + "/" + FileConstant.fmRequestMapping + "/" + FileConstant.fmPostMapping_parseHashcodeList;
+			// 鍙戦�丳OST璇锋眰
+			FileRestVo[] rvos = restTemplate.postForObject(webUrl, requestEntity, FileRestVo[].class);
+			rList = Arrays.asList(rvos) ;
+		}
+		return rList ;
+	}
+
+	/**
 	 * 瑙f瀽鏂囦欢鏂囦欢璺緞涓殑鍝堝笇鍊煎苟杩斿洖鍥剧墖瀹屾暣璺緞
 	 * @param fmUrl
 	 * @param filePath

--
Gitblit v1.8.0