wjc
2025-03-05 a91da1a664d0036c1d7f126a11b397e4239f257d
2025年03月05日16:51:04
4个文件已修改
78 ■■■■■ 已修改文件
app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/dialog_default_filtering.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlESLocalJsonLogic.java
@@ -61,6 +61,10 @@
                || joinFileName.equals(FileName.hdl_inv_ecu_info_output + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.INV)
                || joinFileName.equals(FileName.hdl_inv_ecu_info_item + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.INV)
                || joinFileName.equals(FileName.hdl_inv_ecu_info_signal + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.INV)
                || joinFileName.equals(FileName.hdl_inv_ecu_info_pv + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.OFF_INV)
                || joinFileName.equals(FileName.hdl_inv_ecu_info_output + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.OFF_INV)
                || joinFileName.equals(FileName.hdl_inv_ecu_info_item + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.OFF_INV)
                || joinFileName.equals(FileName.hdl_inv_ecu_info_signal + concatenation_symbol + DeviceType.INV + concatenation_symbol + DeviceModel.OFF_INV)
        ) {
            return address + "/" + UserConfigManage.getInstance().getCurrentAppLanguage() + "/" + deviceType + "/" + deviceModel + "/info/" + fileName + this.getVersion(joinFileName) + ".json";
        }
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
@@ -103,7 +103,7 @@
    private String value = SortValue.all;//descending:降序,ascending:升序
    private String installedCapacityMinValue = "";//最小组串容量(装机容量)
    private String installedCapacityMaxValue = "";//最大组串容量(装机容量)
    private String debugStatus = DebugStatus.All;//筛选条件状态
    private String screeningConditionStatus = DebugStatus.All;//筛选条件状态
    private String powerStationStatusValue = PowerStationStatus.All;//电站状态(全部 不传该过滤参数,1:正常(运行),2:离线,3:待接入,4:故障)
    private final long pageSize = 20;//页数
@@ -116,7 +116,7 @@
        value = SortValue.all;
        installedCapacityMinValue = "";
        installedCapacityMaxValue = "";
        debugStatus = DebugStatus.All;
        screeningConditionStatus = DebugStatus.All;
        powerStationStatusValue = PowerStationStatus.All;
    }
@@ -149,7 +149,7 @@
                selectedTitleLabelStyle();
                initializationState();
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
@@ -174,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, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
        //故障
@@ -186,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, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
        //离线
@@ -198,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, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
        //待接入
@@ -210,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, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
@@ -244,14 +244,14 @@
            public void onClick(View v) {
                DefaultFilteringDialog defaultFilteringDialog = new DefaultFilteringDialog(_mActivity);
                defaultFilteringDialog.show();
                defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, debugStatus);
                defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus);
                defaultFilteringDialog.setOnClickListener(new DefaultFilteringDialog.OnClickListener() {
                    @Override
                    public void confirm(String min, String max, String state) {
                        installedCapacityMinValue = min;//最小组串容量(装机容量)
                        installedCapacityMaxValue = max;//最大组串容量(装机容量)
                        debugStatus = state;//调试状态(全部;调试中;调试完成;已交付;授权调试)
                        loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                        screeningConditionStatus = state;//调试状态(全部;调试中;调试完成;已交付;授权调试)
                        loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
                    }
                });
            }
@@ -264,7 +264,7 @@
            @Override
            public void onRefresh() {
                viewBinding.fragmentHouseSrl.setRefreshing(false);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
                getStatusOverview();
            }
        });
@@ -285,7 +285,7 @@
                    if (!isHouseLoadingMore) {
                        // 滑动到了底部,执行相应的操作
                        HdlLogLogic.print("---滑动到了底部");
                        loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, ++currentHouseListPage, false);
                        loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, ++currentHouseListPage, false);
                    }
                }
            }
