| | |
| | | if (TextUtils.isEmpty(json)) { |
| | | return; |
| | | } |
| | | //英文文件路径 |
| | | String fullPath = HdlFileLogic.getInstance().getHdlESLocalJsonEnFilePath(deviceModel, fileName); |
| | | if (UserConfigManage.getInstance().isZh()) { |
| | | //中文文件路径 |
| | | fullPath = HdlFileLogic.getInstance().getHdlESLocalJsonZhFilePath(deviceModel, fileName); |
| | | } |
| | | //文件路径 |
| | | String fullPath = HdlFileLogic.getInstance().getHdlESLocalLanguageJsonFilePath(UserConfigManage.getInstance().getCurrentAppLanguage(), deviceModel, fileName); |
| | | if (isDelPath) { |
| | | HdlFileLogic.getInstance().deleteFile(fullPath); |
| | | } |
| | |
| | | if (TextUtils.isEmpty(fileName)) { |
| | | return ""; |
| | | } |
| | | //英文文件路径 |
| | | String fullPath = HdlFileLogic.getInstance().getHdlESLocalJsonEnFilePath(deviceModel, fileName); |
| | | if (UserConfigManage.getInstance().isZh()) { |
| | | //中文文件路径 |
| | | fullPath = HdlFileLogic.getInstance().getHdlESLocalJsonZhFilePath(deviceModel, fileName); |
| | | } |
| | | //文件路径 |
| | | String fullPath = HdlFileLogic.getInstance().getHdlESLocalLanguageJsonFilePath(UserConfigManage.getInstance().getCurrentAppLanguage(), deviceModel, fileName); |
| | | return HdlFileLogic.getInstance().readFile(fullPath); |
| | | } catch (Exception ignored) { |
| | | return ""; |
| | |
| | | return address + "/" + UserConfigManage.getInstance().getCurrentAppLanguage() + "/" + deviceType + "/" + deviceModel + "/" + fileName + this.getVersion(joinFileName) + ".json"; |
| | | } |
| | | //region ---------改一动五(注意:如果是增加设备型号【要到HdlFileLogic.createHdlESLocalJsonDirectory()方法里面创建文件夹】)----------- |
| | | |
| | | |
| | | /** |
| | | * 文件对应版本号 |
| | |
| | | } |
| | | |
| | | /** |
| | | * 获取设备型号列表 |
| | | * |
| | | * @return 设备型号列表 |
| | | */ |
| | | public List<String> getModelList() { |
| | | ArrayList<String> list = new ArrayList<>(); |
| | | list.add(DeviceModel.INV);//并网-逆变器 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.LC);//负载中心 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.INV_BMS);//BMS |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.INV_BATTERY);//电池包 |
| | | //离线-逆变器 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV);//离线-逆变器 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BMS);//离网-逆变器-虚拟BMS |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BATTERY);//离网-逆变器-电池包 |
| | | //离线-3.6kw逆变器 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV_3);//离线-逆变器3.6kw |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BMS_3);//离网-逆变器-虚拟BMS |
| | | //电池包转换器 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.INV_KE_GLE_B5K_BATTERY);//电池包转换器 |
| | | //离线-7.6kw逆变器 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV_7);//离线-逆变器7.6kw |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BMS_7);//离网-逆变器-BMS |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.INV_KE_GLE_B15K_BATTERY);//离网-逆变器-电池包15k |
| | | return list; |
| | | |
| | | } |
| | | |
| | | /** |
| | | * Json数据配置文件名 |
| | | */ |
| | | public @interface FileName { |