From d32a308c6f6286669ac5941d1616bfdc9829361e Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期一, 24 二月 2025 17:22:43 +0800 Subject: [PATCH] 2025年02月24日17:22:38 --- app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java | 77 ++++-- app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java | 311 +++++++++++++++++++-------- app/src/main/res/values/strings.xml | 6 app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java | 8 app/src/main/res/layout/item_plant_details.xml | 2 sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java | 6 app/src/main/res/layout/dialog_default_filtering.xml | 44 +++ app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java | 31 ++ app/src/main/res/layout/fragment_house_list.xml | 2 app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java | 11 + app/src/main/res/values-zh/strings.xml | 6 app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java | 46 ++-- app/src/main/java/com/hdl/photovoltaic/enums/SortType.java | 5 app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java | 9 app/src/main/res/values-en/strings.xml | 7 app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java | 6 app/src/main/java/com/hdl/photovoltaic/enums/DebugStatus.java | 27 ++ app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java | 8 18 files changed, 443 insertions(+), 169 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/enums/DebugStatus.java b/app/src/main/java/com/hdl/photovoltaic/enums/DebugStatus.java new file mode 100644 index 0000000..383ea2e --- /dev/null +++ b/app/src/main/java/com/hdl/photovoltaic/enums/DebugStatus.java @@ -0,0 +1,27 @@ +package com.hdl.photovoltaic.enums; + +/** + * 鐢电珯鐨勮皟璇曠姸鎬� + */ +public @interface DebugStatus { + /** + * 鍏ㄩ儴 + */ + String All = "";//鍏ㄩ儴 + /** + * 璋冭瘯涓� + */ + String Debugging = "Debugging";//璋冭瘯涓� + /** + * 璋冭瘯瀹屾垚 + */ + String WAIT_DELIVERED = "WAIT_DELIVERED";//璋冭瘯瀹屾垚 + /** + * 宸蹭氦浠� + */ + String Delivered = "Delivered";//宸蹭氦浠� + /** + * 鎺堟潈璋冭瘯 + */ + String SECONDARY_DEBUGGIN = "SECONDARY_DEBUGGIN";//鎺堟潈璋冭瘯 +} diff --git a/app/src/main/java/com/hdl/photovoltaic/enums/SortType.java b/app/src/main/java/com/hdl/photovoltaic/enums/SortType.java index c8dfdce..92d6915 100644 --- a/app/src/main/java/com/hdl/photovoltaic/enums/SortType.java +++ b/app/src/main/java/com/hdl/photovoltaic/enums/SortType.java @@ -22,6 +22,11 @@ * 褰撴湀鍙戠數閲� */ String monthElectricitySort = "monthElectricitySort";//褰撴湀鍙戠數閲� + + /** + * 鐢垫睜瀹归噺鎺掑簭 + */ + String batteryCapacitySort = "batteryCapacitySort";//鐢垫睜瀹归噺鎺掑簭 /** * 鍒涘缓鏃堕棿鎺掑簭 */ 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 bed9acb..f50ad83 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlDeviceLogic.java @@ -1732,7 +1732,13 @@ gatewayBean.setDevice_name(cloudInverterDeviceBean.getName());//璁惧鍚嶇О gatewayBean.setGatewayType(cloudInverterDeviceBean.getSpk());//璁剧疆spk gatewayBean.setLocalEncrypt(true); - gatewayBean.setMaster(GatewayMasterType.MasterTrue);//榛樿閮芥槸涓婚�嗗彉鍣�(浠ュ悗鏀寔浠庨�嗗彉鍣ㄨ鏇存敼) + if (cloudInverterDeviceBean.getSpk().equals(HdlDeviceLogic.sHdlDeviceLogic.OFF_INVERTER_OG_SPK)) { + //绂荤綉閫嗗彉鍣� + gatewayBean.setMaster(String.valueOf(cloudInverterDeviceBean.isMaster()));//榛樿閮芥槸涓婚�嗗彉鍣�(浠ュ悗鏀寔浠庨�嗗彉鍣ㄨ鏇存敼) + } else { + //閫嗗彉鍣� + gatewayBean.setMaster(GatewayMasterType.MasterTrue);//榛樿閮芥槸涓婚�嗗彉鍣�(浠ュ悗鏀寔浠庨�嗗彉鍣ㄨ鏇存敼) + } gatewayBean.setSystemStatusDesc(cloudInverterDeviceBean.getSystemStatusDesc());//璁惧鐘舵�� gatewayBean.setHwVersion(cloudInverterDeviceBean.getHwVersion());//杞欢鐗堟湰鍙� gatewayBean.setCategorySecondName(cloudInverterDeviceBean.getCategorySecondName());//璁惧绫诲瀷(浜у搧浜岀骇鍒嗙被鍚嶇О diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java index 7d2030a..71c3788 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java @@ -33,79 +33,23 @@ return sHdlESLocalJsonLogic; } + /** + * 鑴氭湰鍦板潃鍩熷悕 + */ + private static final String address = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu"; + /** - * 銆愰�嗗彉鍣ㄣ�戣澶囧瀷鍙� + * 鎷兼帴鏂板湴鍧� + * + * @param fileName json鏂囦欢鍚嶇О + * @param deviceType 璁惧绫诲瀷锛坕nv锛宭c锛宐ms锛宐attery锛� + * @param deviceModel 璁惧鍨嬪彿 + * @return 鏂板湴鍧� */ - public static final String deviceModel_ME_GSE_S5K = "ME-GSE-S5K"; - /** - * 銆愯礋杞芥帶鍒朵腑蹇冦�戣澶囧瀷鍙� - */ - public static final String deviceModel_ME_GSE_SPG63A = "ME-GSE-SPG63A"; - /** - * 銆怋MS銆戣澶囧瀷鍙� - */ - 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.5.1.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"; - /** - * 閫嗗彉鍣ㄥ弬鏁伴厤缃紙config锛� - */ - 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.5.1.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.5.1.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"; - - /** - * 鑾峰彇閫嗗彉鍣ㄦ墍鏈塲son涓枃 - */ - public static final String hdl_inv_ecu_all_zh = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/zh/all_v1.5.1.json"; - /** - * 鑾峰彇閫嗗彉鍣ㄦ墍鏈塲son鑻辨枃 - */ - public static final String hdl_inv_ecu_all_en = "https://hdl-hz-dev.oss-cn-hangzhou.aliyuncs.com/ecu/en/all_v1.5.1.json"; + private String getStrJointNewUrl(String fileName, String deviceType, String deviceModel) { + return address + "/" + UserConfigManage.getInstance().getCurrentAppLanguage() + "/" + deviceType + "/" + deviceModel + "/" + fileName; + } /** * 鍒濆鍖栬剼鏈瑄rl @@ -115,17 +59,31 @@ private Map<String, String> getUrlMap() { //娉ㄦ剰锛堥�嗗彉鍣�:ME-GSE-S5K锛岃礋杞戒腑蹇�:ME-GSE-SPG63A锛宐ms: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);//鐢垫睜鍖�-鐢佃姱淇℃伅 + map.put(this.getStrJointNewUrl(FileName.hdl_lc_ecu_info_item, DeviceType.LC, DeviceModel.LC), DeviceModel.LC);//鑾峰彇璐熻浇鎺у埗涓績 + map.put(this.getStrJointNewUrl(FileName.hdl_lc_ecu_quick, DeviceType.LC, DeviceModel.LC), DeviceModel.LC); //鍒涘缓鐢电珯-璐熻浇鎺у埗涓績鍙傛暟閰嶇疆 + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_quick, DeviceType.INV, DeviceModel.INV), DeviceModel.INV);//鍒涘缓鐢电珯-閫嗗彉鍣ㄥ弬鏁伴厤缃� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu, DeviceType.INV, DeviceModel.INV), DeviceModel.INV);//閫嗗彉鍣ㄥ弬鏁伴厤缃� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_pv, DeviceType.INV, DeviceModel.INV), DeviceModel.INV);// 閫嗗彉鍣ㄨ鎯�-pv + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_output, DeviceType.INV, DeviceModel.INV), DeviceModel.INV);//閫嗗彉鍣ㄨ鎯�-杈撳嚭 + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_item, DeviceType.INV, DeviceModel.INV), DeviceModel.INV);//閫嗗彉鍣ㄨ鎯�-item椤� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_signal, DeviceType.INV, DeviceModel.INV), DeviceModel.INV);//閫嗗彉鍣ㄨ鎯�-淇″彿鐐� + map.put(this.getStrJointNewUrl(FileName.hdl_bms_ecu, DeviceType.BMS, DeviceModel.INV_BMS), DeviceModel.INV_BMS);//鑾峰彇BMS淇℃伅 + map.put(this.getStrJointNewUrl(FileName.hdl_battery_ecu, DeviceType.BATTERY, DeviceModel.INV_BATTERY), DeviceModel.INV_BATTERY);//鐢垫睜鍖呬俊鎭� + map.put(this.getStrJointNewUrl(FileName.hdl_battery_ecu_cell, DeviceType.BATTERY, DeviceModel.INV_BATTERY), DeviceModel.INV_BATTERY);//鐢垫睜鍖�-鐢佃姱淇℃伅 + //绂荤綉閫嗗彉鍣� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_quick_off, DeviceType.INV, DeviceModel.OFF_INV), DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_master_ecu_off, DeviceType.INV, DeviceModel.OFF_INV), DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄤ富鏈洪厤缃� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_slave_ecu_off, DeviceType.INV, DeviceModel.OFF_INV), DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄤ粠鏈洪厤缃� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_pv_off, DeviceType.INV, DeviceModel.OFF_INV), DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄨ鎯呭厜浼忚緭鍏� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_input_off, DeviceType.INV, DeviceModel.OFF_INV), DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄨ鎯呬氦娴佽緭鍏� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_output_off, DeviceType.INV, DeviceModel.OFF_INV), DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄨ鎯呬氦娴佽緭鍑� + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_item_off, DeviceType.INV, DeviceModel.OFF_INV), DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄨ鎯呭熀纭�鍙傛暟 + map.put(this.getStrJointNewUrl(FileName.hdl_inv_ecu_info_signal_off, DeviceType.INV, DeviceModel.OFF_INV), DeviceModel.OFF_INV);//绂荤綉閫嗗彉鍣ㄨ鎯呯粺璁� + map.put(this.getStrJointNewUrl(FileName.hdl_bms_ecu_off, DeviceType.BMS, DeviceModel.OFF_INV_BMS), DeviceModel.OFF_INV_BMS);//绂荤綉閫嗗彉鍣˙MS璇︽儏 + map.put(this.getStrJointNewUrl(FileName.hdl_battery_ecu_off, DeviceType.BATTERY, DeviceModel.OFF_INV_BATTERY), DeviceModel.OFF_INV_BATTERY);//绂荤綉閫嗗彉鍣ㄧ數姹犺鎯� + map.put(this.getStrJointNewUrl(FileName.hdl_battery_ecu_cell_off, DeviceType.BATTERY, DeviceModel.OFF_INV_BATTERY), DeviceModel.OFF_INV_BATTERY);//绂荤綉閫嗗彉鍣ㄧ數姹犵數鑺� + + return map; } @@ -175,18 +133,6 @@ 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鏁版嵁 @@ -248,4 +194,183 @@ } } + /** + * Json鏁版嵁閰嶇疆鏂囦欢鍚� + */ + public @interface FileName { + /** + * 鍒涘缓鐢电珯-閫嗗彉鍣ㄥ弬鏁伴厤缃� + */ + String hdl_inv_ecu_quick = "modbus_hdl_inv_ecu_quick_v1.5.1.json"; + /** + * 鍒涘缓鐢电珯-璐熻浇鎺у埗涓績鍙傛暟閰嶇疆 + */ + String hdl_lc_ecu_quick = "modbus_hdl_lc_ecu_quick_v1.5.0.json"; + /** + * 閫嗗彉鍣ㄥ弬鏁伴厤缃紙config锛� + */ + String hdl_inv_ecu = "modbus_hdl_inv_ecu_v1.5.2.json"; + /** + * 閫嗗彉鍣ㄨ鎯�-pv + */ + String hdl_inv_ecu_info_pv = "info/modbus_hdl_inv_ecu_info_pv_v1.4.2.json"; + /** + * 閫嗗彉鍣ㄨ鎯�-杈撳嚭 + */ + String hdl_inv_ecu_info_output = "info/modbus_hdl_inv_ecu_info_output_v1.4.2.json"; + /** + * 閫嗗彉鍣ㄨ鎯�-item椤� + */ + String hdl_inv_ecu_info_item = "info/modbus_hdl_inv_ecu_info_item_v1.5.2.json"; + /** + * 鑾峰彇璐熻浇鎺у埗涓績 + */ + String hdl_lc_ecu_info_item = "modbus_hdl_lc_ecu_info_item_v1.5.0.json"; + /** + * 鑾峰彇BMS淇℃伅 + */ + String hdl_bms_ecu = "modbus_hdl_bms_ecu_v1.4.2.json"; + /** + * 鐢垫睜鍖呬俊鎭� + */ + String hdl_battery_ecu = "modbus_hdl_battery_ecu_v1.4.2.json"; + + /** + * 鐢垫睜鍖�-鐢佃姱淇℃伅 + */ + String hdl_battery_ecu_cell = "modbus_hdl_battery_ecu_cell_v1.4.2.json"; + + /** + * 閫嗗彉鍣ㄨ鎯�-淇″彿鐐� + */ + String hdl_inv_ecu_info_signal = "info/modbus_hdl_inv_ecu_info_signal_v1.4.1.json"; + + + /** + * 绂荤綉閫嗗彉鍣ㄥ揩閫熼厤缃� + */ + String hdl_inv_ecu_quick_off = "modbus_hdl_inv_ecu_quick_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄤ富鏈洪厤缃� + */ + String hdl_inv_master_ecu_off = "modbus_hdl_inv_master_ecu_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄤ粠鏈洪厤缃� + */ + String hdl_inv_slave_ecu_off = "modbus_hdl_inv_slave_ecu_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄨ鎯呭厜浼忚緭鍏� + */ + String hdl_inv_ecu_info_pv_off = "modbus_hdl_inv_ecu_info_pv_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄨ鎯呬氦娴佽緭鍏� + */ + String hdl_inv_ecu_info_input_off = "modbus_hdl_inv_ecu_info_input_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄨ鎯呬氦娴佽緭鍑� + */ + String hdl_inv_ecu_info_output_off = "modbus_hdl_inv_ecu_info_output_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄨ鎯呭熀纭�鍙傛暟 + */ + String hdl_inv_ecu_info_item_off = "modbus_hdl_inv_ecu_info_item_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄨ鎯呯粺璁� + */ + String hdl_inv_ecu_info_signal_off = "modbus_hdl_inv_ecu_info_signal_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣˙MS璇︽儏 + */ + String hdl_bms_ecu_off = "modbus_hdl_bms_ecu_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄧ數姹犺鎯� + */ + String hdl_battery_ecu_off = "modbus_hdl_battery_ecu_v1.5.2.json"; + + /** + * 绂荤綉閫嗗彉鍣ㄧ數姹犵數鑺� + */ + String hdl_battery_ecu_cell_off = "modbus_hdl_battery_ecu_cell_v1.5.2.json"; + + + /** + * 鑾峰彇閫嗗彉鍣ㄦ墍鏈塲son涓枃 + */ + String hdl_inv_ecu_all_zh = "/zh/all_v1.5.1.json"; + /** + * 鑾峰彇閫嗗彉鍣ㄦ墍鏈塲son鑻辨枃 + */ + String hdl_inv_ecu_all_en = "/en/all_v1.5.1.json"; + + } + + /** + * 璁惧鍨嬪彿 + */ + public @interface DeviceModel { + /** + * 銆愰�嗗彉鍣ㄣ�戣澶囧瀷鍙� + */ + String INV = "ME-GSE-S5K"; + /** + * 銆愯礋杞芥帶鍒朵腑蹇冦�戣澶囧瀷鍙� + */ + String LC = "ME-GSE-SPG63A"; + /** + * 銆怋MS銆戣澶囧瀷鍙� + */ + String INV_BMS = "ME-GSE-BMS15K"; + /** + * 銆愮數姹犲寘銆戣澶囧瀷鍙� + */ + String INV_BATTERY = "ME-GSE-B5K"; + + + /** + * 銆愮绾块�嗗彉鍣ㄣ�戣澶囧瀷鍙� + */ + String OFF_INV = "ME-GLE-S5K"; + + /** + * 銆愮缃戦�嗗彉鍣ㄨ櫄鎷烞MS銆戣澶囧瀷鍙� + */ + String OFF_INV_BMS = "ME-GLE-S5K-BMS"; + /** + * 銆愮缃戦�嗗彉鍣ㄧ數姹犲寘銆戣澶囧瀷鍙� + */ + String OFF_INV_BATTERY = "ME-GLE-B5K"; + } + + /** + * 璁惧绫诲瀷 + */ + public @interface DeviceType { + /** + * 銆愰�嗗彉鍣ㄣ�戠被鍨� + */ + String INV = "inv"; + /** + * 銆愯礋杞芥帶鍒朵腑蹇冦�戠被鍨� + */ + String LC = "lc"; + /** + * 銆怋MS銆戠被鍨� + */ + String BMS = "bms"; + /** + * 銆愮數姹犲寘銆戠被鍨� + */ + String BATTERY = "battery"; + + } + } diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java index c3065ba..c476bb2 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlFileLogic.java @@ -103,6 +103,8 @@ /** * 鑾峰彇涓枃銆恓son璧勬簮鏂囦欢澶广�戝叏璺緞 + * + * @param deviceModel 璁惧鍨嬪彿 */ public String getHdlESLocalJsonZhRootPath(String deviceModel) { return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.zh + "/" + deviceModel; @@ -110,6 +112,8 @@ /** * 鑾峰彇鑻辨枃銆恓son璧勬簮鏂囦欢澶广�戝叏璺緞 + * + * @param deviceModel 璁惧鍨嬪彿 */ public String getHdlESLocalJsonEnRootPath(String deviceModel) { return getAPPInternalStoreFilesPath() + "/hdlESLocalJson/" + LocalManageUtil.en + "/" + deviceModel; @@ -198,15 +202,26 @@ */ 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.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.DeviceModel.INV));//閫嗗彉鍣� + this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.DeviceModel.LC));//璐熻浇涓績 + this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.DeviceModel.INV_BMS));//BMS + this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.DeviceModel.INV_BATTERY));//鐢垫睜鍖� + //绂荤嚎閫嗗彉鍣� + this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.DeviceModel.OFF_INV));//绂荤嚎閫嗗彉鍣� + this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BMS));//绂荤綉閫嗗彉鍣ㄨ櫄鎷烞MS + this.createFileDir(this.getHdlESLocalJsonZhRootPath(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BATTERY));//绂荤綉閫嗗彉鍣ㄧ數姹犲寘 + + //鑻辨枃鏂囦欢澶� - 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)); + this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.DeviceModel.INV)); + this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.DeviceModel.LC)); + this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.DeviceModel.INV_BMS)); + this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.DeviceModel.INV_BATTERY)); + //绂荤嚎閫嗗彉鍣� + this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.DeviceModel.OFF_INV));//绂荤嚎閫嗗彉鍣� + this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BMS));//绂荤綉閫嗗彉鍣ㄨ櫄鎷烞MS + this.createFileDir(this.getHdlESLocalJsonEnRootPath(HdlESLocalJsonLogic.DeviceModel.OFF_INV_BATTERY));//绂荤綉閫嗗彉鍣ㄧ數姹犲寘 } diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java index 67f887a..2d311d7 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlResidenceLogic.java @@ -343,7 +343,7 @@ * ascending:鍗囧簭), * @param installedCapacityMin 鏈�灏忕粍涓插閲�(瑁呮満瀹归噺) * @param installedCapacityMax 鏈�澶х粍涓插閲�(瑁呮満瀹归噺) - * @param gridType 骞剁綉鐘舵�� (鍏ㄩ儴 锛�"";FULL_GRID 锛� 骞剁綉;OFFLINE 锛氱缃�) + * @param debugStatus 璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯) * @param powerStationStatus 鐢电珯鐘舵�� (鍏ㄩ儴 锛�"";1 锛� 姝e父;2 锛� 绂荤嚎; 3 锛� 寰呮帴鍏�;4 锛� 鏁呴殰) * @param pageNo 椤电爜 * @param pageSize 椤垫暟锛堜竴椤靛灏戞暟鎹級 @@ -353,7 +353,7 @@ String keyValue, String installedCapacityMin, String installedCapacityMax, - String gridType, + String debugStatus, String powerStationStatus, long pageNo, long pageSize, CloudCallBeak<HouseBeanClass> cloudCallBeak) { @@ -376,9 +376,9 @@ } catch (Exception ignored) { } } - if (!TextUtils.isEmpty(gridType)) { + if (!TextUtils.isEmpty(debugStatus)) { try { - json.addProperty("gridType", gridType); + json.addProperty("debugStatus", debugStatus); } catch (Exception ignored) { } } diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java b/app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java index 8a06523..b7ae1d2 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java @@ -69,9 +69,9 @@ //褰撴棩鍙戠數閲� holder.day_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getTodayElectricity())); holder.day_kwh_unit.setText(HdlCommonLogic.convertUnit(houseIdBean.getTodayElectricity(), UnitType.kWh)); - //褰撴湀鍙戠數閲� - holder.month_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getMonthElectricity())); - holder.month_kwh_unit.setText(HdlCommonLogic.convertUnit(houseIdBean.getMonthElectricity(), UnitType.kWh)); + //鐢垫睜瀹归噺 + holder.month_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getBatteryCapacity())); + holder.month_kwh_unit.setText(HdlCommonLogic.convertUnit(houseIdBean.getBatteryCapacity(), UnitType.kWh)); holder.plant_details_location_tv.setText(houseIdBean.getHomeAddress()); holder.item_parent_rl.setTag(position); diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java b/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java index c584bba..b6899ff 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/bean/CloudInverterDeviceBean.java @@ -48,6 +48,15 @@ private String address;//璇︾粏鍦板潃 private HouseInfoBean.Location location;//鐢电珯鍦板潃 private String localSecret;//鎵�灞炵數绔欑殑鏈湴瀵嗛挜 + private boolean master;//绂荤綉閫嗗彉鍣ㄦ墠杩斿洖 + public boolean isMaster() { + return master; + } + + public void setMaster(boolean master) { + this.master = master; + } + public String getSystemStatusDesc() { diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java b/app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java index d7bcba9..4d05464 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/bean/HouseIdBean.java @@ -19,6 +19,9 @@ private String monthElectricity;//褰撴湀鍙戠數閲� + private String batteryCapacity;//鐢垫睜瀹归噺 + + private int powerStationStatus;//鐢电珯鐘舵��(鐢电珯鐘舵�� 1:姝e父(杩愯),2:绂荤嚎,3:杩炴帴涓�,4:鏁呴殰) private String localSecret;//鏈湴閫氳绉橀挜 @@ -38,6 +41,14 @@ private String address;//璇︾粏鍦板潃 + public String getBatteryCapacity() { + return batteryCapacity == null ? "" : batteryCapacity; + } + + public void setBatteryCapacity(String batteryCapacity) { + this.batteryCapacity = batteryCapacity; + } + public String getDeliverStatus() { return deliverStatus == null ? "" : deliverStatus; } diff --git a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java index f4a5ad6..ec9501d 100644 --- a/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java +++ b/app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java @@ -31,6 +31,7 @@ import com.hdl.photovoltaic.config.UserConfigManage; import com.hdl.photovoltaic.databinding.FragmentHouseListBinding; import com.hdl.photovoltaic.base.CustomBaseFragment; +import com.hdl.photovoltaic.enums.DebugStatus; import com.hdl.photovoltaic.enums.HomepageTitleTabSwitch; import com.hdl.photovoltaic.enums.LowerTagType; import com.hdl.photovoltaic.enums.PowerStationStatus; @@ -102,7 +103,7 @@ private String value = SortValue.all;//descending:闄嶅簭,ascending:鍗囧簭 private String installedCapacityMinValue = "";//鏈�灏忕粍涓插閲�(瑁呮満瀹归噺) private String installedCapacityMaxValue = "";//鏈�澶х粍涓插閲�(瑁呮満瀹归噺) - private String gridTypeValue = "";//骞剁綉鐘舵��(鍏ㄩ儴 涓嶄紶璇ヨ繃婊ゅ弬鏁�,FULL_GRID:骞剁綉,OFFLINE:绂荤綉) + private String debugStatus = DebugStatus.All;//绛涢�夋潯浠剁姸鎬� private String powerStationStatusValue = PowerStationStatus.All;//鐢电珯鐘舵��(鍏ㄩ儴 涓嶄紶璇ヨ繃婊ゅ弬鏁�,1:姝e父(杩愯),2:绂荤嚎,3:寰呮帴鍏�,4:鏁呴殰) private final long pageSize = 20;//椤垫暟 @@ -115,7 +116,7 @@ value = SortValue.all; installedCapacityMinValue = ""; installedCapacityMaxValue = ""; - gridTypeValue = ""; + debugStatus = DebugStatus.All; powerStationStatusValue = PowerStationStatus.All; } @@ -148,7 +149,7 @@ selectedTitleLabelStyle(); initializationState(); getStatusOverview(); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); @@ -173,7 +174,7 @@ viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); //鏁呴殰 @@ -185,7 +186,7 @@ viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff)); viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); //绂荤嚎 @@ -197,7 +198,7 @@ viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff)); viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); //寰呮帴鍏� @@ -209,7 +210,7 @@ viewBinding.faultsLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); viewBinding.offlineLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff)); viewBinding.connectedLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff)); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); @@ -243,14 +244,14 @@ public void onClick(View v) { DefaultFilteringDialog defaultFilteringDialog = new DefaultFilteringDialog(_mActivity); defaultFilteringDialog.show(); - defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue); + defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, debugStatus); defaultFilteringDialog.setOnClickListener(new DefaultFilteringDialog.OnClickListener() { @Override public void confirm(String min, String max, String state) { installedCapacityMinValue = min;//鏈�灏忕粍涓插閲�(瑁呮満瀹归噺) installedCapacityMaxValue = max;//鏈�澶х粍涓插閲�(瑁呮満瀹归噺) - gridTypeValue = state;//骞剁綉鐘舵��(鍏ㄩ儴 涓嶄紶璇ヨ繃婊ゅ弬鏁�,FULL_GRID:骞剁綉,OFFLINE:绂荤綉) - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + debugStatus = state;//璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯) + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); } @@ -263,7 +264,7 @@ @Override public void onRefresh() { viewBinding.fragmentHouseSrl.setRefreshing(false); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); getStatusOverview(); } }); @@ -284,7 +285,7 @@ if (!isHouseLoadingMore) { // 婊戝姩鍒颁簡搴曢儴锛屾墽琛岀浉搴旂殑鎿嶄綔 HdlLogLogic.print("---婊戝姩鍒颁簡搴曢儴"); - loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, ++currentHouseListPage, false); + loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, ++currentHouseListPage, false); } } } @@ -401,7 +402,7 @@ screenIconState(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected); key = SortType.homeNameSort; value = isSelected ? SortValue.ascending : SortValue.descending; - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); //鐢电珯鍙戠數鍔熺巼绛涢�� @@ -412,7 +413,7 @@ screenIconState(viewBinding.stationPowerRl, viewBinding.stationPowerIv, isSelected); key = SortType.powerSort; value = isSelected ? SortValue.ascending : SortValue.descending; - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); //鐢电珯褰撴棩鍙戠數閲忕瓫閫� @@ -423,18 +424,18 @@ screenIconState(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected); key = SortType.todayElectricitySort; value = isSelected ? SortValue.ascending : SortValue.descending; - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); - //鐢电珯褰撴湀鍙戠數閲忕瓫閫� + //鐢电珯鐢垫睜瀹归噺绛涢�� viewBinding.stationMonthRl.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { boolean isSelected = !v.isSelected(); screenIconState(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected); - key = SortType.monthElectricitySort; + key = SortType.batteryCapacitySort; value = isSelected ? SortValue.ascending : SortValue.descending; - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } }); //璁惧鐐瑰嚮 @@ -620,7 +621,7 @@ // 鍙栨秷绮樻�т簨浠� EventBus.getDefault().removeStickyEvent(eventBus); //uin鍒涘缓鐢电珯鎴愬姛鍚庨�氱煡 - loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); if (eventBus.getData() != null) { Gson gson = new Gson(); String json = eventBus.getData().toString(); @@ -664,7 +665,7 @@ // if (MqttRecvClient.getInstance() != null) { // MqttRecvClient.getInstance().removeAllTopic(); // } - loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) { // 鍙栨秷绮樻�т簨浠� @@ -706,7 +707,7 @@ selectedTitleLabelStyle(); initializationState(); getStatusOverview(); - loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true); + loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true); } else if (eventBus.getType().equals(ConstantManage.station_page)) { //閫氳繃棣栭〉鐢电珯杩涙潵鐨� if (eventBus.getData().equals(PowerStationStatus.All)) { @@ -771,11 +772,12 @@ * @param key 鍙戠數鍔熺巼鎺掑簭(powerSort); * 浠婃棩鍙戠數閲忔帓搴�(todayElectricitySort); * 鍒涘缓鏃堕棿鎺掑簭(createTimeSort); + * 鐢垫睜瀹归噺鎺掑簭(batteryCapacitySort); * @param keyValue (descending:闄嶅簭 * ascending:鍗囧簭), * @param installedCapacityMin 鏈�灏忕粍涓插閲�(瑁呮満瀹归噺) * @param installedCapacityMax 鏈�澶х粍涓插閲�(瑁呮満瀹归噺) - * @param gridType 骞剁綉鐘舵�� (鍏ㄩ儴 锛�"";FULL_GRID 锛� 骞剁綉;OFFLINE 锛氱缃�) + * @param gridType 璋冭瘯鐘舵��(鍏ㄩ儴;璋冭瘯涓�;璋冭瘯瀹屾垚;宸蹭氦浠�;鎺堟潈璋冭瘯) * @param powerStationStatus 鐢电珯鐘舵�� (鍏ㄩ儴 锛�"";1 锛� 姝e父;2 锛� 绂荤嚎; 3 锛� 寰呮帴鍏�;4 锛� 鏁呴殰) * @param pageNo 椤电爜 * @param isClear 鏄惁娓呴櫎鏁版嵁 diff --git a/app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java b/app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java index 6102fc9..77e8617 100644 --- a/app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java +++ b/app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java @@ -19,6 +19,7 @@ import com.hdl.photovoltaic.R; import com.hdl.photovoltaic.base.BaseDialog; import com.hdl.photovoltaic.databinding.DialogDefaultFilteringBinding; +import com.hdl.photovoltaic.enums.DebugStatus; import com.hdl.photovoltaic.enums.GridType; import com.hdl.photovoltaic.enums.UnitType; import com.hdl.photovoltaic.other.HdlThreadLogic; @@ -116,8 +117,8 @@ public void onClick(View v) { setBackgroundColor(null, TitleType.string_capacity); setSelectedText(""); - setBackgroundColor(viewBinding.allTv, TitleType.GridConnectedState); - mStateValue = GridType.All; + setBackgroundColor(viewBinding.allTv, TitleType.debuggingState); + mStateValue = DebugStatus.All; } }); viewBinding.text1Tv.setOnClickListener(new View.OnClickListener() { @@ -177,29 +178,49 @@ setSelectedText(viewBinding.text8Tv.getTag().toString()); } }); - + //鍏ㄩ儴 viewBinding.allTv.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - setBackgroundColor(viewBinding.allTv, TitleType.GridConnectedState); - mStateValue = GridType.All; + setBackgroundColor(viewBinding.allTv, TitleType.debuggingState); + mStateValue = DebugStatus.All; } }); - viewBinding.gridConnectedTv.setOnClickListener(new View.OnClickListener() { + //璋冭瘯涓� + viewBinding.beDebuggingTv.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - setBackgroundColor(viewBinding.gridConnectedTv, TitleType.GridConnectedState); - mStateValue = GridType.FULL_GRID; + setBackgroundColor(viewBinding.beDebuggingTv, TitleType.debuggingState); + mStateValue = DebugStatus.Debugging; } }); - viewBinding.offNetworkTv.setOnClickListener(new View.OnClickListener() { + //璋冭瘯瀹屾垚 + viewBinding.debuggingcOmpletedTv.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { - setBackgroundColor(viewBinding.offNetworkTv, TitleType.GridConnectedState); - mStateValue = GridType.OFFLINE; + setBackgroundColor(viewBinding.debuggingcOmpletedTv, TitleType.debuggingState); + mStateValue = DebugStatus.WAIT_DELIVERED; + } + }); + //宸蹭氦浠� + viewBinding.deliveredTv.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View v) { + setBackgroundColor(viewBinding.deliveredTv, TitleType.debuggingState); + mStateValue = DebugStatus.Delivered; + } + }); + //鎺堟潈璋冭瘯 + viewBinding.authorizationDebuggingTv.setOnClickListener(new View.OnClickListener() { + + @Override + public void onClick(View v) { + setBackgroundColor(viewBinding.authorizationDebuggingTv, TitleType.debuggingState); + mStateValue = DebugStatus.SECONDARY_DEBUGGIN; } }); @@ -248,8 +269,10 @@ viewBinding.text8Tv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); } else { viewBinding.allTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); - viewBinding.gridConnectedTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); - viewBinding.offNetworkTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); + viewBinding.beDebuggingTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); + viewBinding.debuggingcOmpletedTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); + viewBinding.deliveredTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); + viewBinding.authorizationDebuggingTv.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_129)); } if (textView != null) { textView.setBackground(AppCompatResources.getDrawable(mContext, R.drawable.config_yes_129)); @@ -292,12 +315,16 @@ break; } } - if (TextUtils.isEmpty(stateValue)) { - setBackgroundColor(viewBinding.allTv, TitleType.GridConnectedState); - } else if (stateValue.equals(GridType.FULL_GRID)) { - setBackgroundColor(viewBinding.gridConnectedTv, TitleType.GridConnectedState); - } else { - setBackgroundColor(viewBinding.offNetworkTv, TitleType.GridConnectedState); + if (TextUtils.isEmpty(DebugStatus.All)) { + setBackgroundColor(viewBinding.allTv, TitleType.debuggingState); + } else if (stateValue.equals(DebugStatus.Debugging)) { + setBackgroundColor(viewBinding.beDebuggingTv, TitleType.debuggingState); + } else if (stateValue.equals(DebugStatus.WAIT_DELIVERED)) { + setBackgroundColor(viewBinding.debuggingcOmpletedTv, TitleType.debuggingState); + } else if (stateValue.equals(DebugStatus.Delivered)) { + setBackgroundColor(viewBinding.deliveredTv, TitleType.debuggingState); + } else if (stateValue.equals(DebugStatus.SECONDARY_DEBUGGIN)) { + setBackgroundColor(viewBinding.authorizationDebuggingTv, TitleType.debuggingState); } } catch (Exception ignored) { } @@ -317,11 +344,13 @@ viewBinding.text7Tv.setTag(text7); viewBinding.text8Tv.setTag(text8); - viewBinding.allTv.setTag(GridType.All); - viewBinding.gridConnectedTv.setTag(GridType.FULL_GRID); - viewBinding.offNetworkTv.setTag(GridType.OFFLINE); + viewBinding.allTv.setTag(DebugStatus.All); + viewBinding.beDebuggingTv.setTag(DebugStatus.Debugging); + viewBinding.debuggingcOmpletedTv.setTag(DebugStatus.WAIT_DELIVERED); + viewBinding.deliveredTv.setTag(DebugStatus.Delivered); + viewBinding.authorizationDebuggingTv.setTag(DebugStatus.SECONDARY_DEBUGGIN); setBackgroundColor(null, TitleType.string_capacity); - setBackgroundColor(viewBinding.allTv, TitleType.GridConnectedState); + setBackgroundColor(viewBinding.allTv, TitleType.debuggingState); } public void setOnClickListener(OnClickListener onClickListener) { @@ -337,7 +366,7 @@ public enum TitleType { string_capacity,//缁勪覆瀹归噺 - GridConnectedState//骞剁綉鐘舵�� + debuggingState//璋冭瘯鐘舵�� } diff --git a/app/src/main/res/layout/dialog_default_filtering.xml b/app/src/main/res/layout/dialog_default_filtering.xml index 96c152e..7583211 100644 --- a/app/src/main/res/layout/dialog_default_filtering.xml +++ b/app/src/main/res/layout/dialog_default_filtering.xml @@ -279,34 +279,62 @@ android:textSize="@dimen/text_14" app:layout_constraintStart_toStartOf="@+id/min_max_rl" app:layout_constraintTop_toBottomOf="@+id/grid_connected_state_title_tv" /> - <!--骞剁綉--> + <!--璋冭瘯涓�--> <TextView - android:id="@+id/grid_connected_tv" + android:id="@+id/be_debugging_tv" android:layout_width="102dp" android:layout_height="@dimen/dp_35" android:layout_marginStart="@dimen/dp_20" android:layout_marginTop="13dp" android:background="@drawable/config_129" android:gravity="center" - android:text="@string/grid_connected" + android:text="@string/be_debugging" android:textColor="@color/text_E6FFFFFF" android:textSize="@dimen/text_14" app:layout_constraintStart_toEndOf="@+id/all_tv" app:layout_constraintTop_toBottomOf="@+id/grid_connected_state_title_tv" /> - <!--绂荤綉--> + <!--璋冭瘯瀹屾垚--> <TextView - android:id="@+id/off_network_tv" + android:id="@+id/debuggingc_ompleted_tv" android:layout_width="102dp" android:layout_height="@dimen/dp_35" android:layout_marginStart="@dimen/dp_20" android:layout_marginTop="13dp" android:background="@drawable/config_129" android:gravity="center" - android:text="@string/off_network" + android:text="@string/debugging_completed" android:textColor="@color/text_E6FFFFFF" android:textSize="@dimen/text_14" - app:layout_constraintStart_toEndOf="@+id/grid_connected_tv" + app:layout_constraintStart_toEndOf="@+id/be_debugging_tv" app:layout_constraintTop_toBottomOf="@+id/grid_connected_state_title_tv" /> + + <!--宸蹭氦浠�--> + <TextView + android:id="@+id/delivered_tv" + android:layout_width="102dp" + android:layout_height="@dimen/dp_35" + android:layout_marginTop="13dp" + android:background="@drawable/config_129" + android:gravity="center" + android:text="@string/delivered" + android:textColor="@color/text_E6FFFFFF" + android:textSize="@dimen/text_14" + app:layout_constraintStart_toStartOf="@+id/all_tv" + app:layout_constraintTop_toBottomOf="@+id/all_tv" /> + <!--鎺堟潈璋冭瘯--> + <TextView + android:id="@+id/authorization_debugging_tv" + android:layout_width="102dp" + android:layout_height="@dimen/dp_35" + android:layout_marginStart="@dimen/dp_20" + android:layout_marginTop="13dp" + android:background="@drawable/config_129" + android:gravity="center" + android:text="@string/authorization_debugging" + android:textColor="@color/text_E6FFFFFF" + android:textSize="@dimen/text_14" + app:layout_constraintStart_toEndOf="@+id/delivered_tv" + app:layout_constraintTop_toBottomOf="@+id/all_tv" /> <RelativeLayout android:id="@+id/reset_rl" @@ -316,7 +344,7 @@ android:background="@color/text_FF39383D" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@+id/off_network_tv"> + app:layout_constraintTop_toBottomOf="@+id/delivered_tv"> <LinearLayout android:layout_width="wrap_content" diff --git a/app/src/main/res/layout/fragment_house_list.xml b/app/src/main/res/layout/fragment_house_list.xml index b504688..6cababf 100644 --- a/app/src/main/res/layout/fragment_house_list.xml +++ b/app/src/main/res/layout/fragment_house_list.xml @@ -405,7 +405,7 @@ android:id="@+id/station_month_tv" android:layout_width="wrap_content" android:layout_height="match_parent" - android:text="@string/month_power_generation" + android:text="@string/battery_capacity_indicator" android:textColor="@color/text_E6FFFFFF" android:textSize="@dimen/text_14" /> diff --git a/app/src/main/res/layout/item_plant_details.xml b/app/src/main/res/layout/item_plant_details.xml index 65c4391..44e9848 100644 --- a/app/src/main/res/layout/item_plant_details.xml +++ b/app/src/main/res/layout/item_plant_details.xml @@ -259,7 +259,7 @@ android:layout_height="@dimen/dp_15" android:layout_marginTop="3dp" android:gravity="center_vertical|start" - android:text="@string/month_power_generation" + android:text="@string/rated_battery_capacity" android:textColor="@color/text_66FFFFFF" android:textSize="@dimen/text_12" /> diff --git a/app/src/main/res/values-en/strings.xml b/app/src/main/res/values-en/strings.xml index 422aebd..bcbfaf2 100644 --- a/app/src/main/res/values-en/strings.xml +++ b/app/src/main/res/values-en/strings.xml @@ -344,4 +344,11 @@ <string name="account_not_recoverable">Cancelling an account is an irreversible operation. After account cancellation, all account data (including nickname, avatar, QR code photo, etc.) on your app will be deleted and cannot be retrieved.</string> <string name="account">Account</string> <string name="psw">Password</string> + + <string name="battery_capacity_indicator">Battery capacity indicator</string> + <string name="rated_battery_capacity">Rated battery capacity</string> + <string name="be_debugging">Be debugging</string> + <string name="debugging_completed">Debugging completed</string> + <string name="delivered">Delivered</string> + <string name="authorization_debugging">Authorization debugging</string> </resources> \ No newline at end of file diff --git a/app/src/main/res/values-zh/strings.xml b/app/src/main/res/values-zh/strings.xml index 9bb0a76..a5ccd93 100644 --- a/app/src/main/res/values-zh/strings.xml +++ b/app/src/main/res/values-zh/strings.xml @@ -341,4 +341,10 @@ <string name="account_not_recoverable">娉ㄩ攢璐︽埛鏄笉鍙仮澶嶇殑鎿嶄綔锛屾敞閿�璐︽埛涔嬪悗锛屾偍APP鎵�鏈夎处鎴锋暟鎹紙鍖呮嫭鏄电О銆佸ご鍍忋�佷簩缁寸爜鐓х墖绛夛級閮戒細琚垹闄わ紝涓旀棤娉曞啀鎵惧洖銆�</string> <string name="account">璐﹀彿</string> <string name="psw">瀵嗙爜</string> + <string name="battery_capacity_indicator">鐢垫睜瀹归噺</string> + <string name="rated_battery_capacity">鐢垫睜棰濆畾瀹归噺</string> + <string name="be_debugging">璋冭瘯涓�</string> + <string name="debugging_completed">璋冭瘯瀹屾垚</string> + <string name="delivered">宸蹭氦浠�</string> + <string name="authorization_debugging">鎺堟潈璋冭瘯</string> </resources> \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 406c9b5..2849d98 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -341,5 +341,11 @@ <string name="account_not_recoverable">娉ㄩ攢璐︽埛鏄笉鍙仮澶嶇殑鎿嶄綔锛屾敞閿�璐︽埛涔嬪悗锛屾偍APP鎵�鏈夎处鎴锋暟鎹紙鍖呮嫭鏄电О銆佸ご鍍忋�佷簩缁寸爜鐓х墖绛夛級閮戒細琚垹闄わ紝涓旀棤娉曞啀鎵惧洖銆�</string> <string name="account">璐﹀彿</string> <string name="psw">瀵嗙爜</string> + <string name="battery_capacity_indicator">鐢垫睜瀹归噺</string> + <string name="rated_battery_capacity">鐢垫睜棰濆畾瀹归噺</string> + <string name="be_debugging">璋冭瘯涓�</string> + <string name="debugging_completed">璋冭瘯瀹屾垚</string> + <string name="delivered">宸蹭氦浠�</string> + <string name="authorization_debugging">鎺堟潈璋冭瘯</string> </resources> \ No newline at end of file diff --git a/sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java b/sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java index b5fdba5..8486de0 100644 --- a/sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java +++ b/sdk/src/main/java/com/hdl/sdk/link/core/bean/gateway/GatewayBean.java @@ -56,7 +56,7 @@ /** * 鏄惁涓荤綉鍏� true false */ - private String master; + private String master;//绂荤綉閫嗗彉鍣ㄦ墠杩斿洖 /** * 鏄惁鍔犲瘑 */ @@ -80,7 +80,6 @@ * 姣背娉id */ private String sid; - private String spk = "energy.hdl_inverter"; @@ -399,7 +398,6 @@ } - public String getSystemStatusDesc() { return systemStatusDesc == null ? "" : systemStatusDesc; } @@ -479,7 +477,7 @@ } public String getDeviceType() { - return deviceType==null?"":deviceType; + return deviceType == null ? "" : deviceType; } public void setDeviceType(String deviceType) { -- Gitblit v1.8.0