| | |
| | | import com.google.gson.Gson; |
| | | import com.hdl.photovoltaic.HDLApp; |
| | | import com.hdl.photovoltaic.enums.Languages; |
| | | import com.hdl.photovoltaic.enums.PowerStationType; |
| | | import com.hdl.photovoltaic.other.HdlFileLogic; |
| | | import com.hdl.photovoltaic.other.HdlLogLogic; |
| | | import com.hdl.photovoltaic.other.HdlResidenceLogic; |
| | |
| | | //是否正式服务器(true:正式,false:测试) |
| | | private boolean isOnlineServer = true; |
| | | |
| | | //智能体接口密钥 |
| | | private String agentSecret; |
| | | //智能体接口地址 |
| | | private String agentUrl; |
| | | //当前会话ID |
| | | private String conversationId; |
| | | //电站类型(INV = 逆变器电站;BMS = BMS电站) |
| | | private String powerStationType = PowerStationType.INV; |
| | | |
| | | public String getAgentUrl() { |
| | | return agentUrl == null ? "" : agentUrl; |
| | | } |
| | | |
| | | public void setAgentUrl(String agentUrl) { |
| | | this.agentUrl = agentUrl; |
| | | } |
| | | |
| | | /** |
| | | * 智能体AppKey |
| | | * |
| | | * @return 智能体AppKey |
| | | */ |
| | | 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; |
| | | } |
| | |
| | | private String userImageUrl = "/static/image/user-default-head.png"; |
| | | |
| | | |
| | | /// <summary> |
| | | /// 注册极光ID,谷歌FCM的令牌 |
| | | /// </summary> |
| | | /** |
| | | * 注册极光ID,谷歌FCM的令牌 |
| | | */ |
| | | private String pushToken; |
| | | /// <summary> |
| | | /// 添加令牌到云端成功时返回的 |
| | | /// </summary> |
| | | |
| | | /** |
| | | * 添加令牌到云端成功时返回的 |
| | | */ |
| | | private String pushId; |
| | | |
| | | /** |
| | | * 无网模式标识(true=无网模式,false=正常模式) |
| | | */ |
| | | private boolean noNetworkFlag = false; |
| | | |
| | | |
| | | /** |
| | | * 是否是游客模式(true=游客模式,false=正常模式) |
| | | */ |
| | | private boolean tourist_mode = false; |
| | | |
| | | |
| | | /** |
| | | * 是否是游客模式 |
| | | * |
| | | * @return (true=游客模式,false=正常模式) |
| | | */ |
| | | public boolean isTourist_mode() { |
| | | return tourist_mode; |
| | | } |
| | | |
| | | /** |
| | | * 是否是游客模式 |
| | | * |
| | | * @return (true=游客模式,false=正常模式) |
| | | */ |
| | | public void setTourist_mode(boolean tourist_mode) { |
| | | this.tourist_mode = tourist_mode; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 用来游客模式冷启动强制跳到登录界面标记 |
| | | * true=游客模式,冷启动强制跳转登录界面,false:按正常流程跑 |
| | | */ |
| | | private boolean isTouristModeJumpLogic = false; |
| | | |
| | | /** |
| | | * 用来游客模式冷启动强制跳到登录界面标记 |
| | | * |
| | | * @return true=游客模式,冷启动强制跳转登录界面,false:按正常流程跑 |
| | | */ |
| | | public boolean isTouristModeJumpLogic() { |
| | | return isTouristModeJumpLogic; |
| | | } |
| | | |
| | | /** |
| | | * 用来游客模式冷启动强制跳到登录界面标记 |
| | | * |
| | | * @return true=游客模式,冷启动强制跳转登录界面,false:按正常流程跑 |
| | | */ |
| | | public void setTouristModeJumpLogic(boolean touristModeJumpLogic) { |
| | | isTouristModeJumpLogic = touristModeJumpLogic; |
| | | } |
| | | |
| | | public boolean isAutomaticSkipNoNetworkFlag() { |
| | | return automaticSkipNoNetworkFlag; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 电站类型(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 值 |
| | |
| | | return m_Home; |
| | | } |
| | | |
| | | /** |
| | | * 是不是阿拉伯语言 |
| | | * |
| | | * @return true表示是阿拉伯语言,否则不是 |
| | | */ |
| | | public boolean isArabicLanguage() { |
| | | return this.currentAppLanguage.equals(Languages.ar); |
| | | } |
| | | |
| | | /** |
| | | * 刷新 |
| | |
| | | HdlFileLogic.getInstance().writeFile(HdlFileLogic.getInstance().getUserFilePath(), json); |
| | | // SharedPreUtils.saveMyDataInfo("UserConfigManage.json", json, HDLApp.getInstance()); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |