From 5e43612bb0afc1202fe802d4307b02cdfc05756f Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期六, 07 十月 2023 17:32:42 +0800 Subject: [PATCH] 2023年10月07日17:32:35 --- app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java | 33 +++++++++++++++++++++++++++++++-- 1 files changed, 31 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java index 820d6b8..39ee3a0 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java @@ -38,7 +38,6 @@ import java.util.ArrayList; import java.util.List; -import io.reactivex.rxjava3.disposables.Disposable; /** * 璁惧閫昏緫 @@ -110,6 +109,31 @@ public void onSuccess(String str) { if (cloudCallBeak != null) { cloudCallBeak.onSuccess(true); + //涓存椂鐨勯�昏緫锛屼笂浼爋id鍒楄〃鍒颁簯绔� + getGatewayOidList(mac, new LinkCallBack<List<OidBean>>() { + @Override + public void onSuccess(List<OidBean> obj) { + if (obj == null) { + return; + } + fullUpdateOid(obj, new CloudCallBeak<Boolean>() { + @Override + public void onSuccess(Boolean obj) { + + } + + @Override + public void onFailure(HDLException e) { + + } + }); + } + + @Override + public void onError(HDLLinkException e) { + + } + }); } } @@ -237,7 +261,7 @@ * @param cloudCallBeak 鍥炶皟update */ public void fullUpdateOid(List<OidBean> oidList, CloudCallBeak<Boolean> cloudCallBeak) { - String requestUrl = HttpApi.POST_Device_ChildDevices_List; + String requestUrl = HttpApi.POST_Device_Oid; JsonObject json = new JsonObject(); json.addProperty("operationSource", "PROGRAM_ENERGY");// json.addProperty("homeId", UserConfigManage.getInstance().getHomeId()); @@ -558,6 +582,11 @@ gatewayBean.setHomeId(UserConfigManage.getInstance().getHomeId()); gatewayBean.setLocalEncrypt(true); gatewayBean.setMaster("true"); + gatewayBean.setSystemStatusDesc(cloudInverterDeviceBean.getSystemStatusDesc()); + gatewayBean.setHwVersion(cloudInverterDeviceBean.getHwVersion()); + gatewayBean.setCategorySecondName(cloudInverterDeviceBean.getCategorySecondName()); + gatewayBean.setDeviceId(cloudInverterDeviceBean.getDeviceId()); + //娣诲姞缃戝叧 HDLLinkLocalGateway.getInstance().getGatewayList().add(gatewayBean); } -- Gitblit v1.8.0