From 14de918a79943e4961b09fa01ed320c6cad41f2e Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期三, 28 六月 2023 17:14:51 +0800
Subject: [PATCH] Revert "Revert "Merge branch 'hxb' into wjc""
---
app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java | 34 +++++++++++++++++++++++++++++++++-
1 files changed, 33 insertions(+), 1 deletions(-)
diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java
index e55dac1..fcdf6ec 100644
--- a/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java
+++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java
@@ -406,6 +406,37 @@
}
+ /**
+ * 鑾峰彇浣忓畢鍥剧墖
+ */
+ public void getResidenceImage(String imageUrl, CloudCallBeak<List<HouseIdBean>> cloudCallBeak) {
+ String requestUrl = imageUrl;
+ JsonObject json = new JsonObject();
+ List<HouseIdBean> list = new ArrayList<>();
+ HttpClient.getInstance().requestHttp(requestUrl, json.toString(), true, true, new BaseSuccessFailureCallBeak() {
+ @Override
+ public void onSuccess(HttpResponsePack httpResponsePack) {
+ if (httpResponsePack != null && httpResponsePack.getData() != null) {
+ Gson gson = new Gson();
+ String jsonStr = gson.toJson(httpResponsePack.getData());
+ HouseBeanClass houseInfoBeanClass = gson.fromJson(jsonStr, HouseBeanClass.class);
+ } else {
+ if (cloudCallBeak != null) {
+ cloudCallBeak.onSuccess(list);
+ }
+ }
+ }
+
+ @Override
+ public void onFailure(Exception exception) {
+ if (cloudCallBeak != null) {
+ cloudCallBeak.onFailure(exception);
+ }
+ }
+ });
+
+
+ }
/**
* 娣诲姞銆愪綇瀹呰鎯呫�戝埌鏈湴缂撳瓨
@@ -475,9 +506,10 @@
*/
public Boolean switchHouse(String homeId) {
String oidHomeId = UserConfigManage.getInstance().getHomeId();
-
+ HdlFileLogic.getInstance().deleteDirectory(HdlFileLogic.getInstance().getCurrentHomeRootPath());
UserConfigManage.getInstance().setHomeId(homeId);
HdlFileLogic.getInstance().createDirectory();
+
HdlThreadLogic.runThread(new Runnable() {
@Override
public void run() {
--
Gitblit v1.8.0