wjc
2025-04-09 382d057f20369b001fe585ab3027bf5a4cd27539
2025年04月09日17:49:01
9个文件已修改
443 ■■■■■ 已修改文件
app/src/main/java/com/hdl/photovoltaic/other/HdlMessageLogic.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/message/MessageFragment.java 109 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java 297 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_house_list.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/fragment_message.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/item_message.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/item_plant_details.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/hdl/photovoltaic/other/HdlMessageLogic.java
@@ -24,7 +24,7 @@
public class HdlMessageLogic {
    private static volatile HdlMessageLogic sHdlMessageLogic;
    private final int pageSize = 50;//页数
    private final int pageSize = 100;//页数
    private List<MessageBean> mListMessage = new ArrayList<>();
app/src/main/java/com/hdl/photovoltaic/ui/BPowerStationActivity.java
@@ -143,7 +143,7 @@
        if (savedInstanceState != null) {
            //“内存重启”时调用 获取“内存重启”时保存的索引下标
            currentFragmentIndex = savedInstanceState.getInt(CURRENT_FRAGMENT, 0);
            if (fragmentList.size() != 0) {
            if (!fragmentList.isEmpty()) {
                fragmentList.clear();
            }
            fragmentList.add(mFragmentManager.findFragmentByTag(0 + ""));
app/src/main/java/com/hdl/photovoltaic/ui/home/HomePageFragment.java
@@ -467,11 +467,14 @@
        viewBinding.homePageStationSelectTimeLl.setVisibility(View.VISIBLE);
        viewBinding.autoSizeMyAAChart.setBackgroundColor(_mActivity.getColor(R.color.text_FF1C1C1E));
        setUpAAChartView(true);//图表加载
        processLogic();
        pullToRefresh();
    }
    protected void processLogic() {
    /**
     * 下拉刷新的逻辑
     */
    protected void pullToRefresh() {
        viewBinding.rsl.setDelegate(this);
        HDLRefreshViewHolder hdlRefreshViewHolder = new HDLRefreshViewHolder(_mActivity, true);
        hdlRefreshViewHolder.setPullDownImageResource(R.mipmap.loading_44);
app/src/main/java/com/hdl/photovoltaic/ui/message/MessageFragment.java
@@ -3,6 +3,7 @@
import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
@@ -32,6 +33,8 @@
import com.hdl.photovoltaic.ui.bean.UnCountBean;
import com.hdl.photovoltaic.widget.BTypeTitleListDialog;
import com.hdl.photovoltaic.widget.TypeTitleListDialog;
import com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout;
import com.hdl.photovoltaic.widget.refreshlayout.HDLRefreshViewHolder;
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
import org.greenrobot.eventbus.EventBus;
@@ -160,17 +163,17 @@
        viewBinding.allClearIv.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                showLoading();
//                showLoading();
                HdlMessageLogic.getInstance().messageAllRead("", new CloudCallBeak<Boolean>() {
                    @Override
                    public void onSuccess(Boolean obj) {
                        hideLoading();
//                        hideLoading();
                        loadNextPageMessageList(true, 1, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue, true);
                    }
                    @Override
                    public void onFailure(HDLException e) {
                        hideLoading();
//                        hideLoading();
                        HdlThreadLogic.toast(_mActivity, e);
                    }
                });
@@ -207,38 +210,6 @@
                viewBinding.allGradeTitleIv.setBackgroundResource(R.drawable.down);
                viewBinding.allTimeTitleIv.setBackgroundResource(R.drawable.up);
                setTypeTitleListDialog(viewBinding.allTimeTitleTv, FilterType.timeType, getTypeList(FilterType.timeType));
            }
        });
        //下拉按钮
        viewBinding.messageSrl.setColorSchemeResources(R.color.text_FF245EC3);
        viewBinding.messageSrl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                viewBinding.messageSrl.setRefreshing(false);
                loadNextPageMessageList(true, 1, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue, true);
            }
        });
        //上拉按钮
        viewBinding.messageRcv.addOnScrollListener(new RecyclerView.OnScrollListener() {
            @Override
            public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
//                super.onScrolled(recyclerView, dx, dy);
                LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
                if (layoutManager == null) {
                    return;
                }
                int visibleItemCount = layoutManager.getChildCount();
                int totalItemCount = layoutManager.getItemCount();
                int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
                if (visibleItemCount > 0 && visibleItemCount + firstVisibleItemPosition == totalItemCount) {
                    if (!isLoadingMore) {
                        // 滑动到了底部,执行相应的操作
                        HdlLogLogic.print("--->滑动到了底部");
                        loadNextPageMessageList(false, ++mCurrentPage, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue, false);
                    }
                }
            }
        });
        if (mMessageAdapter != null) {
@@ -313,8 +284,76 @@
        mMessageAdapter = new MessageAdapter(_mActivity);
        viewBinding.messageRcv.setLayoutManager(new LinearLayoutManager(_mActivity));
        viewBinding.messageRcv.setAdapter(mMessageAdapter);
        pullToRefresh();
    }
    /**
     * 下拉刷新的逻辑
     */
    protected void pullToRefresh() {
        viewBinding.messageSrl.setDelegate(new BGARefreshLayout.BGARefreshLayoutDelegate() {
            @Override
            public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
                new AsyncTask<Void, Void, Void>() {
                    @Override
                    protected Void doInBackground(Void... params) {
                        try {
                            Thread.sleep(1000);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        return null;
                    }
                    @Override
                    protected void onPostExecute(Void aVoid) {
                        // 执行任务(如更新UI、跳转等)
                        viewBinding.messageSrl.endRefreshing();
                        loadNextPageMessageList(true, 1, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue, true);
                    }
                }.execute();
            }
            @Override
            public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
                new AsyncTask<Void, Void, Void>() {
                    @Override
                    protected Void doInBackground(Void... params) {
                        try {
                            Thread.sleep(10);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        return null;
                    }
                    @Override
                    protected void onPostExecute(Void aVoid) {
                        viewBinding.messageSrl.endLoadingMore();
                        //加载最新数据完成
                        if (!isLoadingMore) {
                            // 滑动到了底部,执行相应的操作
                            loadNextPageMessageList(false, ++mCurrentPage, mDeviceTypeFilterKye, mDeviceTypeFilterValue, mTypeFilterKye, mTypeFilterValue, mTimeTypeFilterKye, mTimeTypeFilterValue, false);
                        }
                    }
                }.execute();
                return true;
            }
        });
        HDLRefreshViewHolder hdlRefreshViewHolder = new HDLRefreshViewHolder(_mActivity, true);
        hdlRefreshViewHolder.setPullDownImageResource(R.mipmap.loading_44);
        hdlRefreshViewHolder.setChangeToReleaseRefreshAnimResId(R.drawable.loading_refresh);
        hdlRefreshViewHolder.setRefreshingAnimResId(R.drawable.loading_refresh_end);
        viewBinding.messageSrl.setRefreshViewHolder(hdlRefreshViewHolder);
    }
    private void initData() {
        //进来读取一次数据(为了更新currentPage,currentTotal这个值),app启动时候读取,为了刷新消息模块的角标
        loadNextPageMessageList(true, 1, FilterType.all, FilterType.all, FilterType.all, FilterType.all, FilterType.all, FilterType.all, true);
app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java
@@ -5,11 +5,14 @@
import android.content.Intent;
import android.content.pm.PackageManager;
import android.location.LocationManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.provider.Settings;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.appcompat.content.res.AppCompatResources;
@@ -55,6 +58,8 @@
import com.hdl.photovoltaic.widget.ConfirmationCancelDialog;
import com.hdl.photovoltaic.widget.DefaultFilteringDialog;
import com.hdl.photovoltaic.widget.DelayedConfirmationCancelDialog;
import com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout;
import com.hdl.photovoltaic.widget.refreshlayout.HDLRefreshViewHolder;
import com.hdl.sdk.link.common.exception.HDLLinkException;
import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus;
import com.hdl.sdk.link.core.bean.gateway.GatewayBean;
@@ -99,7 +104,7 @@
    private String screeningConditionStatus = DebugStatus.All;//筛选条件状态
    private String powerStationStatusValue = PowerStationStatus.All;//电站状态(全部 不传该过滤参数,1:正常(运行),2:离线,3:待接入,4:故障)
    private final long pageSize = 20;//页数
    private final long pageSize = 100;//一页大小
    /**
     * 还原条件的初始化状态
@@ -166,15 +171,7 @@
                    return;
                }
                powerStationStatusValue = PowerStationStatus.All;
                viewBinding.allLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff));
                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));
                viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_FFACACAC));
                viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                stationStatusStyle(viewBinding.allLl,viewBinding.allDesTv);
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
@@ -187,15 +184,7 @@
                    return;
                }
                powerStationStatusValue = PowerStationStatus.malfunction;
                viewBinding.allLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                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));
                viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_FFACACAC));
                viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                stationStatusStyle(viewBinding.faultsLl,viewBinding.faultsDesTv);
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
@@ -208,15 +197,7 @@
                    return;
                }
                powerStationStatusValue = PowerStationStatus.off;
                viewBinding.allLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                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));
                viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_FFACACAC));
                viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                stationStatusStyle(viewBinding.offlineLl,viewBinding.offlineDesTv);
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
@@ -229,14 +210,7 @@
                    return;
                }
                powerStationStatusValue = PowerStationStatus.connecting;
                viewBinding.allLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
                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));
                viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
                viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_FFACACAC));
                stationStatusStyle(viewBinding.connectedLl,viewBinding.connectedDesTv);
                getStatusOverview();
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
            }
@@ -283,40 +257,6 @@
                        loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
                    }
                });
            }
        });
        //电站设置下拉箭头颜色
        viewBinding.fragmentHouseSrl.setColorSchemeResources(R.color.text_FF245EC3);
        //电站下拉读取
        viewBinding.fragmentHouseSrl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                viewBinding.fragmentHouseSrl.setRefreshing(false);
                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
                getStatusOverview();
            }
        });
        //电站上拉读取
        viewBinding.fragmentHouseSrlListRc.addOnScrollListener(new RecyclerView.OnScrollListener() {
            @Override
            public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
//                super.onScrolled(recyclerView, dx, dy);
                LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
                if (layoutManager == null) {
                    return;
                }
                int visibleItemCount = layoutManager.getChildCount();
                int totalItemCount = layoutManager.getItemCount();
                int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
                if (visibleItemCount > 0 && visibleItemCount + firstVisibleItemPosition == totalItemCount) {
                    if (!isHouseLoadingMore) {
                        // 滑动到了底部,执行相应的操作
                        HdlLogLogic.print("---滑动到了底部");
                        loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, ++currentHouseListPage, false);
                    }
                }
            }
        });
        //电站详情进入,删除电站,移动电站位置
@@ -421,7 +361,7 @@
            @Override
            public void onClick(View v) {
                boolean isSelected = !v.isSelected();
                screenIconState(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected);
                screeningConditionStyle(viewBinding.stationNameRl, viewBinding.stationNameIv, isSelected);
                key = SortType.installedCapacitySort;
                value = isSelected ? SortValue.ascending : SortValue.descending;
                getStatusOverview();
@@ -433,7 +373,7 @@
            @Override
            public void onClick(View v) {
                boolean isSelected = !v.isSelected();
                screenIconState(viewBinding.stationPowerRl, viewBinding.stationPowerIv, isSelected);
                screeningConditionStyle(viewBinding.stationPowerRl, viewBinding.stationPowerIv, isSelected);
                key = SortType.invPowerSort;
                value = isSelected ? SortValue.ascending : SortValue.descending;
                getStatusOverview();
@@ -445,7 +385,7 @@
            @Override
            public void onClick(View v) {
                boolean isSelected = !v.isSelected();
                screenIconState(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected);
                screeningConditionStyle(viewBinding.stationMonthRl, viewBinding.stationMonthIv, isSelected);
                key = SortType.batteryCapacitySort;
                value = isSelected ? SortValue.ascending : SortValue.descending;
                getStatusOverview();
@@ -457,7 +397,7 @@
            @Override
            public void onClick(View v) {
                boolean isSelected = !v.isSelected();
                screenIconState(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected);
                screeningConditionStyle(viewBinding.stationDayRl, viewBinding.stationDayIv, isSelected);
                key = SortType.todayElectricitySort;
                value = isSelected ? SortValue.ascending : SortValue.descending;
                getStatusOverview();
@@ -508,38 +448,6 @@
                });
            }
        });
        //设备设置下拉箭头颜色
        viewBinding.fragmentDeviceSrl.setColorSchemeResources(R.color.text_FF245EC3);
        //设备下拉读取
        viewBinding.fragmentDeviceSrl.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() {
            @Override
            public void onRefresh() {
                viewBinding.fragmentDeviceSrl.setRefreshing(false);
                loadNextPageDeviceList(false, 1, true);
            }
        });
        //设备上拉读取
        viewBinding.fragmentDeviceSrlListRc.addOnScrollListener(new RecyclerView.OnScrollListener() {
            @Override
            public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) {
//                super.onScrolled(recyclerView, dx, dy);
                LinearLayoutManager layoutManager = (LinearLayoutManager) recyclerView.getLayoutManager();
                if (layoutManager == null) {
                    return;
                }
                int visibleItemCount = layoutManager.getChildCount();
                int totalItemCount = layoutManager.getItemCount();
                int firstVisibleItemPosition = layoutManager.findFirstVisibleItemPosition();
                if (visibleItemCount > 0 && visibleItemCount + firstVisibleItemPosition == totalItemCount) {
                    if (!isDeviceLoadingMore) {
                        // 滑动到了底部,执行相应的操作
                        HdlLogLogic.print("---滑动到了底部");
                        loadNextPageDeviceList(false, ++currentDeviceListPage, false);
                    }
                }
            }
        });
        //设备搜索
        viewBinding.deviceSearchCl.setOnClickListener(new View.OnClickListener() {
            @Override
@@ -552,14 +460,36 @@
    }
    /**
     * 更新筛选条件状态
     * 更新筛选电站状态样式
     *
     * @param ll 组件名称
     * @param tv 组件名称
     */
    private void stationStatusStyle(LinearLayout ll, TextView tv) {
        viewBinding.allLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_no_ffffff));
        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));
        viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
        viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
        viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
        viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
        ll.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff));
        tv.setTextColor(getResources().getColor(R.color.text_FFACACAC));
    }
    /**
     * 更新筛选条件状态样式
     *
     * @param relativeLayout 组件名称
     * @param imageView      组件名称
     * @param isSelected     状态
     */
    private void screenIconState(RelativeLayout relativeLayout, ImageView imageView, boolean isSelected) {
    private void screeningConditionStyle(RelativeLayout relativeLayout, ImageView imageView, boolean isSelected) {
        viewBinding.stationNameRl.setSelected(false);
        viewBinding.stationNameIv.setSelected(false);
        viewBinding.stationPowerRl.setSelected(false);
@@ -572,18 +502,12 @@
        imageView.setSelected(isSelected);
    }
    private void initView() {
        viewBinding.powerStationLabelParent.setVisibility(View.VISIBLE);
        viewBinding.deviceLabelParent.setVisibility(View.GONE);
        viewBinding.allLl.setBackground(AppCompatResources.getDrawable(_mActivity, R.drawable.station_status_yes_ffffff));
        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));
        viewBinding.allDesTv.setTextColor(getResources().getColor(R.color.text_FFACACAC));
        viewBinding.faultsDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
        viewBinding.offlineDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
        viewBinding.connectedDesTv.setTextColor(getResources().getColor(R.color.text_FF5B5B5B));
        stationStatusStyle(viewBinding.allLl,viewBinding.allDesTv);
        //电站标签
        houseInfoAdapter = new HouseInfoAdapter(_mActivity);
        viewBinding.fragmentHouseSrlListRc.setLayoutManager(new LinearLayoutManager(_mActivity));
