From 70394b344e4c9aceb9e979eb4192bdbb28186deb Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 23 三月 2026 16:07:24 +0800
Subject: [PATCH] 2026年03月23日16:07:23

---
 app/src/main/java/com/hdl/photovoltaic/ui/powerstation/HouseAndDeviceFragment.java |   30 +-
 app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java                |    3 
 app/src/main/res/layout/item_plant_bms_details.xml                                 |  267 ++++++++++++++++++++++++++
 app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java            |  266 +++++++++++++++++++------
 app/src/main/res/drawable-xhdpi/bms.png                                            |    0 
 5 files changed, 482 insertions(+), 84 deletions(-)

diff --git a/app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java b/app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java
index 0855ff4..8c6f293 100644
--- a/app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java
+++ b/app/src/main/java/com/hdl/photovoltaic/config/UserConfigManage.java
@@ -6,6 +6,7 @@
 import com.google.gson.Gson;
 import com.hdl.photovoltaic.HDLApp;
 import com.hdl.photovoltaic.enums.Languages;
+import com.hdl.photovoltaic.enums.PowerStationType;
 import com.hdl.photovoltaic.other.HdlFileLogic;
 import com.hdl.photovoltaic.other.HdlLogLogic;
 import com.hdl.photovoltaic.other.HdlResidenceLogic;
@@ -72,7 +73,7 @@
     //褰撳墠浼氳瘽ID
     private String conversationId;
     //鐢电珯绫诲瀷(INV = 閫嗗彉鍣ㄧ數绔�;BMS = BMS鐢电珯)
