From 6ae9f81d545f44a85c34dea1c11df8b70e3f940f Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 09 四月 2025 10:29:29 +0800 Subject: [PATCH] 2025-04-09 10:29:16 1.1.0 --- app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java | 79 +++++++++++++-------------------------- 1 files changed, 26 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 262e719..24c5d53 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,12 +174,6 @@ 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); } }); @@ -192,12 +186,6 @@ 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); } }); @@ -210,12 +198,6 @@ 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); } }); @@ -228,11 +210,6 @@ 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); } }); @@ -274,7 +251,6 @@ installedCapacityMinValue = min;//鏈�灏忕粍涓插閲�(瑁呮満瀹归噺) installedCapacityMaxValue = max;//鏈�澶х粍涓插閲�(瑁呮満瀹归噺) screeningConditionStatus = state;//璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯) - getStatusOverview(); loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); @@ -411,39 +387,32 @@ } }); - //PV绛涢�� +// //鐢电珯缂栬緫鎸夐挳 +// viewBinding.editIv.setOnClickListener(new View.OnClickListener() { +// @Override +// public void onClick(View v) { +// startActivity(HouseListEditActivity.class); +// } +// }); + //鐢电珯鍚嶇О绛涢�� viewBinding.stationNameRl.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { boolean isSelected = !v.isSelected(); screenIconState(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected); - key = SortType.installedCapacitySort; + key = SortType.homeNameSort; 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.invPowerSort; + key = SortType.powerSort; value = isSelected ? SortValue.ascending : SortValue.descending; - getStatusOverview(); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); - } - }); - //鐢电珯鐢垫睜瀹归噺绛涢�� - viewBinding.stationMonthRl.setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - boolean isSelected = !v.isSelected(); - 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); } }); @@ -455,7 +424,17 @@ 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); + } + }); + //鐢电珯鐢垫睜瀹归噺绛涢�� + viewBinding.stationMonthRl.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + boolean isSelected = !v.isSelected(); + screenIconState(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected); + key = SortType.batteryCapacitySort; + value = isSelected ? SortValue.ascending : SortValue.descending; loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true); } }); @@ -574,11 +553,6 @@ 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)); @@ -691,7 +665,6 @@ // 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())) { @@ -772,7 +745,7 @@ * 鐢电珯鐘舵�佹瑙� */ private void getStatusOverview() { - HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus,installedCapacityMinValue,installedCapacityMaxValue,new CloudCallBeak<StatusOverviewBean>() { + HdlResidenceLogic.getInstance().getStatusOverview(new CloudCallBeak<StatusOverviewBean>() { @Override public void onSuccess(StatusOverviewBean statusOverviewBean) { if (statusOverviewBean == null) { @@ -1066,8 +1039,8 @@ public void requestPermissions(OnCallBeak onCallBeak) { - //ACCESS_FINE_LOCATION 鍏佽浣跨敤GPS瀹氫綅 - //ACCESS_COARSE_LOCATION 鍏佽浣跨敤WIFI鐑偣鎴栧熀绔欐潵鑾峰彇绮楃暐鐨勫畾浣� + //ACCESS_FINE_LOCATION 鍏佽浣跨敤GPS瀹氫綅 + //ACCESS_COARSE_LOCATION 鍏佽浣跨敤WIFI鐑偣鎴栧熀绔欐潵鑾峰彇绮楃暐鐨勫畾浣� String[] ary = PermissionUtils.checkPermission(_mActivity, new String[]{Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION}); if (ary.length > 0) { this.requestPermissions(ary, PermissionUtils.STATUS_SUCCESS); @@ -1117,4 +1090,4 @@ } } -} +} \ No newline at end of file -- Gitblit v1.8.0