mac
2024-10-29 0582b05b1f9dc97a71a72e4784452e5a43510256
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
@@ -1,6 +1,5 @@
package com.hdl.photovoltaic.ui.powerstation;
import android.app.job.JobInfo;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.os.Bundle;
@@ -19,10 +18,10 @@
import com.hdl.photovoltaic.R;
import com.hdl.photovoltaic.bean.PageNumberObject;
import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.databinding.FragmentHouseListBinding;
import com.hdl.photovoltaic.base.CustomBaseFragment;
import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch;
import com.hdl.photovoltaic.enums.LowerTagType;
import com.hdl.photovoltaic.enums.PowerStationStatus;
import com.hdl.photovoltaic.enums.ShowErrorMode;
import com.hdl.photovoltaic.enums.SortType;
@@ -37,7 +36,7 @@
import com.hdl.photovoltaic.other.HdlUniLogic;
import com.hdl.photovoltaic.ui.adapter.DeviceInfoAdapter;
import com.hdl.photovoltaic.ui.adapter.HouseInfoAdapter;
import com.hdl.photovoltaic.ui.bean.DeviceBean;
import com.hdl.photovoltaic.ui.bean.CloudInverterDeviceBean;
import com.hdl.photovoltaic.ui.bean.HouseIdBean;
import com.hdl.photovoltaic.ui.bean.StatusOverviewBean;
import com.hdl.photovoltaic.uni.HDLUniMP;
@@ -48,7 +47,9 @@
import com.hdl.sdk.link.common.exception.HDLLinkException;
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
import com.hdl.sdk.link.core.bean.gateway.GatewayBean;
import com.hdl.sdk.link.core.config.HDLLinkConfig;
import com.hdl.sdk.link.core.utils.mqtt.MqttRecvClient;
import com.hdl.sdk.link.gateway.HDLLinkLocalGateway;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
@@ -69,7 +70,7 @@
    private DeviceInfoAdapter deviceInfoAdapter;
    private List<HouseIdBean> houseListBeanIDList;
    private List<DeviceBean> deviceInfoList;
    private List<CloudInverterDeviceBean> deviceInfoList;
    private int currentHouseListPage = 0; // 当前电站列表页码
    private int currentHouseListTotal = 0; // 电站列表总页码
    private boolean isHouseLoadingMore = false; // 标记电站列表正在加载更多数据
@@ -89,6 +90,17 @@
    private final long pageSize = 20;//页数
    /**
     * 还原条件的初始化状态
     */
    private void initializationState() {
        key = SortValue.all;
        value = SortValue.all;
        installedCapacityMinValue = "";
        installedCapacityMaxValue = "";
        gridTypeValue = "";
        powerStationStatusValue = PowerStationStatus.All;
    }
    @Override
    public Object getContentView() {
@@ -116,17 +128,11 @@
                    return;
                }
                isClickPowerStationLabel = true;
                viewBinding.powerStationLabel.setTextAppearance(R.style.Text20Style);
                viewBinding.deviceLabel.setTextAppearance(R.style.Text16Style);
                viewBinding.editIv.setVisibility(View.VISIBLE);//编辑图标隐藏
                viewBinding.addIv.setVisibility(View.VISIBLE);//添加图标隐藏
                viewBinding.powerStationLabelParent.setVisibility(View.VISIBLE);//电站标签【父容器】显示
                viewBinding.deviceLabelParent.setVisibility(View.GONE);//设备标签【父容器】隐藏
                if (viewBinding.deviceNullDataIc.getRoot().getVisibility() == View.VISIBLE) {
                    viewBinding.deviceNullDataIc.getRoot().setVisibility(View.GONE);
                }
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
                selectedTitleLabelStyle();
                initializationState();
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
            }
        });
        //设备标签
