mac
2024-05-07 56c2f0faf5e9e33ec783a14c17ad46fbe8e7506c
app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java
@@ -26,6 +26,7 @@
import com.hdl.photovoltaic.ui.bean.HouseInfoBean;
import com.hdl.photovoltaic.ui.bean.MessageBean;
import com.hdl.photovoltaic.ui.bean.OidBean;
import com.hdl.photovoltaic.ui.bean.StatusOverviewBean;
import com.hdl.sdk.link.HDLLinkLocalSdk;
import com.hdl.sdk.link.common.config.TopicConstant;
import com.hdl.sdk.link.common.exception.HDLLinkCode;
@@ -213,6 +214,37 @@
    }
    /**
     * 电站状态概览(安装商)
     */
    public void getStatusOverview(CloudCallBeak<StatusOverviewBean> cloudCallBeak) {
        String requestUrl = HttpApi.POST_statusOverview;
        JsonObject json = new JsonObject();
//        json.addProperty("zoneType", zoneType);//区域
        HttpClient.getInstance().requestHttp(requestUrl, json.toString(), new CloudCallBeak<String>() {
            @Override
            public void onSuccess(String jsonStr) {
                if (TextUtils.isEmpty(jsonStr)) {
                    if (cloudCallBeak != null) {
                        cloudCallBeak.onSuccess(new StatusOverviewBean());
                    }
                }
                Gson gson = new Gson();
                StatusOverviewBean statusOverviewBean = gson.fromJson(jsonStr, StatusOverviewBean.class);
                if (cloudCallBeak != null) {
                    cloudCallBeak.onSuccess(statusOverviewBean);
                }
            }
            @Override
            public void onFailure(HDLException e) {
                if (cloudCallBeak != null) {
                    cloudCallBeak.onFailure(e);
                }
            }
        });
    }
    /**
     * 添加【设备列表】到本地缓存
     *
     * @param list -设备列表