wjc
2025-06-12 ce85ef39594b9ba6066751eda310468fb2bccbda
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
@@ -592,15 +592,18 @@
            if (HDLUniMP.UNI_EVENT_REPLY_HOME_CREATION.equals(eventBus.getType())) {
                // 取消粘性事件
                EventBus.getDefault().removeStickyEvent(eventBus);
                //uin创建电站成功后通知
                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
                if (eventBus.getData() != null) {
                    Gson gson = new Gson();
                    String json = eventBus.getData().toString();
                    HouseIdBean houseIdBean = gson.fromJson(json, HouseIdBean.class);
                    HdlResidenceLogic.getInstance().switchHouse(houseIdBean, true);
                }
//                HdlLogLogic.print("进来了---11111" + eventBus.getData().toString());
//                //uin创建电站成功后通知
//                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
//                if (eventBus.getData() != null) {
//                    HdlLogLogic.print("进来了---" + eventBus.getData().toString());
//                    Gson gson = new Gson();
//                    String json = eventBus.getData().toString();
//                    HouseIdBean houseIdBean = gson.fromJson(json, HouseIdBean.class);
//                    HdlResidenceLogic.getInstance().switchHouse(houseIdBean, true);
//                    HdlLogLogic.print("进来了---结束" + eventBus.getData().toString());
//
//                }
            } else if (HDLUniMP.UNI_EVENT_REPLY_HOME_EDIT.equals(eventBus.getType())) {
                // 取消粘性事件
                EventBus.getDefault().removeStickyEvent(eventBus);
@@ -652,8 +655,8 @@
            }
            String homeId = eventBus.getData().toString();
            //进去住宅详情uni读取逆变器列表成功后通知
            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId, null).size(); i++) {
                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId, null).get(i).getGatewayId();
            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).size(); i++) {
                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).get(i).getGatewayId();
                //字符串是自己按规则拼接的,里面注册主题时会解析字符串,只拿getGatewayId()值;
                String topic = "/user/" + gatewayId + "/#";
                //进去住宅详情开始订阅主题
@@ -969,7 +972,7 @@
            @Override
            public void onSuccess(Boolean obj) {
                hideLoading();
                initializeInverter(list); //发起初始化指令给逆变器;(注意:只能是本地发送了(要搜索局域网逆变器列表,建立本地通讯通道),删除电站成功后,云端解绑逆变器的关系)
                initializeInverter(list); //发起初始化指令给逆变器;(注意:前面已先解绑云端逆变器,mqtt通道已断开,初始化只能是本地发送(先搜索局域网逆变器列表,建立本地通讯通道))
                HdlResidenceLogic.getInstance().delHouseId(homeId);//删除电站缓存
                initData();//初始化缓存数据
                houseInfoAdapter.setList(houseListBeanIDList, powerStationStatusValue);//重新刷新列表