@@ -137,15 +143,7 @@
                    return;
                }
                isClickPowerStationLabel = false;
                viewBinding.deviceLabel.setTextAppearance(R.style.Text20Style);
                viewBinding.powerStationLabel.setTextAppearance(R.style.Text16Style);
                viewBinding.editIv.setVisibility(View.GONE);//编辑图标隐藏
                viewBinding.addIv.setVisibility(View.GONE);//添加图标隐藏
                viewBinding.powerStationLabelParent.setVisibility(View.GONE);//电站标签【父容器】隐藏
                viewBinding.deviceLabelParent.setVisibility(View.VISIBLE);//设备标签【父容器】显示
                if (viewBinding.homeNullDataIc.getRoot().getVisibility() == View.VISIBLE) {
                    viewBinding.homeNullDataIc.getRoot().setVisibility(View.GONE);
                }
                selectedTitleLabelStyle();
                loadNextPageDeviceList(true, 1, true);
            }
        });
@@ -154,7 +152,7 @@
            @Override
            public void onClick(View v) {
                powerStationStatusValue = PowerStationStatus.All;
                selectedStationStyle(viewBinding.powerStationAllIl.parentLl, viewBinding.powerStationAllIl.stationTotalTv, viewBinding.powerStationAllIl.stationTitleTv, true);
                selectedStationStateStyle(viewBinding.powerStationAllIl.parentLl, viewBinding.powerStationAllIl.stationTotalTv, viewBinding.powerStationAllIl.stationTitleTv, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
            }
        });
@@ -163,7 +161,7 @@
            @Override
            public void onClick(View v) {
                powerStationStatusValue = PowerStationStatus.malfunction;
                selectedStationStyle(viewBinding.powerStationFaultsIl.parentLl, viewBinding.powerStationFaultsIl.stationTotalTv, viewBinding.powerStationFaultsIl.stationTitleTv, true);
                selectedStationStateStyle(viewBinding.powerStationFaultsIl.parentLl, viewBinding.powerStationFaultsIl.stationTotalTv, viewBinding.powerStationFaultsIl.stationTitleTv, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
            }
        });
@@ -172,7 +170,7 @@
            @Override
            public void onClick(View v) {
                powerStationStatusValue = PowerStationStatus.off;
                selectedStationStyle(viewBinding.powerStationOfflineIl.parentLl, viewBinding.powerStationOfflineIl.stationTotalTv, viewBinding.powerStationOfflineIl.stationTitleTv, true);
                selectedStationStateStyle(viewBinding.powerStationOfflineIl.parentLl, viewBinding.powerStationOfflineIl.stationTotalTv, viewBinding.powerStationOfflineIl.stationTitleTv, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
            }
        });
@@ -181,7 +179,7 @@
            @Override
            public void onClick(View v) {
                powerStationStatusValue = PowerStationStatus.connecting;
                selectedStationStyle(viewBinding.powerStationConnectedIl.parentLl, viewBinding.powerStationConnectedIl.stationTotalTv, viewBinding.powerStationConnectedIl.stationTitleTv, true);
                selectedStationStateStyle(viewBinding.powerStationConnectedIl.parentLl, viewBinding.powerStationConnectedIl.stationTotalTv, viewBinding.powerStationConnectedIl.stationTitleTv, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
            }
        });
@@ -261,7 +259,7 @@
            public void onClick(int position, HouseIdBean houseIdBean) {
                //点击住宅详情
                HdlLogLogic.print("点击住宅详情---" + new Gson().toJson(houseIdBean), false);
                HdlResidenceLogic.getInstance().switchHouse(houseIdBean);
                HdlResidenceLogic.getInstance().switchHouse(houseIdBean,true);
                String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&powerStationStatus=" + houseIdBean.getPowerStationStatus();
                HdlUniLogic.getInstance().openUniMP(path, null);
@@ -283,7 +281,7 @@
                        //移动电站位置
                        HdlResidenceLogic.getInstance().moveHouseId(houseIdBean.getHomeId());
                        initData();//初始化缓存数据
                        houseInfoAdapter.setList(houseListBeanIDList);//重新刷新列表
                        houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//重新刷新列表
                        nullDataUpdateUi();//检测数据是否为空
                    }
