package com.wd.workoffice.ui.adapter;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.wd.workoffice.R;
import com.wd.workoffice.bean.mesBean.ProBadBean;
import com.wd.workoffice.util.MathUtils;

import java.util.List;

/**
 * Created by flexible on 2018/8/13.
 */

public class ReportProBadAdapter extends BaseQuickAdapter<ProBadBean.DataBean, BaseViewHolder> {

    public ReportProBadAdapter(int layoutResId, List data) {
        super(layoutResId, data);
    }


    @Override
    protected void convert(BaseViewHolder helper, ProBadBean.DataBean item) {
        helper.setText(R.id.tv_rank, item.getVariety());
        helper.setText(R.id.tv_pro_name, item.getScapReason());
        helper.setText(R.id.tv_weight, MathUtils.converData(item.getScrapWeight(),3));
    }
}

