package com.wd.workoffice.ui.activity.mes.quality;

import com.wd.workoffice.R;
import com.wd.workoffice.app.WorkToolBarActivity;
import com.wd.workoffice.bean.ProPriceBean;
import com.wd.workoffice.ui.adapter.MesQualityAdapter;

import java.util.List;
import java.util.Map;

import butterknife.ButterKnife;

/**
 * author : flexible
 * email : lgd19940421@163.com
 * github: https://github.com/FlexibleXd
 **/
public class MesQualityFactoryActivity extends WorkToolBarActivity {

    private Map<String, Object> param;
    private List<ProPriceBean.RecordsBean> dataList;
    private MesQualityAdapter dataAdapter;
    private int page = 1;

    @Override
    protected void initView() {
        ButterKnife.bind(this);
    }


    @Override
    protected void initData() {
//        getData();
    }

//    private void getData() {
//        RtfUtils.getRtf().getProHistoryPrice(param).compose(Transformer.schedule()).subscribe(new WorkObserver<BaseBean>() {
//            @Override
//            public void doOnSubscribe(Disposable d) {
//            }
//
//            @Override
//            public void onFail(String errorMsg) {
//                hideLoading();
//                toast(errorMsg);
//            }
//
//            @Override
//            public void onSuccess(BaseBean data) {
//                hideLoading();
//                if (data.getCode() != 0) {
//                    toast(data.getMsg());
//                    return;
//                }
//                List<ProPriceBean.RecordsBean> getList = JSON.parseObject(data.getData().toString(), ProPriceBean.class).getRecords();
//
//                if (page == 1) {
//                    srlRefresh.finishRefresh();
//                    dataList.clear();
//                    dataList.addAll(getList);
//                    dataAdapter.notifyDataSetChanged();
//                    dataAdapter.loadMoreComplete();
//                } else {
//                    dataAdapter.loadMoreComplete();
//                    dataList.addAll(getList);
//                    dataAdapter.notifyDataSetChanged();
//                }
//                if (getList.size() == 0) {
//                    dataAdapter.loadMoreEnd();
//                } else {
//                    page++;
//                }
//            }
//        });
//    }


    @Override
    protected void initEvent() {
    }

    @Override
    protected int layoutId() {
        return R.layout.activity_mes_quality_factory;
    }


}