-    private String powerStationType = "INV ";
+    private String powerStationType = PowerStationType.INV;
 
     public String getAgentUrl() {
         return agentUrl == null ? "" : agentUrl;
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 16e8946..a3f0b13 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
@@ -20,6 +20,7 @@
 import com.hdl.photovoltaic.enums.DebugStatus;
 import com.hdl.photovoltaic.enums.DeliverStatus;
 import com.hdl.photovoltaic.enums.PowerStationStatus;
+import com.hdl.photovoltaic.enums.PowerStationType;
 import com.hdl.photovoltaic.enums.UnitType;
 import com.hdl.photovoltaic.other.HdlCommonLogic;
 import com.hdl.photovoltaic.ui.bean.HouseIdBean;
@@ -31,7 +32,9 @@
 
 
 public class HouseInfoAdapter extends RecyclerView.Adapter<HouseInfoAdapter.MyViewHolder> {
-
+    // 瀹氫箟涓嶅悓鐨� viewType 甯搁噺
+    public static final int VIEW_TYPE_NORMAL = 1;      // 鏅�氱數绔欒鎯�
+    public static final int VIEW_TYPE_BMS = 2;        // BMS鏁版嵁鍗$墖
     private List<HouseIdBean> mList;
     private final Context mContext;
     private OnclickListener noOnclickListener;//鐐瑰嚮浜嗙殑鐩戝惉鍣�
@@ -48,91 +51,170 @@
         this.mContext = context;
     }
 
+    @Override
+    public int getItemViewType(int position) {
+        HouseIdBean item = this.mList.get(position);
+        if (item.getPowerStationType().equals(PowerStationType.BMS)) {
+            return VIEW_TYPE_BMS;
+        } else {
+            return VIEW_TYPE_NORMAL;
+        }
+    }
+
     @NonNull
     @Override
     public MyViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
-        View contentItem = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_plant_details, parent, false);
+        View contentItem;
+        // 鏍规嵁 viewType 鍔犺浇涓嶅悓鐨勫竷灞�鏂囦欢
+        if (viewType == VIEW_TYPE_BMS) {
+            contentItem = LayoutInflater.from(parent.getContext())
+                    .inflate(R.layout.item_plant_bms_details, parent, false);
+        } else {
+            contentItem = LayoutInflater.from(parent.getContext())
+                    .inflate(R.layout.item_plant_details, parent, false);
+        }
         return new MyViewHolder(contentItem);
     }
 
 
     @Override
     public void onBindViewHolder(@NonNull MyViewHolder holder, int position) {
-
         HouseIdBean houseIdBean = this.mList.get(position);
-        holder.homeNameTv.setText(houseIdBean.getHomeName().trim());
-        //缁勪覆瀹归噺(鍒涘缓鐢电珯鏃惰緭鍏ョ殑缁勪覆瀹归噺)
-        holder.pv_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getInstalledCapacity(), UnitType.kWp));
-        holder.pv_kw_unit.setText(HdlCommonLogic.convertKWPUnit(houseIdBean.getInstalledCapacity()));
-        //褰撴棩鍙戠數
-        holder.generation_today_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getTodayElectricity(), UnitType.kWh));
-        holder.generation_today_kw_unit.setText(HdlCommonLogic.convertKWHUnit(houseIdBean.getTodayElectricity()));
-        //閫嗗彉鍣ㄩ瀹氬姛鐜囷紙鍗曚釜閫嗗彉鍣ㄩ瀹氬姛鐜�*閫嗗彉鍣ㄦ暟閲忥級
-        holder.output_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getInvPower(), UnitType.kW));
-        holder.output_kw_unit.setText(HdlCommonLogic.convertKWUnit(houseIdBean.getInvPower()));
-        //鐢垫睜鑳介噺锛堝閲�*鐢垫睜鏁伴噺锛�
-        holder.battery_storage_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getBatteryCapacity(), UnitType.kWh));
-        holder.battery_storage_kw_unit.setText(HdlCommonLogic.convertKWHUnit(houseIdBean.getBatteryCapacity()));
+        int viewType = getItemViewType(position);
+        if (viewType == VIEW_TYPE_BMS) {
+            holder.setText(R.id.bms_home_name_tv, houseIdBean.getHomeName().trim());
+            //鐢垫睜鑳介噺锛堝閲�*鐢垫睜鏁伴噺锛�
+            holder.setText(R.id.bms_battery_storage_value_tv, HdlCommonLogic.convertDoubleValue(houseIdBean.getBatteryCapacity(), UnitType.kWh));
+            holder.setText(R.id.bms_battery_storage_kw_unit, HdlCommonLogic.convertKWHUnit(houseIdBean.getBatteryCapacity()));
+            holder.setText(R.id.bms_home_location_tv, houseIdBean.getHomeAddress());
+            holder.getView(R.id.bms_item_parent_rl).setTag(position);
+            setHomeStateTextViewStyle(holder.getView(R.id.bms_home_state_tv), houseIdBean.getPowerStationStatus());
+            setHomeDebugStateTextViewStyle(holder.getView(R.id.bms_home_debug_state_tv), holder.getView(R.id.bms_home_debug_state_iv), houseIdBean.getDebugStatus());
+            GlideUtils.getRoundedCornersImage(mContext, houseIdBean.getPowerStationImage(), holder.getView(R.id.bms_home_image_iv), 6);
+            holder.getView(R.id.bms_item_parent_rl).setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    try {
+                        if (noOnclickListener != null) {
+                            noOnclickListener.onClick((int) holder.getView(R.id.bms_item_parent_rl).getTag(), houseIdBean);
+                        }
+                    } catch (Exception ignored) {
+                    }
+                }
+            });
+            //绉诲姩鐢电珯浣嶇疆
+            holder.getView(R.id.bms_move_ll).setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    try {
+                        if (noOnclickListener != null) {
+                            noOnclickListener.onMoveClick((int) holder.getView(R.id.bms_item_parent_rl).getTag(), houseIdBean);
+                        }
+                    } catch (Exception ignored) {
+                    }
+                }
+            });
+            holder.getView(R.id.bms_del_ll).setVisibility(View.GONE);
+            if (houseIdBean.getDebugStatus().equals(DebugStatus.Debugging)) {
+                //鏈氦浠樺畬瑕佹樉绀哄垹闄ゆ寜閽�
+                holder.getView(R.id.bms_del_ll).setVisibility(View.VISIBLE);
+                holder.setImageResource(R.id.bms_del_home_iv, R.drawable.del_home);
+            }
+            if (houseIdBean.getDebugStatus().equals(DebugStatus.WAIT_DELIVERED)) {
+                //鏇存敼鎴愬洖婊氬浘鏍�
+                holder.getView(R.id.bms_del_ll).setVisibility(View.VISIBLE);
+                holder.setImageResource(R.id.bms_del_home_iv, R.drawable.roll_back);
+            }
 
