From c4ae4589c6c001329ebb731589b209e8ddcbf7ca Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 24 三月 2026 16:03:59 +0800
Subject: [PATCH] 2026年03月24日16:03:57

---
 app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java |   54 +++++++++++++++++++++++++++++-------------------------
 1 files changed, 29 insertions(+), 25 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 7e966e3..253e4cf 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
@@ -35,6 +35,7 @@
 import com.hdl.photovoltaic.enums.LogoutType;
 import com.hdl.photovoltaic.enums.LowerTagType;
 import com.hdl.photovoltaic.enums.PowerStationStatus;
+import com.hdl.photovoltaic.enums.PowerStationType;
 import com.hdl.photovoltaic.enums.ProjectOperation;
 import com.hdl.photovoltaic.enums.ShowErrorMode;
 import com.hdl.photovoltaic.enums.SortType;
@@ -109,6 +110,7 @@
     private String installedCapacityMaxValue = "";//鏈�澶х粍涓插閲�(瑁呮満瀹归噺)
     private String screeningConditionStatus = DebugStatus.All;//绛涢�夋潯浠剁姸鎬�
     private String powerStationStatusValue = PowerStationStatus.All;//鐢电珯鐘舵��(鍏ㄩ儴 涓嶄紶璇ヨ繃婊ゅ弬鏁�,1:姝e父(杩愯),2:绂荤嚎,3:寰呮帴鍏�,4:鏁呴殰)
+    private String powerStationTypeValue = PowerStationType.All;//鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
 
     private final long pageSize = 100;//涓�椤靛ぇ灏�
 
@@ -122,6 +124,7 @@
         installedCapacityMaxValue = "";
         screeningConditionStatus = DebugStatus.All;
         powerStationStatusValue = PowerStationStatus.All;
+        powerStationTypeValue = PowerStationType.All;
     }
 
     @Override
@@ -158,7 +161,7 @@
                 selectedTitleLabelStyle();
                 initializationState();
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
 
             }
         });
@@ -184,7 +187,7 @@
                 powerStationStatusValue = PowerStationStatus.All;
                 stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv);
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //鏁呴殰
@@ -197,7 +200,7 @@
                 powerStationStatusValue = PowerStationStatus.malfunction;
                 stationStatusStyle(viewBinding.faultsLl, viewBinding.faultsDesTv);
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //绂荤嚎
@@ -210,7 +213,7 @@
                 powerStationStatusValue = PowerStationStatus.off;
                 stationStatusStyle(viewBinding.offlineLl, viewBinding.offlineDesTv);
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //寰呮帴鍏�
@@ -223,7 +226,7 @@
                 powerStationStatusValue = PowerStationStatus.connecting;
                 stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv);
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
 
@@ -286,15 +289,16 @@
             public void onClick(View v) {
                 DefaultFilteringDialog defaultFilteringDialog = new DefaultFilteringDialog(_mActivity);
                 defaultFilteringDialog.show();
-                defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus);
+                defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationTypeValue);
                 defaultFilteringDialog.setOnClickListener(new DefaultFilteringDialog.OnClickListener() {
                     @Override
-                    public void confirm(String min, String max, String state) {
+                    public void confirm(String min, String max, String state, String powerStationType) {
                         installedCapacityMinValue = min;//鏈�灏忕粍涓插閲�(瑁呮満瀹归噺)
                         installedCapacityMaxValue = max;//鏈�澶х粍涓插閲�(瑁呮満瀹归噺)
                         screeningConditionStatus = state;//璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯)
+                        powerStationTypeValue = powerStationType;//鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
                         getStatusOverview();
-                        loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                        loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
                     }
                 });
             }
