From 3e904bfa8a1bb53dcf461e5c717f9b808e179245 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 08 一月 2025 16:27:48 +0800
Subject: [PATCH] 2025年01月08日16:27:46
---
app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 54 insertions(+), 0 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java
index 76133f3..c3065ba 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java
@@ -8,7 +8,9 @@
import android.text.TextUtils;
import com.hdl.photovoltaic.HDLApp;
+import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.config.UserConfigManage;
+import com.hdl.photovoltaic.utils.LocalManageUtil;
import org.apache.commons.io.FileUtils;
@@ -99,6 +101,19 @@
return getAPPInternalStoreFilesPath() + "/upgrade/firmware";
}
+ /**
+ * 鑾峰彇涓枃銆恓son璧勬簮鏂囦欢澶广�戝叏璺緞
+ */
+ public String getHdlESLocalJsonZhRootPath(String deviceModel) {
+ return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.zh + "/" + deviceModel;
+ }
+
+ /**
+ * 鑾峰彇鑻辨枃銆恓son璧勬簮鏂囦欢澶广�戝叏璺緞
+ */
+ public String getHdlESLocalJsonEnRootPath(String deviceModel) {
+ return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.en + "/" + deviceModel;
+ }
/**
@@ -108,12 +123,34 @@
return getCurrentHomeRootPath() + "/log.txt";
}
+
/**
* 鑾峰彇銆愮敤鎴锋枃浠躲�戝叏璺緞
*/
public String getUserFilePath() {
return getAPPInternalStoreFilesPath() + "/userConfigManage.txt";
}
+
+ /**
+ * 鑾峰彇涓枃銆恓son璧勬簮鏂囦欢銆戝叏璺緞
+ */
+ public String getHdlESLocalJsonZhFilePath(String deviceModel, String fileName) {
+ if (!fileName.endsWith(".json")) {
+ fileName += ".json";
+ }
+ return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.zh + "/" + deviceModel + "/" + fileName;
+ }
+
+ /**
+ * 鑾峰彇鑻辨枃銆恓son璧勬簮鏂囦欢銆戝叏璺緞
+ */
+ public String getHdlESLocalJsonEnFilePath(String deviceModel, String fileName) {
+ if (!fileName.endsWith(".json")) {
+ fileName += ".json";
+ }
+ return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.en + "/" + deviceModel + "/" + fileName;
+ }
+
/**
* 鑾峰彇椹卞姩鍗囩骇鏂囦欢鍏ㄨ矾寰�
@@ -157,6 +194,23 @@
}
/**
+ * 棰勫垱寤簀son璧勬簮鏂囦欢澶�
+ */
+ public void createHdlESLocalJsonDirectory() {
+ //涓枃鏂囦欢澶�
+ this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_S5K));//閫嗗彉鍣�
+ this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_SPG63A));//璐熻浇涓績
+ this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_BMS15K));//BMS
+ this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_B5K));//鐢垫睜鍖�
+ //鑻辨枃鏂囦欢澶�
+ this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_S5K));
+ this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_SPG63A));
+ this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_BMS15K));
+ this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_B5K));
+
+ }
+
+ /**
* 鍒涘缓鏂囦欢澶�
*
* @param fullPath fullPath 鍏ㄨ矾寰�
--
Gitblit v1.8.0