| | |
| | | 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; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 电站状态概览(安装商) |
| | | */ |
| | | 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 -设备列表 |