From 2b805d413e924bc0a8e80e1280208d9af8d93cb1 Mon Sep 17 00:00:00 2001
From: mac <user@users-MacBook-Pro.local>
Date: 星期四, 30 五月 2024 21:12:07 +0800
Subject: [PATCH] 2024年05月30日21:11:54

---
 app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java |  190 ++++++++++++++++++++++++++++++++++-------------
 1 files changed, 137 insertions(+), 53 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
index 61965cc..4d410ff 100644
--- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
+++ b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
@@ -22,6 +22,7 @@
 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;
@@ -36,17 +37,20 @@
 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;
 import com.hdl.photovoltaic.utils.PermissionUtils;
+import com.hdl.photovoltaic.utils.URLEncodingUtils;
 import com.hdl.photovoltaic.widget.DefaultFilteringDialog;
 import com.hdl.photovoltaic.widget.DelayedConfirmationCancelDialog;
 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;
@@ -59,15 +63,15 @@
  * 鐢电珯鍜岃澶�-鐣岄潰
  */
 public class HouseAndDeviceFragment extends CustomBaseFragment {
+
+    private boolean isReadData = false;
     private FragmentHouseListBinding viewBinding;
     private HouseInfoAdapter houseInfoAdapter;
 
     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; // 鏍囪鐢电珯鍒楄〃姝e湪鍔犺浇鏇村鏁版嵁
@@ -96,9 +100,7 @@
 
     @Override
     public void onBindView(Bundle savedInstanceState) {
-        //鏀惧湪杩欓噷涔熷锛岃繖閲屽彧鏄鍒涘缓涓�娆�
-//        loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
-//        getStatusOverview();
+        getStatusOverview();
         initData();
         //鍒濆鍖�
         initView();
@@ -116,16 +118,10 @@
                     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);
-                }
+                selectedTitleLabelStyle();
+                getStatusOverview();
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
+
             }
         });
         //璁惧鏍囩
@@ -136,15 +132,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);
             }
         });
@@ -153,7 +141,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);
             }
         });
@@ -162,7 +150,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);
             }
         });
@@ -171,7 +159,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);
             }
         });
@@ -180,7 +168,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);
             }
         });
@@ -229,6 +217,7 @@
             public void onRefresh() {
                 viewBinding.fragmentHouseSrl.setRefreshing(false);
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
+                getStatusOverview();
             }
         });
         //鐢电珯涓婃媺璇诲彇
@@ -281,7 +270,7 @@
                         //绉诲姩鐢电珯浣嶇疆
                         HdlResidenceLogic.getInstance().moveHouseId(houseIdBean.getHomeId());
                         initData();//鍒濆鍖栫紦瀛樻暟鎹�
-                        houseInfoAdapter.setList(houseListBeanIDList);//閲嶆柊鍒锋柊鍒楄〃
+                        houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//閲嶆柊鍒锋柊鍒楄〃
                         nullDataUpdateUi();//妫�娴嬫暟鎹槸鍚︿负绌�
                     }
 
@@ -298,10 +287,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
@@ -407,8 +397,45 @@
         //璁惧鐐瑰嚮
         deviceInfoAdapter.setOnclickListener(new DeviceInfoAdapter.OnClickListener() {
             @Override
-            public void onClick(int position, DeviceBean deviceBean) {
+            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);
+                //鐩殑鏄负浜嗚幏鍙栨嬁鍒扮綉鍏矷D锛宮qtt閫氳绉橀挜绛変俊鎭紝鎷垮埌鍚庣紦瀛樺埌鏈湴閫嗗彉鍣ㄥ垪琛ㄩ噷闈紝鍙戦�佹暟鎹暟鎹椂鑷姩鍘荤紦瀛樺垪琛ㄩ噷闈㈠幓鏌ユ壘锛�
+                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) {
+
+                    }
+                });
             }
         });
         //璁惧璁剧疆涓嬫媺绠ご棰滆壊
