package com.casic.dcms.utils.retrofit;


import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;
import rx.Observable;

public interface RetrofitService {
    /**
     * PublicKey校验
     */
    @GET("/config/baseConfig")
    Observable<ResponseBody> getPublicKey();

    /**
     * 登录并获取Token
     */
    @FormUrlEncoded
    @POST("/user/appLogin")
    Observable<ResponseBody> login(
            @Field("username") String username,
            @Field("password") String password
    );

    /**
     * 获取用户信息
     * <p>
     * token添加到Header
     */
    @GET("/user/info")
    Observable<ResponseBody> getUserData(@Header("token") String token);

    /**
     * 获取地图地址
     * <p>
     * token添加到Header
     */
    @GET("/map/server/listPage")
    Observable<ResponseBody> getMapConfig(@Header("token") String token);

    /**
     * 大类列表查询
     */
    @GET("/case/type/list")
    Observable<ResponseBody> getCaseLargeType(
            @Header("token") String token,
            @Query("eorc") String eorc
    );

    /**
     * 小类列表查询
     */
    @GET("/case/typeDetail/list")
    Observable<ResponseBody> getCaseSmallType(
            @Header("token") String token,
            @Query("eorc") String eorc,
            @Query("typeId") String typeId
    );

    /**
     * 提交案卷
     */
    @FormUrlEncoded
    @POST("/case/addAPP")
    Observable<ResponseBody> submitCase(
            @Header("token") String token,
            @Field("isNeedVerify") String isNeedVerify,
            @Field("isNeedRevisit") String isNeedRevisit,
            @Field("lng") String longitude,
            @Field("lat") String latitude,
            @Field("source") String source,
            @Field("caseLevel") String caseLevel,
            @Field("eorc") String eorc,
            @Field("casetypeCode") String casetypeCode,
            @Field("casetypeDetailCode") String casetypeDetailCode,
            @Field("areaCode") String areaCode,
            @Field("streetCode") String streetCode,
            @Field("communityCode") String communityCode,
            @Field("gridId") String gridId,
            @Field("description") String description,
            @Field("fieldintro") String fieldintro,
            @Field("fileIdVerify") String fileIdVerify,
            @Field("audioIdVerify") String audioIdVerify,
            @Field("videoIdVerify") String videoIdVerify,
            @Field("bzhours") int bzhours,
            @Field("bzminis") int bzminis
    );

    /**
     * 三包上报
     */
    @FormUrlEncoded
    @POST("/case/addAPP")
    Observable<ResponseBody> submitShopCase(
            @Header("token") String token,
            @Field("isNeedVerify") String isNeedVerify,
            @Field("isNeedRevisit") String isNeedRevisit,
            @Field("lng") String longitude,
            @Field("lat") String latitude,
            @Field("source") String source,
            @Field("caseLevel") String caseLevel,
            @Field("areaCode") String areaCode,
            @Field("streetCode") String streetCode,
            @Field("communityCode") String communityCode,
            @Field("gridId") String gridId,
            @Field("description") String description,
            @Field("fieldintro") String fieldintro,
            @Field("fileIdVerify") String fileIdVerify,
            @Field("bzhours") int bzhours,
            @Field("bzminis") int bzminis,
            @Field("shopId") String shopId,
            @Field("shopkeeperName") String shopkeeperName,
            @Field("shopPhone") String shopPhone
    );

    /**
     * 退出登录
     */
    @GET("/user/logout")
    Observable<ResponseBody> loginOut(@Header("token") String token);

    /**
     * 修改密码
     * 如果有转义字符串，需要用FormUrlEncoded
     */
    @FormUrlEncoded
    @POST("/mgr/changePwd")
    Observable<ResponseBody> changePassword(
            @Header("token") String token,
            @Field("oldPwd") String oldPwd,
            @Field("newPwd") String newPwd
    );

    /**
     * 修改头像
     */
//    @FormUrlEncoded
//    @POST("/mgr/update")
//    Observable<ResponseBody> updateUserInfo(
//            @Header("token") String token,
//            @Field("id") String id,
//            @Field("account") String account,
//            @Field("name") String name,
//            @Field("deptid") String deptid,
//            @Field("roleid") String roleid,
//            @Field("avatar") String avatar,
//            @Field("sex") String sex,
//            @Field("birthday") String birthday,
//            @Field("phone") String phone
//    );
    @POST("/mgr/update")
    Observable<ResponseBody> updateUserInfo(
            @Header("token") String token,
            @Body RequestBody requestBody
    );

