mac
2024-11-06 5d46ab965bb9bb827e9585400ef006bbc3a7814b
去掉Android14等待2s,增加云端脚本缓存在本地
1个文件已添加
13个文件已修改
652 ■■■■ 已修改文件
app/src/main/java/com/hdl/photovoltaic/HDLApp.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/config/ConstantManage.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/internet/HttpClient.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java 241 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java 32 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-en/strings.xml 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values-zh/strings.xml 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/values/strings.xml 75 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/HDLApp.java
@@ -24,6 +24,7 @@
import com.hdl.photovoltaic.enums.LowerTagType;
import com.hdl.photovoltaic.enums.NetworkType;
import com.hdl.photovoltaic.other.HdlDeviceLogic;
import com.hdl.photovoltaic.other.HdlFileLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlMessageLogic;
import com.hdl.photovoltaic.other.HdlResidenceLogic;
@@ -168,8 +169,8 @@
        //2.设置打印
        HDLLinkPMSdk.setLogEnabled(isLogEnabled);
        if (TextUtils.isEmpty(UserConfigManage.getInstance().getCurrentAppLanguage())) {
            //默认配置接口请求语言是中文
            UserConfigManage.getInstance().setCurrentAppLanguage(LocalManageUtil.zh);
            //默认配置接口请求语言是英文
            UserConfigManage.getInstance().setCurrentAppLanguage(LocalManageUtil.en);
        }
        //3.配置接口请求语言
        HDLLinkPMSdk.setLanguage(UserConfigManage.getInstance().getCurrentAppLanguage());
@@ -317,27 +318,20 @@
    private void initAutoSize() {
        AutoSize.initCompatMultiProcess(this);
        boolean isBaseOnWidth = getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT;
        AutoSizeConfig.getInstance()
                .setBaseOnWidth(true)
                .setCustomFragment(true)
                .setDesignWidthInDp(375)
                .setDesignHeightInDp(812)
                .setUseDeviceSize(false)
                .setOnAdaptListener(new onAdaptListener() {
                    @Override
                    public void onAdaptBefore(Object target, Activity activity) {
        AutoSizeConfig.getInstance().setBaseOnWidth(true).setCustomFragment(true).setDesignWidthInDp(375).setDesignHeightInDp(812).setUseDeviceSize(false).setOnAdaptListener(new onAdaptListener() {
            @Override
            public void onAdaptBefore(Object target, Activity activity) {
                        AutoSizeConfig.getInstance().setScreenWidth(ScreenUtils.getScreenSize(activity)[0]);
                        AutoSizeConfig.getInstance().setScreenHeight(ScreenUtils.getScreenSize(activity)[1] +
                                ScreenUtils.getHeightOfNavigationBar(activity) + ScreenUtils.getStatusBarHeight());
                AutoSizeConfig.getInstance().setScreenWidth(ScreenUtils.getScreenSize(activity)[0]);
                AutoSizeConfig.getInstance().setScreenHeight(ScreenUtils.getScreenSize(activity)[1] + ScreenUtils.getHeightOfNavigationBar(activity) + ScreenUtils.getStatusBarHeight());
                    }
            }
                    @Override
                    public void onAdaptAfter(Object target, Activity activity) {
            @Override
            public void onAdaptAfter(Object target, Activity activity) {
                    }
                });
            }
        });
    }
    /**
app/src/main/java/com/hdl/photovoltaic/config/ConstantManage.java
@@ -2,6 +2,7 @@
public class ConstantManage {
    /******住宅数据存储的常量*********/
    public static final String SAVE_HOME_ACCOUNT = "account";
    public static final String SAVE_HOME_PASSWORD = "password";
app/src/main/java/com/hdl/photovoltaic/internet/HttpClient.java
@@ -20,7 +20,10 @@
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.listener.BaseSuccessFailureCallBeak;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlESLocalJsonLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlThreadLogic;
import com.hdl.photovoltaic.utils.LocalManageUtil;
import com.hdl.photovoltaic.utils.Md5Utils;
import java.io.File;
@@ -62,6 +65,57 @@
    }
    /**
     * 获取json资源用的
     *
     * @param url      地址
     * @param callBack 回调
     */
    public void requestJsonHttpGet(String url, CloudCallBeak<String> callBack) {
        if (TextUtils.isEmpty(url)) {
            if (callBack != null) {
                callBack.onSuccess("");
            }
        }
        HdlThreadLogic.runSubThread(new Runnable() {
            @Override
            public void run() {
                OkHttpClient client = new OkHttpClient();
                Request request = new Request.Builder()
                        .url(url)
                        .addHeader("Accept-Language", UserConfigManage.getInstance().getCurrentAppLanguage())
                        .build();
                try (Response response = client.newCall(request).execute()) {
                    if (response.isSuccessful()) {
                        if (response.body() == null) {
                            if (callBack != null) {
                                callBack.onSuccess("");
                            }
                        } else {
                            String str = response.body().string();
                            if (callBack != null) {
                                callBack.onSuccess(str);
                            }
                        }
                    } else {
                        if (callBack != null) {
                            callBack.onSuccess("");
                        }
                    }
                } catch (Exception e) {
                    if (callBack != null) {
                        callBack.onFailure(new HDLException(-20002, e.getMessage()));
                    }
                }
            }
        });
    }
    /**
     * 请求服务器(get)
     * 底层方法,引用库的方法
     *
app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java
New file
@@ -0,0 +1,241 @@
package com.hdl.photovoltaic.other;
import android.text.TextUtils;
import com.hdl.linkpm.sdk.core.exception.HDLException;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.internet.HttpClient;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import java.util.HashMap;
import java.util.Map;
/**
 * 本地json缓存逻辑
 */
