From 4598b51c90c695c9ccbe5350a84e4a46b9d8e587 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期三, 22 五月 2024 20:19:02 +0800
Subject: [PATCH] 2024年05月22日20:18:54

---
 app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java |   76 +++++++++++++++++++++++++++++++++++++
 1 files changed, 75 insertions(+), 1 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 1203f6a..d1a5959 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,11 +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 {
 
 
@@ -29,13 +34,19 @@
 
     private String inv;//inv鐘舵��
     private int deviceStatus;//1:寰呮満,2:杩炴帴涓�,3:鏁呴殰,4:杩愯,5:绂荤嚎
-    private String addresses;
+    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;//鐢电珯鍦板潃
 
     public String getSystemStatusDesc() {
         return systemStatusDesc == null ? "" : systemStatusDesc;
@@ -191,5 +202,68 @@
         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;
+    }
+
+
+    /**
+     * 鎷间綇瀹呭湴鍧�
+     *
+     * @return 浣忓畢鍦板潃
+     */
+    public String getHomeAddress() {
+        if (this.location == null) {
+            return this.address;
+        }
+        return this.location.getNationName() + this.location.getProvinceName() + this.location.getCityName() + this.address;
+    }
+
+    public String getHomeNameAndDeviceName() {
+        return homeName + "_" + this.getName();
+    }
 }

--
Gitblit v1.8.0