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.DispatchBean;
import com.wd.workoffice.bean.mesBean.MudBean;
import com.wd.workoffice.util.MathUtils;

import java.util.List;

import flexible.xd.android_base.utils.TimeUtils;

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

public class MudAdapter extends BaseQuickAdapter<MudBean, BaseViewHolder> {

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


    @Override
    protected void convert(BaseViewHolder helper, MudBean item) {
        helper.setText(R.id.tv_no,String.format( "泥料编码:%s",item.getMudCode()));
        helper.setText(R.id.tv_name, item.getMudName());
        helper.setText(R.id.tv_code, item.getMudCode());
        helper.setText(R.id.tv_code_no, item.getMudVoucherNumber());
        helper.setText(R.id.tv_data, TimeUtils.millis2String(item.getCreateDateTime()));
        helper.setText(R.id.tv_volatilize, MathUtils.converData( item.getVolatileMatter(),3));
    }
}

