From cdcd08459665a89844a14c1d376995ebc501e018 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期三, 22 五月 2024 16:23:49 +0800 Subject: [PATCH] 2024年05月22日16:23:47 --- app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java | 30 +----------------------------- 1 files changed, 1 insertions(+), 29 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 59c99f1..5d4748c 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java @@ -74,38 +74,9 @@ return sHdlDeviceLogic; } - public static final String kWp = "kWp"; - public static final String kWh = "kW.h"; - - public static final String kW = "kW"; - public static final String noValue = "0.00"; private List<DeviceBean> mListDevice = new ArrayList<>(); - public static String getConvertDoubleUnit(String value) { - if (TextUtils.isEmpty(value)) { - return noValue + kWh; - } - BigDecimal formattedValue = getBigDecimal(value); - return formattedValue + kWh; - - } - - public static String getConvertDoubleUnit(int value) { - if (value == 0) { - return noValue + kWh; - } - BigDecimal formattedValue = getBigDecimal(value + ""); - return formattedValue + kWh; - } - - private static BigDecimal getBigDecimal(String value) { - if (TextUtils.isEmpty(value)) { - return new BigDecimal(0); - } - double doubleValue = Double.parseDouble(value); - return BigDecimal.valueOf(doubleValue).setScale(2, RoundingMode.HALF_UP); - } public void clearDeviceList() { if (mListDevice == null) { @@ -1420,6 +1391,7 @@ gatewayBean.setSystemStatusDesc(cloudInverterDeviceBean.getSystemStatusDesc());//璁惧鐘舵�� gatewayBean.setHwVersion(cloudInverterDeviceBean.getHwVersion());//杞欢鐗堟湰鍙� gatewayBean.setCategorySecondName(cloudInverterDeviceBean.getCategorySecondName());//璁惧绫诲瀷(浜у搧浜岀骇鍒嗙被鍚嶇О + gatewayBean.setDeviceType(cloudInverterDeviceBean.getDeviceType());//璁惧绫诲瀷(INV:閫嗗彉鍣�;BMS:BMS鎺у埗鐩�;BATTERY:鐢垫睜鍗曞厓) gatewayBean.setAddresses(cloudInverterDeviceBean.getAddresses());//瀛愮綉鍙�/璁惧鍙�,閫嗗彉鍣ㄥ湴鍧� gatewayBean.setPowerPvNow(cloudInverterDeviceBean.getPowerPvNow());//鍙戠數鍔熺巼 gatewayBean.setTotalElectricityPvToday(cloudInverterDeviceBean.getTotalElectricityPvToday());//浠婃棩鍙戠數閲� -- Gitblit v1.8.0