package com.zztrapp.zztrapp.http;


import com.zztrapp.zztrapp.bean.BlackWaterTasksBean;
import com.zztrapp.zztrapp.bean.ChoosePopItemBean;
import com.zztrapp.zztrapp.bean.CreateUserBean;
import com.zztrapp.zztrapp.bean.FileBean;
import com.zztrapp.zztrapp.bean.GetAppNameBean;
import com.zztrapp.zztrapp.bean.GetTreeListBean;
import com.zztrapp.zztrapp.bean.HeiChouShuiTiIndexBean;
import com.zztrapp.zztrapp.bean.HttpResult;
import com.zztrapp.zztrapp.bean.IndexBean;
import com.zztrapp.zztrapp.bean.JcjPagelistBean;
import com.zztrapp.zztrapp.bean.LoginBean;
import com.zztrapp.zztrapp.bean.MapBfjListBean;
import com.zztrapp.zztrapp.bean.MapHcstListBean;
import com.zztrapp.zztrapp.bean.MapJcjListBean;
import com.zztrapp.zztrapp.bean.MapKhdwListBean;
import com.zztrapp.zztrapp.bean.MapNcshwsclssListBean;
import com.zztrapp.zztrapp.bean.MapZdjgdwListBean;
import com.zztrapp.zztrapp.bean.MeetListBean;
import com.zztrapp.zztrapp.bean.MeetingBean;
import com.zztrapp.zztrapp.bean.RcrwPagelistBean;
import com.zztrapp.zztrapp.bean.SewageFacilitiesTasksBean;
import com.zztrapp.zztrapp.bean.TaskDetailSpecialBean;
import com.zztrapp.zztrapp.bean.WdPageListBean;
import com.zztrapp.zztrapp.bean.WsclssIndexBean;
import com.zztrapp.zztrapp.bean.ZdjgdwPagelistBean;

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

import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.POST;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Describe 请求接口处理
 * Created by Bby on 2021/10/2
 * Email bby0856@163.com
 */

public interface ZztrService {

    @GET(HttpApi.GET_APP_NAME)
    Observable<HttpResult<GetAppNameBean>> getAppName();


