From 68db344081c103c94832b8d0a06be6c6888d66e4 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 26 三月 2025 17:34:14 +0800 Subject: [PATCH] 2025年03月26日17:34:12 --- app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java | 62 +++++++++++++++++++++--------- 1 files changed, 43 insertions(+), 19 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 ec9501d..65ec710 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 @@ -103,7 +103,7 @@ private String value = SortValue.all;//descending:闄嶅簭,ascending:鍗囧簭 private String installedCapacityMinValue = "";//鏈�灏忕粍涓插閲�(瑁呮満瀹归噺) private String installedCapacityMaxValue = "";//鏈�澶х粍涓插閲�(瑁呮満瀹归噺) - private String debugStatus = DebugStatus.All;//绛涢�夋潯浠剁姸鎬� + private String screeningConditionStatus = DebugStatus.All;//绛涢�夋潯浠剁姸鎬� private String powerStationStatusValue = PowerStationStatus.All;//鐢电珯鐘舵��(鍏ㄩ儴 涓嶄紶璇ヨ繃婊ゅ弬鏁�,1:姝e父(杩愯),2:绂荤嚎,3:寰呮帴鍏�,4:鏁呴殰) private final long pageSize = 20;//椤垫暟 @@ -116,7 +116,7 @@ value = SortValue.all; installedCapacityMinValue = ""; installedCapacityMaxValue = ""; - debugStatus = DebugStatus.All; + screeningConditionStatus = DebugStatus.All; powerStationStatusValue = PowerStationStatus.All; } @@ -149,7 +149,7 @@ selectedTitleLabelStyle(); initializationState(); getStatusOverview(); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); @@ -174,7 +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)); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + + 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)); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); //鏁呴殰 @@ -186,7 +191,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)); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + + 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)); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); //绂荤嚎 @@ -198,7 +208,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)); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + + 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)); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); //寰呮帴鍏� @@ -210,7 +225,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)); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + 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)); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); @@ -244,14 +263,14 @@ public void onClick(View v) { DefaultFilteringDialog defaultFilteringDialog = new DefaultFilteringDialog(_mActivity); defaultFilteringDialog.show(); - defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, debugStatus); + defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus); defaultFilteringDialog.setOnClickListener(new DefaultFilteringDialog.OnClickListener() { @Override public void confirm(String min, String max, String state) { installedCapacityMinValue = min;//鏈�灏忕粍涓插閲�(瑁呮満瀹归噺) installedCapacityMaxValue = max;//鏈�澶х粍涓插閲�(瑁呮満瀹归噺) - debugStatus = state;//璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯) - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + screeningConditionStatus = state;//璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯) + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); } @@ -264,7 +283,7 @@ @Override public void onRefresh() { viewBinding.fragmentHouseSrl.setRefreshing(false); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); getStatusOverview(); } }); @@ -285,7 +304,7 @@ if (!isHouseLoadingMore) { // 婊戝姩鍒颁簡搴曢儴锛屾墽琛岀浉搴旂殑鎿嶄綔 HdlLogLogic.print("---婊戝姩鍒颁簡搴曢儴"); - loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, ++currentHouseListPage, false); + loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, ++currentHouseListPage, false); } } } @@ -402,7 +421,7 @@ screenIconState(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected); key = SortType.homeNameSort; value = isSelected ? SortValue.ascending : SortValue.descending; - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); //鐢电珯鍙戠數鍔熺巼绛涢�� @@ -413,7 +432,7 @@ screenIconState(viewBinding.stationPowerRl, viewBinding.stationPowerIv, isSelected); key = SortType.powerSort; value = isSelected ? SortValue.ascending : SortValue.descending; - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); //鐢电珯褰撴棩鍙戠數閲忕瓫閫� @@ -424,7 +443,7 @@ screenIconState(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected); key = SortType.todayElectricitySort; value = isSelected ? SortValue.ascending : SortValue.descending; - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); //鐢电珯鐢垫睜瀹归噺绛涢�� @@ -435,7 +454,7 @@ screenIconState(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected); key = SortType.batteryCapacitySort; value = isSelected ? SortValue.ascending : SortValue.descending; - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); //璁惧鐐瑰嚮 @@ -553,6 +572,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)); @@ -621,7 +645,7 @@ // 鍙栨秷绮樻�т簨浠� EventBus.getDefault().removeStickyEvent(eventBus); //uin鍒涘缓鐢电珯鎴愬姛鍚庨�氱煡 - loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); if (eventBus.getData() != null) { Gson gson = new Gson(); String json = eventBus.getData().toString(); @@ -665,7 +689,7 @@ // if (MqttRecvClient.getInstance() != null) { // MqttRecvClient.getInstance().removeAllTopic(); // } - loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) { // 鍙栨秷绮樻�т簨浠� @@ -707,7 +731,7 @@ selectedTitleLabelStyle(); initializationState(); getStatusOverview(); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } else if (eventBus.getType().equals(ConstantManage.station_page)) { //閫氳繃棣栭〉鐢电珯杩涙潵鐨� if (eventBus.getData().equals(PowerStationStatus.All)) { -- Gitblit v1.8.0