From 5bac3017277a90d56ba3e653f380d74025bb7a31 Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 24 三月 2026 16:04:11 +0800
Subject: [PATCH] 2026年03月24日16:04:09
---
app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java | 147 +++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 137 insertions(+), 10 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 23c31b7..63c0775 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
@@ -2,6 +2,8 @@
import android.text.TextUtils;
+import com.hdl.sdk.link.core.bean.gateway.FwVersionBean;
+
import java.io.Serializable;
import java.util.ArrayList;
import java.util.HashMap;
@@ -12,8 +14,6 @@
* 浜戠閫嗗彉鍣ㄥ疄浣撶被
*/
public class CloudInverterDeviceBean implements Serializable {
-
-
/**
* true-鍦ㄧ嚎
* false-绂荤嚎
@@ -27,20 +27,25 @@
private String sid;
private String oid;
private String omodel;//璁惧鍨嬪彿
+ private String deviceModel;//璁惧鍨嬪彿锛坆ms璁惧锛�
+ private String deviceOidId;//璁惧浜戠涓妎id锛坆ms璁惧锛�
+
private String osn;//璁惧sn(mac)
+
+ private String mac;//锛坆ms璁惧mac锛�,鍚庨潰缁熶竴鏀规垚mac
private String powerPvNow;//鍙戠數鍔熺巼
private String totalElectricityPvToday;//浠婃棩鍙戠數閲�
private String systemStatusDesc;//鐘舵��
private String inv;//inv鐘舵��
- private int deviceStatus;//1:寰呮満,2:杩炴帴涓�,3:鏁呴殰,4:杩愯,5:绂荤嚎
+ 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 deviceType;//(璁惧绫诲瀷INV 锛� 閫嗗彉鍣�,BMS 锛� BMS鎺у埗鐩�,BATTERY 锛� 鐢垫睜鍗曞厓锛孡OAD_CENTRE 锛氳礋杞芥帶鍒朵腑蹇�)
private String homeId;
private String homeName;
@@ -48,6 +53,108 @@
private String address;//璇︾粏鍦板潃
private HouseInfoBean.Location location;//鐢电珯鍦板潃
private String localSecret;//鎵�灞炵數绔欑殑鏈湴瀵嗛挜
+
+ private List<FwVersionBean> fwVersion = new ArrayList<>();//BMS璁惧鎵嶆湁鐨勫浐浠剁増鏈�
+ private String chargeToday;//浠婃棩鍏呯數閲忥紝BMS璁惧鎵嶆湁鐨�
+ private String dischargeToday;//浠婃棩鏀剧數閲忥紝BMS璁惧鎵嶆湁鐨�
+
+ /**
+ * 浠婃棩鍏呯數閲忥紝BMS璁惧鎵嶆湁鐨�
+ * @return
+ */
+ public String getChargeToday() {
+ return chargeToday==null ? "" : chargeToday;
+ }
+
+
+ public void setChargeToday(String chargeToday) {
+ this.chargeToday = chargeToday;
+ }
+ /**
+ * 浠婃棩鏀剧數閲忥紝BMS璁惧鎵嶆湁鐨�
+ * @param
+ */
+ public String getDischargeToday() {
+ return dischargeToday==null ? "" : dischargeToday;
+ }
+
+ public void setDischargeToday(String dischargeToday) {
+ this.dischargeToday = dischargeToday;
+ }
+
+ public String getDeviceModel() {
+ return deviceModel == null ? "" : deviceModel;
+ }
+
+ public void setDeviceModel(String deviceModel) {
+ this.deviceModel = deviceModel;
+ }
+
+ public String getDeviceOidId() {
+ return deviceOidId == null ? "" : deviceOidId;
+ }
+
+ public void setDeviceOidId(String deviceOidId) {
+ this.deviceOidId = deviceOidId;
+ }
+
+ public List<FwVersionBean> getFwVersion() {
+ return fwVersion;
+ }
+
+ public void setFwVersion(List<FwVersionBean> fwVersion) {
+ this.fwVersion = fwVersion;
+ }
+
+ 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() {
@@ -117,7 +224,8 @@
}
public String getSid() {
- return sid == null ? "" : sid;
+
+ return TextUtils.isEmpty(sid) ? "" : sid;
}
public void setSid(String sid) {
@@ -132,20 +240,38 @@
this.oid = oid;
}
+ /**
+ * 鑾峰彇璁惧鍨嬪彿宸插吋鐢˙MS璁惧鎯呭喌(bms璁惧浣跨敤鏄疍eviceModel瀛楁锛屽叾瀹冭澶嘜model瀛楁) 骞冲彴璇村悗闈細缁熶竴瀛楁
+ *
+ * @return 璁惧鍨嬪彿
+ */
public String getOmodel() {
- return omodel == null ? "" : omodel;
+ return TextUtils.isEmpty(omodel) ? getDeviceModel() : omodel;
}
public void setOmodel(String omodel) {
this.omodel = omodel;
}
+ /**
+ * 鑾峰彇璁惧sn(mac)宸插吋鐢˙MS璁惧鎯呭喌(bms璁惧浣跨敤鏄痬ac瀛楁锛屽叾瀹冭澶噊sn瀛楁) 骞冲彴璇村悗闈細缁熶竴瀛楁
+ *
+ * @return 璁惧mac
+ */
public String getOsn() {
- return osn == null ? "" : osn;
+ return TextUtils.isEmpty(osn) ? getMac() : osn;
}
public void setOsn(String osn) {
this.osn = osn;
+ }
+
+ public String getMac() {
+ return mac == null ? "" : mac;
+ }
+
+ public void setMac(String mac) {
+ this.mac = mac;
}
public String getPowerPvNow() {
@@ -260,6 +386,7 @@
this.localSecret = localSecret;
}
+
/**
* 鎷间綇瀹呭湴鍧�
*
@@ -267,12 +394,12 @@
*/
public String getHomeAddress() {
if (this.location == null) {
- return this.address;
+ return this.getAddress();
}
- return this.location.getNationName() + this.location.getProvinceName() + this.location.getCityName() + this.address;
+ return this.location.getNationName() + " " + this.location.getProvinceName() + " " + this.location.getCityName() + " " + this.getAddress();
}
public String getHomeNameAndDeviceName() {
- return homeName + "_" + this.getName();
+ return this.getHomeName() + "_" + this.getName();
}
}
--
Gitblit v1.8.0