From 3eb60f615d621a3acb72a17f14e011b0d1ef749e Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期二, 21 五月 2024 20:33:25 +0800 Subject: [PATCH] 2024年05月21日20:33:18 --- app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java | 40 ++++------------------------------------ 1 files changed, 4 insertions(+), 36 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 ab8ab79..ceb0a5f 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java @@ -44,6 +44,8 @@ import java.lang.reflect.Type; +import java.math.BigDecimal; +import java.math.RoundingMode; import java.util.ArrayList; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; @@ -72,11 +74,9 @@ return sHdlDeviceLogic; } - public static final String kWp = "kWp"; - public static final String kWh = "kW.h"; - public static final String kW = "kW"; private List<DeviceBean> mListDevice = new ArrayList<>(); + public void clearDeviceList() { if (mListDevice == null) { @@ -213,36 +213,6 @@ }); } - /** - * 鐢电珯鐘舵�佹瑙�(瀹夎鍟�) - */ - 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); - } - } - }); - } /** * 娣诲姞銆愯澶囧垪琛ㄣ�戝埌鏈湴缂撳瓨 @@ -1382,9 +1352,6 @@ } - - - /** * 鍒锋柊閫嗗彉鍣ㄧ紦瀛樹俊鎭�(鍖呮嫭璁剧疆mqtt绉橀挜锛� * 娉�: @@ -1424,6 +1391,7 @@ gatewayBean.setSystemStatusDesc(cloudInverterDeviceBean.getSystemStatusDesc());//璁惧鐘舵�� gatewayBean.setHwVersion(cloudInverterDeviceBean.getHwVersion());//杞欢鐗堟湰鍙� gatewayBean.setCategorySecondName(cloudInverterDeviceBean.getCategorySecondName());//璁惧绫诲瀷(浜у搧浜岀骇鍒嗙被鍚嶇О + gatewayBean.setGateway_type(cloudInverterDeviceBean.getDeviceType());//璁惧绫诲瀷(INV:閫嗗彉鍣�;BMS:BMS鎺у埗鐩�;BATTERY:鐢垫睜鍗曞厓) gatewayBean.setAddresses(cloudInverterDeviceBean.getAddresses());//瀛愮綉鍙�/璁惧鍙�,閫嗗彉鍣ㄥ湴鍧� gatewayBean.setPowerPvNow(cloudInverterDeviceBean.getPowerPvNow());//鍙戠數鍔熺巼 gatewayBean.setTotalElectricityPvToday(cloudInverterDeviceBean.getTotalElectricityPvToday());//浠婃棩鍙戠數閲� -- Gitblit v1.8.0