-        holder.home_location_tv.setText(houseIdBean.getHomeAddress());
-        holder.item_parent_rl.setTag(position);
-        setHomeStateTextViewStyle(holder.home_state_tv, houseIdBean.getPowerStationStatus());
-        setHomeDebugStateTextViewStyle(holder.home_debug_state_tv, holder.home_debug_state_iv, houseIdBean.getDebugStatus());
-        GlideUtils.getRoundedCornersImage(mContext, houseIdBean.getPowerStationImage(), holder.homeIconIv, 6);
+            //鍒犻櫎鐢电珯
+            holder.getView(R.id.bms_del_ll).setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    try {
+                        if (noOnclickListener != null) {
+                            noOnclickListener.onDelClick((int) holder.item_parent_rl.getTag(), houseIdBean);
+                        }
+                    } catch (Exception ignored) {
+                    }
+                }
+            });
+            if (UserConfigManage.getInstance().isTourist_mode()) {
+                holder.getView(R.id.bms_del_ll).setVisibility(View.GONE);
+            }
+        } else {
+            holder.homeNameTv.setText(houseIdBean.getHomeName().trim());
+            //缁勪覆瀹归噺(鍒涘缓鐢电珯鏃惰緭鍏ョ殑缁勪覆瀹归噺)
+            holder.pv_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getInstalledCapacity(), UnitType.kWp));
+            holder.pv_kw_unit.setText(HdlCommonLogic.convertKWPUnit(houseIdBean.getInstalledCapacity()));
+            //褰撴棩鍙戠數
+            holder.generation_today_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getTodayElectricity(), UnitType.kWh));
+            holder.generation_today_kw_unit.setText(HdlCommonLogic.convertKWHUnit(houseIdBean.getTodayElectricity()));
+            //閫嗗彉鍣ㄩ瀹氬姛鐜囷紙鍗曚釜閫嗗彉鍣ㄩ瀹氬姛鐜�*閫嗗彉鍣ㄦ暟閲忥級
+            holder.output_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getInvPower(), UnitType.kW));
+            holder.output_kw_unit.setText(HdlCommonLogic.convertKWUnit(houseIdBean.getInvPower()));
+            //鐢垫睜鑳介噺锛堝閲�*鐢垫睜鏁伴噺锛�
+            holder.battery_storage_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getBatteryCapacity(), UnitType.kWh));
+            holder.battery_storage_kw_unit.setText(HdlCommonLogic.convertKWHUnit(houseIdBean.getBatteryCapacity()));
+
+            holder.home_location_tv.setText(houseIdBean.getHomeAddress());
+            holder.item_parent_rl.setTag(position);
+            setHomeStateTextViewStyle(holder.home_state_tv, houseIdBean.getPowerStationStatus());
+            setHomeDebugStateTextViewStyle(holder.home_debug_state_tv, holder.home_debug_state_iv, houseIdBean.getDebugStatus());
+            GlideUtils.getRoundedCornersImage(mContext, houseIdBean.getPowerStationImage(), holder.homeIconIv, 6);
 //        HdlLogLogic.print("---鐢电珯鍚嶇О:" + houseIdBean.getHomeName() + "---鍥剧墖url:" + houseIdBean.getPowerStationImage(), false);
-        holder.item_parent_rl.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                try {
-                    if (noOnclickListener != null) {
-                        noOnclickListener.onClick((int) holder.item_parent_rl.getTag(), houseIdBean);
+            holder.item_parent_rl.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    try {
+                        if (noOnclickListener != null) {
+                            noOnclickListener.onClick((int) holder.item_parent_rl.getTag(), houseIdBean);
+                        }
+                    } catch (Exception ignored) {
                     }
-                } catch (Exception ignored) {
                 }
-            }
-        });
-        //绉诲姩鐢电珯浣嶇疆
-        holder.home_move_ll.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                try {
-                    if (noOnclickListener != null) {
-                        noOnclickListener.onMoveClick((int) holder.item_parent_rl.getTag(), houseIdBean);
+            });
+            //绉诲姩鐢电珯浣嶇疆
+            holder.home_move_ll.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    try {
+                        if (noOnclickListener != null) {
+                            noOnclickListener.onMoveClick((int) holder.item_parent_rl.getTag(), houseIdBean);
+                        }
+                    } catch (Exception ignored) {
                     }
