wjc
2025-05-23 971a24a9e58a21bc306897fd3ad63012a399f7db
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -208,8 +208,22 @@
                    break;
                    //创建电站
                    case HDLUniMP.UNI_EVENT_REPLY_HOME_CREATION: {
                        //uin创建电站成功后通知
//                     HdlResidenceLogic.getInstance().getResidenceIdList("","","","","","",1,50,null);
                        try {
                            String dataJsonStr = getKeyValue("data", data);
                            if (!TextUtils.isEmpty(dataJsonStr)) {
                                Gson gson = new Gson();
                                HouseIdBean houseIdBean = gson.fromJson(dataJsonStr, HouseIdBean.class);
                                HdlResidenceLogic.getInstance().switchHouse(houseIdBean, true);
                            }
                            HdlLogLogic.print("uin创建电站成功后通知---"+dataJsonStr, true);
                        } catch (Exception e) {
                            HdlLogLogic.print("uin创建电站成功后通知---" + e.getMessage(), true);
                        }
                        //EventBus事件分发
                        HdlCommonLogic.getInstance().postEventBus(HDLUniMP.UNI_EVENT_REPLY_HOME_MODEL, HDLUniMP.UNI_EVENT_REPLY_HOME_CREATION, getKeyValue("data", data));
//                        HdlCommonLogic.getInstance().postEventBusSticky(HDLUniMP.UNI_EVENT_REPLY_HOME_MODEL, HDLUniMP.UNI_EVENT_REPLY_HOME_CREATION, getKeyValue("data", data));
                        if (callback != null) {
                            uniSuccessCallback(type, null, callback);
                        }
@@ -393,7 +407,9 @@
                    case HDLUniMP.UNI_EVENT_REPLY_AUTHORIZATION_GET: {
                        boolean isLocalAuthor = PermissionUtils.checkPermission(HDLApp.getInstance(), Manifest.permission.ACCESS_FINE_LOCATION);
                        if (callback != null) {
                            uniSuccessCallback(mode_type, isLocalAuthor, callback);
                            JsonObject jsonObject = new JsonObject();
                            jsonObject.addProperty("localAuthor", isLocalAuthor);
                            uniSuccessCallback(mode_type, jsonObject, callback);
                        }
                    }
                    break;
@@ -916,7 +932,7 @@
                if (callback != null) {
                    uniSuccessCallback(type, null, callback);
                }
                List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId, null);
                List<GatewayBean> list = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId);
                for (int i = 0; i < list.size(); i++) {
                    GatewayBean gatewayBean = list.get(i);
                    HdlDeviceLogic.getInstance().initializeInverter(gatewayBean.getDevice_mac(), null);