@@ -300,10 +298,11 @@
            public void onDelClick(int position, HouseIdBean houseIdBean) {
                DelayedConfirmationCancelDialog delayedConfirmationCancelDialog = new DelayedConfirmationCancelDialog(_mActivity);
                delayedConfirmationCancelDialog.setTitleContent(getString(R.string.loading_title_tip));
                delayedConfirmationCancelDialog.show();
                delayedConfirmationCancelDialog.isHideTitle(true);
                String homeName = "\"" + houseIdBean.getHomeName() + "\"";
                delayedConfirmationCancelDialog.setContent(getString(R.string.delete_power_station).replace("%s", homeName));
                delayedConfirmationCancelDialog.show();
                delayedConfirmationCancelDialog.startCountdown(4);
                delayedConfirmationCancelDialog.setYesOnclickListener(new DelayedConfirmationCancelDialog.onYesOnclickListener() {
                    @Override
@@ -409,23 +408,45 @@
        //设备点击
        deviceInfoAdapter.setOnclickListener(new DeviceInfoAdapter.OnClickListener() {
            @Override
            public void onClick(int position, DeviceBean deviceBean) {
                GatewayBean gatewayBean = new GatewayBean();
                gatewayBean.setCategorySecondName(deviceBean.getCategorySecondName());
                gatewayBean.setDevice_mac(deviceBean.getOsn());
                gatewayBean.setDevice_model(deviceBean.getOmodel());
                gatewayBean.setOid(deviceBean.getOid());
                gatewayBean.setGatewayId(deviceBean.getGatewayId());
                gatewayBean.setAddresses(deviceBean.getAddresses());
                gatewayBean.setSid(deviceBean.getSid());
                gatewayBean.setDeviceId(deviceBean.getDeviceId());
                gatewayBean.setDevice_name(deviceBean.getName());
                gatewayBean.setDeviceStatus(deviceBean.getDeviceStatus());
                gatewayBean.setHomeId(deviceBean.getHomeId());
                gatewayBean.setDeviceType(deviceBean.getDeviceType());
                String jsonEncryption = URLEncodingUtils.encodeURIComponent(new Gson().toJson(gatewayBean));
                String path = HDLUniMP.UNI_EVENT_OPEN_DEVICE_DETAILS + "?inverterInfo=" + jsonEncryption;
                HdlUniLogic.getInstance().openUniMP(path, null);
            public void onClick(int position, CloudInverterDeviceBean deviceBean) {
//                GatewayBean gatewayBean = new GatewayBean();
//                gatewayBean.setCategorySecondName(deviceBean.getCategorySecondName());
//                gatewayBean.setDevice_mac(deviceBean.getOsn());
//                gatewayBean.setDevice_model(deviceBean.getOmodel());
//                gatewayBean.setOid(deviceBean.getOid());
//                gatewayBean.setGatewayId(deviceBean.getGatewayId());
//                gatewayBean.setAddresses(deviceBean.getAddresses());
//                gatewayBean.setSid(deviceBean.getSid());
//                gatewayBean.setDeviceId(deviceBean.getDeviceId());
//                gatewayBean.setDevice_name(deviceBean.getName());
//                gatewayBean.setDeviceStatus(deviceBean.getDeviceStatus());
//                gatewayBean.setHomeId(deviceBean.getHomeId());
//                gatewayBean.setSpk(deviceBean.getSpk());
//                gatewayBean.setDeviceType(deviceBean.getDeviceType());
                if (deviceBean.getDeviceStatus() == 4) {
                    HdlThreadLogic.toast(_mActivity, R.string.device_off);
                    return;
                }
                //配置本地通信的信息
                HDLLinkConfig.getInstance().setHomeId(deviceBean.getHomeId());
                HDLLinkConfig.getInstance().setLocalSecret(deviceBean.getLocalSecret());
                List<CloudInverterDeviceBean> newList = new ArrayList<>();
                newList.add(deviceBean);
                //目的是为了获取拿到网关ID,mqtt通讯秘钥等信息,拿到后缓存到本地逆变器列表里面,发送数据数据时自动去缓存列表里面去查找;
                HdlDeviceLogic.getInstance().setDeviceRemoteInfo(newList, deviceBean.getHomeId(), new CloudCallBeak<List<GatewayBean>>() {
                    @Override
                    public void onSuccess(List<GatewayBean> obj) {
                        GatewayBean newGatewayBean = HDLLinkLocalGateway.getInstance().getLocalGateway(deviceBean.getOsn());
                        String jsonEncryption = URLEncodingUtils.encodeURIComponent(new Gson().toJson(newGatewayBean));
                        String path = HDLUniMP.UNI_EVENT_OPEN_DEVICE_DETAILS + "?inverterInfo=" + jsonEncryption;
                        HdlUniLogic.getInstance().openUniMP(path, null);
                    }
                    @Override
                    public void onFailure(HDLException e) {
                    }
                });
            }
        });
        //设备设置下拉箭头颜色
@@ -481,12 +502,12 @@
        viewBinding.powerStationOfflineIl.stationTitleTv.setText(getString(R.string.my_power_station_off_line));
        viewBinding.powerStationConnectedIl.stationTitleTv.setText(getString(R.string.to_be_added));
        selectedStationStyle(viewBinding.powerStationAllIl.parentLl, viewBinding.powerStationAllIl.stationTotalTv, viewBinding.powerStationAllIl.stationTitleTv, true);
        selectedStationStateStyle(viewBinding.powerStationAllIl.parentLl, viewBinding.powerStationAllIl.stationTotalTv, viewBinding.powerStationAllIl.stationTitleTv, true);
        //电站标签
        houseInfoAdapter = new HouseInfoAdapter(_mActivity);
        viewBinding.fragmentHouseSrlListRc.setLayoutManager(new LinearLayoutManager(_mActivity));
        viewBinding.fragmentHouseSrlListRc.setAdapter(houseInfoAdapter);
        houseInfoAdapter.setList(this.houseListBeanIDList);
        houseInfoAdapter.setList(this.houseListBeanIDList, powerStationStatusValue);
        //设备标签
        deviceInfoAdapter = new DeviceInfoAdapter(_mActivity);
@@ -494,6 +515,33 @@
        viewBinding.fragmentDeviceSrlListRc.setAdapter(deviceInfoAdapter);
        this.nullDataUpdateUi();
    }
    /**
     * 电站和设备标签样式
     */
    private void selectedTitleLabelStyle() {
        if (isClickPowerStationLabel) {
            viewBinding.powerStationLabel.setTextAppearance(R.style.Text20Style);
            viewBinding.deviceLabel.setTextAppearance(R.style.Text16Style);
//            viewBinding.editIv.setVisibility(View.VISIBLE);//编辑图标隐藏
            viewBinding.addIv.setVisibility(View.VISIBLE);//添加图标隐藏
            viewBinding.powerStationLabelParent.setVisibility(View.VISIBLE);//电站标签【父容器】显示
            viewBinding.deviceLabelParent.setVisibility(View.GONE);//设备标签【父容器】隐藏
            if (viewBinding.deviceNullDataIc.getRoot().getVisibility() == View.VISIBLE) {
                viewBinding.deviceNullDataIc.getRoot().setVisibility(View.GONE);
            }
        } else {
            viewBinding.deviceLabel.setTextAppearance(R.style.Text20Style);
            viewBinding.powerStationLabel.setTextAppearance(R.style.Text16Style);
//            viewBinding.editIv.setVisibility(View.GONE);//编辑图标隐藏
            viewBinding.addIv.setVisibility(View.GONE);//添加图标隐藏
            viewBinding.powerStationLabelParent.setVisibility(View.GONE);//电站标签【父容器】隐藏
            viewBinding.deviceLabelParent.setVisibility(View.VISIBLE);//设备标签【父容器】显示
            if (viewBinding.homeNullDataIc.getRoot().getVisibility() == View.VISIBLE) {
                viewBinding.homeNullDataIc.getRoot().setVisibility(View.GONE);
            }
        }
    }
@@ -505,7 +553,7 @@
     * @param titleTv              组件
     * @param isShowSelectedStatus 是否显示状态样式
     */
    private void selectedStationStyle(LinearLayout linearLayout, TextView numberTv, TextView titleTv, boolean isShowSelectedStatus) {
    private void selectedStationStateStyle(LinearLayout linearLayout, TextView numberTv, TextView titleTv, boolean isShowSelectedStatus) {
        viewBinding.powerStationAllIl.parentLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
        viewBinding.powerStationFaultsIl.parentLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
        viewBinding.powerStationOfflineIl.parentLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
@@ -562,7 +610,7 @@
                    Gson gson = new Gson();
                    String json = eventBus.getData().toString();
                    HouseIdBean houseIdBean = gson.fromJson(json, HouseIdBean.class);
                    HdlResidenceLogic.getInstance().switchHouse(houseIdBean);
                    HdlResidenceLogic.getInstance().switchHouse(houseIdBean,true);
                }
            } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_EDIT.equals(eventBus.getType())) {
@@ -591,48 +639,78 @@
//                    }
//                }
            }
        } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE.equals(eventBus.getType())) {
        } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE.equals(eventBus.getTopic())) {
            // 取消粘性事件
            EventBus.getDefault().removeStickyEvent(eventBus);
            //uin关闭住宅详情界面通知
            if (MqttRecvClient.getInstance() != null) {
                MqttRecvClient.getInstance().removeAllTopic();
            //是在(电站)模块且在(电站)标签页才进来这里
            if (HdlCommonLogic.lowerTagType == LowerTagType.power_station && isClickPowerStationLabel) {
//                //uin关闭住宅详情界面通知
//                if (MqttRecvClient.getInstance() != null) {
//                    MqttRecvClient.getInstance().removeAllTopic();
//                }
                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
            }
            loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
        } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) {
            // 取消粘性事件
            EventBus.getDefault().removeStickyEvent(eventBus);
//            if (!isClickPowerStationLabel) {
//                return;
//            }
            //先清空订阅主题
            if (MqttRecvClient.getInstance() != null) {
                MqttRecvClient.getInstance().removeAllTopic();
            }
            String homeId = eventBus.getData().toString();
            //进去住宅详情uni读取逆变器列表成功后通知
            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(UserConfigManage.getInstance().getHomeId()).size(); i++) {
                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(UserConfigManage.getInstance().getHomeId()).get(i).getGatewayId();
            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).size(); i++) {
                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).get(i).getGatewayId();
                //字符串是自己按规则拼接的,里面注册主题时会解析字符串,只拿getGatewayId()值;
                String topic = "/user/" + gatewayId + "/#";
                //进去住宅详情开始订阅主题
                MqttRecvClient.getInstance().checkAndsubscribeAllTopics(topic);
                MqttRecvClient.getInstance().checkAndsubscribeAllTopics(topic);//订阅【逆变器】消息
            }
            String topicHome = "/user/" + homeId + "/#";
            MqttRecvClient.getInstance().checkAndsubscribeAllTopics(topicHome);//订阅【电站】消息
        } else if (eventBus.getTopic().equals(ConstantManage.homepage_title_tab_switch)) {
            // 取消粘性事件
            EventBus.getDefault().removeStickyEvent(eventBus);
            //接收外部点击事件
            if (eventBus.getType().equals(HomepageTitleTabSwitch.powerstation.toString())) {
                // 取消粘性事件
                EventBus.getDefault().removeStickyEvent(eventBus);
                HdlLogLogic.print("正在点击【电站】");
                if (!isReadData) {
                    //1,从首页-故障-进来-电站(不读取)
                    //1,从电站-进来-电站(读取一次,后面进来不在读取)
                    loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
                    getStatusOverview();
//                if (!isReadData) {
//                    //1,从首页-故障-进来-电站(不读取)
//                    //2,从电站-进来-电站(读取一次,后面进来不在读取)
//                    loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
//                    getStatusOverview();
//                }
                //2024年06月24日14:34:01 产品经理要求进去电站列表都要读取 且默认进去都是默认电站标签
                isClickPowerStationLabel = true;
                selectedTitleLabelStyle();
                initializationState();
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
            } else if (eventBus.getType().equals(ConstantManage.station_page)) {
                //通过首页电站进来的
                if (eventBus.getData().equals(PowerStationStatus.All)) {
                    isClickPowerStationLabel = true;
                    selectedTitleLabelStyle();
                    viewBinding.powerStationAllIl.parentLl.performClick();
                } else if (eventBus.getData().equals(PowerStationStatus.malfunction)) {
                    isClickPowerStationLabel = true;
                    selectedTitleLabelStyle();
                    viewBinding.powerStationFaultsIl.parentLl.performClick();
                } else if (eventBus.getData().equals(PowerStationStatus.off)) {
                    isClickPowerStationLabel = true;
                    selectedTitleLabelStyle();
                    viewBinding.powerStationOfflineIl.parentLl.performClick();
                } else if (eventBus.getData().equals(PowerStationStatus.connecting)) {
                    isClickPowerStationLabel = true;
                    selectedTitleLabelStyle();
                    viewBinding.powerStationConnectedIl.parentLl.performClick();
                }
            } else if (eventBus.getType().equals(PowerStationStatus.All)) {
                viewBinding.powerStationAllIl.parentLl.performClick();
            } else if (eventBus.getType().equals(PowerStationStatus.malfunction)) {
                viewBinding.powerStationFaultsIl.parentLl.performClick();
            } else if (eventBus.getType().equals(PowerStationStatus.off)) {
                viewBinding.powerStationOfflineIl.parentLl.performClick();
            } else if (eventBus.getType().equals(PowerStationStatus.connecting)) {
                viewBinding.powerStationConnectedIl.parentLl.performClick();
            } else if (eventBus.getType().equals(ConstantManage.station_edit)) {
                //编辑后更新一下住宅列表
                //loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
@@ -640,7 +718,7 @@
                if (houseInfoAdapter != null) {
                    initData();
                    //更新UI
                    houseInfoAdapter.setList(houseListBeanIDList);
                    houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);
                }
            }
        }
