From f91ef956cf482ed4ce0885dc47794b783c20c415 Mon Sep 17 00:00:00 2001 From: wjc <1243177876@qq.com> Date: 星期三, 30 四月 2025 10:14:43 +0800 Subject: [PATCH] Merge branch '1.2.0' into 1.5.1_google --- app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java | 40 ++++++++++++++++++++++++---------------- 1 files changed, 24 insertions(+), 16 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 8a06523..1a98fbd 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,17 +61,21 @@ HouseIdBean houseIdBean = this.mList.get(position); holder.homeNameTv.setText(houseIdBean.getHomeName().trim()); //瑁呮満瀹归噺 - String capacity = HdlCommonLogic.getBigDecimal(houseIdBean.getInstalledCapacity()).toString(); - holder.capacityTv.setText(capacity); - //鍙戠數鍔熺巼 - holder.power_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getPower())); - holder.power_kw_unit.setText(HdlCommonLogic.convertUnit(houseIdBean.getPower(), UnitType.kW)); - //褰撴棩鍙戠數閲� - holder.day_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getTodayElectricity())); - holder.day_kwh_unit.setText(HdlCommonLogic.convertUnit(houseIdBean.getTodayElectricity(), UnitType.kWh)); - //褰撴湀鍙戠數閲� - holder.month_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getMonthElectricity())); - holder.month_kwh_unit.setText(HdlCommonLogic.convertUnit(houseIdBean.getMonthElectricity(), UnitType.kWh)); + holder.capacityTv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getInstalledCapacity(), UnitType.kWp)); + holder.capacity_kwp_unit.setText(HdlCommonLogic.convertKWPUnit(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(), 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.plant_details_location_tv.setText(houseIdBean.getHomeAddress()); holder.item_parent_rl.setTag(position); @@ -101,8 +105,9 @@ } } }); - holder.del_home_ll.setVisibility(View.GONE); - if (houseIdBean.getDeliverStatus().equals("UNDELIVERED")) { + holder.home_del_ll.setVisibility(View.GONE); + + if (houseIdBean.getDebugStatus().equals(DebugStatus.Debugging)) { //鏈氦浠樺畬瑕佹樉绀哄垹闄ゆ寜閽� holder.del_home_ll.setVisibility(View.VISIBLE); } @@ -159,7 +164,7 @@ * 璁惧鍦ㄧ嚎 浣嗘槸褰撳墠澶勪簬鏁呴殰 鐘舵�侊細鏁呴殰 * 璁惧鍦ㄧ嚎锛堟湁涓婃姤杩囨暟鎹紝娌℃湁鏁呴殰锛� 鐘舵�侊細鍦ㄧ嚎 * 璁惧绂荤嚎 鐘舵�侊細绂荤嚎 - * @param state_value 鐢电珯鐘舵��(1:姝e父(杩愯),2:绂荤嚎,3:杩炴帴涓�,4:鏁呴殰,5:绂荤嚎鏈夋晠闅�) + * @param state_value 鐢电珯鐘舵��(1:姝e父(杩愯),2:绂荤嚎,3:杩炴帴涓�,4:鏁呴殰,5:绂荤嚎鏈夋晠闅�,6:閮ㄥ垎绂荤嚎) */ private void setTextViewStyle(TextView textView, int state_value) { @@ -172,7 +177,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); } @@ -219,6 +225,7 @@ public ImageView homeIconIv;//浣忓畢鍥剧墖 public TextView homeNameTv;//浣忓畢鍚嶇О public TextView capacityTv;//瑁呮満瀹归噺 + public TextView capacity_kwp_unit;//瑁呮満瀹归噺鍗曚綅 public TextView power_value_tv;//鍙戠數鍔熺巼 public TextView power_kw_unit;//鍙戠數鍔熺巼鍗曚綅 public TextView day_value_tv;//褰撴棩鍙戠數閲� @@ -237,6 +244,7 @@ homeIconIv = itemView.findViewById(R.id.device_details_image_iv); homeNameTv = itemView.findViewById(R.id.device_details_name_tv); capacityTv = itemView.findViewById(R.id.device_details_value_tv); + capacity_kwp_unit = itemView.findViewById(R.id.capacity_kwp_unit); power_value_tv = itemView.findViewById(R.id.power_value_tv); power_kw_unit = itemView.findViewById(R.id.power_kw_unit); day_value_tv = itemView.findViewById(R.id.day_value_tv); @@ -261,4 +269,4 @@ } -} +} \ No newline at end of file -- Gitblit v1.8.0