@@ -594,7 +518,12 @@
        deviceInfoAdapter = new DeviceInfoAdapter(_mActivity);
        viewBinding.fragmentDeviceSrlListRc.setLayoutManager(new LinearLayoutManager(_mActivity));
        viewBinding.fragmentDeviceSrlListRc.setAdapter(deviceInfoAdapter);
        //
//        this.nullDataUpdateUi();
        //下拉刷新住宅的逻辑
        pullToRefreshHome();
        //下拉刷新设备的逻辑
        pullToRefreshDevice();
    }
@@ -800,7 +729,7 @@
    /**
     * 刷新UI(电站)
     *
     * @param isRefreshing         表示是下拉刷新的
     * @param isRefreshing         是否显示加载框(true显示,false不显示)
     * @param key                  发电功率排序(powerSort);
     *                             今日发电量排序(todayElectricitySort);
     *                             创建时间排序(createTimeSort);
@@ -880,7 +809,7 @@
    /**
     * 刷新UI(设备)
     *
     * @param isRefreshing 表示是下拉刷新的
     * @param isRefreshing 是否显示加载框(true显示,false不显示)
     * @param pageNo       页码
     * @param isClear      true表示清空缓存
     */
@@ -976,12 +905,12 @@
        boolean is_data;
        String tipText = "";
        if (isClickPowerStationLabel) {
            is_data = houseListBeanIDList != null && houseListBeanIDList.size() > 0;
            is_data = houseListBeanIDList != null && !houseListBeanIDList.isEmpty();
            tipText = getString(R.string.my_power_station_data_null);
            HdlCommonLogic.getInstance().nullDataUpdateUi(_mActivity, viewBinding.homeNullDataIc.getRoot(), viewBinding.homeNullDataIc.nullDataGifAnimationIv, viewBinding.homeNullDataIc.nullDataTv, tipText, is_data);
        } else {
            is_data = deviceInfoList != null && deviceInfoList.size() > 0;
            is_data = deviceInfoList != null && !deviceInfoList.isEmpty();
            tipText = getString(R.string.no_equipment);
            HdlCommonLogic.getInstance().nullDataUpdateUi(_mActivity, viewBinding.deviceNullDataIc.getRoot(), viewBinding.deviceNullDataIc.nullDataGifAnimationIv, viewBinding.deviceNullDataIc.nullDataTv, tipText, is_data);
@@ -1123,4 +1052,132 @@
        }
    }
    /**
     * 下拉刷新【住宅】的逻辑
     */
    protected void pullToRefreshHome() {
        viewBinding.fragmentHouseSrl.setDelegate(new BGARefreshLayout.BGARefreshLayoutDelegate() {
            @Override
            public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
                new AsyncTask<Void, Void, Void>() {
                    @Override
                    protected Void doInBackground(Void... params) {
                        try {
                            Thread.sleep(1000);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        return null;
                    }
                    @Override
                    protected void onPostExecute(Void aVoid) {
                        // 执行任务(如更新UI、跳转等)
                        viewBinding.fragmentHouseSrl.endRefreshing();
                        //加载最新数据完成
                        loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, 1, true);
                        getStatusOverview();
                    }
                }.execute();
            }
            @Override
            public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
                new AsyncTask<Void, Void, Void>() {
                    @Override
                    protected Void doInBackground(Void... params) {
                        try {
                            Thread.sleep(10);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        return null;
                    }
                    @Override
                    protected void onPostExecute(Void aVoid) {
                        viewBinding.fragmentHouseSrl.endLoadingMore();
                        if (!isHouseLoadingMore) {
                            // 滑动到了底部,执行相应的操作
                            loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, ++currentHouseListPage, false);
                        }
                    }
                }.execute();
                return true;
            }
        });
        HDLRefreshViewHolder hdlRefreshViewHolder = new HDLRefreshViewHolder(_mActivity, true);
        hdlRefreshViewHolder.setPullDownImageResource(R.mipmap.loading_44);
        hdlRefreshViewHolder.setChangeToReleaseRefreshAnimResId(R.drawable.loading_refresh);
        hdlRefreshViewHolder.setRefreshingAnimResId(R.drawable.loading_refresh_end);
        viewBinding.fragmentHouseSrl.setRefreshViewHolder(hdlRefreshViewHolder);
    }
    /**
     * 下拉刷新【设备】的逻辑
     */
    protected void pullToRefreshDevice() {
        viewBinding.fragmentDeviceSrl.setDelegate(new BGARefreshLayout.BGARefreshLayoutDelegate() {
            @Override
            public void onBGARefreshLayoutBeginRefreshing(BGARefreshLayout refreshLayout) {
                new AsyncTask<Void, Void, Void>() {
                    @Override
                    protected Void doInBackground(Void... params) {
                        try {
                            Thread.sleep(1000);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        return null;
                    }
                    @Override
                    protected void onPostExecute(Void aVoid) {
                        viewBinding.fragmentDeviceSrl.endRefreshing();
                        loadNextPageDeviceList(true, 1, true);
                    }
                }.execute();
            }
            @Override
            public boolean onBGARefreshLayoutBeginLoadingMore(BGARefreshLayout refreshLayout) {
                new AsyncTask<Void, Void, Void>() {
                    @Override
                    protected Void doInBackground(Void... params) {
                        try {
                            Thread.sleep(10);
                        } catch (InterruptedException e) {
                            e.printStackTrace();
                        }
                        return null;
                    }
                    @Override
                    protected void onPostExecute(Void aVoid) {
                        // 执行任务(如更新UI、跳转等)
                        viewBinding.fragmentDeviceSrl.endLoadingMore();
                        if (!isDeviceLoadingMore) {
                            // 滑动到了底部,执行相应的操作
                            loadNextPageDeviceList(false, ++currentDeviceListPage, false);
                        }
                    }
                }.execute();
                return true;
            }
        });
        HDLRefreshViewHolder hdlRefreshViewHolder = new HDLRefreshViewHolder(_mActivity, true);
        hdlRefreshViewHolder.setPullDownImageResource(R.mipmap.loading_44);
        hdlRefreshViewHolder.setChangeToReleaseRefreshAnimResId(R.drawable.loading_refresh);
        hdlRefreshViewHolder.setRefreshingAnimResId(R.drawable.loading_refresh_end);
        viewBinding.fragmentDeviceSrl.setRefreshViewHolder(hdlRefreshViewHolder);
    }
}
app/src/main/res/layout/fragment_house_list.xml
@@ -414,11 +414,11 @@
        </androidx.constraintlayout.widget.ConstraintLayout>
        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        <com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout
            android:id="@+id/fragment_house_srl"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:layout_marginTop="18.5dp"
            android:layout_marginTop="10dp"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