-                } catch (Exception ignored) {
                 }
-            }
-        });
-        holder.home_del_ll.setVisibility(View.GONE);
-
-        if (houseIdBean.getDebugStatus().equals(DebugStatus.Debugging)) {
-            //鏈氦浠樺畬瑕佹樉绀哄垹闄ゆ寜閽�
-            holder.home_del_ll.setVisibility(View.VISIBLE);
-            holder.del_home_iv.setImageResource(R.drawable.del_home);
-        }
-        if (houseIdBean.getDebugStatus().equals(DebugStatus.WAIT_DELIVERED)) {
-            //鏇存敼鎴愬洖婊氬浘鏍�
-            holder.home_del_ll.setVisibility(View.VISIBLE);
-            holder.del_home_iv.setImageResource(R.drawable.roll_back);
-        }
-
-        //鍒犻櫎鐢电珯
-        holder.home_del_ll.setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                try {
-                    if (noOnclickListener != null) {
-                        noOnclickListener.onDelClick((int) holder.item_parent_rl.getTag(), houseIdBean);
-                    }
-                } catch (Exception ignored) {
-                }
-            }
-        });
-
-        if (UserConfigManage.getInstance().isTourist_mode()) {
+            });
             holder.home_del_ll.setVisibility(View.GONE);
-        }
 
+            if (houseIdBean.getDebugStatus().equals(DebugStatus.Debugging)) {
+                //鏈氦浠樺畬瑕佹樉绀哄垹闄ゆ寜閽�
+                holder.home_del_ll.setVisibility(View.VISIBLE);
+                holder.del_home_iv.setImageResource(R.drawable.del_home);
+            }
+            if (houseIdBean.getDebugStatus().equals(DebugStatus.WAIT_DELIVERED)) {
+                //鏇存敼鎴愬洖婊氬浘鏍�
+                holder.home_del_ll.setVisibility(View.VISIBLE);
+                holder.del_home_iv.setImageResource(R.drawable.roll_back);
+            }
+
+            //鍒犻櫎鐢电珯
+            holder.home_del_ll.setOnClickListener(new View.OnClickListener() {
+                @Override
+                public void onClick(View v) {
+                    try {
+                        if (noOnclickListener != null) {
+                            noOnclickListener.onDelClick((int) holder.item_parent_rl.getTag(), houseIdBean);
+                        }
+                    } catch (Exception ignored) {
+                    }
+                }
+            });
+
+            if (UserConfigManage.getInstance().isTourist_mode()) {
+                holder.home_del_ll.setVisibility(View.GONE);
+            }
+        }
 
     }
 
@@ -316,6 +398,54 @@
             home_location_tv = itemView.findViewById(R.id.home_location_tv);
             item_parent_swipeLayout = itemView.findViewById(R.id.item_parent_swipeLayout);
         }