    //-------------------首页-------------------
    @GET(HttpApi.INDEX_LIST)
    Observable<HttpResult<List<IndexBean>>> indexList(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.HCST_PAGE_LIST)
    Observable<HttpResult<HeiChouShuiTiIndexBean>> hcstPagelist(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.WSCLSS_PAGE_LIST)
    Observable<HttpResult<WsclssIndexBean>> wsclssPagelist(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.RCRW_PAGE_LIST)
    Observable<HttpResult<RcrwPagelistBean>> rcrwPagelist(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @POST(HttpApi.ADD_RCRW)
    Observable<HttpResult<String>> addRcrw(@Header("X-Access-Token") String token, @Body RequestBody body);

    @POST(HttpApi.EDIT_RCRW)
    Observable<HttpResult<String>> editRcrw(@Header("X-Access-Token") String token, @Body RequestBody body);

    @POST(HttpApi.EDIT_HCST)
    Observable<HttpResult<String>> editHcst(@Header("X-Access-Token") String token, @Body RequestBody body);

    @POST(HttpApi.EDIT_WSCLSS)
    Observable<HttpResult<String>> editWsclss(@Header("X-Access-Token") String token, @Body RequestBody body);

    @GET(HttpApi.ZDJGDW_LIST)
    Observable<HttpResult<ZdjgdwPagelistBean>> zdjgdwPagelist(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @POST(HttpApi.EDIT_ZDJGDW)
    Observable<HttpResult<String>> editZdjgdw(@Header("X-Access-Token") String token, @Body RequestBody body);

    @GET(HttpApi.JCJ_LIST)
    Observable<HttpResult<JcjPagelistBean>> jcjPagelist(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @POST(HttpApi.EDIT_JCJ)
    Observable<HttpResult<String>> editJcj(@Header("X-Access-Token") String token, @Body RequestBody body);

    @GET(HttpApi.XZBM_AREA_LISTT)
    Observable<HttpResult<List<ChoosePopItemBean>>> xzbmAreaList(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @POST(HttpApi.GET_SYQDLX)
    Observable<HttpResult<List<String>>> getSyqdlx(@Header("X-Access-Token") String token);

    @POST(HttpApi.GET_SYQDMC)
    Observable<HttpResult<List<String>>> getSyqdmc(@Header("X-Access-Token") String token, @Body RequestBody body);

    //-------------------地图-------------------
    @GET(HttpApi.MAP_FQJ)
    Observable<HttpResult<List<MapBfjListBean>>> mapBfj(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.MAP_JCJ)
    Observable<HttpResult<List<MapJcjListBean>>> mapJcj(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.MAP_KHDW)
    Observable<HttpResult<List<MapKhdwListBean>>> mapKhdw(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.MAP_ZDJGDW)
    Observable<HttpResult<List<MapZdjgdwListBean>>> mapZdjgdw(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.MAP_HCST)
    Observable<HttpResult<List<MapHcstListBean>>> mapHcst(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.MAP_NCSHWSCLSS)
    Observable<HttpResult<List<MapNcshwsclssListBean>>> mapNcshwsclss(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);


    //-------------------通用-------------------
    @GET(HttpApi.HCST_LIST)
    Observable<HttpResult<BlackWaterTasksBean>> queryPageHcstList(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.SHWSCL_LIST)
    Observable<HttpResult<SewageFacilitiesTasksBean>> queryPageShwsclList(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.QUERY_BY_ID)
    Observable<HttpResult<TaskDetailSpecialBean>> queryById(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @POST(HttpApi.SAVE_ZXRWGL)
    Observable<HttpResult<String>> saveZxrwgl(@Header("X-Access-Token") String token, @Body RequestBody body);

    @POST(HttpApi.COMMIT_ZXRWGL)
    Observable<HttpResult<String>> commitZxrwgl(@Header("X-Access-Token") String token, @Body RequestBody body);

    @GET(HttpApi.GET_TREE_LIST)
    Observable<HttpResult<List<GetTreeListBean>>> getTreeList(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @GET(HttpApi.WD_PAGE_LIST)
    Observable<HttpResult<WdPageListBean>> wdPageList(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    @POST(HttpApi.CREATE_USER)
    Observable<HttpResult<CreateUserBean>> createUser(@Header("X-Access-Token") String token);

    @POST(HttpApi.CREATE_SHPY)
    Observable<HttpResult<MeetingBean>> createSphy(@Header("X-Access-Token") String token, @Body RequestBody body);

    @POST(HttpApi.JR_HY)
    Observable<HttpResult<String>> jrhy(@Header("X-Access-Token") String token, @Body RequestBody body);

    @POST(HttpApi.CLOSE_HY)
    Observable<HttpResult<String>> closeHy(@Header("X-Access-Token") String token, @Body RequestBody body);

    @GET(HttpApi.SHPY_LIST)
    Observable<HttpResult<MeetListBean>> sphyPageList(@Header("X-Access-Token") String token, @QueryMap Map<String, Object> map);

    //-------------------我的-------------------
    @POST(HttpApi.LOGIN)
    Observable<HttpResult<LoginBean>> login(@Body RequestBody body);


    //-------------------公共接口-------------------
    //POST请求
    @POST(HttpApi.UPLOAD_FTP)
    Observable<HttpResult<FileBean>> uploadftp(@Header("X-Access-Token") String token, @Body RequestBody body);


    //    @GET(HttpApi.RANDOM_IMAGE+"{time}")
//    Observable<HttpResult<String>> randomImage(@Path("time") String time);
    @GET(HttpApi.RANDOM_IMAGE + "{time}")
    Observable<HttpResult<String>> randomImage(@Path("time") String time, @QueryMap Map<String, Object> map);
}
