package com.phlx.wool.data.http;



import com.phlx.wool.entity.DivisionEntity;
import com.phlx.wool.entity.Harmless;
import com.phlx.wool.entity.Label;
import com.phlx.wool.entity.Marking;
import com.phlx.wool.entity.Quarantine;
import com.phlx.wool.entity.Unit;
import com.phlx.wool.entity.User;
import com.phlx.wool.entity.Veterinary;
import com.phlx.wool.entity.VillusBuyEntity;
import com.phlx.wool.entity.VillusGaugeEntity;
import com.phlx.wool.params.BasicParams;
import com.phlx.wool.params.CattleResponse;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;

/**
 * Created by goldze on 2017/6/15.
 */

public interface ApiService {

    /**
     * 获取版本号
     */
    @GET("/app/getAppVsesion?type=2")
    Observable<CattleResponse<Double>> versionGet();

    /**
     * 下载新版本
     */
    @GET("/app/download")
    Observable<CattleResponse> DownloadApp();

    /**
     * 登录
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/auth/login")
    Observable<CattleResponse<User>> loginPost(@Body RequestBody body);

    /**
     * 获取基本信息
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/basicsInfo/findBasicsList")
    Observable<CattleResponse<BasicParams>> getBasicInfo(@Body RequestBody body);

    /**
     * 获取发标记录
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/manageunitdrawslug/findList")
    Observable<CattleResponse<List<Label>>> getLabelList(@Body RequestBody body);

    /**
     * 获取牧户信息
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/basicsInfo/findPastureunitList")
    Observable<CattleResponse<List<Unit>>> getUnitList(@Body RequestBody body);

    /**
     * 获取兽医管理
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/basicsInfo/findVeterinaryList")
    Observable<CattleResponse<List<Veterinary>>> getVeterinaryList(@Body RequestBody body);

    /**
     * 获取绒毛购买
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/villus/findVillusBuy")
    Observable<CattleResponse<List<VillusBuyEntity>>> getVillusBuyList(@Body RequestBody body);

    /**
     * 获取行政区划
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/basicsInfo/findDivisionsList")
    Observable<CattleResponse<List<DivisionEntity>>> getDivisionList(@Body RequestBody body);

    /**
     * 上传打标信息
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/resumeInfo/saveList")
    Observable<CattleResponse<List<Marking>>> submitMarking(@Body RequestBody body);

    /**
     * 上传绒毛购买信息
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/villus/saveListVillusBuy")
    Observable<CattleResponse<List<VillusBuyEntity>>> submitVillusBuy(@Body RequestBody body);

    /**
     * 上传绒毛测量信息
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/villus/saveListVillusGauge")
    Observable<CattleResponse<List<VillusGaugeEntity>>> submitVillusGauge(@Body RequestBody body);

    /**
     * 上传产地检疫
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/quarantinerecord/saveList")
    Observable<CattleResponse<List<Quarantine>>> submitQuarantine(@Body RequestBody body);

    /**
     * 上传无害化处理信息
     */
    @Headers({"Content-Type: application/json", "Accept: application/json"})
    @POST("/app/innocuitymanagerecord/saveList")
    Observable<CattleResponse<List<Harmless>>> submitHarmless(@Body RequestBody body);
}

