From b63ff58e2c415bae2fb4741aebe710fa3576ff66 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 23 三月 2026 13:11:47 +0800
Subject: [PATCH] 2026年03月23日13:11:38 备份代码
---
app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java | 217 ++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 192 insertions(+), 25 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java b/app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java
index 6764796..0855ff4 100644
--- a/app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java
+++ b/app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java
@@ -5,6 +5,7 @@
import com.google.gson.Gson;
import com.hdl.photovoltaic.HDLApp;
+import com.hdl.photovoltaic.enums.Languages;
import com.hdl.photovoltaic.other.HdlFileLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlResidenceLogic;
@@ -38,7 +39,7 @@
//uni涓�绾х晫闈㈢殑瀹夊叏璺濈鑳屾櫙棰滆壊锛�0=鐢电珯璇︽儏鐣岄潰锛�1=娣诲姞鐢电珯鐣岄潰锛�2=璁惧璋冩祴鐣岄潰锛�
- private int uniBottomSafeDistanceBackgroundColor;
+ private int uniBottomSafeDistanceBackgroundColor = 1;
//褰撳墠璐﹀彿锛氬埛鏂癟oken鐢ㄧ殑token(涓嶇敤璁板綍浠�涔堟湁鏁堟湡,濡傛灉鍒锋柊澶辫触,灏辫涪浜哄嵆鍙�)
private String refreshToken;
//璐︽埛鐧诲綍鎴愬姛鏃剁殑鏃堕棿
@@ -61,7 +62,54 @@
//鏄惁鏄疊绔处鍙风櫥褰�(true=B绔�)
private boolean isB_account;
+ //鏄惁姝e紡鏈嶅姟鍣�(true锛氭寮忥紝false锛氭祴璇�)
+ private boolean isOnlineServer = false;
+ //鏅鸿兘浣撴帴鍙e瘑閽�
+ private String agentSecret;
+ //鏅鸿兘浣撴帴鍙e湴鍧�
+ private String agentUrl;
+ //褰撳墠浼氳瘽ID
+ private String conversationId;
+ //鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
+ private String powerStationType = "INV ";
+
+ public String getAgentUrl() {
+ return agentUrl == null ? "" : agentUrl;
+ }
+
+ public void setAgentUrl(String agentUrl) {
+ this.agentUrl = agentUrl;
+ }
+
+ /**
+ * 鏅鸿兘浣揂ppKey
+ *
+ * @return 鏅鸿兘浣揂ppKey
+ */
+ public String getAgentSecret() {
+ return agentSecret == null ? "" : agentSecret;
+ }
+
+ public void setAgentSecret(String agentApiKey) {
+ this.agentSecret = agentApiKey;
+ }
+
+ public String getConversationId() {
+ return conversationId == null ? "" : conversationId;
+ }
+
+ public void setConversationId(String conversationId) {
+ this.conversationId = conversationId;
+ }
+
+ public boolean isOnlineServer() {
+ return isOnlineServer;
+ }
+
+ public void setOnlineServer(boolean onlineServer) {
+ isOnlineServer = onlineServer;
+ }
//鏄惁鏄敤鎴蜂綋楠岃处鍙风櫥褰�
private boolean isUserExperience;
@@ -99,14 +147,117 @@
private String userImageUrl = "/static/image/user-default-head.png";
- /// <summary>
- /// 娉ㄥ唽鏋佸厜ID
- /// </summary>
- public String registrationID;
- /// <summary>
- /// 娣诲姞鏋佸厜ID鍒颁簯绔垚鍔熸椂杩斿洖鐨�
- /// </summary>
- public String pushId;
+ /**
+ * 娉ㄥ唽鏋佸厜ID锛岃胺姝孎CM鐨勪护鐗�
+ */
+ private String pushToken;
+
+ /**
+ * 娣诲姞浠ょ墝鍒颁簯绔垚鍔熸椂杩斿洖鐨�
+ */
+ private String pushId;
+
+ /**
+ * 鏃犵綉妯″紡鏍囪瘑(true=鏃犵綉妯″紡,false=姝e父妯″紡)
+ */
+ private boolean noNetworkFlag = false;
+
+
+ /**
+ * 鏄惁鏄父瀹㈡ā寮�(true=娓稿妯″紡,false=姝e父妯″紡)
+ */
+ private boolean tourist_mode = false;
+
+
+ /**
+ * 鏄惁鏄父瀹㈡ā寮�
+ *
+ * @return (true=娓稿妯″紡,false=姝e父妯″紡)
+ */
+ public boolean isTourist_mode() {
+ return tourist_mode;
+ }
+
+ /**
+ * 鏄惁鏄父瀹㈡ā寮�
+ *
+ * @return (true=娓稿妯″紡,false=姝e父妯″紡)
+ */
+ public void setTourist_mode(boolean tourist_mode) {
+ this.tourist_mode = tourist_mode;
+ }
+
+
+ /**
+ * 鐢ㄦ潵娓稿妯″紡鍐峰惎鍔ㄥ己鍒惰烦鍒扮櫥褰曠晫闈㈡爣璁�
+ * true=娓稿妯″紡,鍐峰惎鍔ㄥ己鍒惰烦杞櫥褰曠晫闈紝false锛氭寜姝e父娴佺▼璺�
+ */
+ private boolean isTouristModeJumpLogic = false;
+
+ /**
+ * 鐢ㄦ潵娓稿妯″紡鍐峰惎鍔ㄥ己鍒惰烦鍒扮櫥褰曠晫闈㈡爣璁�
+ *
+ * @return true=娓稿妯″紡,鍐峰惎鍔ㄥ己鍒惰烦杞櫥褰曠晫闈紝false锛氭寜姝e父娴佺▼璺�
+ */
+ public boolean isTouristModeJumpLogic() {
+ return isTouristModeJumpLogic;
+ }
+
+ /**
+ * 鐢ㄦ潵娓稿妯″紡鍐峰惎鍔ㄥ己鍒惰烦鍒扮櫥褰曠晫闈㈡爣璁�
+ *
+ * @return true=娓稿妯″紡,鍐峰惎鍔ㄥ己鍒惰烦杞櫥褰曠晫闈紝false锛氭寜姝e父娴佺▼璺�
+ */
+ public void setTouristModeJumpLogic(boolean touristModeJumpLogic) {
+ isTouristModeJumpLogic = touristModeJumpLogic;
+ }
+
+ public boolean isAutomaticSkipNoNetworkFlag() {
+ return automaticSkipNoNetworkFlag;
+ }
+
+ public void setAutomaticSkipNoNetworkFlag(boolean automaticSkipNoNetworkFlag) {
+ this.automaticSkipNoNetworkFlag = automaticSkipNoNetworkFlag;
+ }
+
+ /**
+ * 鑷姩璺宠浆鍒版棤缃戞ā寮�(true=鍚屾剰璺宠浆,false=涓嶅悓鎰忚烦杞�)
+ */
+ private boolean automaticSkipNoNetworkFlag = false;
+
+ /**
+ * 鏃犵綉妯″紡璁惧mac
+ */
+ private String noNetworkDeviceMac;
+ /**
+ * 鏃犵綉妯″紡璁惧鐧诲綍M瀵嗙爜
+ */
+ private String noNetworkPassword;
+
+ public boolean isNoNetworkFlag() {
+ return noNetworkFlag;
+ }
+
+ public void setNoNetworkFlag(boolean noNetworkFlag) {
+ this.noNetworkFlag = noNetworkFlag;
+ }
+
+ public String getNoNetworkDeviceMac() {
+ return noNetworkDeviceMac == null ? "" : noNetworkDeviceMac;
+ }
+
+ public void setNoNetworkDeviceMac(String noNetworkDeviceMac) {
+ this.noNetworkDeviceMac = noNetworkDeviceMac;
+ }
+
+ public String getNoNetworkPassword() {
+ return noNetworkPassword == null ? "" : noNetworkPassword;
+ }
+
+ public void setNoNetworkPassword(String noNetworkPassword) {
+ this.noNetworkPassword = noNetworkPassword;
+ }
+
public String getUserImageUrl() {
return userImageUrl == null ? "/static/image/user-default-head.png" : userImageUrl;
@@ -116,12 +267,12 @@
this.userImageUrl = userImageUrl;
}
- public String getRegistrationID() {
- return registrationID == null ? "" : registrationID;
+ public String getPushToken() {
+ return pushToken == null ? "" : pushToken;
}
- public void setRegistrationID(String registrationID) {
- this.registrationID = registrationID;
+ public void setPushToken(String pushToken) {
+ this.pushToken = pushToken;
}
public String getPushId() {
@@ -299,16 +450,33 @@
}
/**
+ * 鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
+ * @return 鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
+ */
+ public String getPowerStationType() {
+ return powerStationType;
+ }
+
+ public void setPowerStationType(String powerStationType) {
+ this.powerStationType = powerStationType;
+ }
+
+ /**
* uni涓�绾х晫闈㈢殑瀹夊叏璺濈鑳屾櫙棰滆壊锛�0=鐢电珯璇︽儏鐣岄潰锛�1=娣诲姞鐢电珯鐣岄潰锛�2=璁惧璋冩祴鐣岄潰锛�
*
* @return 鍊�
*/
public int getUniBottomSafeDistanceBackgroundColor() {
- return uniBottomSafeDistanceBackgroundColor;
+ return this.uniBottomSafeDistanceBackgroundColor;
}
- public void setUniBottomSafeDistanceBackgroundColor(int uniBottomSafeDistanceBackgroundColor) {
- this.uniBottomSafeDistanceBackgroundColor = uniBottomSafeDistanceBackgroundColor;
+ /**
+ * uni涓�绾х晫闈㈢殑瀹夊叏璺濈鑳屾櫙棰滆壊锛�0=鐢电珯璇︽儏鐣岄潰锛�1=娣诲姞鐢电珯鐣岄潰锛�2=璁惧璋冩祴鐣岄潰锛�
+ *
+ * @param uniBottomSafeDistanceBackgroundColorValue 锛�0=鐢电珯璇︽儏鐣岄潰锛�1=娣诲姞鐢电珯鐣岄潰锛�2=璁惧璋冩祴鐣岄潰锛�
+ */
+ public void setUniBottomSafeDistanceBackgroundColor(int uniBottomSafeDistanceBackgroundColorValue) {
+ this.uniBottomSafeDistanceBackgroundColor = uniBottomSafeDistanceBackgroundColorValue;
}
/**
@@ -330,6 +498,14 @@
return m_Home;
}
+ /**
+ * 鏄笉鏄樋鎷変集璇█
+ *
+ * @return true琛ㄧず鏄樋鎷変集璇█锛屽惁鍒欎笉鏄�
+ */
+ public boolean isArabicLanguage() {
+ return this.currentAppLanguage.equals(Languages.ar);
+ }
/**
* 鍒锋柊
@@ -360,15 +536,6 @@
String json = gson.toJson(sUserConfigManage);
HdlFileLogic.getInstance().writeFile(HdlFileLogic.getInstance().getUserFilePath(), json);
// SharedPreUtils.saveMyDataInfo("UserConfigManage.json", json, HDLApp.getInstance());
- }
-
- /**
- * true琛ㄧず鏄腑鏂�
- *
- * @return true琛ㄧず鏄腑鏂�
- */
- public boolean isZh() {
- return currentAppLanguage.equals(LocalManageUtil.zh);
}
--
Gitblit v1.8.0