@@ -303,12 +307,11 @@
         houseInfoAdapter.setNoOnclickListener(new HouseInfoAdapter.OnclickListener() {
             @Override
             public void onClick(int position, HouseIdBean houseIdBean) {
+                HdlLogLogic.print("鐐瑰嚮浣忓畢璇︽儏---" + new Gson().toJson(houseIdBean), false);
                 //鐐瑰嚮浣忓畢璇︽儏
                 UserConfigManage.getInstance().setUniBottomSafeDistanceBackgroundColor(0);
                 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);
-                HdlLogLogic.print("鐐瑰嚮浣忓畢璇︽儏---" + new Gson().toJson(houseIdBean), false);
+                HdlResidenceLogic.getInstance().openPowerStationDetails(houseIdBean);
             }
 
             @Override
@@ -385,9 +388,9 @@
                         } else {
                             showLoading(getString(R.string.deleting_please_wait));
 //                            if (houseIdBean.getDebugType().equals(DebugType.NORMAL)) {
-                            //銆愬父瑙勬柟寮忋�戝彂璧峰垹闄ょ數绔欐寚浠わ紙鎼滅储缃戝叧鏄�冨埌缃戝叧娌℃湁杩炴帴鍒颁簯绔紝浣跨敤鏈湴鍙戦�佸垵濮嬪寲鎸囦护锛�
+                            //銆愬父瑙勬柟寮忋�戝彂璧峰垹闄ょ數绔欐寚浠わ紙鎼滅储缃戝叧鏄�冭檻鍒扮綉鍏虫病鏈夎繛鎺ュ埌浜戠锛屼娇鐢ㄦ湰鍦板彂閫佸垵濮嬪寲鎸囦护锛�
                             // 纭欢閭h竟鍙柊鍥轰欢涔熷彂鍒濆鍖� 2025骞�10鏈�14鏃�10:55:18
-                            HdlDeviceLogic.getInstance().getCurrentHomeLocalAndCloudGatewayList(houseIdBean.getHomeId(), new CloudCallBeak<List<GatewayBean>>() {
+                            HdlDeviceLogic.getInstance().getCurrentHomeLocalAndCloudGatewayList(houseIdBean.getHomeId(), houseIdBean.getPowerStationType(), new CloudCallBeak<List<GatewayBean>>() {
                                 @Override
                                 public void onSuccess(List<GatewayBean> list) {
                                     //鍙戣捣鍒犻櫎鐢电珯鎸囦护
@@ -426,7 +429,7 @@
                 key = SortType.installedCapacitySort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //棰濆畾鍔熺巼绛涢��
@@ -438,7 +441,7 @@
                 key = SortType.invPowerSort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //鐢电珯鐢垫睜瀹归噺绛涢��
@@ -450,7 +453,7 @@
                 key = SortType.batteryCapacitySort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //鐢电珯褰撴棩鍙戠數閲忕瓫閫�
@@ -462,7 +465,7 @@
                 key = SortType.todayElectricitySort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //璁惧鐐瑰嚮
@@ -720,7 +723,7 @@
 //                    MqttRecvClient.getInstance().removeAllTopic();
 //                }
 
-                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) {
             // 鍙栨秷绮樻�т簨浠�
@@ -763,7 +766,7 @@
                 initializationState();
                 stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv);
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             } else if (eventBus.getType().equals(ConstantManage.station_page)) {
                 // 鍙栨秷绮樻�т簨浠�
                 EventBus.getDefault().removeStickyEvent(eventBus);
@@ -781,7 +784,7 @@
                     stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv);
                 }
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             } else if (eventBus.getType().equals(ConstantManage.station_edit)) {
                 //缂栬緫鍚庢洿鏂颁竴涓嬩綇瀹呭垪琛�
                 //loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
@@ -800,7 +803,7 @@
      * 鐢电珯鐘舵�佹瑙�
      */
     private void getStatusOverview() {
-        HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue, new CloudCallBeak<StatusOverviewBean>() {
+        HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue, powerStationTypeValue, new CloudCallBeak<StatusOverviewBean>() {
             @Override
             public void onSuccess(StatusOverviewBean statusOverviewBean) {
                 if (statusOverviewBean == null) {
@@ -834,10 +837,11 @@
      * @param installedCapacityMax 鏈�澶х粍涓插閲�(瑁呮満瀹归噺)
      * @param gridType             璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯)
      * @param powerStationStatus   鐢电珯鐘舵�� (鍏ㄩ儴  锛�"";1 锛� 姝e父;2 锛� 绂荤嚎; 3 锛� 寰呮帴鍏�;4 锛� 鏁呴殰)
+     * @param powerStationType     鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
      * @param pageNo               椤电爜
      * @param isClear              鏄惁娓呴櫎鏁版嵁
      */
-    private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, long pageNo, boolean isClear) {
+    private void loadNextPageHouseList(boolean isRefreshing, String key, String keyValue, String installedCapacityMin, String installedCapacityMax, String gridType, String powerStationStatus, String powerStationType, long pageNo, boolean isClear) {
         isReadData = true;
         if (isClear) {
             clearData();
@@ -854,7 +858,7 @@
         }
 
         //鑾峰彇浣忓畢(鐢电珯)ID鍒楄〃
-        HdlResidenceLogic.getInstance().getResidenceIdList(key, keyValue, installedCapacityMin, installedCapacityMax, gridType, powerStationStatus, pageNo, pageSize, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() {
+        HdlResidenceLogic.getInstance().getResidenceIdList(key, keyValue, installedCapacityMin, installedCapacityMax, gridType, powerStationStatus, powerStationType, pageNo, pageSize, new CloudCallBeak<HdlResidenceLogic.HouseBeanClass>() {
             @Override
             public void onSuccess(HdlResidenceLogic.HouseBeanClass houseBeanClass) {
                 HdlThreadLogic.runMainThread(new Runnable() {
@@ -1191,7 +1195,7 @@
                         // 鎵ц浠诲姟锛堝鏇存柊UI銆佽烦杞瓑锛�
                         viewBinding.fragmentHouseSrl.endRefreshing();
                         //鍔犺浇鏈�鏂版暟鎹畬鎴�
-                        loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+                        loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
                         getStatusOverview();
                     }
                 }.execute();
@@ -1218,7 +1222,7 @@
                         viewBinding.fragmentHouseSrl.endLoadingMore();
                         if (!isHouseLoadingMore) {
                             // 婊戝姩鍒颁簡搴曢儴锛屾墽琛岀浉搴旂殑鎿嶄綔
-                            loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, ++currentHouseListPage, false);
+                            loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, ++currentHouseListPage, false);
                         }
                     }
                 }.execute();

--
Gitblit v1.8.0