    /**
     * 获取部门树
     */
    @GET("/dept/tree")
    Observable<ResponseBody> getDeptTree(@Header("token") String token, @Query("pid") String pid);

    /**
     * 获取通讯录
     */
    @FormUrlEncoded
    @POST("/mgr/mobileList")
    Observable<ResponseBody> getPhoneBook(
            @Header("token") String token,
            @Field("deptid") String deptid
    );

    /**
     * 获取高发问题
     */
    @FormUrlEncoded
    @POST("/departmentAssess/highEventList")
    Observable<ResponseBody> getHighEvent(
            @Header("token") String token,
            @Field("begTime") String begTime,
            @Field("endTime") String endTime
    );

    /**
     * 获取单位处置情况
     */
    @GET("/departmentAssess/departmentAccess")
    Observable<ResponseBody> getDeptHandleCondition(
            @Header("token") String token,
            @Query("begTime") String begTime,
            @Query("endTime") String endTime
    );

    /**
     * 网格结案率Top10
     */
    @GET("/dcm/view/grid-statistics")
    Observable<ResponseBody> getGridAnalysis(
            @Header("token") String token,
            @Query("beginTime") String beginTime,
            @Query("endTime") String endTime
    );

    /**
     * 获取城市基础数据
     */
    @GET("/dcm/view/list")
    Observable<ResponseBody> getCityBaseData(@Header("token") String token);

    /**
     * 案卷来源统计
     */
    @FormUrlEncoded
    @POST("/departmentAssess/sourceList")
    Observable<ResponseBody> getCaseResource(
            @Header("token") String token,
            @Field("begTime") String begTime,
            @Field("endTime") String endTime
    );

    /**
     * 案卷趋势分析
     */
    @GET("/dcm/view/case-trend")
    Observable<ResponseBody> getCaseTendency(
            @Header("token") String token,
            @Query("beginTime") String beginTime,
            @Query("endTime") String endTime
    );

    /**
     * 商铺处罚类型统计
     */
    @GET("/shop/punish/type-statistic")
    Observable<ResponseBody> getPunishType(
            @Header("token") String token,
            @Query("beginTime") String beginTime,
            @Query("endTime") String endTime
    );

    /**
     * 商铺处罚排行榜
     */
    @GET("/shop/punish/ranking")
    Observable<ResponseBody> getPunishRanking(
            @Header("token") String token,
            @Query("beginTime") String beginTime,
            @Query("endTime") String endTime
    );

    /**
     * 获取案件状态
     */
    @GET("/dict/code/caseState")
    Observable<ResponseBody> getCaseStatus(@Header("token") String token);