public class HdlESLocalJsonLogic {
    private static volatile HdlESLocalJsonLogic sHdlESLocalJsonLogic;
    /**
     * 获取当前对象
     *
     * @return HdlAccountLogic
     */
    public static synchronized HdlESLocalJsonLogic getInstance() {
        if (sHdlESLocalJsonLogic == null) {
            synchronized (HdlESLocalJsonLogic.class) {
                if (sHdlESLocalJsonLogic == null) {
                    sHdlESLocalJsonLogic = new HdlESLocalJsonLogic();
                }
            }
        }
        return sHdlESLocalJsonLogic;
    }
    /**
     * 【逆变器】设备型号
     */
    public static final String deviceModel_ME_GSE_S5K = "ME-GSE-S5K";
    /**
     * 【负载控制中心】设备型号
     */
    public static final String deviceModel_ME_GSE_SPG63A = "ME-GSE-SPG63A";
    /**
     * 【BMS】设备型号
     */
    public static final String deviceModel_ME_GSE_BMS15K = "ME-GSE-BMS15K";
    /**
     * 【电池包】设备型号
     */
    public static final String deviceModel_ME_GSE_B5K = "ME-GSE-B5K";
    /**
     * 创建电站-逆变器参数配置
     */
    public static final String hdl_inv_ecu_quick = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/modbus_hdl_inv_ecu_quick_v1.4.2.json";
    /**
     * 创建电站-负载控制中心参数配置
     */
    public static final String hdl_lc_ecu_quick = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/lc/deviceModel/modbus_hdl_lc_ecu_quick_v1.5.0.json";
    /**
     * 逆变器参数配置
     */
    public static final String hdl_inv_ecu = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/modbus_hdl_inv_ecu_v1.4.2.json";
    /**
     * 逆变器详情-pv
     */
    public static final String hdl_inv_ecu_info_pv = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/info/modbus_hdl_inv_ecu_info_pv_v1.4.2.json";
    /**
     * 逆变器详情-输出
     */
    public static final String hdl_inv_ecu_info_output = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/info/modbus_hdl_inv_ecu_info_output_v1.4.2.json";
    /**
     * 逆变器详情-item项
     */
    public static final String hdl_inv_ecu_info_item = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/info/modbus_hdl_inv_ecu_info_item_v1.4.2.json";
    /**
     * 获取负载控制中心
     */
    public static final String hdl_lc_ecu_info_item = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/lc/deviceModel/modbus_hdl_lc_ecu_info_item_v1.5.0.json";
    /**
     * 获取BMS信息
     */
    public static final String hdl_bms_ecu = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/bms/deviceModel/modbus_hdl_bms_ecu_v1.4.2.json";
    /**
     * 电池包信息
     */
    public static final String hdl_battery_ecu = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/battery/deviceModel/modbus_hdl_battery_ecu_v1.4.2.json";
    /**
     * 电池包-电芯信息
     */
    public static final String hdl_battery_ecu_cell = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/battery/deviceModel/modbus_hdl_battery_ecu_cell_v1.4.2.json";
    /**
     * 逆变器详情-信号点
     */
    public static final String hdl_inv_ecu_info_signal = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/currentLanguage/inv/deviceModel/info/modbus_hdl_inv_ecu_info_signal_v1.4.1.json";
    /**
     * 初始化脚本url
     *
     * @return map
     */
    private Map<String, String> getUrlMap() {
        //注意(逆变器:ME-GSE-S5K,负载中心:ME-GSE-SPG63A,bms:ME-GSE-BMS15K,电池包:ME-GSE-B5K)设备型号不一样
        Map<String, String> map = new HashMap<>();
        map.put(this.getNewUrl(hdl_lc_ecu_info_item, deviceModel_ME_GSE_SPG63A), deviceModel_ME_GSE_SPG63A);//获取负载控制中心
        map.put(this.getNewUrl(hdl_lc_ecu_quick, deviceModel_ME_GSE_SPG63A), deviceModel_ME_GSE_SPG63A); //创建电站-负载控制中心参数配置
        map.put(this.getNewUrl(hdl_inv_ecu_quick, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//创建电站-逆变器参数配置
        map.put(this.getNewUrl(hdl_inv_ecu, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//逆变器参数配置
        map.put(this.getNewUrl(hdl_inv_ecu_info_pv, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);// 逆变器详情-pv
        map.put(this.getNewUrl(hdl_inv_ecu_info_output, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//逆变器详情-输出
        map.put(this.getNewUrl(hdl_inv_ecu_info_item, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//逆变器详情-item项
        map.put(this.getNewUrl(hdl_inv_ecu_info_signal, deviceModel_ME_GSE_S5K), deviceModel_ME_GSE_S5K);//逆变器详情-信号点
        map.put(this.getNewUrl(hdl_bms_ecu, deviceModel_ME_GSE_BMS15K), deviceModel_ME_GSE_BMS15K);//获取BMS信息
        map.put(this.getNewUrl(hdl_battery_ecu, deviceModel_ME_GSE_B5K), deviceModel_ME_GSE_B5K);//电池包信息
        map.put(this.getNewUrl(hdl_battery_ecu_cell, deviceModel_ME_GSE_B5K), deviceModel_ME_GSE_B5K);//电池包-电芯信息
        return map;
    }
    /**
     * 向云端获取Json【所有】脚本
     */
    public void getAllHdlESLocalJson() {
        for (Map.Entry<String, String> entry : getUrlMap().entrySet()) {
            this.getHdlESLocalJson(entry.getKey(), entry.getValue(), null);
        }
    }
    /**
     * 向云端获取Json【单个】脚本
     *
     * @param url         地址
     * @param deviceModel 设备型号
     */
    public void getHdlESLocalJson(String url, String deviceModel, CloudCallBeak<String> callBeak) {
        HttpClient.getInstance().requestJsonHttpGet(url, new CloudCallBeak<String>() {
            @Override
            public void onSuccess(String str) {
                saveJson(url, deviceModel, str);
                HdlLogLogic.print("获取云端脚本---" + url + "\r\n" + str, false);
                if (callBeak != null) {
                    callBeak.onSuccess(str);
                }
            }
            @Override
            public void onFailure(HDLException e) {
                HdlLogLogic.print(e.getMessage(), e.getCode(), false);
                if (callBeak != null) {
                    callBeak.onFailure(e);
                }
            }
        });
    }
    /**
     * 读取本地json数据
     *
     * @param url         地址
     * @param deviceModel 设备型号
     */
    public String readHdlESLocalJson(String url, String deviceModel) {
        return this.readJson(url, deviceModel);
    }
    /**
     * 处理url返回新的url
     *
     * @param url         地址
     * @param deviceModel 设备类型
     * @return 返回地址
     */
    private String getNewUrl(String url, String deviceModel) {
        return url.replace("currentLanguage", UserConfigManage.getInstance().getCurrentAppLanguage()).replace("deviceModel", deviceModel);
    }
    /**
     * 保存json数据
     *
     * @param fileUrlOrFileName 地址或者文件名
     * @param deviceModel       设备型号(逆变器,负载中心,bms,电池包)
     * @param json              内容
     */
    private void saveJson(String fileUrlOrFileName, String deviceModel, String json) {
        try {
            if (TextUtils.isEmpty(json)) {
                return;
            }
            String fileName = fileUrlOrFileName;
            if (fileUrlOrFileName.contains("/")) {
                //表示链接,截取最后一个索引表示文件名
                fileName = fileUrlOrFileName.split("/")[fileUrlOrFileName.split("/").length - 1];
            }
            if (TextUtils.isEmpty(fileName)) {
                return;
            }
            //英文文件路径
            String fullPath = HdlFileLogic.getInstance().getHdlESLocalJsonEnFilePath(deviceModel, fileName);
            if (UserConfigManage.getInstance().isZh()) {
                //中文文件路径
                fullPath = HdlFileLogic.getInstance().getHdlESLocalJsonZhFilePath(deviceModel, fileName);
            }
            HdlFileLogic.getInstance().writeFile(fullPath, json);
        } catch (Exception ignored) {
        }
    }
    /**
     * 读取json数据
     *
     * @param fileUrlOrFileName 地址或者文件名
     * @param deviceModel       设备型号(逆变器,负载中心,bms,电池包)
     */
    private String readJson(String fileUrlOrFileName, String deviceModel) {
        try {
            String fileName = fileUrlOrFileName;
            if (fileUrlOrFileName.contains("/")) {
                //表示链接,截取最后一个索引表示文件名
                fileName = fileUrlOrFileName.split("/")[fileUrlOrFileName.split("/").length - 1];
            }
            if (TextUtils.isEmpty(fileName)) {
                return "";
            }
            //英文文件路径
            String fullPath = HdlFileLogic.getInstance().getHdlESLocalJsonEnFilePath(deviceModel, fileName);
            if (UserConfigManage.getInstance().isZh()) {
                //中文文件路径
                fullPath = HdlFileLogic.getInstance().getHdlESLocalJsonZhFilePath(deviceModel, fileName);
            }
            return HdlFileLogic.getInstance().readFile(fullPath);
        } catch (Exception ignored) {
            return "";
        }
    }
}
app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java
@@ -8,7 +8,9 @@
import android.text.TextUtils;
import com.hdl.photovoltaic.HDLApp;
import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.utils.LocalManageUtil;
import org.apache.commons.io.FileUtils;
@@ -99,6 +101,19 @@
        return getAPPInternalStoreFilesPath() + "/upgrade/firmware";
    }
    /**
     * 获取中文【json资源文件夹】全路径
     */
    public String getHdlESLocalJsonZhRootPath(String deviceModel) {
        return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.zh + "/" + deviceModel;
    }
    /**
     * 获取英文【json资源文件夹】全路径
     */
    public String getHdlESLocalJsonEnRootPath(String deviceModel) {
        return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.en + "/" + deviceModel;
    }
    /**
@@ -108,12 +123,34 @@
        return getCurrentHomeRootPath() + "/log.txt";
    }
    /**
     * 获取【用户文件】全路径
     */
    public String getUserFilePath() {
        return getAPPInternalStoreFilesPath() + "/userConfigManage.txt";
    }
    /**
     * 获取中文【json资源文件】全路径
     */
    public String getHdlESLocalJsonZhFilePath(String deviceModel, String fileName) {
        if (!fileName.endsWith(".json")) {
            fileName += ".json";
        }
        return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.zh + "/" + deviceModel + "/" + fileName;
    }
    /**
     * 获取英文【json资源文件】全路径
     */
    public String getHdlESLocalJsonEnFilePath(String deviceModel, String fileName) {
        if (!fileName.endsWith(".json")) {
            fileName += ".json";
        }
        return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.en + "/" + deviceModel + "/" + fileName;
    }
    /**
     * 获取驱动升级文件全路径
@@ -157,6 +194,23 @@
    }
    /**
     * 预创建json资源文件夹
     */
    public void createHdlESLocalJsonDirectory() {
        //中文文件夹
        this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_S5K));//逆变器
        this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_SPG63A));//负载中心
        this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_BMS15K));//BMS
        this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_B5K));//电池包
        //英文文件夹
        this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_S5K));
        this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_SPG63A));
        this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_BMS15K));
        this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.deviceModel_ME_GSE_B5K));
    }
    /**
     * 创建文件夹
     *
     * @param fullPath fullPath 全路径
app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java
@@ -700,10 +700,41 @@
                    }
                    break;
                    //link进行密码验证
                    case HDLUniMP.UNI_EVENT_REPLY_OTHER_Password_verifiy: {
                    case HDLUniMP.UNI_EVENT_REPLY_OTHER_PASSWORD_VERIFIY: {
                        uniCheckPasswordVerification(mode_type, data, callback);
                    }
                    break;
                    //本地json资源文件获取
                    case HDLUniMP.UNI_EVENT_REPLY_OTHER_GET_LOCAL_JSON: {
                        String url = getKeyValue("url", getKeyValue("data", data));
                        String deviceModel = getKeyValue("deviceModel", getKeyValue("data", data));
                        String language = getKeyValue("language", getKeyValue("data", data));
                        String json = HdlESLocalJsonLogic.getInstance().readHdlESLocalJson(url, deviceModel);
                        if (TextUtils.isEmpty(json)) {
                            //本地没有缓存
                            HdlESLocalJsonLogic.getInstance().getHdlESLocalJson(url, deviceModel, new CloudCallBeak<String>() {
                                @Override
                                public void onSuccess(String obj) {
                                    if (callback != null) {
                                        uniSuccessCallback(type, obj, callback);
                                    }
                                }
                                @Override
                                public void onFailure(HDLException e) {
                                    if (callback != null) {
                                        uniExceptionCallback(type, e, callback);
                                    }
                                }
                            });
                        } else {
                            //本地缓存数据
                            if (callback != null) {
                                uniSuccessCallback(type, json, callback);
                            }
                        }
                    }
                    break;
                }
            }
app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
@@ -36,6 +36,8 @@
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlDeviceLogic;
import com.hdl.photovoltaic.other.HdlESLocalJsonLogic;
import com.hdl.photovoltaic.other.HdlFileLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlMessageLogic;
import com.hdl.photovoltaic.other.HdlMqttLogic;
@@ -120,6 +122,11 @@
        this.requestPermissions();
        //读取消息未读数量
        this.getUnreadCount();
        //预创建脚本json文件夹
        HdlFileLogic.getInstance().createHdlESLocalJsonDirectory();
        //获取云端脚本
        HdlESLocalJsonLogic.getInstance().getAllHdlESLocalJson();
    }
app/src/main/java/com/hdl/photovoltaic/ui/CPowerStationActivity.java
@@ -5,7 +5,6 @@
import android.os.Process;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Log;
import com.google.gson.Gson;
@@ -20,11 +19,11 @@
import com.hdl.photovoltaic.config.ConstantManage;
import com.hdl.photovoltaic.config.UserConfigManage;
import com.hdl.photovoltaic.databinding.ActivityCpowerStationBinding;
import com.hdl.photovoltaic.enums.LowerTagType;
import com.hdl.photovoltaic.enums.NetworkType;
import com.hdl.photovoltaic.listener.CloudCallBeak;
import com.hdl.photovoltaic.other.HdlCommonLogic;
import com.hdl.photovoltaic.other.HdlDeviceLogic;
import com.hdl.photovoltaic.other.HdlESLocalJsonLogic;
import com.hdl.photovoltaic.other.HdlFileLogic;
import com.hdl.photovoltaic.other.HdlLogLogic;
import com.hdl.photovoltaic.other.HdlMqttLogic;
import com.hdl.photovoltaic.other.HdlOtaLogic;
@@ -46,14 +45,10 @@
import com.hdl.sdk.link.core.config.HDLLinkConfig;
import com.hdl.sdk.link.core.utils.mqtt.MqttRecvClient;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
import org.greenrobot.eventbus.ThreadMode;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import cn.jpush.android.api.JPushInterface;
@@ -87,6 +82,10 @@
        this.initMqttClient();
        //上传极光注册ID到云端
        this.pushTokens();
        //预创建脚本json文件夹
        HdlFileLogic.getInstance().createHdlESLocalJsonDirectory();
        //获取云端脚本
        HdlESLocalJsonLogic.getInstance().getAllHdlESLocalJson();
    }
    @Override
@@ -105,12 +104,13 @@
                runOnUiThread(new Runnable() {
                    @Override
                    public void run() {
                        //低于安卓14版本
                        if (android.os.Build.VERSION.SDK_INT < 34) {
                            startAppAutomaticallyOpenUni(false);
                        } else {
                            startAppAutomaticallyOpenUni(true);
                        }
                        startAppAutomaticallyOpenUni(false);
//                        //低于安卓14版本
//                        if (android.os.Build.VERSION.SDK_INT < 34) {
//                            startAppAutomaticallyOpenUni(false);
//                        } else {
//                            startAppAutomaticallyOpenUni(false);
//                        }
                    }
                });
            }
@@ -229,9 +229,9 @@
     */
    private void startAppAutomaticallyOpenUni(boolean delay) {
        if (delay) {
            SystemClock.sleep(2000);
        }
//        if (delay) {
//            SystemClock.sleep(2000);
//        }
        if (TextUtils.isEmpty(HDLLinkPMUser.getInstance().getAccessToken())) {
            //其实刷新token失败已通知退出登录,数据已经清空,因为等2s uni加载慢导致请求链接的时候出现token为空
            return;
app/src/main/java/com/hdl/photovoltaic/ui/StartActivity.java
@@ -35,7 +35,6 @@
//        setNotificationBarBackgroundColor(CustomColor.white);
        getWindow().setStatusBarColor(getColor(R.color.text_FFFFFFFF));
        setStatusBarTextColor();
        //初始化服务器域名(用户注册所在服务器域名地址)
        AppConfigManage.setUserRegionUrl(HDLLinkPMUser.getInstance().getUserRegionUrl());
        //判断AccessToken是否null
@@ -73,7 +72,6 @@
                    openActivity(intent);
                }
            });
        } else {
            Intent intent = new Intent();
            intent.setClass(this, LoginActivity.class);
app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMP.java
@@ -42,7 +42,6 @@
    public final static String UNI_EVENT_REPLY_DEVICE_MODEL = "uni_device_model";//设备模块(大类)
    public final static String UNI_EVENT_REPLY_DEVICE_LIST = "list";//本地逆变器设备列表
    public final static String UNI_EVENT_REPLY_DEVICE_NET_LIST = "net_list";//网络逆变器设备列表
    public final static String UNI_EVENT_REPLY_DEVICE_CLOUD_LIST = "cloud_list";//获取云端逆变器设备列表
    public final static String UNI_EVENT_REPLY_DEVICE_CHILD_LIST = "child_list";//逆变器【下挂】设备列表
    public final static String UNI_EVENT_REPLY_DEVICE_ADD = "add";//设备添加
    public final static String UNI_EVENT_REPLY_DEVICE_ADD_All = "add_all";//添加多个设备
@@ -95,7 +94,9 @@
    public final static String UNI_EVENT_REPLY_OTHER_LOGOUT = "uni_logout";//退出登录
    public final static String UNI_EVENT_REPLY_OTHER_LOCAL_ENCRYPT_GET = "get_local_encrypt";//本地密钥获取
    public final static String UNI_EVENT_REPLY_OTHER_LOCAL_ENCRYPT_SET = "set_local_encrypt";//本地密钥设置
    public final static String UNI_EVENT_REPLY_OTHER_Password_verifiy = "password_verifiy";//link进行密码验证
    public final static String UNI_EVENT_REPLY_OTHER_PASSWORD_VERIFIY = "password_verifiy";//link进行密码验证
    public final static String UNI_EVENT_REPLY_OTHER_GET_LOCAL_JSON= " get_local_json";//本地json资源文件获取
    /*********【我的】模块*********/
app/src/main/java/com/hdl/photovoltaic/uni/HDLUniMPSDKManager.java
@@ -280,13 +280,13 @@
                uniMPOpenConfiguration.splashClass = MySplashView.class;
                uniMP = DCUniMPSDK.getInstance().openUniMP(mContext, uniAppId, uniMPOpenConfiguration);
            }
            //android14有些设备有问题,需要等待
            if (android.os.Build.VERSION.SDK_INT >= 34) {
                if (TextUtils.isEmpty(mCurrentAppId)) {
                    //第一次用要休眠
                    SystemClock.sleep(1000);
                }
            }
