mac
2024-07-16 3ec7de773bff5582411c6f1f659d35cf8fb1734a
app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java
@@ -1,15 +1,99 @@
package com.hdl.photovoltaic.ui.bean;
import android.text.TextUtils;
import com.hdl.photovoltaic.R;
import java.io.Serializable;
/**
 * 电站Id实体类
 */
public class HouseIdBean implements Serializable {
    private String homeId;//电站id
    private String homeImage;//电站图片
    private String powerStationImage;//电站图片
    private String homeName;//电站名称
    private String installedCapacity;//装机容量
    private String power;//发电功率
    private String todayElectricity;//今天发电量
    private String todayElectricity;//当日发电量
    private String monthElectricity;//当月发电量
    private int powerStationStatus;//电站状态(电站状态   1:正常(运行),2:离线,3:连接中,4:故障)
    private String localSecret;//本地通讯秘钥
    private boolean isMove = false;//表示是否显示移动组件(true显示)
    private boolean isDelIcon = false;//表示是否显示删除组件(true显示)
    private boolean state_select = false;//表示是否显示选中组件(true显示)
    private String deliverStatus;//(PAID:已交付 ;UNDELIVERED :未交付)
    private boolean isOtherShare;//是不是分享的电站
    private String accountType;//如果是分享的,分享的权限类型(VIEW : 仅查看,ADMIN : 查看加控制)
    private boolean debugPerm;//(是否开启授权安装商,未开启状态安装仅查看)
    private HouseInfoBean.Location location;//电站地址
    private String address;//详细地址
    public String getDeliverStatus() {
        return deliverStatus == null ? "" : deliverStatus;
    }
    public void setDeliverStatus(String deliverStatus) {
        this.deliverStatus = deliverStatus;
    }
    public boolean isOtherShare() {
        return isOtherShare;
    }
    public void setOtherShare(boolean otherShare) {
        isOtherShare = otherShare;
    }
    public String getAccountType() {
        return accountType == null ? "" : accountType;
    }
    public void setAccountType(String accountType) {
        this.accountType = accountType;
    }
    public boolean isDebugPerm() {
        return debugPerm;
    }
    public void setDebugPerm(boolean debugPerm) {
        this.debugPerm = debugPerm;
    }
    public boolean isState_select() {
        return state_select;
    }
    public void setState_select(boolean state_select) {
        this.state_select = state_select;
    }
    public boolean isDelIcon() {
        return isDelIcon;
    }
    public void setDelIcon(boolean delIcon) {
        isDelIcon = delIcon;
    }
    public boolean isMove() {
        return isMove;
    }
    public void setMove(boolean edit) {
        isMove = edit;
    }
    public String getHomeId() {
        return homeId == null ? "" : homeId;
@@ -19,12 +103,12 @@
        this.homeId = homeId;
    }
    public String getHomeImage() {
        return homeImage == null ? "" : homeImage;
    public String getPowerStationImage() {
        return powerStationImage == null ? "" : powerStationImage;
    }
    public void setHomeImage(String homeImage) {
        this.homeImage = homeImage;
    public void setPowerStationImage(String homeImage) {
        this.powerStationImage = homeImage;
    }
    public String getHomeName() {
@@ -36,7 +120,7 @@
    }
    public String getInstalledCapacity() {
        return installedCapacity == null ? "" : installedCapacity;
        return TextUtils.isEmpty(installedCapacity) ? "0" : installedCapacity;
    }
    public void setInstalledCapacity(String installedCapacity) {
@@ -44,7 +128,7 @@
    }
    public String getPower() {
        return power == null ? "" : power;
        return TextUtils.isEmpty(power) ? "0" : power;
    }
    public void setPower(String power) {
@@ -59,6 +143,14 @@
        this.todayElectricity = todayElectricity;
    }
    public String getMonthElectricity() {
        return monthElectricity == null ? "" : monthElectricity;
    }
    public void setMonthElectricity(String monthElectricity) {
        this.monthElectricity = monthElectricity;
    }
    public int getPowerStationStatus() {
        return powerStationStatus;
    }
@@ -67,4 +159,39 @@
        this.powerStationStatus = powerStationStatus;
    }
    public String getLocalSecret() {
        return localSecret == null ? "" : localSecret;
    }
    public void setLocalSecret(String localSecret) {
        this.localSecret = localSecret;
    }
    public HouseInfoBean.Location getLocation() {
        return location == null ? new HouseInfoBean.Location() : location;
    }
    public void setLocation(HouseInfoBean.Location location) {
        this.location = location;
    }
    public String getAddress() {
        return address == null ? "" : address;
    }
    public void setAddress(String address) {
        this.address = address;
    }
    /**
     * 拼住宅地址
     *
     * @return 住宅地址
     */
    public String getHomeAddress() {
        if (this.location == null) {
            return this.address;
        }
        return this.location.getNationName() + this.location.getProvinceName() + this.location.getCityName() + this.address;
    }
}