    /**
     * 获取案件列表
     * isShopCase	否	string	是否三包案件0-否，1-是
     */
    @GET("/case/queryListPage")
    Observable<ResponseBody> getCaseList(
            @Header("token") String token,
            @Query("eorc") String eorc,
            @Query("casetypeCode") String casetypeCode,
            @Query("casetypeDetailCode") String casetypeDetailCode,
            @Query("caseState") String caseState,
            @Query("createTimeBegin") String createTimeBegin,
            @Query("createTimeEnd") String createTimeEnd,
            @Query("isShopCase") String isShopCase,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 获取案件详情
     * <p>
     * 请求参数直接跟在请求路径下
     * <p>
     * http://111.198.10.15:11409/case/detail/1372735305680994306
     */
    @GET("/case/detail/{id}")
    Observable<ResponseBody> getCaseDetail(@Header("token") String token, @Path("id") String id);

    /**
     * 获取案件流转记录
     */
    @GET("/process/historicalRecords")
    Observable<ResponseBody> getCaseProcess(
            @Header("token") String token,
            @Query("processId") String processId
    );

    /**
     * 更新版本
     */
    @POST("/app/checkVersion")
    Observable<ResponseBody> updateVersion(@Header("token") String token);

    /**
     * 获取核实待办案卷
     */
    @POST("/case/toVerifyListPage")
    Observable<ResponseBody> getVerifyResult(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 获取核实已办案卷
     */
    @POST("/case/verifiedListPage")
    Observable<ResponseBody> getVerifiedResult(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 获取核查待办案卷
     */
    @POST("/case/toCheckListPage")
    Observable<ResponseBody> getCheckResult(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 获取核查已办案卷
     */
    @POST("/case/checkedListPage")
    Observable<ResponseBody> getCheckedResult(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 上传案卷图片
     * <p>
     * 系统路径static拼接图片返回路径
     * http://xx.com/static/2019-10/8050891248624f2bbefedcb196ce89cb.jpeg
     */
    @Multipart
    @POST("/fileUpload")
    Observable<ResponseBody> uploadImage(
            @Header("token") String token,
            @Part MultipartBody.Part file
    );

    /**
     * 上传案卷音频
     */
    @Multipart
    @POST("/fileUpload")
    Observable<ResponseBody> uploadAudio(
            @Header("token") String token,
            @Part MultipartBody.Part file
    );

    /**
     * 上传案卷视频
     */
    @Multipart
    @POST("/fileUpload")
    Observable<ResponseBody> uploadVideo(
            @Header("token") String token,
            @Part MultipartBody.Part file
    );

    /**
     * 处理待办分页查询
     *
     * @param isShop 是否三包,0-普通案卷,1-三包案卷
     */
    @GET("/case/toHandleListPage")
    Observable<ResponseBody> getHandleResult(
            @Header("token") String token,
            @Query("isShop") String isShop,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 处理已办分页查询
     */
    @GET("/case/handledListPage")
    Observable<ResponseBody> getHandledResult(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 紧急案件分页查询
     * <p>
     * isSupervise	否	string	是否督办,0-未督办，1-已督办
     */
    @GET("/case/isCriticalListPage")
    Observable<ResponseBody> getUrgentCase(
            @Header("token") String token,
            @Query("isSupervise") String isSupervise,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 超时案件分页查询
     * <p>
     * isSupervise	否	string	是否已督办,null-所有,0-未督办,1-已督办
     */
    @GET("/case/isOvertimeListPage")
    Observable<ResponseBody> getOvertimeCase(
            @Header("token") String token,
            @Query("isSupervise") String isSupervise,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 员查询
     */
    @GET("/userDevice/userDeviceOnLine")
    Observable<ResponseBody> getOnlinePerson(
            @Header("token") String token,
            @Query("deptid") String deptid,
            @Query("roleTips") String roleTips,
            @Query("isOnLine") String isOnLine
    );

    /**
     * 设备定位信息上传
     */
    @FormUrlEncoded
    @POST("/devicePositionLog/positionUpload")
    Observable<ResponseBody> uploadDevicePosition(
            @Header("token") String token,
            @Field("imei") String imei,
            @Field("positionLat") String positionLat,
            @Field("positionLng") String positionLng
    );

    /**
     * 获取流转下级节点
     */
    @GET("/process/nextNodes")
    Observable<ResponseBody> getProcessNextNode(
            @Header("token") String token,
            @Query("caseState") String caseState
    );

    /**
     * 获取常见语句
     */
    @GET("/dict/code/commonApproval")
    Observable<ResponseBody> getCommonSentence(@Header("token") String token);

    /**
     * 案卷处理
     * <p>
     * 案卷核实-仅添加核实意见/核实情况/核实图片
     * 案卷核查
     */
    @FormUrlEncoded
    @POST("/process/completeCaseTask")
    Observable<ResponseBody> handleCase(
            @Header("token") String token,
            @Field("processId") String processId,
            @Field("bizId") String bizId,
            @Field("currState") String currState,
            @Field("changeState") String changeState,
            @Field("remarks") String remarks,
            @Field("fileId") String fileId
    );

    /**
     * 案卷处理
     * <p>
     * 超时案卷
     */
    @FormUrlEncoded
    @POST("/process/completeCaseTask")
    Observable<ResponseBody> handleCase(
            @Header("token") String token,
            @Field("processId") String processId,
            @Field("bizId") String bizId,
            @Field("currState") String currState,
            @Field("changeState") String changeState,
            @Field("remarks") String remarks,
            @Field("fileId") String fileId,
            @Field("approvalResult") String approvalResult
    );

    /**
     * 案卷处理
     * <p>
     * 案卷核实-热线电话和微信公众号提交的数据，需要补全信息
     */
    @FormUrlEncoded
    @POST("/process/completeCaseTask")
    Observable<ResponseBody> handleCase(
            @Header("token") String token,
            @Field("processId") String processId,
            @Field("bizId") String bizId,
            @Field("currState") String currState,
            @Field("changeState") String changeState,
            @Field("remarks") String remarks,
            @Field("fileId") String fileId,
            @Field("eorc") String eorc,
            @Field("casetypeCode") String casetypeCode,
            @Field("casetypeDetailCode") String casetypeDetailCode,
            @Field("lng") String lng,
            @Field("lat") String lat,
            @Field("caseLevel") String caseLevel,
            @Field("areaCode") String areaCode,
            @Field("streetCode") String streetCode,
            @Field("communityCode") String communityCode,
            @Field("gridId") String gridId,
            @Field("fieldintro") String fieldintro
    );

    /**
     * 案卷处理
     * <p>
     * 派遣员处理
     */
    @FormUrlEncoded
    @POST("/process/completeCaseTask")
    Observable<ResponseBody> dispatcherHandleCase(
            @Header("token") String token,
            @Field("processId") String processId,
            @Field("bizId") String bizId,
            @Field("currState") String currState,
            @Field("changeState") String changeState,
            @Field("remarks") String remarks,
            @Field("approvalResult") String approvalResult,
            @Field("operationKey") String operationKey,
            @Field("taskUserId") String taskUserId
    );

    /**
     * 紧急要件-超时督办
     */
    @GET("/casedetail/updateSuperviseRemarks")
    Observable<ResponseBody> updateSuperviseRemarks(
            @Header("token") String token,
            @Query("id") String id,
            @Query("superviseRemarks") String superviseRemarks
    );

    /**
     * 获取首页九宫格数据
     * <p>
     * http://111.198.10.15:11409/user/permission?type=05
     */
    @GET("/user/permission")
    Observable<ResponseBody> getHomePageData(
            @Header("token") String token,
            @Query("resourceType") String resourceType
    );

    /**
     * 个推推送cid注册
     * <p>
     * http://111.198.10.15:11409/userPush/register
     */
    @FormUrlEncoded
    @POST("/userPush/register")
    Observable<ResponseBody> registerPush(
            @Header("token") String token,
            @Field("clientId") String clientId
    );

    /**
     * 公厕列表
     * <p>
     * http://111.198.10.15:11409/sanitation/toilet/list
     */
    @GET("/sanitation/toilet/list")
    Observable<ResponseBody> getToilets(@Header("token") String token);

    /**
     * 公厕打扫签到
     * <p>
     * http://111.198.10.15:11409/sanitation/toiletClean/add
     */
    @FormUrlEncoded
    @POST("/sanitation/toiletClean/add")
    Observable<ResponseBody> cleanToilet(
            @Header("token") String token,
            @Field("toiletId") String toiletId,
            @Field("userId") String userId,
            @Field("lng") String lng,
            @Field("lat") String lat,
            @Field("startTime") String startTime,
            @Field("endTime") String endTime,
            @Field("photo") String photo,
            @Field("workContent") String workContent
    );

    /**
     * 公厕打扫记录
     * <p>
     * http://111.198.10.15:11409/sanitation/toiletClean/listPage
     */
    @GET("/sanitation/toiletClean/listPage")
    Observable<ResponseBody> getToiletCleanRecord(
            @Header("token") String token,
            @Query("userId") String userId,
            @Query("keywords") String keywords,
            @Query("beginDate") String beginDate,
            @Query("endDate") String endDate,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 三包待办
     * <p>
     * http://111.198.10.15:11409/case/workListPage?isShop=1
     */
    @GET("/case/workListPage")
    Observable<ResponseBody> getPackageWorkListPage(
            @Header("token") String token,
            @Query("isShop") String isShop,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 三包已办
     * <p>
     * http://111.198.10.15:11409/case/completedListPage/?offset=1&limit=15&isShop=1
     */
    @GET("/case/completedListPage")
    Observable<ResponseBody> getCompletedListPage(
            @Header("token") String token,
            @Query("isShop") String isShop,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 三包处罚
     * <p>
     * http://111.198.10.15:11409/case/update
     */
    @FormUrlEncoded
    @POST("/case/update")
    Observable<ResponseBody> handlePackageCase(
            @Header("token") String token,
            @Field("id") String id,
            @Field("punishType") String punishType,
            @Field("punishRemarks") String punishRemarks,
            @Field("punishTime") String punishTime,
            @Field("punishImage") String punishImage
    );

    /**
     * 商铺变更
     * <p>
     * http://111.198.10.15:11409/change/apply
     */
    @FormUrlEncoded
    @POST("/shop/change/apply")
    Observable<ResponseBody> changeShopInfo(
            @Header("token") String token,
            @Field("merchantId") String merchantId,
            @Field("rentStatus") String rentStatus,
            @Field("merchantName") String merchantName,
            @Field("contactName") String contactName,
            @Field("contactPhone") String contactPhone,
            @Field("images") String images,
            @Field("applySource") String applySource
    );

    /**
     * 二级派遣员待办案卷
     * <p>
     * http://111.198.10.15:11409/case/workListPage/?offset=1&limit=15
     */
    @GET("/case/workListPage")
    Observable<ResponseBody> getWorkListPage(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 二级派遣员待处理案卷
     * <p>
     * http://111.198.10.15:11409/case/toProcessListPage/?offset=1&limit=15
     */
    @GET("/case/toProcessListPage")
    Observable<ResponseBody> getProcessListPage(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 二级派遣员已办案卷
     * <p>
     * http://111.198.10.15:11409/case/completedListPage/?offset=1&limit=15
     */
    @GET("/case/completedListPage")
    Observable<ResponseBody> getCompletedListPage(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 二级缓办待处理
     * <p>
     * http://111.198.10.15:11409/case/secIsPostponeListPage/?offset=1&limit=15
     */
    @GET("/case/secIsPostponeListPage")
    Observable<ResponseBody> getPostponeListPage(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 二级延期待处理
     * <p>
     * http://111.198.10.15:11409/case/secIsDelayListPage/?offset=1&limit=15
     */
    @GET("/case/secIsDelayListPage")
    Observable<ResponseBody> getDelayedListPage(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 部门授权审核
     * <p>
     * http://111.198.10.15:11409/case/deptAuthAuditListPage/?offset=1&limit=15
     */
    @GET("/case/deptAuthAuditListPage")
    Observable<ResponseBody> getCaseAuthorizeListPage(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 部门调整批示
     * <p>
     * http://111.198.10.15:11409/case/deptAdjustInstructionListPage/?offset=1&limit=15
     */
    @GET("/case/deptAdjustInstructionListPage")
    Observable<ResponseBody> getCaseAdjustListPage(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 获取下级处置员
     * <p>
     * http://111.198.10.15:11409/mgr/simplelist?roleTips=process
     */
    @FormUrlEncoded
    @POST("/mgr/simplelist")
    Observable<ResponseBody> getNextProcessPerson(
            @Header("token") String token,
            @Field("roleTips") String roleTips
    );

    /**
     * 根据养护类型获取养护内容
     * <p>
     * http://111.198.10.15:11409/bridge/maintain/contentByType
     */
    @FormUrlEncoded
    @POST("/bridge/maintain/contentByType")
    Observable<ResponseBody> getMaintainContent(
            @Header("token") String token,
            @Field("type") String type
    );

    /**
     * 桥梁新增打卡记录
     * <p>
     * http://111.198.10.15:11409/bridge/maintain/addApp
     */
    @FormUrlEncoded
    @POST("/bridge/maintain/addApp")
    Observable<ResponseBody> addMaintainRecord(
            @Header("token") String token,
            @Field("bridgeId") String bridgeId,
            @Field("content") String content,
            @Field("maintainTime") String maintainTime,
            @Field("personId") String personId,
            @Field("longitude") String longitude,
            @Field("latitude") String latitude,
            @Field("description") String description
    );

    /**
     * 桥梁养护记录
     * <p>
     * http://111.198.10.15:11409/bridge/maintain/listPage?startDate=2021-06-21&endDate=2021-06-22
     */
    @GET("/bridge/maintain/listPage")
    Observable<ResponseBody> getMaintainRecord(
            @Header("token") String token,
            @Query("startDate") String beginDate,
            @Query("endDate") String endDate,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 灯箱分页列表
     * <p>
     * http://111.198.10.15:11409/lightCr/overview/lampBoxListPage?limit=15&offset=1
     */
    @GET("/lightCr/overview/lampBoxListPage")
    Observable<ResponseBody> getLampBoxesByPage(
            @Header("token") String token,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 全部灯箱
     * <p>
     * http://111.198.10.15:11409/lightCr/overview/lampBoxList
     */
    @GET("/lightCr/overview/lampBoxList")
    Observable<ResponseBody> getLampBoxes(@Header("token") String token);

    /**
     * 灯箱详情
     * <p>
     * http://111.198.10.15:11409/lightCr/overview/lampBoxDetail?lampBoxId=1391983622473011202
     */
    @GET("/lightCr/overview/lampBoxDetail")
    Observable<ResponseBody> getLampBoxDetail(
            @Header("token") String token,
            @Query("lampBoxId") String lampId
    );

    /**
     * 控制灯箱
     * <p>
     * http://111.198.10.15:11409/lightCr/overview/lampControl
     */
    @FormUrlEncoded
    @POST("/lightCr/overview/lampControl")
    Observable<ResponseBody> controlLampBox(
            @Header("token") String token,
            @Field("lampBoxId") String lampBoxId,
            @Field("controlType") String controlType
    );

    /**
     * 报警列表
     * <p>
     * http://111.198.10.15:11409/smartwell/alarm/list?status=1
     */
    @GET("/smartwell/alarm/list")
    Observable<ResponseBody> getAlarmList(
            @Header("token") String token,
            @Query("status") String status,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 单个取消报警
     * <p>
     * http://111.198.10.15:11409/smartwell/alarm/cancelAlarm?id=1232266&jobStatus=3&handleMessage=dfgdfgd
     */
    @FormUrlEncoded
    @POST("/smartwell/alarm/cancelAlarm")
    Observable<ResponseBody> cancelAlarm(
            @Header("token") String token,
            @Field("id") String id,
            @Field("jobStatus") String jobStatus,
            @Field("handleMessage") String handleMessage
    );

    /**
     * 一键取消报警
     * <p>
     * http://111.198.10.15:11409/smartwell/alarm/batchCancel?jobStatus=3&handleMessage=ffsdf
     */
    @FormUrlEncoded
    @POST("/smartwell/alarm/batchCancel")
    Observable<ResponseBody> cancelAlarm(
            @Header("token") String token,
            @Field("jobStatus") String jobStatus,
            @Field("handleMessage") String handleMessage
    );

    /**
     * 窨井列表
     * <p>
     * http://111.198.10.15:11409/smartwell/well/list?offset=1&limit=15&sort=wellCode&order=asc
     */
    @GET("/smartwell/well/list")
    Observable<ResponseBody> getWellList(
            @Header("token") String token,
            @Query("sort") String sort,
            @Query("order") String order,
            @Query("limit") int limit,
            @Query("offset") int offset
    );

    /**
     * 单个撤防/布防 0/1
     * <p>
     * http://111.198.10.15:11409/smartwell/well/bfcf?wellId=36925&bfzt=0
     */
    @FormUrlEncoded
    @POST("/smartwell/well/bfcf")
    Observable<ResponseBody> optionWellStatus(
            @Header("token") String token,
            @Field("wellId") String wellId,
            @Field("bfzt") String bfzt
    );

    /**
     * 一键撤防/布防 0/1
     * <p>
     * http://111.198.10.15:11409/smartwell/well/batchBfcf?bfzt=0
     */
    @FormUrlEncoded
    @POST("/smartwell/well/batchBfcf")
    Observable<ResponseBody> optionWellStatus(
            @Header("token") String token,
            @Field("bfzt") String bfzt
    );

    /**
     * 井详情
     * <p>
     * http://111.198.10.15:13002/arcgis/rest/services/fsw/MapServer/0/query?f=json&inSr=4326&outSR=4326&outFields=*&returnGeometry=true&where=编号='GX_WSD_4107_HLDD154'
     */
    @GET("/arcgis/rest/services/fsw/MapServer/0/query")
    Observable<ResponseBody> getWellDetail(
            @Query("f") String f,
            @Query("inSr") String inSr,
            @Query("outSR") String outSR,
            @Query("outFields") String outFields,
            @Query("returnGeometry") boolean returnGeometry,
            @Query("where") String where
    );
}
