package com.philisense.rdgo.http;

import com.example.http.HttpUtils;
import com.philisense.rdgo.bean.LineBean;
import com.philisense.rdgo.bean.request.BasePageRequestBean;
import com.philisense.rdgo.bean.request.BoxIdRequestBean;
import com.philisense.rdgo.bean.request.BoxInfoRequestBean;
import com.philisense.rdgo.bean.request.LoginRequestBean;
import com.philisense.rdgo.bean.request.OrderDetailRequestBean;
import com.philisense.rdgo.bean.request.OrderReplaceSubmitRequestBean;
import com.philisense.rdgo.bean.request.OrderSubmitRequestBean;
import com.philisense.rdgo.bean.request.PasswordRequestBean;
import com.philisense.rdgo.bean.request.PeopleRequestBean;
import com.philisense.rdgo.bean.request.PileInfoRequestBean;
import com.philisense.rdgo.bean.request.ProductRequestBean;
import com.philisense.rdgo.bean.request.PutInRequestBean;
import com.philisense.rdgo.bean.request.RemoveRequestBean;
import com.philisense.rdgo.bean.request.ReplaceRequestBean;
import com.philisense.rdgo.bean.request.ResetRequestBean;
import com.philisense.rdgo.bean.request.SeeBean;
import com.philisense.rdgo.bean.request.UserOutBean;
import com.philisense.rdgo.bean.request.WhRequestBean;
import com.philisense.rdgo.bean.request.addRequestBean;
import com.philisense.rdgo.bean.request.pile;
import com.philisense.rdgo.bean.response.AllBoxBean;
import com.philisense.rdgo.bean.response.BaseBean;
import com.philisense.rdgo.bean.response.BoxBean;
import com.philisense.rdgo.bean.response.BoxInfoBean;
import com.philisense.rdgo.bean.response.CommonBean;
import com.philisense.rdgo.bean.response.LoginBean;
import com.philisense.rdgo.bean.response.OrderDetailBean;
import com.philisense.rdgo.bean.response.PeopleBean;
import com.philisense.rdgo.bean.response.PileBoxBean;
import com.philisense.rdgo.bean.response.PileInfoBean;
import com.philisense.rdgo.bean.response.ProductBean;
import com.philisense.rdgo.bean.response.PutOutRecordBean;
import com.philisense.rdgo.bean.response.TypeBean;
import com.philisense.rdgo.bean.response.UserInfoBean;
import com.philisense.rdgo.bean.response.UserListBean;
import com.philisense.rdgo.bean.response.WarehouseBean;
import com.philisense.rdgo.bean.response.WhBean;

import io.reactivex.Observable;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * Created by shaop on 2017/12/7.
 */

public interface HttpClient {
    class Builder {
        public static HttpClient getBaseService() {
            return HttpUtils.getInstance().getBaseServer(HttpClient.class);
        }
    }


    @GET("user/info")
    Observable<UserInfoBean> userInfo(
            @Header("accessToken") String accessToken);

    @POST("user/Login")
    Observable<LoginBean> login(
            @Body LoginRequestBean body);

    @GET("user/infoApp")
    Observable<UserListBean> getUserList();

    @POST("user/modifyPassword")
    Observable<BaseBean> modifyPassword(
            @Body PasswordRequestBean body);

    @POST("pile/box")
    Observable<BoxInfoBean> getBoxInfo(
            @Body BoxInfoRequestBean body);

    @POST("pile/pile")
    Observable<PileInfoBean> getPileInfo(
            @Body PileInfoRequestBean body);

    @POST("send/search/info")
    Observable<OrderDetailBean> getOrderDetail(
            @Body OrderDetailRequestBean body);

    @POST("send/outbound")
    Observable<BaseBean> sendOutBound(
            @Body OrderSubmitRequestBean body);

    @POST("record/record")
    Observable<PutOutRecordBean> getPutOutRecord(
            @Body BasePageRequestBean body);

    @POST("pile/storage")
    Observable<BaseBean> putInStorage(
            @Body PutInRequestBean body);

    @POST("pile/replace")
    Observable<BaseBean> replaceAction(
            @Body ReplaceRequestBean body);

    @POST("pile/eliminate")
    Observable<BaseBean> removeAction(
            @Body RemoveRequestBean body);

    @POST("pile/boxDel")
    Observable<BaseBean> inRemoveAction(
            @Body RemoveRequestBean body);

    @GET("warehouse/list")
    Observable<WarehouseBean> getWarehouse(
            @Query("accessToken") String accessToken);

    @POST("pile/pileBox")
    Observable<PileBoxBean> getPileBox(
            @Body pile body);

    @POST("pile/boxInsearch")
    Observable<AllBoxBean> getAllBox(
            @Body SeeBean body);



    @POST("send/sendReplace")
    Observable<BaseBean> OutReplaceBound(
            @Body OrderReplaceSubmitRequestBean body);


    @GET("line/list")
    Observable<LineBean> getlins(
            @Header("accessToken") String accessToken);
    //红蜻蜓
    @POST("member/search")
    Observable<PeopleBean> getMemberSearch(
            @Body PeopleRequestBean body);

    @POST("warehouse/search")
    Observable<WhBean> getWhSearch(
            @Body WhRequestBean body);

    @POST("type/search")
    Observable<ProductBean> getTypeSearch(
            @Body ProductRequestBean body);




    @GET("type/stockSearch")
    Observable<TypeBean> gettype(
            @Header("accessToken") String accessToken);
    @POST("pile/wait")
    Observable<CommonBean> getpilewait(
            @Body addRequestBean body);



    @POST("pile/check")
    Observable<BoxBean> boxId(
            @Body BoxIdRequestBean body);

    @POST("user/logout")
    Observable<CommonBean> out(
            @Body UserOutBean body);


    @POST("pile/reset")
    Observable<CommonBean> reset(
            @Body ResetRequestBean body);
}