@@ -427,8 +427,10 @@
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/fragment_house_srl_list_rc"
                android:layout_width="match_parent"
                android:layout_height="match_parent" />
        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
                android:layout_height="match_parent"
                android:clipToPadding="false"
                android:paddingBottom="@dimen/dp_10" />
        </com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout>
        <!--没有数据显示样式-->
        <include
            android:id="@+id/home_null_data_ic"
@@ -500,7 +502,7 @@
        </androidx.constraintlayout.widget.ConstraintLayout>
        <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
        <com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout
            android:id="@+id/fragment_device_srl"
            android:layout_width="match_parent"
            android:layout_height="0dp"
@@ -515,7 +517,7 @@
                android:layout_height="match_parent"
                android:clipToPadding="false"
                android:paddingBottom="@dimen/dp_10" />
        </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
        </com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout>
        <!--没有数据显示样式-->
        <include
app/src/main/res/layout/fragment_message.xml
@@ -53,7 +53,7 @@
    <LinearLayout
        android:id="@+id/message_cl"
        android:layout_width="match_parent"
        android:layout_height="98dp"
        android:layout_height="77dp"
        android:layout_marginTop="@dimen/dp_10"
        android:orientation="vertical"
        app:layout_constraintEnd_toEndOf="parent"
@@ -105,8 +105,9 @@
        <LinearLayout
            android:id="@+id/message_tab_ll"
            android:layout_width="match_parent"
            android:layout_height="@dimen/dp_62"
            android:layout_height="@dimen/dp_22"
            android:layout_marginStart="@dimen/dp_16"
            android:layout_marginTop="@dimen/dp_20"
            android:layout_marginEnd="@dimen/dp_16"
            android:orientation="horizontal">
            <!--全部设备-->
