| | |
| | | import com.facebook.imagepipeline.cache.BitmapMemoryCacheTrimStrategy; |
| | | import com.hdl.linkpm.sdk.core.exception.HDLException; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | | import com.hdl.photovoltaic.enums.Languages; |
| | | import com.hdl.photovoltaic.internet.HttpClient; |
| | | import com.hdl.photovoltaic.listener.CloudCallBeak; |
| | | |
| | |
| | | * @param isDelPath 是否删除(true表示删除,否则不删除) |
| | | */ |
| | | public void getHdlESLocalJson(String fileName, String deviceType, String deviceModel, boolean isDelPath, CloudCallBeak<String> callBeak) { |
| | | // 2025年12月08日09:29:31 产品经理说:因脚本还没有适配阿拉伯语言,先默认英文 |
| | | String language = UserConfigManage.getInstance().getCurrentAppLanguage(); |
| | | // if (!UserConfigManage.getInstance().getCurrentAppLanguage().equals(Languages.zh)) { |
| | | // language = Languages.en; |
| | | // } |
| | | //拼接地址 |
| | | String url = getStrJointNewUrl(fileName, deviceType, deviceModel); |
| | | String url = getStrJointNewUrl(fileName, deviceType, deviceModel, language); |
| | | HttpClient.getInstance().requestJsonHttpGet(url, new CloudCallBeak<String>() { |
| | | @Override |
| | | public void onSuccess(String json) { |
| | |
| | | * @param fileName json文件名称 |
| | | * @param deviceType 设备类型(inv,lc,bms,battery) |
| | | * @param deviceModel 设备型号 |
| | | * @param language 语言 (例如:Languages.zh) |
| | | * @return 新地址 |
| | | */ |
| | | private String getStrJointNewUrl(String fileName, String deviceType, String deviceModel) { |
| | | private String getStrJointNewUrl(String fileName, String deviceType, String deviceModel, String language) { |
| | | String joinFileName = fileName + concatenation_symbol + deviceType + concatenation_symbol + deviceModel; |
| | | if (joinFileName.equals(FileName.hdl_inv_ecu_info_pv + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.INV) |
| | | || joinFileName.equals(FileName.hdl_inv_ecu_info_output + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.INV) |
| | |
| | | || joinFileName.equals(FileName.hdl_inv_ecu_info_signal + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.OFF_INV_8) |
| | | || joinFileName.equals(FileName.hdl_inv_ecu_info_input_off + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.OFF_INV_8) |
| | | ) { |
| | | return address + "/" + UserConfigManage.getInstance().getCurrentAppLanguage() + "/" + deviceType + "/" + deviceModel + "/info/" + fileName + this.getVersion(joinFileName) + ".json"; |
| | | return address + "/" + language + "/" + deviceType + "/" + deviceModel + "/info/" + fileName + this.getVersion(joinFileName) + ".json"; |
| | | } |
| | | return address + "/" + UserConfigManage.getInstance().getCurrentAppLanguage() + "/" + deviceType + "/" + deviceModel + "/" + fileName + this.getVersion(joinFileName) + ".json"; |
| | | return address + "/" + language + "/" + deviceType + "/" + deviceModel + "/" + fileName + this.getVersion(joinFileName) + ".json"; |
| | | } |
| | | //region ---------改一动五(注意:如果是增加设备型号【要到HdlFileLogic.createHdlESLocalJsonDirectory()方法里面创建文件夹】)----------- |
| | | |
| | |
| | | map.put(FileName.hdl_inv_ecu_info_signal_off + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.OFF_INV_8, Version.v_2_0_0);//离网逆变器详情统计 |
| | | //bms |
| | | map.put(FileName.hdl_bms_ecu_off + concatenation_symbol + DeviceType.BMS + concatenation_symbol + DeviceModel.OFF_INV_BMS_8, Version.v_2_0_0);//离网逆变器BMS详情 |
| | | |
| | | //BMS设备 |
| | | map.put(FileName.bms_modbus_hdl_bms_ecu_v + concatenation_symbol + DeviceType.BMS + concatenation_symbol + DeviceModel.ME_GLE_BW5K, Version.v_2_1_0);// 参数详情页面(BMS设备) |
| | | map.put(FileName.bms_modbus_hdl_bms_ecu_config_v + concatenation_symbol + DeviceType.BMS + concatenation_symbol + DeviceModel.ME_GLE_BW5K, Version.v_2_1_0);//参数设置页面(BMS设备) |
| | | map.put(FileName.bms_modbus_hdl_bms_ecu_realtime_v + concatenation_symbol + DeviceType.BMS + concatenation_symbol + DeviceModel.ME_GLE_BW5K, Version.v_2_1_0);//实时页面(BMS设备) |
| | | map.put(FileName.bms_modbus_hdl_bms_ecu_signal_v + concatenation_symbol + DeviceType.BMS + concatenation_symbol + DeviceModel.ME_GLE_BW5K, Version.v_2_1_0);//统计点页面(BMS设备) |
| | | return map; |
| | | } |
| | | |
| | |
| | | // 离线-8kw逆变器 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV_8);//离线-逆变器8kw |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BMS_8);//离网-逆变器-BMS |
| | | |
| | | // BMS设备 |
| | | list.add(HdlESLocalJsonLogic.DeviceModel.ME_GLE_BW5K); |
| | | |
| | | return list; |
| | | |
| | |
| | | */ |
| | | String hdl_battery_ecu_cell_off = "modbus_hdl_battery_ecu_cell_v"; |
| | | |
| | | /** |
| | | * 参数详情页面(BMS设备) |
| | | */ |
| | | String bms_modbus_hdl_bms_ecu_v = "modbus_hdl_bms_ecu_v"; |
| | | /** |
| | | * 参数设置页面(BMS设备) |
| | | */ |
| | | String bms_modbus_hdl_bms_ecu_config_v = "modbus_hdl_bms_ecu_config_v"; |
| | | /** |
| | | * 实时页面(BMS设备) |
| | | */ |
| | | String bms_modbus_hdl_bms_ecu_realtime_v = "modbus_hdl_bms_ecu_realtime_v"; |
| | | /** |
| | | * 统计点页面(BMS设备) |
| | | */ |
| | | String bms_modbus_hdl_bms_ecu_signal_v = "modbus_hdl_bms_ecu_signal_v"; |
| | | |
| | | /** |
| | | * 获取逆变器所有json中文 |
| | |
| | | * 获取逆变器所有json英文 |
| | | */ |
| | | String hdl_inv_ecu_all_en = "/en/all_v"; |
| | | |
| | | String all_v = "all_v"; |
| | | |
| | | } |
| | | |
| | |
| | | String v_1_5_7 = "1.5.7"; |
| | | String v_1_5_8 = "1.5.8"; |
| | | String v_2_0_0 = "2.0.0"; |
| | | String v_2_1_0 = "2.1.0"; |
| | | |
| | | } |
| | | |
| | |
| | | */ |
| | | String OFF_INV_BMS_8 = "ME-GLE-S8K-BMS"; |
| | | |
| | | /** |
| | | * 【BMS】设备型号 |
| | | */ |
| | | String ME_GLE_BW5K = "ME-GLE-BW5K"; |
| | | |
| | | |
| | | } |
| | | |