@@ -402,7 +402,7 @@
                screenIconState(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected);
                key = SortType.homeNameSort;
                value = isSelected ? SortValue.ascending : SortValue.descending;
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
        //电站发电功率筛选
@@ -413,7 +413,7 @@
                screenIconState(viewBinding.stationPowerRl, viewBinding.stationPowerIv, isSelected);
                key = SortType.powerSort;
                value = isSelected ? SortValue.ascending : SortValue.descending;
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
        //电站当日发电量筛选
@@ -424,7 +424,7 @@
                screenIconState(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected);
                key = SortType.todayElectricitySort;
                value = isSelected ? SortValue.ascending : SortValue.descending;
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
        //电站电池容量筛选
@@ -435,7 +435,7 @@
                screenIconState(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected);
                key = SortType.batteryCapacitySort;
                value = isSelected ? SortValue.ascending : SortValue.descending;
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        });
        //设备点击
@@ -621,7 +621,7 @@
                // 取消粘性事件
                EventBus.getDefault().removeStickyEvent(eventBus);
                //uin创建电站成功后通知
                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
                if (eventBus.getData() != null) {
                    Gson gson = new Gson();
                    String json = eventBus.getData().toString();
@@ -665,7 +665,7 @@
//                if (MqttRecvClient.getInstance() != null) {
//                    MqttRecvClient.getInstance().removeAllTopic();
//                }
                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
        } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) {
            // 取消粘性事件
@@ -707,7 +707,7 @@
                selectedTitleLabelStyle();
                initializationState();
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, debugStatus, powerStationStatusValue, 1, true);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            } else if (eventBus.getType().equals(ConstantManage.station_page)) {
                //通过首页电站进来的
                if (eventBus.getData().equals(PowerStationStatus.All)) {
app/src/main/java/com/hdl/photovoltaic/widget/DefaultFilteringDialog.java
@@ -315,16 +315,26 @@
                        break;
                }
            }
            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);
            switch (stateValue) {
                case DebugStatus.All:
                    setBackgroundColor(viewBinding.allTv, TitleType.debuggingState);
                    break;
                case DebugStatus.Debugging:
                    setBackgroundColor(viewBinding.beDebuggingTv, TitleType.debuggingState);
                    break;
                case DebugStatus.WAIT_DELIVERED:
                    setBackgroundColor(viewBinding.debuggingcOmpletedTv, TitleType.debuggingState);
                    break;
                case DebugStatus.Delivered:
                    setBackgroundColor(viewBinding.deliveredTv, TitleType.debuggingState);
                    break;
                case DebugStatus.SECONDARY_DEBUGGIN:
                    setBackgroundColor(viewBinding.authorizationDebuggingTv, TitleType.debuggingState);
                    break;
                default: {
                    setBackgroundColor(viewBinding.allTv, TitleType.debuggingState);
                    break;
                }
            }
        } catch (Exception ignored) {
        }
app/src/main/res/layout/dialog_default_filtering.xml
@@ -284,7 +284,7 @@
        android:id="@+id/be_debugging_tv"
        android:layout_width="102dp"
        android:layout_height="@dimen/dp_35"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginStart="@dimen/dp_15"
        android:layout_marginTop="13dp"
        android:background="@drawable/config_129"
        android:gravity="center"
@@ -298,7 +298,7 @@
        android:id="@+id/debuggingc_ompleted_tv"
        android:layout_width="102dp"
        android:layout_height="@dimen/dp_35"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginStart="@dimen/dp_15"
        android:layout_marginTop="13dp"
        android:background="@drawable/config_129"
        android:gravity="center"
@@ -326,7 +326,7 @@
        android:id="@+id/authorization_debugging_tv"
        android:layout_width="102dp"
        android:layout_height="@dimen/dp_35"
        android:layout_marginStart="@dimen/dp_20"
        android:layout_marginStart="@dimen/dp_15"
        android:layout_marginTop="13dp"
        android:background="@drawable/config_129"
        android:gravity="center"