//            //android14有些设备有问题,需要等待
//            if (android.os.Build.VERSION.SDK_INT >= 34) {
//                if (TextUtils.isEmpty(mCurrentAppId)) {
//                    //第一次用要休眠
//                    SystemClock.sleep(1000);
//                }
//            }
            mCurrentAppId = uniAppId;//记录当前小程序
            mUniMPCaches.put(uniMP.getAppid(), uniMP);
        } catch (Exception e) {
app/src/main/res/values-en/strings.xml
@@ -162,12 +162,12 @@
    <string name="app_stop_current_download">Stop current download?</string>
    <string name="app_version">Version</string>
    <string name="app_package_size">Size</string>
    <string name="app_update_content">In order to upgrade the HDL APP successfully, please click the Settings button to allow the installation of applications from unknown sources. This function is only available for APP upgrades. Android versions 11 and above need to be re-downloaded and installed after authorization.</string>
    <string name="app_update_content">In order to upgrade the HDL APP successfully, please click the Settings button to allow the installation of applications from unknown sources. This function is only available for APP upgrades. Android versions 11 and above need to be re-downloaded and installed after authorization</string>
    <string name="app_update_fail">Authorization failed, unable to install the application</string>
    <!--ota-->
    <string name="ota_binding_cloud_upgrade_fails">The inverter is not bound, upgrade failed</string>
    <string name="ota_not_cloud_upgrade_fails">The inverter is not connected to the cloud, upgrade failed.</string>
    <string name="ota_not_cloud_upgrade_fails">The inverter is not connected to the cloud, upgrade failed</string>
    <!--uin-->
@@ -179,11 +179,11 @@
    <string name="loading_agree">Agree to login</string>
    <string name="loading_on_agree">Disagree</string>
    <string name="loading_privacy">Privacy policy and terms of service</string>
    <string name="loading_privacy_server">To better protect your legitimate rights and interests, please read and agree to the following agreements 《Privacy Policy》 and 《Terms of Service》.</string>
    <string name="loading_privacy_server">To better protect your legitimate rights and interests, please read and agree to the following agreements 《Privacy Policy》 and 《Terms of Service》</string>
    <string name="kill_app">Press again to exit </string>
    <string name="loading_not_supported">Sorry, not supported yet</string>
    <string name="loading_title_tip">Prompt</string>
    <string name="loading_app_restart">Confirm to restart the App.</string>
    <string name="loading_app_restart">Confirm to restart the App</string>
    <string name="loading_log_out">Confirm logout?</string>
@@ -195,33 +195,33 @@
    <!--    图片上传       -->
    <string name="camera_album_file_get_fial">Failed to retrieve image</string>
    <string name="camera_album_system_fial">System failed to process image, please retry</string>
    <string name="apk_update_content">In order to upgrade the  APP successfully, please click the Settings button to allow the installation of applications from unknown sources. This function is only available for APP upgrades. Android versions 11 and above need to be re-downloaded and installed after authorization.</string>
    <string name="apk_update_content">In order to upgrade the  APP successfully, please click the Settings button to allow the installation of applications from unknown sources. This function is only available for APP upgrades. Android versions 11 and above need to be re-downloaded and installed after authorization</string>
    <string name="apk_update_sure">Settings</string>
    <string name="permission_open">Please go to Settings to enable permission</string>
    <string name="please_go_set_permissions">Please set permissions.</string>
    <string name="please_go_set_permissions">Please set permissions</string>
    <string name="residue"> Remaining time</string>
    <string name="minute">minutes</string>
    <string name="event"> Event</string>
    <string name="The_gateway_cannot_be_found_locally">Unable to find gateway under local network</string>
    <string name="welcome_to_the_smart_energy_app">Welcome to the Smart Energy APP</string>
    <string name="no_permissions_unable_to_receive_push">Unable to receive push notification If the permission is not enabled, you cannot receive push information.</string>
    <string name="no_permissions_unable_to_receive_push">Unable to receive push notification If the permission is not enabled, you cannot receive push information</string>
    <string name="go_to_settings">Go to Settings</string>
    <string name="system_positioning_switch">You need to turn on the system positioning switch. Otherwise, the system can obtain the position information.</string>
    <string name="system_positioning_switch">You need to turn on the system positioning switch. Otherwise, the system can obtain the position information</string>
    <!--异常-->
    <string name="exception_unable_to_pull_up_the_cloud_upgrade_file_data">Unable to pull up the cloud upgrade file data</string>
    <string name="exception_failed_to_obtain_the_md5_key_of_the_upgrade_file_on_the_cloud">Failed to obtain the md5 key of the upgrade file on the cloud</string>
    <string name="exception_the_user_cancels_downloading_the_upgrade_file">The user cancels downloading the upgrade file.</string>
    <string name="exception_failed_to_decrypt_the_upgrade_aes_file">Failed to decrypt the upgrade aes file.</string>
    <string name="exception_failed_to_generate_md5_for_the_upgrade_file">Failed to generate md5 for the upgrade file.</string>
    <string name="exception_description_failed_to_compare_the_md5_of_the_upgrade_file">Description Failed to compare the md5 of the upgrade file.</string>
    <string name="exception_the_upgrade_file_is_downloaded">The upgrade file is downloaded.</string>
    <string name="exception_no_location_information_permission">No location information permission.</string>
    <string name="exception_the_location_function_is_not_enabled">The location function is not enabled.</string>
    <string name="exception_unable_location_move10_meters_later">Unable to get the location, please move the phone 10 meters later, and then get again.</string>
    <string name="succeed">succeed.</string>
    <string name="exception_the_user_cancels_downloading_the_upgrade_file">The user cancels downloading the upgrade file</string>
    <string name="exception_failed_to_decrypt_the_upgrade_aes_file">Failed to decrypt the upgrade aes file</string>
    <string name="exception_failed_to_generate_md5_for_the_upgrade_file">Failed to generate md5 for the upgrade file</string>
    <string name="exception_description_failed_to_compare_the_md5_of_the_upgrade_file">Description Failed to compare the md5 of the upgrade file</string>
    <string name="exception_the_upgrade_file_is_downloaded">The upgrade file is downloaded</string>
    <string name="exception_no_location_information_permission">No location information permission</string>
    <string name="exception_the_location_function_is_not_enabled">The location function is not enabled</string>
    <string name="exception_unable_location_move10_meters_later">Unable to get the location, please move the phone 10 meters later, and then get again</string>
    <string name="succeed">succeed</string>
    <string name="delete_power_station">Do you want to delete %s power station?</string>
    <string name="power_station_selection">Power station selection</string>
@@ -327,7 +327,7 @@
    <string name="capture_no_network">The current network is not available. Please check the network and try again</string>
    <string name="capture_no_result2">No results were scanned, it may not be a valid QR code</string>
    <string name="scan_cancel">Cancel</string>
    <string name="not_delivery_qr_code">Not delivery of QR code.</string>
    <string name="not_delivery_qr_code">Not delivery of QR code</string>
    <string name="device_debugging">Device debugging</string>
    <string name="save_to_album">Save to album</string>
app/src/main/res/values-zh/strings.xml
@@ -143,8 +143,8 @@
    <string name="set_f">℉(华氏度)</string>
    <string name="set_change_bind_phone_number">修改手机号码</string>
    <string name="set_change_bind_mail">修改邮箱地址</string>
    <string name="set_bind_phone_succeed">绑定手机号成功.</string>
    <string name="set_bind_mail_succeed">绑定邮箱成功.</string>
    <string name="set_bind_phone_succeed">绑定手机号成功</string>
    <string name="set_bind_mail_succeed">绑定邮箱成功</string>
    <!--app更新-->
@@ -161,12 +161,12 @@
    <string name="app_stop_current_download">是否停止当前下载?</string>
    <string name="app_version">版本</string>
    <string name="app_package_size">大小</string>
    <string name="app_update_content">为了正常升级河东APP,请点击设置按钮,允许安装未知来源应用,本功能只限用于河东APP版本升级,Android 11版本及以上需要在授权之后重新下载安装。</string>
    <string name="app_update_content">为了正常升级河东APP,请点击设置按钮,允许安装未知来源应用,本功能只限用于河东APP版本升级,Android 11版本及以上需要在授权之后重新下载安装</string>
    <string name="app_update_fail">授权失败,无法安装应用</string>
    <!--ota-->
    <string name="ota_binding_cloud_upgrade_fails">逆变器没绑定过,升级失败.</string>
    <string name="ota_not_cloud_upgrade_fails">逆变器没连上云,升级失败.</string>
    <string name="ota_binding_cloud_upgrade_fails">逆变器没绑定过,升级失败</string>
    <string name="ota_not_cloud_upgrade_fails">逆变器没连上云,升级失败</string>
    <!--uin-->
@@ -180,9 +180,9 @@
    <string name="loading_privacy">隐私权政策及服务条款</string>
    <string name="loading_privacy_server">为了更好的保障您的合法权益,请您阅读并同意以下协议《隐私权政策》和《服务条款》</string>
    <string name="kill_app">再按一次退出应用</string>
    <string name="loading_not_supported">抱歉,暂不支持.</string>
    <string name="loading_not_supported">抱歉,暂不支持</string>
    <string name="loading_title_tip">提示</string>
    <string name="loading_app_restart">确认后App将会重新启动.</string>
    <string name="loading_app_restart">确认后App将会重新启动</string>
    <string name="loading_log_out">确认退出登录?</string>
@@ -204,23 +204,23 @@
    <string name="event">事件</string>
    <string name="The_gateway_cannot_be_found_locally">本地找不到网关</string>
    <string name="welcome_to_the_smart_energy_app">欢迎打开智慧能源APP</string>
    <string name="no_permissions_unable_to_receive_push">通知权限没开启,将无法收到推送信息.</string>
    <string name="no_permissions_unable_to_receive_push">通知权限没开启,将无法收到推送信息</string>
    <string name="go_to_settings">前往设置</string>
    <string name="system_positioning_switch">需要打开系统定位开关,否则取法获取位置信息.</string>
    <string name="system_positioning_switch">需要打开系统定位开关,否则取法获取位置信息</string>
    <!--异常-->
    <string name="exception_unable_to_pull_up_the_cloud_upgrade_file_data">拉不到云端升级文件数据</string>
    <string name="exception_failed_to_obtain_the_md5_key_of_the_upgrade_file_on_the_cloud">拿不到云端上升级文件md5秘钥</string>
    <string name="exception_the_user_cancels_downloading_the_upgrade_file">用户取消下载升级文件.</string>
    <string name="exception_failed_to_decrypt_the_upgrade_aes_file">升级文件aes解密失败.</string>
    <string name="exception_failed_to_generate_md5_for_the_upgrade_file">升级文件生成md5失败失败.</string>
    <string name="exception_description_failed_to_compare_the_md5_of_the_upgrade_file">升级文件md5比对失败.</string>
    <string name="exception_the_upgrade_file_is_downloaded">升级文件下载完成.</string>
    <string name="exception_no_location_information_permission">没有位置信息权限.</string>
    <string name="exception_the_location_function_is_not_enabled">没开启定位功能.</string>
    <string name="exception_unable_location_move10_meters_later">无法获取位置,请移动手机10米后,再重新获取.</string>
    <string name="succeed">成功.</string>
    <string name="exception_the_user_cancels_downloading_the_upgrade_file">用户取消下载升级文件</string>
    <string name="exception_failed_to_decrypt_the_upgrade_aes_file">升级文件aes解密失败</string>
    <string name="exception_failed_to_generate_md5_for_the_upgrade_file">升级文件生成md5失败失败</string>
    <string name="exception_description_failed_to_compare_the_md5_of_the_upgrade_file">升级文件md5比对失败</string>
    <string name="exception_the_upgrade_file_is_downloaded">升级文件下载完成</string>
    <string name="exception_no_location_information_permission">没有位置信息权限</string>
    <string name="exception_the_location_function_is_not_enabled">没开启定位功能</string>
    <string name="exception_unable_location_move10_meters_later">无法获取位置,请移动手机10米后,再重新获取</string>
    <string name="succeed">成功</string>
    <string name="delete_power_station">是否要删除%s电站?</string>
    <string name="power_station_selection">电站选择</string>
@@ -243,20 +243,20 @@
    <string name="power_station_editing">电站编辑</string>
    <string name="switch_power_station">是否要切换%s电站?</string>
    <string name="deleting_please_wait">删除中,请稍等…</string>
    <string name="already_the_first_one">已经是第一个了.</string>
    <string name="already_the_first_one">已经是第一个了</string>
    <string name="restarting_please_wait">重启中,请等待…</string>
    <string name="port_conflict">应用冲突,需要关闭onpro或者其它版本的调试软件然后再重新启动这个软件试试</string>
    <string name="cancel_download_successfully">取消下载成功.</string>
    <string name="writing_firmware_upgrade_memory_succeeded">写入新固件文件到内存成功.</string>
    <string name="download_firmware_upgrade_file_failed">下载固件升级文件失败.</string>
    <string name="found_locally_firmware_upgrade_file">本地找不到升级固件文件,请下载好固件文件,再重新升级.</string>
    <string name="notify_gateway_firmware_upgrade_failed">通知给网关升级固件文件地址失败,无法升级.</string>
    <string name="local_service_fails">本地服务有异常失败,无法升级.</string>
    <string name="writing_drive_memory_succeeded">写入新驱动文件到内存成功.</string>
    <string name="download_drive_file_failed">下载驱动升级文件失败.</string>
    <string name="found_locally_drive_file">本地找不到升级驱动文件,请下载好驱动文件,再重新升级.</string>
    <string name="notify_gateway_drive_failed">通知给网关升级驱动文件地址失败,无法升级.</string>
    <string name="writing_firmware_upgrade_memory_succeeded">写入新固件文件到内存成功</string>
    <string name="download_firmware_upgrade_file_failed">下载固件升级文件失败</string>
    <string name="found_locally_firmware_upgrade_file">本地找不到升级固件文件,请下载好固件文件,再重新升级</string>
    <string name="notify_gateway_firmware_upgrade_failed">通知给网关升级固件文件地址失败,无法升级</string>
    <string name="local_service_fails">本地服务有异常失败,无法升级</string>
    <string name="writing_drive_memory_succeeded">写入新驱动文件到内存成功</string>
    <string name="download_drive_file_failed">下载驱动升级文件失败</string>
    <string name="found_locally_drive_file">本地找不到升级驱动文件,请下载好驱动文件,再重新升级</string>
    <string name="notify_gateway_drive_failed">通知给网关升级驱动文件地址失败,无法升级</string>
    <string name="time_selectd">时间选择</string>
    <string name="life_cycle">生命期</string>
    <string name="year">年</string>
@@ -308,13 +308,13 @@
    <string name="device_off">设备已离线!</string>
    <string name="summarize">概览</string>
    <string name="qr_code_business_card">二维码名片</string>
    <string name="save_qr_code_successfully">保存二维码成功.</string>
    <string name="failed_to_save_qr_code">保存二维码失败.</string>
    <string name="save_qr_code_successfully">保存二维码成功</string>
    <string name="failed_to_save_qr_code">保存二维码失败</string>
    <string name="staff_management">员工管理</string>
    <string name="alarm">报警</string>
    <string name="add_power_station">添加电站</string>
    <string name="add_power_station_failing">添加电站失败.</string>
    <string name="add_power_station_succeed">添加电站成功.</string>
    <string name="add_power_station_failing">添加电站失败</string>
    <string name="add_power_station_succeed">添加电站成功</string>
    <!--扫码-->
    <string name="scan_title">电站二维码扫描</string>
@@ -324,7 +324,7 @@
    <string name="capture_no_network">当前网络不可用,请检查网络后再试</string>
    <string name="capture_no_result2">没有扫描出结果,可能不是有效的二维码</string>
    <string name="scan_cancel">取消</string>
    <string name="not_delivery_qr_code">不是交付二维码.</string>
    <string name="not_delivery_qr_code">不是交付二维码</string>
    <string name="device_debugging">设备调测</string>
    <string name="save_to_album">保存至相册</string>
app/src/main/res/values/strings.xml
@@ -1,4 +1,5 @@
<resources>
    <!--    <string name="app_name">PhotovoltaicDebug</string>-->
    <string name="app_name">新特锐能</string>
    <string name="title_activity_home_login">HomeLoginActivity</string>
    <!-- Strings used for fragments for navigation -->
@@ -9,7 +10,6 @@
    <string name="hello_first_fragment">Hello first fragment</string>
    <string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
    <!--登录模块-->
    <string name="home_login_chinese">简体中文</string>
@@ -104,7 +104,7 @@
    <string name="message_alarm_details_time">报警时间</string>
    <string name="message_alarm_details_back">返回</string>
    <string name="message_alarm_details_resolved">已解决</string>
    <string name="message_alarm_data_null">暂无消息</string>
    <string name="message_alarm_data_null">暂无消息!</string>
    <!--我的-->
@@ -143,8 +143,8 @@
    <string name="set_f">℉(华氏度)</string>
    <string name="set_change_bind_phone_number">修改手机号码</string>
    <string name="set_change_bind_mail">修改邮箱地址</string>
    <string name="set_bind_phone_succeed">绑定手机号成功.</string>
    <string name="set_bind_mail_succeed">绑定邮箱成功.</string>
    <string name="set_bind_phone_succeed">绑定手机号成功</string>
    <string name="set_bind_mail_succeed">绑定邮箱成功</string>
    <!--app更新-->
@@ -161,12 +161,12 @@
    <string name="app_stop_current_download">是否停止当前下载?</string>
    <string name="app_version">版本</string>
    <string name="app_package_size">大小</string>
    <string name="app_update_content">为了正常升级河东APP,请点击设置按钮,允许安装未知来源应用,本功能只限用于河东APP版本升级,Android 11版本及以上需要在授权之后重新下载安装。</string>
    <string name="app_update_content">为了正常升级河东APP,请点击设置按钮,允许安装未知来源应用,本功能只限用于河东APP版本升级,Android 11版本及以上需要在授权之后重新下载安装</string>
    <string name="app_update_fail">授权失败,无法安装应用</string>
    <!--ota-->
    <string name="ota_binding_cloud_upgrade_fails">逆变器没绑定过,升级失败.</string>
    <string name="ota_not_cloud_upgrade_fails">逆变器没连上云,升级失败.</string>
    <string name="ota_binding_cloud_upgrade_fails">逆变器没绑定过,升级失败</string>
    <string name="ota_not_cloud_upgrade_fails">逆变器没连上云,升级失败</string>
    <!--uin-->
@@ -180,9 +180,9 @@
    <string name="loading_privacy">隐私权政策及服务条款</string>
    <string name="loading_privacy_server">为了更好的保障您的合法权益,请您阅读并同意以下协议《隐私权政策》和《服务条款》</string>
    <string name="kill_app">再按一次退出应用</string>
    <string name="loading_not_supported">抱歉,暂不支持.</string>
    <string name="loading_not_supported">抱歉,暂不支持</string>
    <string name="loading_title_tip">提示</string>
    <string name="loading_app_restart">确认后App将会重新启动.</string>
    <string name="loading_app_restart">确认后App将会重新启动</string>
    <string name="loading_log_out">确认退出登录?</string>
@@ -204,23 +204,23 @@
    <string name="event">事件</string>
    <string name="The_gateway_cannot_be_found_locally">本地找不到网关</string>
    <string name="welcome_to_the_smart_energy_app">欢迎打开智慧能源APP</string>
    <string name="no_permissions_unable_to_receive_push">通知权限没开启,将无法收到推送信息.</string>
    <string name="no_permissions_unable_to_receive_push">通知权限没开启,将无法收到推送信息</string>
    <string name="go_to_settings">前往设置</string>
    <string name="system_positioning_switch">需要打开系统定位开关,否则取法获取位置信息.</string>
    <string name="system_positioning_switch">需要打开系统定位开关,否则取法获取位置信息</string>
    <!--异常-->
    <string name="exception_unable_to_pull_up_the_cloud_upgrade_file_data">拉不到云端升级文件数据</string>
    <string name="exception_failed_to_obtain_the_md5_key_of_the_upgrade_file_on_the_cloud">拿不到云端上升级文件md5秘钥</string>
    <string name="exception_the_user_cancels_downloading_the_upgrade_file">用户取消下载升级文件.</string>
    <string name="exception_failed_to_decrypt_the_upgrade_aes_file">升级文件aes解密失败.</string>
    <string name="exception_failed_to_generate_md5_for_the_upgrade_file">升级文件生成md5失败失败.</string>
    <string name="exception_description_failed_to_compare_the_md5_of_the_upgrade_file">升级文件md5比对失败.</string>
    <string name="exception_the_upgrade_file_is_downloaded">升级文件下载完成.</string>
    <string name="exception_no_location_information_permission">没有位置信息权限.</string>
    <string name="exception_the_location_function_is_not_enabled">没开启定位功能.</string>
    <string name="exception_unable_location_move10_meters_later">无法获取位置,请移动手机10米后,再重新获取.</string>
    <string name="succeed">成功.</string>
    <string name="exception_the_user_cancels_downloading_the_upgrade_file">用户取消下载升级文件</string>
    <string name="exception_failed_to_decrypt_the_upgrade_aes_file">升级文件aes解密失败</string>
    <string name="exception_failed_to_generate_md5_for_the_upgrade_file">升级文件生成md5失败失败</string>
    <string name="exception_description_failed_to_compare_the_md5_of_the_upgrade_file">升级文件md5比对失败</string>
    <string name="exception_the_upgrade_file_is_downloaded">升级文件下载完成</string>
    <string name="exception_no_location_information_permission">没有位置信息权限</string>
    <string name="exception_the_location_function_is_not_enabled">没开启定位功能</string>
    <string name="exception_unable_location_move10_meters_later">无法获取位置,请移动手机10米后,再重新获取</string>
    <string name="succeed">成功</string>
    <string name="delete_power_station">是否要删除%s电站?</string>
    <string name="power_station_selection">电站选择</string>
@@ -243,21 +243,20 @@
    <string name="power_station_editing">电站编辑</string>
    <string name="switch_power_station">是否要切换%s电站?</string>
    <string name="deleting_please_wait">删除中,请稍等…</string>
    <string name="already_the_first_one">已经是第一个了.</string>
    <string name="already_the_first_one">已经是第一个了</string>
    <string name="restarting_please_wait">重启中,请等待…</string>
    <string name="port_conflict">应用冲突,需要关闭onpro或者其它版本的调试软件然后再重新启动这个软件试试</string>
    <string name="cancel_download_successfully">取消下载成功.</string>
    <string name="writing_firmware_upgrade_memory_succeeded">写入新固件文件到内存成功.</string>
    <string name="download_firmware_upgrade_file_failed">下载固件升级文件失败.</string>
    <string name="found_locally_firmware_upgrade_file">本地找不到升级固件文件,请下载好固件文件,再重新升级.</string>
    <string name="notify_gateway_firmware_upgrade_failed">通知给网关升级固件文件地址失败,无法升级.</string>
    <string name="local_service_fails">本地服务有异常失败,无法升级.</string>
    <string name="writing_drive_memory_succeeded">写入新驱动文件到内存成功.</string>
    <string name="download_drive_file_failed">下载驱动升级文件失败.</string>
    <string name="found_locally_drive_file">本地找不到升级驱动文件,请下载好驱动文件,再重新升级.</string>
    <string name="notify_gateway_drive_failed">通知给网关升级驱动文件地址失败,无法升级.</string>
    <string name="writing_firmware_upgrade_memory_succeeded">写入新固件文件到内存成功</string>
    <string name="download_firmware_upgrade_file_failed">下载固件升级文件失败</string>
    <string name="found_locally_firmware_upgrade_file">本地找不到升级固件文件,请下载好固件文件,再重新升级</string>
    <string name="notify_gateway_firmware_upgrade_failed">通知给网关升级固件文件地址失败,无法升级</string>
    <string name="local_service_fails">本地服务有异常失败,无法升级</string>
    <string name="writing_drive_memory_succeeded">写入新驱动文件到内存成功</string>
    <string name="download_drive_file_failed">下载驱动升级文件失败</string>
    <string name="found_locally_drive_file">本地找不到升级驱动文件,请下载好驱动文件,再重新升级</string>
    <string name="notify_gateway_drive_failed">通知给网关升级驱动文件地址失败,无法升级</string>
    <string name="time_selectd">时间选择</string>
    <string name="life_cycle">生命期</string>
    <string name="year">年</string>
@@ -309,23 +308,23 @@
    <string name="device_off">设备已离线!</string>
    <string name="summarize">概览</string>
    <string name="qr_code_business_card">二维码名片</string>
    <string name="save_qr_code_successfully">保存二维码成功.</string>
    <string name="failed_to_save_qr_code">保存二维码失败.</string>
    <string name="save_qr_code_successfully">保存二维码成功</string>
    <string name="failed_to_save_qr_code">保存二维码失败</string>
    <string name="staff_management">员工管理</string>
    <string name="alarm">报警</string>
    <string name="add_power_station">添加电站</string>
    <string name="add_power_station_failing">添加电站失败.</string>
    <string name="add_power_station_succeed">添加电站成功.</string>
    <string name="add_power_station_failing">添加电站失败</string>
    <string name="add_power_station_succeed">添加电站成功</string>
    <!--扫码-->
    <string name="scan_title">二维码扫描</string>
    <string name="scan_title">电站二维码扫描</string>
    <string name="zxing_scan_tips">将二维码放入框内,即可自动扫描</string>
    <string name="capture_no_camera">没有访问相机的权限,请打开访问权限再试</string>
    <string name="capture_no_result">没有扫描出结果</string>
    <string name="capture_no_network">当前网络不可用,请检查网络后再试</string>
    <string name="capture_no_result2">没有扫描出结果,可能不是有效的二维码</string>
    <string name="scan_cancel">取消</string>
    <string name="not_delivery_qr_code">不是交付二维码.</string>
    <string name="not_delivery_qr_code">不是交付二维码</string>
    <string name="device_debugging">设备调测</string>
    <string name="save_to_album">保存至相册</string>