From 2bc156ec08369884b44961cd446201d35a66fff0 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期二, 25 六月 2024 10:50:40 +0800 Subject: [PATCH] Merge branch 'feature/v1.4.1' of http://59.41.255.150:6688/r/~wjc/HDLPhotovoltaicDebugAPP into feature/v1.4.1 --- app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java | 42 +++++++++++++++++++++++++++++++----------- 1 files changed, 31 insertions(+), 11 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 4d410ff..8ce63bd 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 @@ -91,6 +91,17 @@ private final long pageSize = 20;//椤垫暟 + /** + * 杩樺師鏉′欢鐨勫垵濮嬪寲鐘舵�� + */ + private void InitializationState() { + key = SortValue.all; + value = SortValue.all; + installedCapacityMinValue = ""; + installedCapacityMaxValue = ""; + gridTypeValue = ""; + powerStationStatusValue = PowerStationStatus.All; + } @Override public Object getContentView() { @@ -119,6 +130,7 @@ } isClickPowerStationLabel = true; selectedTitleLabelStyle(); + InitializationState(); getStatusOverview(); loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); @@ -629,12 +641,11 @@ // } // } - } - } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE.equals(eventBus.getType())) { + } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_CLOSE_HOME_DETAILS_PAGE.equals(eventBus.getTopic())) { // 鍙栨秷绮樻�т簨浠� EventBus.getDefault().removeStickyEvent(eventBus); - //鏄湪鐢电珯鍒楄〃椤垫墠杩涙潵杩欓噷 + //鏄湪锛堢數绔欙級妯″潡涓斿湪锛堢數绔欙級鏍囩椤垫墠杩涙潵杩欓噷 if (HdlCommonLogic.lowerTagType == LowerTagType.power_station && isClickPowerStationLabel) { //uin鍏抽棴浣忓畢璇︽儏鐣岄潰閫氱煡 if (MqttRecvClient.getInstance() != null) { @@ -662,12 +673,20 @@ // 鍙栨秷绮樻�т簨浠� EventBus.getDefault().removeStickyEvent(eventBus); HdlLogLogic.print("姝e湪鐐瑰嚮銆愮數绔欍��"); - if (!isReadData) { - //1锛屼粠棣栭〉-鏁呴殰-杩涙潵-鐢电珯锛堜笉璇诲彇锛� - //2锛屼粠鐢电珯-杩涙潵-鐢电珯锛堣鍙栦竴娆�,鍚庨潰杩涙潵涓嶅湪璇诲彇锛� - 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(); +// } + //2024骞�06鏈�24鏃�14:34:01 浜у搧缁忕悊瑕佹眰杩涘幓鐢电珯鍒楄〃閮借璇诲彇 + isClickPowerStationLabel = true; + selectedTitleLabelStyle(); + InitializationState(); + getStatusOverview(); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + + } else if (eventBus.getType().equals(PowerStationStatus.All)) { isClickPowerStationLabel = true; selectedTitleLabelStyle(); @@ -751,7 +770,7 @@ } isHouseLoadingMore = true;//鏍囪璇诲彇鐘舵�� if (isRefreshing) { - showLoading(); + showLoading(getString(R.string.device_loading)); } //鑾峰彇浣忓畢(鐢电珯)ID鍒楄〃 @@ -820,7 +839,7 @@ } isDeviceLoadingMore = true;//鏍囪璇诲彇鐘舵�� if (isRefreshing) { - showLoading(); + showLoading(getString(R.string.device_loading)); } //鑾峰彇浣忓畢(鐢电珯)ID鍒楄〃 HdlDeviceLogic.getInstance().getPowerStationDeviceList("", pageNo, pageSize, new CloudCallBeak<PageNumberObject<CloudInverterDeviceBean>>() { @@ -955,6 +974,7 @@ HdlResidenceLogic.getInstance().delHouseId(homeId);//鍒犻櫎鐢电珯缂撳瓨 initData();//鍒濆鍖栫紦瀛樻暟鎹� houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//閲嶆柊鍒锋柊鍒楄〃 + getStatusOverview();//鍒犻櫎鎴愬姛鍚庡埛鏂扮數绔欑姸鎬佹瑙� nullDataUpdateUi();//妫�娴嬫暟鎹槸鍚︿负绌� } -- Gitblit v1.8.0