From d8eb22351c6d0bfe0c9f233edfd593538e6838c9 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 24 四月 2025 13:58:49 +0800
Subject: [PATCH] 1、表阀一体机协议开阀类型变化; 2、表阀一体机协议开关阀报中增加水价数据;

---
 pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/dyFile/FileOperate.java |   35 ++++++++++++++++++++++++++++-------
 1 files changed, 28 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 f4132ec..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_ ;
 	}

--
Gitblit v1.8.0