@@ -464,12 +491,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);
@@ -481,6 +508,34 @@
     }
 
     /**
+     * 鐢电珯鍜岃澶囨爣绛炬牱寮�
+     */
+    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);
+            }
+        }
+
+    }
+
+    /**
      * 鏄剧ず閫変腑鐘舵�佹牱寮�
      *
      * @param linearLayout         缁勪欢
@@ -488,7 +543,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));
@@ -579,15 +634,20 @@
         } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE.equals(eventBus.getType())) {
             // 鍙栨秷绮樻�т簨浠�
             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;
+//            }
             //杩涘幓浣忓畢璇︽儏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();
@@ -602,14 +662,37 @@
                 // 鍙栨秷绮樻�т簨浠�
                 EventBus.getDefault().removeStickyEvent(eventBus);
                 HdlLogLogic.print("姝e湪鐐瑰嚮銆愮數绔欍��");
-//                HdlThreadLogic.runSubThread(new Runnable() {
-//                    @Override
-//                    public void run() {
-                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();
+                }
+            } else if (eventBus.getType().equals(PowerStationStatus.All)) {
+                isClickPowerStationLabel = true;
+                selectedTitleLabelStyle();
+                viewBinding.powerStationAllIl.parentLl.performClick();
+            } else if (eventBus.getType().equals(PowerStationStatus.malfunction)) {
+                isClickPowerStationLabel = true;
+                selectedTitleLabelStyle();
+                viewBinding.powerStationFaultsIl.parentLl.performClick();
+            } else if (eventBus.getType().equals(PowerStationStatus.off)) {
+                isClickPowerStationLabel = true;
+                selectedTitleLabelStyle();
+                viewBinding.powerStationOfflineIl.parentLl.performClick();
+            } else if (eventBus.getType().equals(PowerStationStatus.connecting)) {
+                isClickPowerStationLabel = true;
+                selectedTitleLabelStyle();
+                viewBinding.powerStationConnectedIl.parentLl.performClick();
+            } else if (eventBus.getType().equals(ConstantManage.station_edit)) {
+                //缂栬緫鍚庢洿鏂颁竴涓嬩綇瀹呭垪琛�
+                //loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
+//                getStatusOverview();
+                if (houseInfoAdapter != null) {
+                    initData();
+                    //鏇存柊UI
+                    houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);
+                }
             }
         }
     }
@@ -656,6 +739,7 @@
      * @param isClear              鏄惁娓呴櫎鏁版嵁
      */
     private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, long pageNo, boolean isClear) {
+        isReadData = true;
         if (isClear) {
             clearData();
         }
@@ -689,7 +773,7 @@
                             if (houseInfoAdapter != null) {
                                 initData();
                                 //鏇存柊UI
-                                houseInfoAdapter.setList(houseListBeanIDList);
+                                houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);
                             }
                         }
                         nullDataUpdateUi();
@@ -739,9 +823,9 @@
             showLoading();
         }
         //鑾峰彇浣忓畢(鐢电珯)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() {
@@ -870,7 +954,7 @@
                 initializeInverter(list); //鍙戣捣鍒濆鍖栨寚浠ょ粰閫嗗彉鍣�;锛堟敞鎰�:鍙兘鏄湰鍦板彂閫佷簡(瑕佹悳绱㈠眬鍩熺綉閫嗗彉鍣ㄥ垪琛紝寤虹珛鏈湴閫氳閫氶亾),鍒犻櫎鐢电珯鎴愬姛鍚�,浜戠瑙g粦閫嗗彉鍣ㄧ殑鍏崇郴锛�
                 HdlResidenceLogic.getInstance().delHouseId(homeId);//鍒犻櫎鐢电珯缂撳瓨
                 initData();//鍒濆鍖栫紦瀛樻暟鎹�
-                houseInfoAdapter.setList(houseListBeanIDList);//閲嶆柊鍒锋柊鍒楄〃
+                houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//閲嶆柊鍒锋柊鍒楄〃
                 nullDataUpdateUi();//妫�娴嬫暟鎹槸鍚︿负绌�
             }
 

--
Gitblit v1.8.0