@@ -700,7 +778,7 @@
        }
        isHouseLoadingMore = true;//标记读取状态
        if (isRefreshing) {
            showLoading();
            showLoading(getString(R.string.device_loading));
        }
        //获取住宅(电站)ID列表
@@ -722,7 +800,7 @@
                            if (houseInfoAdapter != null) {
                                initData();
                                //更新UI
                                houseInfoAdapter.setList(houseListBeanIDList);
                                houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);
                            }
                        }
                        nullDataUpdateUi();
@@ -769,12 +847,12 @@
        }
        isDeviceLoadingMore = true;//标记读取状态
        if (isRefreshing) {
            showLoading();
            showLoading(getString(R.string.device_loading));
        }
        //获取住宅(电站)ID列表
        HdlDeviceLogic.getInstance().getPowerStationDeviceList("", pageNo, pageSize, new CloudCallBeak<PageNumberObject<DeviceBean>>() {
        HdlDeviceLogic.getInstance().getPowerStationDeviceList("", pageNo, pageSize, new CloudCallBeak<PageNumberObject<CloudInverterDeviceBean>>() {
            @Override
            public void onSuccess(PageNumberObject<DeviceBean> pageNumberObject) {
            public void onSuccess(PageNumberObject<CloudInverterDeviceBean> pageNumberObject) {
                HdlThreadLogic.runMainThread(new Runnable() {
                    @Override
                    public void run() {
@@ -903,7 +981,8 @@
                initializeInverter(list); //发起初始化指令给逆变器;(注意:只能是本地发送了(要搜索局域网逆变器列表,建立本地通讯通道),删除电站成功后,云端解绑逆变器的关系)
                HdlResidenceLogic.getInstance().delHouseId(homeId);//删除电站缓存
                initData();//初始化缓存数据
                houseInfoAdapter.setList(houseListBeanIDList);//重新刷新列表
                houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//重新刷新列表
                getStatusOverview();//删除成功后刷新电站状态概览
                nullDataUpdateUi();//检测数据是否为空
            }