From 44ba605a4e850efa757020da5fb4cf02bdf6e3ab Mon Sep 17 00:00:00 2001
From: wjc <1243177876@qq.com>
Date: 星期一, 08 九月 2025 10:55:18 +0800
Subject: [PATCH] 2025年09月08日10:55:15
---
app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java | 26 ++++++++++++++++++--------
1 files changed, 18 insertions(+), 8 deletions(-)
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 1f4d7b0..b16f43d 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
@@ -61,16 +61,16 @@
holder.homeNameTv.setText(houseIdBean.getHomeName().trim());
//缁勪覆瀹归噺(鍒涘缓鐢电珯鏃惰緭鍏ョ殑缁勪覆瀹归噺)
- holder.pv_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getInstalledCapacity()));
+ 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()));
+ 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()));
+ 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()));
+ //鐢垫睜鑳介噺锛堝閲�*鐢垫睜鏁伴噺锛�
+ 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());
@@ -103,9 +103,16 @@
}
});
holder.home_del_ll.setVisibility(View.GONE);
- if (houseIdBean.getDeliverStatus().equals(DeliverStatus.UNDELIVERED)) {
+
+ 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);
}
//鍒犻櫎鐢电珯
@@ -201,7 +208,7 @@
* 璁惧鍦ㄧ嚎 浣嗘槸褰撳墠澶勪簬鏁呴殰 鐘舵�侊細鏁呴殰
* 璁惧鍦ㄧ嚎锛堟湁涓婃姤杩囨暟鎹紝娌℃湁鏁呴殰锛� 鐘舵�侊細鍦ㄧ嚎
* 璁惧绂荤嚎 鐘舵�侊細绂荤嚎
- * @param state_value 鐢电珯鐘舵��(1:姝e父(杩愯),2:绂荤嚎,3:杩炴帴涓�,4:鏁呴殰,5:绂荤嚎鏈夋晠闅�)
+ * @param state_value 鐢电珯鐘舵��(1:姝e父(杩愯),2:绂荤嚎,3:杩炴帴涓�,4:鏁呴殰,5:绂荤嚎鏈夋晠闅�,6:閮ㄥ垎绂荤嚎)
*/
private void setHomeStateTextViewStyle(TextView textView, int state_value) {
@@ -214,7 +221,8 @@
}
break;
- case 2: {
+ case 2:
+ case 6: {
text = mContext.getString(R.string.my_power_station_off_line);
drawable = AppCompatResources.getDrawable(mContext, R.drawable.device_state_ffb9b9b9);
}
@@ -276,6 +284,7 @@
public RelativeLayout item_parent_rl;//鏉$洰鐖跺鍣�
public LinearLayout home_move_ll;//绉诲姩鐢电珯浣嶇疆
public LinearLayout home_del_ll;//鍒犻櫎鐢电珯
+ public ImageView del_home_iv;
public TextView home_location_tv;//鐢电珯鍦板潃
public SwipeLayout item_parent_swipeLayout;//鐖跺鍣�
@@ -297,6 +306,7 @@
item_parent_rl = itemView.findViewById(R.id.item_parent_rl);
home_move_ll = itemView.findViewById(R.id.move_ll);
home_del_ll = itemView.findViewById(R.id.del_ll);
+ del_home_iv = itemView.findViewById(R.id.del_home_iv);
home_location_tv = itemView.findViewById(R.id.home_location_tv);
item_parent_swipeLayout = itemView.findViewById(R.id.item_parent_swipeLayout);
}
--
Gitblit v1.8.0