mac
2024-10-29 0582b05b1f9dc97a71a72e4784452e5a43510256
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
@@ -18,7 +18,6 @@
import com.hdl.photovoltaic.R;
import com.hdl.photovoltaic.bean.PageNumberObject;
import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.databinding.FragmentHouseListBinding;
import com.hdl.photovoltaic.base.CustomBaseFragment;
import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch;
@@ -94,7 +93,7 @@
    /**
     * 还原条件的初始化状态
     */
    private void InitializationState() {
    private void initializationState() {
        key = SortValue.all;
        value = SortValue.all;
        installedCapacityMinValue = "";
@@ -130,7 +129,7 @@
                }
                isClickPowerStationLabel = true;
                selectedTitleLabelStyle();
                InitializationState();
                initializationState();
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
@@ -260,7 +259,7 @@
            public void onClick(int position, HouseIdBean houseIdBean) {
                //点击住宅详情
                HdlLogLogic.print("点击住宅详情---" + new Gson().toJson(houseIdBean), false);
                HdlResidenceLogic.getInstance().switchHouse(houseIdBean);
                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);
@@ -611,7 +610,7 @@
                    Gson gson = new Gson();
                    String json = eventBus.getData().toString();
                    HouseIdBean houseIdBean = gson.fromJson(json, HouseIdBean.class);
                    HdlResidenceLogic.getInstance().switchHouse(houseIdBean);
                    HdlResidenceLogic.getInstance().switchHouse(houseIdBean,true);
                }
            } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_EDIT.equals(eventBus.getType())) {
@@ -676,10 +675,10 @@
        } else if (eventBus.getTopic().equals(ConstantManage.homepage_title_tab_switch)) {
            // 取消粘性事件
            EventBus.getDefault().removeStickyEvent(eventBus);
            //接收外部点击事件
            if (eventBus.getType().equals(HomepageTitleTabSwitch.powerstation.toString())) {
                // 取消粘性事件
                EventBus.getDefault().removeStickyEvent(eventBus);
                HdlLogLogic.print("正在点击【电站】");
//                if (!isReadData) {
//                    //1,从首页-故障-进来-电站(不读取)
@@ -690,27 +689,28 @@
                //2024年06月24日14:34:01 产品经理要求进去电站列表都要读取 且默认进去都是默认电站标签
                isClickPowerStationLabel = true;
                selectedTitleLabelStyle();
                InitializationState();
                initializationState();
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
            } else if (eventBus.getType().equals(PowerStationStatus.All)) {
                isClickPowerStationLabel = true;
                selectedTitleLabelStyle();
                viewBinding.powerStationAllIl.parentLl.performClick();
            } else if (eventBus.getType().equals(PowerStationStatus.malfunction)) {
                isClickPowerStationLabel = true;
                selectedTitleLabelStyle();
                viewBinding.powerStationFaultsIl.parentLl.performClick();
            } else if (eventBus.getType().equals(PowerStationStatus.off)) {
                isClickPowerStationLabel = true;
                selectedTitleLabelStyle();
                viewBinding.powerStationOfflineIl.parentLl.performClick();
            } else if (eventBus.getType().equals(PowerStationStatus.connecting)) {
                isClickPowerStationLabel = true;
                selectedTitleLabelStyle();
                viewBinding.powerStationConnectedIl.parentLl.performClick();
            } else if (eventBus.getType().equals(ConstantManage.station_page)) {
                //通过首页电站进来的
                if (eventBus.getData().equals(PowerStationStatus.All)) {
                    isClickPowerStationLabel = true;
                    selectedTitleLabelStyle();
                    viewBinding.powerStationAllIl.parentLl.performClick();
                } else if (eventBus.getData().equals(PowerStationStatus.malfunction)) {
                    isClickPowerStationLabel = true;
                    selectedTitleLabelStyle();
                    viewBinding.powerStationFaultsIl.parentLl.performClick();
                } else if (eventBus.getData().equals(PowerStationStatus.off)) {
                    isClickPowerStationLabel = true;
                    selectedTitleLabelStyle();
                    viewBinding.powerStationOfflineIl.parentLl.performClick();
                } else if (eventBus.getData().equals(PowerStationStatus.connecting)) {
                    isClickPowerStationLabel = true;
                    selectedTitleLabelStyle();
                    viewBinding.powerStationConnectedIl.parentLl.performClick();
                }
            } else if (eventBus.getType().equals(ConstantManage.station_edit)) {
                //编辑后更新一下住宅列表
                //loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);