wjc
2024-12-25 1a8ba64b9cca5aaa98c4f84602f0fb78d3b6b6b4
app/src/main/java/com/hdl/photovoltaic/ui/adapter/HouseInfoAdapter.java
@@ -61,14 +61,18 @@
        HouseIdBean houseIdBean = this.mList.get(position);
        holder.homeNameTv.setText(houseIdBean.getHomeName().trim());
        //装机容量
        String capacity = HdlCommonLogic.getConvertDoubleUnit(houseIdBean.getInstalledCapacity(), UnitType.kWp, false);
        String capacity = HdlCommonLogic.getBigDecimal(houseIdBean.getInstalledCapacity()).toString();
        holder.capacityTv.setText(capacity);
        //发电功率
        holder.power_value_tv.setText(HdlCommonLogic.getConvertDoubleUnit(houseIdBean.getPower(), UnitType.kW, false));
        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.getConvertDoubleUnit(houseIdBean.getTodayElectricity(), UnitType.kWh, false));
        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.getConvertDoubleUnit(houseIdBean.getMonthElectricity(), UnitType.kWh, false));
        holder.month_value_tv.setText(HdlCommonLogic.convertDoubleValue(houseIdBean.getMonthElectricity()));
        holder.month_kwh_unit.setText(HdlCommonLogic.convertUnit(houseIdBean.getMonthElectricity(), UnitType.kWh));
        holder.plant_details_location_tv.setText(houseIdBean.getHomeAddress());
        holder.item_parent_rl.setTag(position);
        setTextViewStyle(holder.stateTv, houseIdBean.getPowerStationStatus());
@@ -216,8 +220,11 @@
        public TextView homeNameTv;//住宅名称
        public TextView capacityTv;//装机容量
        public TextView power_value_tv;//发电功率
        public TextView power_kw_unit;//发电功率单位
        public TextView day_value_tv;//当日发电量
        public TextView day_kwh_unit;//当日发电量单位
        public TextView month_value_tv;//当月发电量
        public TextView month_kwh_unit;//当月发电量单位
        public TextView stateTv;//电站状态(连接中,运行,离线,故障);
        public RelativeLayout item_parent_rl;//条目父容器
        public LinearLayout move_home_ll;//移动电站位置
@@ -231,8 +238,11 @@
            homeNameTv = itemView.findViewById(R.id.device_details_name_tv);
            capacityTv = itemView.findViewById(R.id.device_details_value_tv);
            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);
            day_kwh_unit = itemView.findViewById(R.id.day_kwh_unit);
            month_value_tv = itemView.findViewById(R.id.month_value_tv);
            month_kwh_unit = itemView.findViewById(R.id.month_kwh_unit);
            stateTv = itemView.findViewById(R.id.device_state_tv);
            item_parent_rl = itemView.findViewById(R.id.item_parent_rl);
            move_home_ll = itemView.findViewById(R.id.move_ll);