| | |
| | | */ |
| | | private Disposable requestPost(String api, String body, CloudCallBeak<String> callBack) { |
| | | String requestUrl = HDLCloudUserApi.getRequestUrl(api); |
| | | HdlLogLogic.print("http->发送->" + requestUrl + "\r\n" + body, isAddToMemory); |
| | | HdlLogLogic.print("http---发送---" + requestUrl + "\r\n" + body, isAddToMemory); |
| | | //开发环境需要加(用来区分onpro和光伏app代码):HxHttp.builder().headers("x-lbs-version", "hdl-yt") |
| | | return HxHttp.builder().url(requestUrl).raw(body).build().post().subscribeWith(new HDLResponse<String>() { |
| | | @Override |
| | | public void onResponse(String str) { |
| | | if (callBack != null) { |
| | | callBack.onSuccess(str); |
| | | // System.out.println("http->回复->" + requestUrl + "\r\n" + gson.fromJson(str, JsonObject.class).toString()); |
| | | HdlLogLogic.print("http->回复->" + requestUrl + "\r\n" + str, isAddToMemory); |
| | | // System.out.println("http---回复---" + requestUrl + "\r\n" + gson.fromJson(str, JsonObject.class).toString()); |
| | | HdlLogLogic.print("http---回复---" + requestUrl + "\r\n" + str, isAddToMemory); |
| | | } |
| | | } |
| | | |
| | |
| | | HDLExceptionSubmitUtils.submit(requestUrl, body, e); |
| | | if (callBack != null) { |
| | | callBack.onFailure(e); |
| | | HdlLogLogic.print("http->回复->" + requestUrl + "\r\n" + "\"{code=\"" + e.getCode() + "," + "\"message=\"" + e.getMsg() + "}", isAddToMemory); |
| | | HdlLogLogic.print("http---回复---" + requestUrl + "\r\n" + "\"{code=\"" + e.getCode() + "," + "\"message=\"" + e.getMsg() + "}", isAddToMemory); |
| | | } |
| | | } |
| | | }); |
| | |
| | | |
| | | |
| | | String requestUrl = HDLCloudUserApi.getRequestUrl(api); |
| | | HdlLogLogic.print("http->发送->" + requestUrl + "\r\n" + body, isAddToMemory); |
| | | HdlLogLogic.print("http---发送---" + requestUrl + "\r\n" + body, isAddToMemory); |
| | | return HxHttp.builder().url(requestUrl).file(body).build().post().subscribeWith(new HDLResponse<String>() { |
| | | @Override |
| | | public void onResponse(String str) { |
| | | if (callBack != null) { |
| | | callBack.onSuccess(str); |
| | | // System.out.println("http->回复->" + requestUrl + "\r\n" + gson.fromJson(str, JsonObject.class).toString()); |
| | | HdlLogLogic.print("http->回复->" + requestUrl + "\r\n" + str, isAddToMemory); |
| | | // System.out.println("http---回复---" + requestUrl + "\r\n" + gson.fromJson(str, JsonObject.class).toString()); |
| | | HdlLogLogic.print("http---回复---" + requestUrl + "\r\n" + str, isAddToMemory); |
| | | } |
| | | } |
| | | |
| | |
| | | HDLExceptionSubmitUtils.submit(requestUrl, body, e); |
| | | if (callBack != null) { |
| | | callBack.onFailure(e); |
| | | HdlLogLogic.print("http->回复->" + requestUrl + "\r\n" + "\"{code=\"" + e.getCode() + "," + "\"message=\"" + e.getMsg() + "}", isAddToMemory); |
| | | HdlLogLogic.print("http---回复---" + requestUrl + "\r\n" + "\"{code=\"" + e.getCode() + "," + "\"message=\"" + e.getMsg() + "}", isAddToMemory); |
| | | } |
| | | } |
| | | }); |
| | |
| | | @Override |
| | | public void run() { |
| | | try { |
| | | HdlLogLogic.print("http->发送->" + fullUrl + "\r\n" + json, isAddToMemory); |
| | | HdlLogLogic.print("http---发送---" + fullUrl + "\r\n" + json, isAddToMemory); |
| | | OkHttpClient okHttpClient = new OkHttpClient(); |
| | | RequestBody requestBody = FormBody.create(MediaType.parse("application/json; charset=utf-8"), getJson(json)); |
| | | final Request request = new Request.Builder().url(fullUrl)//请求的url |
| | |
| | | if (response.isSuccessful()) { |
| | | String s = Objects.requireNonNull(response.body()).string(); |
| | | HttpResponsePack httpResponsePack = new Gson().fromJson(s, HttpResponsePack.class); |
| | | HdlLogLogic.print("http->回复->" + response.request().url() + "\r\n" + s, isAddToMemory); |
| | | HdlLogLogic.print("http---回复---" + response.request().url() + "\r\n" + s, isAddToMemory); |
| | | baseSuccessCallBeak.onSuccess(httpResponsePack); |
| | | |
| | | } else { |
| | |
| | | call.enqueue(new Callback() {//异步 |
| | | @Override |
| | | public void onFailure(@NonNull Call call, @NonNull IOException e) { |
| | | HdlLogLogic.print("http->回复->" + "\r\n" + e.getMessage(), isAddToMemory); |
| | | HdlLogLogic.print("http---回复---" + "\r\n" + e.getMessage(), isAddToMemory); |
| | | } |
| | | |
| | | @Override |
| | |
| | | String s = Objects.requireNonNull(response.body()).string(); |
| | | HttpResponsePack httpResponsePack = new Gson().fromJson(s, HttpResponsePack.class); |
| | | baseSuccessCallBeak.onSuccess(httpResponsePack); |
| | | HdlLogLogic.print("http->回复->" + "\r\n" + s, isAddToMemory); |
| | | HdlLogLogic.print("http---回复---" + "\r\n" + s, isAddToMemory); |
| | | } else { |
| | | baseSuccessCallBeak.onFailure(new HDLException(response.code(), response.message())); |
| | | } |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | baseSuccessCallBeak.onFailure(new HDLException(-100, e.getMessage())); |
| | | HdlLogLogic.print("http->回复->" + "\r\n" + e.getMessage(), isAddToMemory); |
| | | HdlLogLogic.print("http---回复---" + "\r\n" + e.getMessage(), isAddToMemory); |
| | | } |
| | | |
| | | } |
| | |
| | | //响应客户端 |
| | | Response response = newFixedLengthResponse(newByte); |
| | | response.addHeader("Content-Range", range + "/" + sourceDataByte.length);//伟南需要这个字段 |
| | | HdlLogLogic.print("http回复数据===请求大小-->" + range + "=====文件大小-->" + sourceDataByte.length, true); |
| | | HdlLogLogic.print("http回复数据===请求大小--" + range + "=====文件大小--" + sourceDataByte.length, true); |
| | | return response; |
| | | } |
| | | } |
| | |
| | | // } |
| | | // |
| | | // } |
| | | HdlLogLogic.print("初始化Http服务器失败--->" + e.getMessage(), true); |
| | | HdlLogLogic.print("初始化Http服务器失败---" + e.getMessage(), true); |
| | | startService(new Intent(this, MyNanoHttpService.class)); |
| | | } |
| | | } |
| | |
| | | */ |
| | | public void onMessage(Context context, CustomMessage customMessage) { |
| | | |
| | | HdlLogLogic.print("极光--->自定义消息回调--->" + new Gson().toJson(customMessage), false); |
| | | HdlLogLogic.print("极光---自定义消息回调---" + new Gson().toJson(customMessage), false); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param registrationId 注册 id |
| | | */ |
| | | public void onRegister(Context context, String registrationId) { |
| | | HdlLogLogic.print("极光--->注册成功回调Id:" + registrationId, false); |
| | | HdlLogLogic.print("极光---注册成功回调Id:" + registrationId, false); |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param isConnected 长连接状态 |
| | | */ |
| | | public void onConnected(Context context, boolean isConnected) { |
| | | HdlLogLogic.print("极光--->长连接状态回调:" + isConnected, false); |
| | | HdlLogLogic.print("极光---长连接状态回调:" + isConnected, false); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | String mes = e.getMessage(); |
| | | HdlLogLogic.print("--->" + mes); |
| | | HdlLogLogic.print("---" + mes); |
| | | } |
| | | } |
| | | |
| | |
| | | @Override |
| | | public void onSuccess(List<OidBean> oidBeanList) { |
| | | if (oidBeanList == null) { |
| | | HdlLogLogic.print("上传oid列表到云端成功--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "--->数据是null", true); |
| | | HdlLogLogic.print("上传oid列表到云端成功---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "---数据是null", true); |
| | | return; |
| | | } |
| | | //增量添加oid |
| | | updateOidAdd(homeId, oidBeanList, new CloudCallBeak<Boolean>() { |
| | | @Override |
| | | public void onSuccess(Boolean obj) { |
| | | HdlLogLogic.print("上传oid列表到云端成功(增量)--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "--->\r\n数据--->" + new Gson().toJson(oidBeanList), true); |
| | | HdlLogLogic.print("上传oid列表到云端成功(增量)---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "---\r\n数据---" + new Gson().toJson(oidBeanList), true); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | HdlLogLogic.print("上传oid列表到云端失败(增量)--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | HdlLogLogic.print("上传oid列表到云端失败(增量)---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | } |
| | | }); |
| | | |
| | |
| | | // updateOidAdd(homeId, oidList, new CloudCallBeak<Boolean>() { |
| | | // @Override |
| | | // public void onSuccess(Boolean obj) { |
| | | // HdlLogLogic.print("上传oid列表到云端成功--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac(), true); |
| | | // HdlLogLogic.print("上传oid列表到云端成功---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac(), true); |
| | | // } |
| | | // |
| | | // @Override |
| | | // public void onFailure(HDLException e) { |
| | | // HdlLogLogic.print("上传oid列表到云端失败--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | // HdlLogLogic.print("上传oid列表到云端失败---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | // } |
| | | // }); |
| | | |
| | |
| | | fullUpdateOid(homeId, newOidList, new CloudCallBeak<Boolean>() { |
| | | @Override |
| | | public void onSuccess(Boolean obj) { |
| | | HdlLogLogic.print("上传oid列表到云端成功(全量)--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "--->\r\n数据--->" + new Gson().toJson(newOidList), true); |
| | | HdlLogLogic.print("上传oid列表到云端成功(全量)---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "---\r\n数据---" + new Gson().toJson(newOidList), true); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | HdlLogLogic.print("上传oid列表到云端失败(全量)--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | HdlLogLogic.print("上传oid列表到云端失败(全量)---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | } |
| | | }); |
| | | } |
| | |
| | | atomicInteger.set(atomicInteger.get() + 1); |
| | | if (atomicInteger.get() == list.size()) { |
| | | if (newOidList.size() == 0) { |
| | | HdlLogLogic.print("获取逆变器oid列表失败--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | HdlLogLogic.print("获取逆变器oid列表失败---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | return; |
| | | } |
| | | //增量添加oid |
| | | updateOidAdd(homeId, newOidList, new CloudCallBeak<Boolean>() { |
| | | @Override |
| | | public void onSuccess(Boolean obj) { |
| | | HdlLogLogic.print("上传oid列表到云端成功(增量)--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "--->\r\n数据--->" + new Gson().toJson(newOidList), true); |
| | | HdlLogLogic.print("上传oid列表到云端成功(增量)---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "---\r\n数据---" + new Gson().toJson(newOidList), true); |
| | | } |
| | | |
| | | @Override |
| | | public void onFailure(HDLException e) { |
| | | HdlLogLogic.print("上传oid列表到云端失败(增量)--->住宅id:" + homeId + "--->mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | HdlLogLogic.print("上传oid列表到云端失败(增量)---住宅id:" + homeId + "---mac:" + gatewayBean.getDevice_mac() + "-->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | } |
| | | }); |
| | | } |
| | |
| | | */ |
| | | public void fullUpdateOid(String homeId, List<OidBean> oidList, CloudCallBeak<Boolean> cloudCallBeak) { |
| | | if (oidList == null || oidList.size() == 0) { |
| | | HdlLogLogic.print("oid列表为空,无法全量更新oid到云端--->", true); |
| | | HdlLogLogic.print("oid列表为空,无法全量更新oid到云端---", true); |
| | | return; |
| | | } |
| | | String requestUrl = HttpApi.POST_Device_Oid; |
| | |
| | | */ |
| | | public void updateOidAdd(String homeId, List<OidBean> oidList, CloudCallBeak<Boolean> cloudCallBeak) { |
| | | if (oidList == null || oidList.size() == 0) { |
| | | HdlLogLogic.print("oid列表为空,无法增量添加oid到云端--->", true); |
| | | HdlLogLogic.print("oid列表为空,无法增量添加oid到云端---", true); |
| | | return; |
| | | } |
| | | String requestUrl = HttpApi.POST_Device_IncrAdd; |
| | |
| | | if (cloudCallBeak != null) { |
| | | cloudCallBeak.onSuccess(true); |
| | | } |
| | | HdlLogLogic.print("增量添加oid到云端成功--->"); |
| | | HdlLogLogic.print("增量添加oid到云端成功---"); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (cloudCallBeak != null) { |
| | | cloudCallBeak.onFailure(e); |
| | | } |
| | | HdlLogLogic.print("增量添加oid到云端失败--->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | HdlLogLogic.print("增量添加oid到云端失败---" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | } |
| | | }); |
| | | |
| | |
| | | if (linkCallBack != null) { |
| | | linkCallBack.onError(e); |
| | | } |
| | | HdlLogLogic.print("初始化逆变器失败-->mac:" + mac + "--->" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | HdlLogLogic.print("初始化逆变器失败-->mac:" + mac + "---" + e.getMsg() + "(" + e.getCode() + ")", true); |
| | | } |
| | | }); |
| | | |
| | |
| | | cloudCallBeak.onSuccess(getCurrentHomeGatewayList(homeId)); |
| | | } |
| | | } |
| | | HdlLogLogic.print("获取设备远程通讯信息失败--->msg--->" + e.getMsg() + "(" + e.getCode() + ")"); |
| | | HdlLogLogic.print("获取设备远程通讯信息失败---msg---" + e.getMsg() + "(" + e.getCode() + ")"); |
| | | } |
| | | }); |
| | | } |
| | |
| | | File file = new File(fullPath); |
| | | if (!file.isDirectory()) { |
| | | boolean succeed = file.mkdirs(); |
| | | System.out.println("创建文件夹路径--->" + file.getAbsolutePath() + "===创建文件夹结果--->" + succeed); |
| | | System.out.println("创建文件夹路径---" + file.getAbsolutePath() + "===创建文件夹结果---" + succeed); |
| | | return succeed; |
| | | } |
| | | return true; |
| | |
| | | } |
| | | // 删除文件夹本身 |
| | | boolean succeed = fileRoot.delete();//文件夹空这个方法才有效 |
| | | System.out.println("删除文件夹路径--->" + fileRoot.getAbsolutePath() + "===删除结果--->" + succeed); |
| | | System.out.println("删除文件夹路径---" + fileRoot.getAbsolutePath() + "===删除结果---" + succeed); |
| | | } catch (Exception e) { |
| | | System.out.println("删除文件夹有异常===" + e.getMessage()); |
| | | } |
| | |
| | | File file = new File(fullPath); |
| | | if (!file.exists()) { |
| | | boolean succeed = file.createNewFile(); |
| | | System.out.println("创建文件路径--->" + file.getAbsolutePath() + "===创建文件结果--->" + succeed); |
| | | System.out.println("创建文件路径---" + file.getAbsolutePath() + "===创建文件结果---" + succeed); |
| | | return succeed; |
| | | } |
| | | return true; |
| | |
| | | File file = new File(fullPath); |
| | | if (file.exists()) { |
| | | boolean succeed = file.delete(); |
| | | System.out.println("删除文件--->" + fullPath + "===结果--->" + succeed); |
| | | System.out.println("删除文件---" + fullPath + "===结果---" + succeed); |
| | | return succeed; |
| | | } |
| | | return true; |
| | |
| | | d.write(data); |
| | | d.flush(); |
| | | d.close(); |
| | | System.out.println("写入文件成功--->" + fullPath); |
| | | System.out.println("写入文件成功---" + fullPath); |
| | | } catch (Exception e) { |
| | | System.out.println("写入文件有异常--->" + e.getMessage()); |
| | | System.out.println("写入文件有异常---" + e.getMessage()); |
| | | } |
| | | |
| | | } |
| | |
| | | //文件大于1m,删除文件前100条日志 |
| | | this.delFileLien(fullPath, 100); |
| | | } |
| | | // System.out.println("写入一行数据到文件成功--->" + dataLine); |
| | | // System.out.println("写入一行数据到文件成功---" + dataLine); |
| | | } catch (Exception e) { |
| | | System.out.println("写入一行数据到文件有异常--->" + e.getMessage()); |
| | | System.out.println("写入一行数据到文件有异常---" + e.getMessage()); |
| | | } |
| | | |
| | | } |
| | |
| | | FileInputStream fis = new FileInputStream(f); |
| | | byte[] bytes = FileUtils.readFileToByteArray(f);//这个方法不兼用android 6.0 |
| | | fis.close(); |
| | | System.out.println("读取文件成功--->" + filePath); |
| | | System.out.println("读取文件成功---" + filePath); |
| | | return bytes; |
| | | } catch (Exception e1) { |
| | | System.out.println("读取文件有异常--->" + e1.getMessage()); |
| | | System.out.println("读取文件有异常---" + e1.getMessage()); |
| | | return null; |
| | | } |
| | | |
| | |
| | | int len = bis.read(bytes); |
| | | bis.close(); |
| | | fis.close(); |
| | | System.out.println("读取文件成功--->" + filePath); |
| | | System.out.println("读取文件成功---" + filePath); |
| | | return bytes; |
| | | } catch (Exception e1) { |
| | | System.out.println("读取文件有异常--->" + e1.getMessage()); |
| | | System.out.println("读取文件有异常---" + e1.getMessage()); |
| | | return null; |
| | | } |
| | | |
| | |
| | | fileLength = f.length(); |
| | | return new FileInputStream(f); |
| | | } catch (Exception e1) { |
| | | System.out.println("读取文件有异常--->" + e1.getMessage()); |
| | | System.out.println("读取文件有异常---" + e1.getMessage()); |
| | | return null; |
| | | } |
| | | |
| | |
| | | */ |
| | | public boolean isBoolean(String path) { |
| | | if (path.contains("//") || path.contains("\\")) { |
| | | System.out.println("无效文件路径--->" + path); |
| | | System.out.println("无效文件路径---" + path); |
| | | return false; |
| | | } |
| | | return true; |
| | |
| | | messageBean.setTitle(jPushMessageInfoBean.getContent()); |
| | | messageBean.setDeviceDesc(jPushMessageInfoBean.getContent()); |
| | | HdlMessageLogic.getInstance().setListMessage(messageBean, 0); |
| | | HdlLogLogic.print("极光推送--->添加在推送数据到缓存列表中--->" + new Gson().toJson(jPushMessageInfoBean)); |
| | | HdlLogLogic.print("极光推送---添加在推送数据到缓存列表中---" + new Gson().toJson(jPushMessageInfoBean)); |
| | | } catch (Exception ignored) { |
| | | } |
| | | } |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | String mes = e.getMessage(); |
| | | HdlLogLogic.print("--->" + mes); |
| | | HdlLogLogic.print("---" + mes); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | String mes = e.getMessage(); |
| | | HdlLogLogic.print("--->" + mes); |
| | | HdlLogLogic.print("---" + mes); |
| | | } |
| | | } |
| | | |
| | |
| | | int progress = (int) (100 * sum * 1.0f / total); |
| | | if (sum != total) { |
| | | //不等于100都要报,等于100处理整块逻辑完之后再报100; |
| | | this.eventBusPost(fileFullPath, driver, progress, "正常上报进度值--->" + progress); |
| | | this.eventBusPost(fileFullPath, driver, progress, "正常上报进度值---" + progress); |
| | | } |
| | | } |
| | | fos.flush(); |
| | |
| | | setTextViewStyle(holder.stateTv, houseIdBean.getPowerStationStatus()); |
| | | GlideUtils.getRoundedCornersImage(mContext, houseIdBean.getPowerStationImage(), holder.homeIconIv, new RoundedCorners(6), false); |
| | | |
| | | HdlLogLogic.print("--->电站名称:" + houseIdBean.getHomeName() + "--->图片url:" + houseIdBean.getPowerStationImage(), false); |
| | | HdlLogLogic.print("---电站名称:" + houseIdBean.getHomeName() + "---图片url:" + houseIdBean.getPowerStationImage(), false); |
| | | holder.item_parent_rl.setOnClickListener(new View.OnClickListener() { |
| | | @Override |
| | | public void onClick(View v) { |
| | |
| | | if (visibleItemCount > 0 && visibleItemCount + firstVisibleItemPosition == totalItemCount) { |
| | | if (!isHouseLoadingMore) { |
| | | // 滑动到了底部,执行相应的操作 |
| | | HdlLogLogic.print("--->滑动到了底部"); |
| | | HdlLogLogic.print("---滑动到了底部"); |
| | | loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, ++currentHouseListPage, false); |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public void onClick(int position, HouseIdBean houseIdBean) { |
| | | //点击住宅详情 |
| | | HdlLogLogic.print("点击住宅详情--->" + new Gson().toJson(houseIdBean), false); |
| | | HdlLogLogic.print("点击住宅详情---" + new Gson().toJson(houseIdBean), false); |
| | | HdlResidenceLogic.getInstance().switchHouse(houseIdBean); |
| | | String path = HDLUniMP.UNI_EVENT_OPEN_HOME_DETAILS + "?homeId=" + houseIdBean.getHomeId() + "&homeName=" + houseIdBean.getHomeName() + "&powerStationStatus=" + houseIdBean.getPowerStationStatus(); |
| | | HdlUniLogic.getInstance().openUniMP(path, null); |
| | |
| | | if (visibleItemCount > 0 && visibleItemCount + firstVisibleItemPosition == totalItemCount) { |
| | | if (!isDeviceLoadingMore) { |
| | | // 滑动到了底部,执行相应的操作 |
| | | HdlLogLogic.print("--->滑动到了底部"); |
| | | HdlLogLogic.print("---滑动到了底部"); |
| | | loadNextPageDeviceList(false, ++currentDeviceListPage, false); |
| | | } |
| | | } |
| | |
| | | if (visibleItemCount > 0 && visibleItemCount + firstVisibleItemPosition == totalItemCount) { |
| | | if (!isHouseLoadingMore) { |
| | | // 滑动到了底部,执行相应的操作 |
| | | HdlLogLogic.print("--->滑动到了底部"); |
| | | HdlLogLogic.print("---滑动到了底部"); |
| | | loadNextPageHouseList(false, ++currentHouseListPage, false); |
| | | } |
| | | } |
| | |
| | | } |
| | | } catch (Exception e) { |
| | | String mes = e.getMessage(); |
| | | HdlLogLogic.print("--->" + mes); |
| | | HdlLogLogic.print("---" + mes); |
| | | } |
| | | } |
| | | |