@@ -205,10 +206,11 @@
    </LinearLayout>
    <androidx.swiperefreshlayout.widget.SwipeRefreshLayout
    <com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout
        android:id="@+id/message_srl"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_marginTop="@dimen/dp_10"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
@@ -222,7 +224,7 @@
            android:id="@+id/message_rcv"
            android:layout_width="match_parent"
            android:layout_height="match_parent" />
    </androidx.swiperefreshlayout.widget.SwipeRefreshLayout>
    </com.hdl.photovoltaic.widget.refreshlayout.BGARefreshLayout>
    <!--没有数据显示样式-->
    <include
app/src/main/res/layout/item_message.xml
@@ -5,6 +5,7 @@
    android:layout_height="117.5dp">
    <androidx.constraintlayout.widget.ConstraintLayout
        android:layout_marginTop="@dimen/dp_10"
        android:layout_width="0dp"
        android:layout_height="107.5dp"
        android:layout_marginStart="@dimen/dp_16"
app/src/main/res/layout/item_plant_details.xml
@@ -19,6 +19,7 @@
            android:layout_width="match_parent"
            android:layout_height="194.5dp"
            android:layout_marginStart="@dimen/dp_16"
            android:layout_marginTop="@dimen/dp_10"
            android:layout_marginEnd="@dimen/dp_16"
            android:background="@drawable/bj_ff1c1c1e">
            <!--电站图片-->