From 44ba605a4e850efa757020da5fb4cf02bdf6e3ab Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 08 九月 2025 10:55:18 +0800
Subject: [PATCH] 2025年09月08日10:55:15
---
app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java | 192 ++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 177 insertions(+), 15 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java b/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java
index fea4793..36b5a7e 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java
@@ -1,9 +1,16 @@
package com.hdl.photovoltaic.ui.bean;
+import android.text.TextUtils;
+
import java.io.Serializable;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
+/**
+ * 浜戠閫嗗彉鍣ㄥ疄浣撶被
+ */
public class CloudInverterDeviceBean implements Serializable {
@@ -13,7 +20,6 @@
*/
private boolean online;
private String gatewayId;//缃戝叧Id
- private String gatewayName;//缃戝叧鍚嶇О
private String deviceId;//璁惧id
private String name;//璁惧鍚嶇О
private String spk;
@@ -24,10 +30,100 @@
private String osn;//璁惧sn(mac)
private String powerPvNow;//鍙戠數鍔熺巼
private String totalElectricityPvToday;//浠婃棩鍙戠數閲�
+ private String systemStatusDesc;//鐘舵��
+
private String inv;//inv鐘舵��
- private int deviceStatus;//1:寰呮満,2:杩炴帴涓�,3:鏁呴殰,4:杩愯,5:绂荤嚎
- private String addresses;
- private Map<String, String> status;
+ private int deviceStatus;// 锛� 杩炴帴涓紝2 锛� 鏁呴殰锛�3 锛� 杩愯锛�4 锛� 绂荤嚎
+ private String addresses;//瀛愮綉鍙�/璁惧鍙�
+ private List<DeviceAttributeBean> status;
+
+ private String hwVersion;//杞欢鐗堟湰鍙�
+ private String categorySecondName;//璁惧绫诲瀷(浜у搧浜岀骇鍒嗙被鍚嶇О)
+
+ private String deviceType;//(璁惧绫诲瀷INV 锛� 閫嗗彉鍣�,BMS 锛� BMS鎺у埗鐩�,BATTERY 锛� 鐢垫睜鍗曞厓)
+
+ private String homeId;
+ private String homeName;
+ private String outputActivePower;//閫嗗彉鍣ㄨ緭鍑烘湁鍔熷姛鐜�
+ private String address;//璇︾粏鍦板潃
+ private HouseInfoBean.Location location;//鐢电珯鍦板潃
+ private String localSecret;//鎵�灞炵數绔欑殑鏈湴瀵嗛挜
+
+ public boolean isActivate() {
+ return activate;
+ }
+
+ public void setActivate(boolean activate) {
+ this.activate = activate;
+ }
+
+ private boolean activate;//鏄惁婵�娲昏澶�(true锛氭縺娲伙紱false锛氭湭婵�娲�)
+
+ private boolean popUpgrade;//鏀硅澶囨槸鍚︽湁寮圭獥鍗囩骇
+ private boolean subPopUpgrade;//涓嬫寕璁惧鏄惁鏈夊脊绐楀崌绾�
+
+ public boolean isSubPopUpgrade() {
+ return subPopUpgrade;
+ }
+
+ public void setSubPopUpgrade(boolean subPopUpgrade) {
+ this.subPopUpgrade = subPopUpgrade;
+ }
+
+ public boolean isPopUpgrade() {
+ return popUpgrade;
+ }
+
+ public void setPopUpgrade(boolean popUpgrade) {
+ this.popUpgrade = popUpgrade;
+ }
+
+ public String getWorkStatusDesc() {
+ return workStatusDesc==null?"":this.workStatusDesc;
+ }
+
+ public void setWorkStatusDesc(String workStatusDesc) {
+ this.workStatusDesc = workStatusDesc;
+ }
+
+ private String workStatusDesc;//宸ヤ綔鐘舵�侊紙璐熻浇涓績璁惧锛�
+
+ private boolean ogMaster;//绂荤綉閫嗗彉鍣ㄦ墠杩斿洖
+
+
+ public boolean isOgMaster() {
+ return ogMaster;
+ }
+
+ public void setOgMaster(boolean ogMaster) {
+ this.ogMaster = ogMaster;
+ }
+
+
+ public String getSystemStatusDesc() {
+ return systemStatusDesc == null ? "" : systemStatusDesc;
+ }
+
+ public void setSystemStatusDesc(String systemStatusDesc) {
+ this.systemStatusDesc = systemStatusDesc;
+ }
+
+ public String getHwVersion() {
+ return hwVersion == null ? "" : hwVersion;
+ }
+
+ public void setHwVersion(String hwVersion) {
+ this.hwVersion = hwVersion;
+ }
+
+ public String getCategorySecondName() {
+ return categorySecondName == null ? "" : categorySecondName;
+ }
+
+ public void setCategorySecondName(String categorySecondName) {
+ this.categorySecondName = categorySecondName;
+ }
+
public String getGatewayId() {
return gatewayId == null ? "" : gatewayId;
@@ -37,13 +133,6 @@
this.gatewayId = gatewayId;
}
- public String getGatewayName() {
- return gatewayName == null ? "" : gatewayName;
- }
-
- public void setGatewayName(String gatewayName) {
- this.gatewayName = gatewayName;
- }
public String getDeviceId() {
return deviceId == null ? "" : deviceId;
@@ -78,7 +167,8 @@
}
public String getSid() {
- return sid == null ? "" : sid;
+
+ return TextUtils.isEmpty(sid) ? "" : sid;
}
public void setSid(String sid) {
@@ -149,11 +239,11 @@
this.addresses = addresses;
}
- public Map<String, String> getStatus() {
- return status == null ? new HashMap<>() : status;
+ public List<DeviceAttributeBean> getStatus() {
+ return status == null ? new ArrayList<>() : status;
}
- public void setStatus(Map<String, String> status) {
+ public void setStatus(List<DeviceAttributeBean> status) {
this.status = status;
}
@@ -164,4 +254,76 @@
public void setOnline(boolean online) {
this.online = online;
}
+
+ public String getDeviceType() {
+ return deviceType == null ? "" : deviceType;
+ }
+
+ public void setDeviceType(String deviceType) {
+ this.deviceType = deviceType;
+ }
+
+ public String getHomeId() {
+ return TextUtils.isEmpty(homeId) ? "" : homeId;
+ }
+
+ public void setHomeId(String homeId) {
+ this.homeId = homeId;
+ }
+
+ public String getHomeName() {
+ return TextUtils.isEmpty(homeName) ? "" : homeName;
+ }
+
+ public void setHomeName(String homeName) {
+ this.homeName = homeName;
+ }
+
+ public String getOutputActivePower() {
+ return TextUtils.isEmpty(outputActivePower) ? "" : outputActivePower;
+ }
+
+ public void setOutputActivePower(String outputActivePower) {
+ this.outputActivePower = outputActivePower;
+ }
+
+ public String getAddress() {
+ return TextUtils.isEmpty(address) ? "" : address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public HouseInfoBean.Location getLocation() {
+ return location;
+ }
+
+ public void setLocation(HouseInfoBean.Location location) {
+ this.location = location;
+ }
+
+ public String getLocalSecret() {
+ return localSecret == null ? "" : this.localSecret;
+ }
+
+ public void setLocalSecret(String localSecret) {
+ this.localSecret = localSecret;
+ }
+
+ /**
+ * 鎷间綇瀹呭湴鍧�
+ *
+ * @return 浣忓畢鍦板潃
+ */
+ public String getHomeAddress() {
+ if (this.location == null) {
+ return this.getAddress();
+ }
+ return this.location.getNationName() + " " + this.location.getProvinceName() + " " + this.location.getCityName() + " " + this.getAddress();
+ }
+
+ public String getHomeNameAndDeviceName() {
+ return this.getHomeName() + "_" + this.getName();
+ }
}
--
Gitblit v1.8.0