| | |
| | | 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; |
| | |
| | | /** |
| | | * 还原条件的初始化状态 |
| | | */ |
| | | private void InitializationState() { |
| | | private void initializationState() { |
| | | key = SortValue.all; |
| | | value = SortValue.all; |
| | | installedCapacityMinValue = ""; |
| | |
| | | } |
| | | isClickPowerStationLabel = true; |
| | | selectedTitleLabelStyle(); |
| | | InitializationState(); |
| | | initializationState(); |
| | | getStatusOverview(); |
| | | loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); |
| | | |
| | |
| | | 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); |
| | | |
| | |
| | | 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())) { |
| | |
| | | |
| | | |
| | | } 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,从首页-故障-进来-电站(不读取) |
| | |
| | | //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); |