+
+        /**
+         * 璁剧疆鏂囨湰
+         */
+        public void setText(int viewId, String text) {
+            TextView textView = getView(viewId);
+            if (textView != null) {
+                textView.setText(text);
+            }
+        }
+
+        /**
+         * 璁剧疆鍥剧墖璧勬簮
+         */
+        public void setImageResource(int viewId, int resId) {
+            ImageView imageView = getView(viewId);
+            if (imageView != null) {
+                imageView.setImageResource(resId);
+            }
+        }
+
+        /**
+         * 璁剧疆鏂囨湰棰滆壊
+         */
+        public void setTextColor(int viewId, int color) {
+            TextView textView = getView(viewId);
+            if (textView != null) {
+                textView.setTextColor(color);
+            }
+        }
+
+        /**
+         * 璁剧疆鐐瑰嚮浜嬩欢
+         */
+        public void setOnClickListener(int viewId, View.OnClickListener listener) {
+            View view = getView(viewId);
+            if (view != null) {
+                view.setOnClickListener(listener);
+            }
+        }
+
+        /**
+         * 鑾峰彇 View
+         */
+        @SuppressWarnings("unchecked")
+        public <T extends View> T getView(int viewId) {
+            return (T) itemView.findViewById(viewId);
+        }
     }
 
     public interface OnclickListener {
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 190aca2..889632a 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
@@ -289,7 +289,7 @@
             public void onClick(View v) {
                 DefaultFilteringDialog defaultFilteringDialog = new DefaultFilteringDialog(_mActivity);
                 defaultFilteringDialog.show();
-                defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus,powerStationTypeValue);
+                defaultFilteringDialog.initState(installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationTypeValue);
                 defaultFilteringDialog.setOnClickListener(new DefaultFilteringDialog.OnClickListener() {
                     @Override
                     public void confirm(String min, String max, String state, String powerStationType) {
@@ -391,7 +391,7 @@
 //                            if (houseIdBean.getDebugType().equals(DebugType.NORMAL)) {
                             //銆愬父瑙勬柟寮忋�戝彂璧峰垹闄ょ數绔欐寚浠わ紙鎼滅储缃戝叧鏄�冨埌缃戝叧娌℃湁杩炴帴鍒颁簯绔紝浣跨敤鏈湴鍙戦�佸垵濮嬪寲鎸囦护锛�
                             // 纭欢閭h竟鍙柊鍥轰欢涔熷彂鍒濆鍖� 2025骞�10鏈�14鏃�10:55:18
-                            HdlDeviceLogic.getInstance().getCurrentHomeLocalAndCloudGatewayList(houseIdBean.getHomeId(), new CloudCallBeak<List<GatewayBean>>() {
+                            HdlDeviceLogic.getInstance().getCurrentHomeLocalAndCloudGatewayList(houseIdBean.getHomeId(), houseIdBean.getPowerStationType(), new CloudCallBeak<List<GatewayBean>>() {
                                 @Override
                                 public void onSuccess(List<GatewayBean> list) {
                                     //鍙戣捣鍒犻櫎鐢电珯鎸囦护
@@ -430,7 +430,7 @@
                 key = SortType.installedCapacitySort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //棰濆畾鍔熺巼绛涢��
@@ -442,7 +442,7 @@
                 key = SortType.invPowerSort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //鐢电珯鐢垫睜瀹归噺绛涢��
@@ -454,7 +454,7 @@
                 key = SortType.batteryCapacitySort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //鐢电珯褰撴棩鍙戠數閲忕瓫閫�
@@ -466,7 +466,7 @@
                 key = SortType.todayElectricitySort;
                 value = isSelected ? SortValue.ascending : SortValue.descending;
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         });
         //璁惧鐐瑰嚮
@@ -503,7 +503,7 @@
                 List<CloudInverterDeviceBean> newList = new ArrayList<>();
                 newList.add(deviceBean);
                 //鐩殑鏄负浜嗚幏鍙栨嬁鍒扮綉鍏矷D锛宮qtt閫氳绉橀挜绛変俊鎭紝鎷垮埌鍚庣紦瀛樺埌鏈湴閫嗗彉鍣ㄥ垪琛ㄩ噷闈紝鍙戦�佹暟鎹暟鎹椂鑷姩鍘荤紦瀛樺垪琛ㄩ噷闈㈠幓鏌ユ壘锛�
-                HdlDeviceLogic.getInstance().setDeviceRemoteInfo(newList, deviceBean.getHomeId(), new CloudCallBeak<List<GatewayBean>>() {
+                HdlDeviceLogic.getInstance().setDeviceRemoteInfo(newList, deviceBean.getHomeId(), PowerStationType.All, new CloudCallBeak<List<GatewayBean>>() {
                     @Override
                     public void onSuccess(List<GatewayBean> obj) {
 
@@ -724,7 +724,7 @@
 //                    MqttRecvClient.getInstance().removeAllTopic();
 //                }
 
-                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true);
+                loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             }
         } else if (HDLUniMP.UNI_EVENT_REPLY_DEVICE_LIST.equals(eventBus.getType())) {
             // 鍙栨秷绮樻�т簨浠�
@@ -738,8 +738,8 @@
             }
             String homeId = eventBus.getData().toString();
             //杩涘幓浣忓畢璇︽儏uni璇诲彇閫嗗彉鍣ㄥ垪琛ㄦ垚鍔熷悗閫氱煡
-            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).size(); i++) {
-                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId).get(i).getGatewayId();
+            for (int i = 0; i < HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId,PowerStationType.All).size(); i++) {
+                String gatewayId = HdlDeviceLogic.getInstance().getCurrentHomeGatewayList(homeId,PowerStationType.All).get(i).getGatewayId();
                 //瀛楃涓叉槸鑷繁鎸夎鍒欐嫾鎺ョ殑,閲岄潰娉ㄥ唽涓婚鏃朵細瑙f瀽瀛楃涓�,鍙嬁getGatewayId()鍊�;
                 String topic = "/user/" + gatewayId + "/#";
                 //杩涘幓浣忓畢璇︽儏寮�濮嬭闃呬富棰�
@@ -767,7 +767,7 @@
                 initializationState();
                 stationStatusStyle(viewBinding.allLl, viewBinding.allDesTv);
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             } else if (eventBus.getType().equals(ConstantManage.station_page)) {
                 // 鍙栨秷绮樻�т簨浠�
                 EventBus.getDefault().removeStickyEvent(eventBus);
@@ -785,7 +785,7 @@
                     stationStatusStyle(viewBinding.connectedLl, viewBinding.connectedDesTv);
                 }
                 getStatusOverview();
-                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, 1, true);
+                loadNextPageHouseList(true, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
             } else if (eventBus.getType().equals(ConstantManage.station_edit)) {
                 //缂栬緫鍚庢洿鏂颁竴涓嬩綇瀹呭垪琛�
                 //loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, gridTypeValue, powerStationStatusValue, 1, true);
@@ -804,7 +804,7 @@
      * 鐢电珯鐘舵�佹瑙�
      */
     private void getStatusOverview() {
-        HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue,powerStationTypeValue, new CloudCallBeak<StatusOverviewBean>() {
+        HdlResidenceLogic.getInstance().getStatusOverview(screeningConditionStatus, installedCapacityMinValue, installedCapacityMaxValue, powerStationTypeValue, new CloudCallBeak<StatusOverviewBean>() {
             @Override
             public void onSuccess(StatusOverviewBean statusOverviewBean) {
                 if (statusOverviewBean == null) {
@@ -1196,7 +1196,7 @@
                         // 鎵ц浠诲姟锛堝鏇存柊UI銆佽烦杞瓑锛�
                         viewBinding.fragmentHouseSrl.endRefreshing();
                         //鍔犺浇鏈�鏂版暟鎹畬鎴�
-                        loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue,1, true);
+                        loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, 1, true);
                         getStatusOverview();
                     }
                 }.execute();
@@ -1223,7 +1223,7 @@
                         viewBinding.fragmentHouseSrl.endLoadingMore();
                         if (!isHouseLoadingMore) {
                             // 婊戝姩鍒颁簡搴曢儴锛屾墽琛岀浉搴旂殑鎿嶄綔
-                            loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue,powerStationTypeValue, ++currentHouseListPage, false);
+                            loadNextPageHouseList(false, key, value, installedCapacityMinValue, installedCapacityMaxValue, screeningConditionStatus, powerStationStatusValue, powerStationTypeValue, ++currentHouseListPage, false);
                         }
                     }
                 }.execute();
diff --git a/app/src/main/res/drawable-xhdpi/bms.png b/app/src/main/res/drawable-xhdpi/bms.png
new file mode 100644
index 0000000..7422f37
--- /dev/null
+++ b/app/src/main/res/drawable-xhdpi/bms.png
Binary files differ
diff --git a/app/src/main/res/layout/item_plant_bms_details.xml b/app/src/main/res/layout/item_plant_bms_details.xml
new file mode 100644
index 0000000..ea70459
--- /dev/null
+++ b/app/src/main/res/layout/item_plant_bms_details.xml
@@ -0,0 +1,267 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<com.hdl.photovoltaic.widget.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:id="@+id/bms_item_parent_swipeLayout"
+    android:layout_width="match_parent"
+    android:layout_height="wrap_content">
+
+    <LinearLayout
+        android:id="@+id/bms_swipe_layout_il"
+        android:layout_width="66dp"
+        android:layout_height="124.5dp"
+        android:layout_marginTop="@dimen/dp_0"
+        android:orientation="vertical">
+
+        <View
+            android:layout_width="match_parent"
+            android:layout_height="@dimen/dp_10" />
+
+        <LinearLayout
+            android:id="@+id/bms_move_ll"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1"
+            android:gravity="center_vertical"
+            android:orientation="vertical">
+
+            <ImageView
+                android:id="@+id/bms_move_home_iv"
+                android:layout_width="@dimen/dp_36"
+                android:layout_height="@dimen/dp_36"
+                android:src="@drawable/move_house" />
+
+        </LinearLayout>
+
+        <LinearLayout
+            android:id="@+id/bms_del_ll"
+            android:layout_width="match_parent"
+            android:layout_height="0dp"
+            android:layout_weight="1"
+            android:gravity="center_vertical"
+            android:orientation="vertical">
+
+
+            <ImageView
+                android:id="@+id/bms_del_home_iv"
+                android:layout_width="@dimen/dp_36"
+                android:layout_height="@dimen/dp_36"
+                android:src="@drawable/del_home" />
+
+
+        </LinearLayout>
+
+
+    </LinearLayout>
+
+    <RelativeLayout
+        android:id="@+id/bms_item_parent_rl"
+        android:layout_width="match_parent"
+        android:layout_height="134.5dp">
+
+        <RelativeLayout
+            android:id="@+id/bms_device_details_info_rl"
+            android:layout_width="match_parent"
+            android:layout_height="124.5dp"
+            android:layout_marginStart="@dimen/dp_16"
+            android:layout_marginTop="@dimen/dp_10"
+            android:layout_marginEnd="@dimen/dp_16"
+            android:background="@drawable/bj_ff1c1c1e">
+            <!--鐢电珯鍥剧墖-->
+            <ImageView
+                android:id="@+id/bms_home_image_iv"
+                android:layout_width="44dp"
+                android:layout_height="42dp"
+                android:layout_marginStart="@dimen/dp_16"
+                android:layout_marginTop="@dimen/dp_13"
+                android:scaleType="centerCrop" />
+            <!--鐢电珯鍚嶇О浠ュ強鍦板潃-->
+            <LinearLayout
+                android:id="@+id/bms_home_name_ll"
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_20"
+                android:layout_marginStart="@dimen/dp_5"
+                android:layout_marginTop="13.5dp"
+                android:layout_toStartOf="@+id/bms_home_debug_state_ll"
+                android:layout_toEndOf="@+id/bms_home_image_iv"
+                android:gravity="center_vertical"
+                android:orientation="horizontal">
+
+                <LinearLayout
+                    android:layout_width="@dimen/dp_19"
+                    android:layout_height="@dimen/dp_19"
+                    android:gravity="center">
+
+                    <TextView
+                        android:id="@+id/bms_home_state_tv"
+                        android:layout_width="7dp"
+                        android:layout_height="7dp"
+                        android:background="@drawable/device_state_ff38c494" />
+                </LinearLayout>
+
+                <TextView
+                    android:id="@+id/bms_home_name_tv"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:ellipsize="end"
+                    android:gravity="center_vertical|start"
+                    android:paddingStart="0dp"
+                    android:paddingEnd="@dimen/dp_5"
+                    android:singleLine="true"
+                    android:text="@string/power_station"
+                    android:textColor="@color/text_FFACACAC"
+                    android:textSize="@dimen/text_14" />
+            </LinearLayout>
+            <!--鐢电珯鐘舵��-->
+            <LinearLayout
+                android:id="@+id/bms_home_debug_state_ll"
+                android:layout_width="wrap_content"
+                android:layout_height="@dimen/dp_18"
+                android:layout_alignParentTop="true"
+                android:layout_alignParentEnd="true"
+                android:layout_marginTop="@dimen/dp_15"
+                android:orientation="horizontal">
+
+                <ImageView
+                    android:id="@+id/bms_home_debug_state_iv"
+                    android:layout_width="@dimen/dp_18"
+                    android:layout_height="@dimen/dp_18" />
+
+                <TextView
+                    android:id="@+id/bms_home_debug_state_tv"
+                    android:layout_width="wrap_content"
+                    android:layout_height="match_parent"
+                    android:paddingStart="0dp"
+                    android:paddingEnd="@dimen/dp_16"
+                    android:textColor="@color/text_FFACACAC"
+                    android:textSize="@dimen/text_12" />
+            </LinearLayout>
+            <!--鐢电珯鍦板潃-->
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="@dimen/dp_19"
+                android:layout_below="@+id/bms_home_name_ll"
+                android:layout_alignStart="@+id/bms_home_name_ll">
+
+                <ImageView
+                    android:layout_width="@dimen/dp_19"
+                    android:layout_height="@dimen/dp_19"
+                    android:src="@drawable/location" />
+
+                <TextView
+                    android:id="@+id/bms_home_location_tv"
+                    android:layout_width="match_parent"
+                    android:layout_height="match_parent"
+                    android:ellipsize="end"
+                    android:gravity="center_vertical|start"
+                    android:paddingStart="0dp"
+                    android:paddingEnd="@dimen/dp_5"
+                    android:singleLine="true"
+                    android:text="@string/power_station"
+                    android:textColor="@color/text_FF5B5B5B"
+                    android:textSize="@dimen/text_12" />
+            </LinearLayout>
+
+
+            <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_below="@+id/bms_home_image_iv"
+                android:layout_alignStart="@+id/bms_home_image_iv"
+                android:layout_marginTop="@dimen/dp_16"
+                android:layout_marginEnd="@dimen/dp_16"
+                android:orientation="vertical">
+
+                <LinearLayout
+                    android:layout_width="match_parent"
+                    android:layout_height="39dp"
+                    android:orientation="horizontal">
+
+                    <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1">
+
+                        <ImageView
+                            android:layout_width="37.5dp"
+                            android:layout_height="37.5dp"
+                            android:layout_marginEnd="@dimen/dp_12"
+                            android:src="@drawable/battery_storage" />
+
+                        <LinearLayout
+                            android:id="@+id/battery_storage_ll"
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:orientation="vertical">
+
+                            <LinearLayout
+                                android:layout_width="match_parent"
+                                android:layout_height="@dimen/dp_20">
+
+                                <TextView
+                                    android:id="@+id/bms_battery_storage_value_tv"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="match_parent"
+                                    android:gravity="center_vertical|start"
+                                    android:text="0"
+                                    android:textColor="@color/text_FFACACAC"
+                                    android:textSize="@dimen/text_14" />
+
+                                <TextView
+                                    android:id="@+id/bms_battery_storage_kw_unit"
+                                    android:layout_width="wrap_content"
+                                    android:layout_height="match_parent"
+                                    android:layout_marginStart="3dp"
+                                    android:gravity="bottom"
+                                    android:text="kWh"
+                                    android:textColor="@color/text_FF5B5B5B"
+                                    android:textSize="@dimen/text_10" />
+                            </LinearLayout>
+
+                            <TextView
+                                android:id="@+id/bms_attery_storage_type_tv"
+                                android:layout_width="match_parent"
+                                android:layout_height="@dimen/dp_17"
+                                android:layout_marginTop="3dp"
+                                android:gravity="center_vertical|start"
+                                android:text="@string/battery_capacity_indicator"
+                                android:textColor="@color/text_FF5B5B5B"
+                                android:textSize="@dimen/text_12" />
+
+                        </LinearLayout>
+                    </LinearLayout>
+
+                    <LinearLayout
+                        android:layout_width="0dp"
+                        android:layout_height="match_parent"
+                        android:layout_weight="1">
+
+                        <ImageView
+                            android:layout_width="37.5dp"
+                            android:layout_height="37.5dp"
+                            android:layout_marginEnd="@dimen/dp_12"
+                            android:src="@drawable/bms" />
+
+                        <TextView
+                            android:layout_width="wrap_content"
+                            android:layout_height="match_parent"
+                            android:gravity="center_vertical|start"
+                            android:text="BMS"
+                            android:textColor="@color/text_FFACACAC"
+                            android:textSize="@dimen/text_14" />
+                    </LinearLayout>
+                </LinearLayout>
+
+                <View
+                    android:layout_width="match_parent"
+                    android:layout_height="@dimen/dp_16" />
+
+            </LinearLayout>
+
+
+        </RelativeLayout>
+
+
+    </RelativeLayout>
+
+</com.hdl.photovoltaic.widget.SwipeLayout>
+

--
Gitblit v1.8.0