From 31e89a8697d049410c9d8d5c333cba33223bc9dc Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期二, 01 四月 2025 19:39:26 +0800
Subject: [PATCH] 2025年04月01日19:39:19

---
 app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java |   73 +++++++++++++++++++++++++-----------
 1 files changed, 50 insertions(+), 23 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 9feca3b..262e719 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
@@ -174,6 +174,12 @@
                 viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                 viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                 viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
+
+                viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF));
+                viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                getStatusOverview();
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
             }
         });
@@ -186,6 +192,12 @@
                 viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff));
                 viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                 viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
+
+                viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF));
+                viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                getStatusOverview();
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
             }
         });
@@ -198,6 +210,12 @@
                 viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                 viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff));
                 viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
+
+                viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF));
+                viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                getStatusOverview();
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
             }
         });
@@ -210,6 +228,11 @@
                 viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                 viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                 viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff));
+                viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+                viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF));
+                getStatusOverview();
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
             }
         });
@@ -251,6 +274,7 @@
                         installedCapacityMinValue = min;//鏈�灏忕粍涓插閲�(瑁呮満瀹归噺)
                         installedCapacityMaxValue = max;//鏈�澶х粍涓插閲�(瑁呮満瀹归噺)
                         screeningConditionStatus = state;//璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯)
+                        getStatusOverview();
                         loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
                     }
                 });
@@ -387,43 +411,27 @@
 
             }
         });
-        //鐢电珯缂栬緫鎸夐挳
-        viewBinding.editIv.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                startActivity(HouseListEditActivity.class);
-            }
-        });
-        //鐢电珯鍚嶇О绛涢��
+        //PV绛涢��
         viewBinding.stationNameRl.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 boolean isSelected = !v.isSelected();
                 screenIconState(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected);
-                key = SortType.homeNameSort;
+                key = SortType.installedCapacitySort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
+                getStatusOverview();
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
             }
         });
-        //鐢电珯鍙戠數鍔熺巼绛涢��
+        //棰濆畾鍔熺巼绛涢��
         viewBinding.stationPowerRl.setOnClickListener(new View.OnClickListener() {
             @Override
             public void onClick(View v) {
                 boolean isSelected = !v.isSelected();
                 screenIconState(viewBinding.stationPowerRl, viewBinding.stationPowerIv, isSelected);
-                key = SortType.powerSort;
+                key = SortType.invPowerSort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
-            }
-        });
-        //鐢电珯褰撴棩鍙戠數閲忕瓫閫�
-        viewBinding.stationDayRl.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                boolean isSelected = !v.isSelected();
-                screenIconState(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected);
-                key = SortType.todayElectricitySort;
-                value = isSelected ? SortValue.ascending : SortValue.descending;
+                getStatusOverview();
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
             }
         });
@@ -435,6 +443,19 @@
                 screenIconState(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected);
                 key = SortType.batteryCapacitySort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
+                getStatusOverview();
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
+            }
+        });
+        //鐢电珯褰撴棩鍙戠數閲忕瓫閫�
+        viewBinding.stationDayRl.setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                boolean isSelected = !v.isSelected();
+                screenIconState(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected);
+                key = SortType.todayElectricitySort;
+                value = isSelected ? SortValue.ascending : SortValue.descending;
+                getStatusOverview();
                 loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
             }
         });
@@ -553,6 +574,11 @@
         viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
         viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
         viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
+
+        viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_E6FFFFFF));
+        viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+        viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
+        viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_66FFFFFF));
         //鐢电珯鏍囩
         houseInfoAdapter = new HouseInfoAdapter(_mActivity);
         viewBinding.fragmentHouseSrlListRc.setLayoutManager(new LinearLayoutManager(_mActivity));
@@ -665,6 +691,7 @@
 //                if (MqttRecvClient.getInstance() != null) {
 //                    MqttRecvClient.getInstance().removeAllTopic();
 //                }
+
                 loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
             }
         } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) {
@@ -745,7 +772,7 @@
      * 鐢电珯鐘舵�佹瑙�
      */
     private void getStatusOverview() {
-        HdlResidenceLogic.getInstance().getStatusOverview(new CloudCallBeak<StatusOverviewBean>() {
+        HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus,installedCapacityMinValue,installedCapacityMaxValue,new CloudCallBeak<StatusOverviewBean>() {
             @Override
             public void onSuccess(StatusOverviewBean statusOverviewBean) {
                 if (statusOverviewBean == null) {

--
Gitblit v1.8.0