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.OrderBean;
import com.wd.workoffice.bean.RepairBean;
import com.wd.workoffice.util.WorkUtils;

import java.util.List;

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

public class DeviceRepairAdapter extends BaseQuickAdapter<RepairBean.RecordsBean, BaseViewHolder> {

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


    @Override
    protected void convert(BaseViewHolder helper, RepairBean.RecordsBean item) {
        helper.setText(R.id.tv_name, item.getReceiveDeptName());
        helper.setText(R.id.tv_order_people, item.getLaunchUserName());
        helper.setText(R.id.tv_order_dep, item.getLaunchDeptName());
        helper.setText(R.id.tv_code, item.getId());
        helper.setText(R.id.tv_order_time, item.getCreatedTime());
        helper.setText(R.id.tv_repair_time, item.getRepairDateTime());
        helper.setText(R.id.tv_status, WorkUtils.getDeviceStatus(item.getStatus()));
        helper.setText(R.id.tv_all_price, String.valueOf(item.getAmount()));
    }
}

