mac
2024-05-22 cdcd08459665a89844a14c1d376995ebc501e018
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.setDeviceType(cloudInverterDeviceBean.getDeviceType());//设备类型(INV:逆变器;BMS:BMS控制盒;BATTERY:电池单元)
        gatewayBean.setAddresses(cloudInverterDeviceBean.getAddresses());//子网号/设备号,逆变器地址
        gatewayBean.setPowerPvNow(cloudInverterDeviceBean.getPowerPvNow());//发电功率
        gatewayBean.setTotalElectricityPvToday(cloudInverterDeviceBean.getTotalElectricityPvToday());//今日发电量