package com.wd.workoffice.model;

import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.contract.BatChooseInfoContract;
import com.wd.workoffice.retrofit.RtfUtils;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.QueryMap;

/**
 * author : flexible
 * email : lgd19940421@163.com
 * github: https://github.com/FlexibleXd
 **/
public class BatChooseInfoModel implements BatChooseInfoContract.Model {
    public static BatChooseInfoModel newInstance() {
        return new BatChooseInfoModel();
    }

    @Override
    public Observable<BaseBean> getProcess(String processCode, Integer transitPartId) {
        return RtfUtils.getRtf().getProcess(processCode, transitPartId);
    }

    @Override
    public Observable<BaseBean> getPro(Map<String, Object> param) {
        return RtfUtils.getRtf().getProductList(param);
    }
    @Override
    public Observable<BaseBean> getStock(Map<String,Object> param) {
        return RtfUtils.getRtf().getStock(param);
    }

    @Override
    public Observable<BaseBean> getTradingPro( Map<String, Object> param ) {
        return RtfUtils.getRtf().tradingProDialog(param);
    }

    @Override
    public Observable<BaseBean> getTradingProList(Map<String, Object> param) {
        //TODO 其他类型内部订单下单，需区分接口，暂时不需要功能
        return RtfUtils.getRtf().tradingUsablePro(param);
    }
}
