package com.wd.workoffice.retrofit;


import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.Config;
import com.wd.workoffice.ui.activity.mes.user.MesChooseClientActivity;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.RequestBody;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * author : flexible
 * email : lgd19940421@163.com
 * github: https://github.com/FlexibleXd
 **/
public interface MesApiService {
//    String DOMAIN = Config.DEBUG ? "http://121.36.41.30:9001/" : "http://zwang.bat100.net.cn:8000/";

    String DOMAIN = Config.DEBUG ? "http://114.116.55.221/" : "http://114.116.55.221/";


    /**
     * 登录
     *
     * @return
     */
    @POST("/himes/api/applogin")
    Observable<BaseMesBean> login(@Query("userName") String userName, @Query("password") String password);

    /**
     * 工单列表
     *
     * @return
     */
    @GET("/himes/api/main/getButton")
    Observable<BaseMesBean> buttonPermission(@Query("functionId") String functionId);

    /**
     * 工单列表
     *
     * @return
     */
    @POST("/himes/api/msWorkOrder/show/page.json")
    Observable<BaseMesBean> ticketList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 新增
     *
     * @return
     */
    @POST("/himes/api/msWorkOrder/save.json")
    Observable<BaseMesBean> ticketAdd(@Query("functionId") String functionId,
                                      @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 任务类型-父类
     *
     * @return
     */
    @POST("/himes/api/msJobTypeInfo/show/parentlist.json")
    Observable<BaseMesBean> jobType(@Query("functionId") String functionId);

    /**
     * 任务类型
     *
     * @return
     */
    @POST("/himes/api/msJobTypeInfo/show/list.json")
    Observable<BaseMesBean> jobTypeChild(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 日志
     *
     * @return
     */
    @POST("/himes/api/msWorkLogReport/show/listApp.json")
    Observable<BaseMesBean> logList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 日志新增
     *
     * @return
     */
    @POST("/himes/api/msWorkLogReport/save.json")
    Observable<BaseMesBean> logAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 工作总结根据jobNo查询
     *
     * @return
     */
    @GET("/himes/api/msWorkSummary/show/{id}.json")
    Observable<BaseMesBean> summaryDetail(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * msWorkEvaluation
     *
     * @return
     */
    @GET("/himes/api/msWorkEvaluation/show/{id}.json")
    Observable<BaseMesBean> review(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * msWorkEvaluation
     *
     * @return
     */
    @POST("/himes/api/msWorkEvaluation/save.json")
    Observable<BaseMesBean> reviewAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 工作总结新增
     *
     * @return
     */
    @POST("/himes/api/msWorkSummary/save.json")
    Observable<BaseMesBean> summaryAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 工作总结新增
     *
     * @return
     */
    @POST("/himes/api/msCustomerSales/show/page.json")
    Observable<BaseMesBean> clientList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 新建选择客户
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedback/createByWorkOrder.json")
    Observable<BaseMesBean> userClientList(@Query("functionId") String functionId, @Body RequestBody requestBody);


    /**
     * 工作总结新增
     *
     * @return
     */
    @POST("/himes/api/msWorkOrder/accept.json")
    Observable<BaseMesBean> receiveTicket(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 产品
     *
     * @return
     */
    @POST("/himes/api/product/show/list.json")
    Observable<BaseMesBean> proList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 产品
     *
     * @return
     */
    @POST("/himes/api/user/noClear/show/page.json")
    Observable<BaseMesBean> takeOnList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 产品
     *
     * @return
     */
    @Multipart
    @POST("/himes/api/file/uploadFile")
    Observable<BaseMesBean> upload(@Part MultipartBody.Part file);

    /**
     * @return
     */
    @POST("/himes/api/msSceneFeedback/show/page.json")
    Observable<BaseMesBean> userDataList(@Query("functionId") String functionId, @Body RequestBody requestBody);


    /**
     * 炼钢厂列表查询
     *
     * @return
     */
    @POST("/himes/api/msSteelmakingWorks/show/list.json")
    Observable<BaseMesBean> factoryList(@Query("functionId") String functionId, @Query("customerUserCode") String customerUserCode, @Body RequestBody requestBody);

    /**
     * 炼钢厂列表查询
     *
     * @return
     */
    @POST("/himes/api/msSteelmakingWorks/show/getBySteel.json")
    Observable<BaseMesBean> factoryDetail(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 连铸机列表查询
     *
     * @return
     */
    @POST("/himes/api/msContinuousCasterInfo/show/list.json")
    Observable<BaseMesBean> machineList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 连铸机详情
     *
     * @return
     */
    @POST("/himes/api/msContinuousCasterInfo/show/getByCaster.json")
    Observable<BaseMesBean> machineDetail(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 连铸三大件单独新增
     *
     * @return
     */
    @POST("/himes/api/msContinuousProducts/save.json")
    Observable<BaseMesBean> threeAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 连铸三大件单独新增 删除
     *
     * @return
     */
    @GET("/himes/api/msContinuousProducts/delete/{id}.json")
    Observable<BaseMesBean> threeDelete(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * 其他供应商供货三大件
     *
     * @return
     */
    @POST("/himes/api/msSupplierSupply/save.json")
    Observable<BaseMesBean> otherSupplierAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 其他供应商供货三大件 刪除
     *
     * @return
     */
    @GET("/himes/api/msSupplierSupply/delete/{id}.json")
    Observable<BaseMesBean> otherSupplierDelete(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * otherSupplierAdd
     *
     * @return
     */
    @POST("/himes/api/msLadleRefractoryRecord/save.json")
    Observable<BaseMesBean> packageAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);


    /**
     * 三大件供货记录表
     *
     * @return
     */
    @POST("/himes/api/msSupplyRecord/save.json")
    Observable<BaseMesBean> supplierAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 三大件供货记录表
     *
     * @return
     */
    @GET("/himes/api/msSupplyRecord/delete/{id}.json")
    Observable<BaseMesBean> supplierDelete(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * 中间包承包与结算
     *
     * @return
     */
    @POST("/himes/api/msContractAndSettlement/save.json")
    Observable<BaseMesBean> middleAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 中间包承包与结算 删除
     *
     * @return
     */
    @GET("/himes/api/msContractAndSettlement/delete/{id}.json")
    Observable<BaseMesBean> middleDelete(@Path("id") String id, @Query("functionId") String functionId);


    /**
     * 拉速信息
     *
     * @return
     */
    @POST("/himes/api/msContinuousCasterSpeed/save.json")
    Observable<BaseMesBean> speedAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 拉速信息 删除
     *
     * @return
     */
    @GET("/himes/api/msContinuousCasterSpeed/delete/{id}.json")
    Observable<BaseMesBean> speedDelete(@Path("id") String id, @Query("functionId") String functionId);


    /**
     * otherSupplierAdd
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedback/save.json")
    Observable<BaseMesBean> userDataAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * otherSupplierAdd
     *
     * @return
     */
    @POST("/himes/api/msContinuousCasterInfo/save.json")
    Observable<BaseMesBean> machineAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);


    /**
     * @return
     */
    @POST("/himes/api/msSceneFeedback/show/getByFeedInfo.json")
    Observable<BaseMesBean> userDataDetail(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * otherSupplierAdd
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedback/updateByWorkOrder.json")
    Observable<BaseMesBean> canModify(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 三大件库存记录
     *
     * @return
     */
    @POST("/himes/api/msStockRecord/save.json")
    Observable<BaseMesBean> stockAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 三大件库存记录 删除
     *
     * @return
     */
    @GET("/himes/api/msStockRecord/delete/{id}.json")
    Observable<BaseMesBean> stockDelete(@Path("id") String id,
                                        @Query("functionId") String functionId);

    /**
     * 审核接口
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedback/approval.json")
    Observable<BaseMesBean> userDataCheck(@Query("functionId") String functionId, @Body RequestBody requestBody);


    /**
     * 连铸三大件
     *
     * @return
     */
    @GET("/himes/api/msContinuousProducts/show/{id}.json")
    Observable<BaseMesBean> threeDetail(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * 其他供应商供货情况
     *
     * @return
     */
    @GET("/himes/api/msSupplierSupply/show/{id}.json")
    Observable<BaseMesBean> supplierDetail(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * 其他中包耐材记录
     *
     * @return
     */
    @GET("/himes/api/msLadleRefractoryRecord/show/{id}.json")
    Observable<BaseMesBean> packageDetail(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * 其他中包耐材记录 刪除
     *
     * @return
     */
    @GET("/himes/api/msLadleRefractoryRecord/delete/{id}.json")
    Observable<BaseMesBean> packageDelete(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * 炼钢厂保存、更新
     *
     * @return
     */
    @POST("/himes/api/msSteelmakingWorks/save.json")
    Observable<BaseMesBean> factoryAdd(@Query("functionId") String functionId, @Query("option") String option, @Body RequestBody requestBody);

    /**
     * 炼钢厂保存、更新
     *
     * @return
     */
    @POST("/himes/api/msRelationQuery/show/page.json")
    Observable<BaseMesBean> searchList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 质量反馈
     *
     * @return
     */
    @POST("/himes/api/feedback/show/page.json")
    Observable<BaseMesBean> feedbackList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 质量反馈 详情
     *
     * @return
     */
    @GET("/himes/api/feedback/show/{id}.json")
    Observable<BaseMesBean> feedbackDetail(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * 质量反馈 详情
     *
     * @return
     */
    @POST("/himes/api/feedback/approved.json")
    Observable<BaseMesBean> feedbackApproved(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 质量反馈 详情
     *
     * @return
     */
    @POST("/himes/api/feedback/deal/update.json")
    Observable<BaseMesBean> feedbackCheck(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 质量反馈 详情
     *
     * @return
     */
    @POST("/himes/api/main/getRoleFunction.json")
    Observable<BaseMesBean> feedbackMenu();

    /**
     * 销售经理查询
     *
     * @return
     */
    @POST("/himes/api/user/show/page.json")
    Observable<BaseMesBean> managerList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 销售经理查询
     *
     * @return
     */
    @POST("/himes/api/feedback/show/conster/list.json")
    Observable<BaseMesBean> machineByUser(@Query("functionId") String functionId, @Body RequestBody requestBody);


    /**
     * 获取箱码接口
     *
     * @return
     */
    @POST("/himes/api/mpsProduct/show/getMpsProduct/list.json")
    Observable<BaseMesBean> boxNum(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 获取箱码接口
     *
     * @return
     */
    @POST("/himes/api/defectdict/show/page.json")
    Observable<BaseMesBean> defectList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 客户
     *
     * @return
     */
    @POST("/himes/api/customer/show/page.json")
    Observable<BaseMesBean> qualityClientList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/feedback/add/save.json")
    Observable<BaseMesBean> feedbackAdd(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/feedback/update/save.json")
    Observable<BaseMesBean> feedbackUpdate(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/feedback/sendActivity.json")
    Observable<BaseMesBean> startFeedback(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/feedback/show/geteProcedureList.json")
    Observable<BaseMesBean> processList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/feedback/show/bom/page.json")
    Observable<BaseMesBean> questionList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/feedback/show/siteList.json")
    Observable<BaseMesBean> questionDeptList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/msStockRecord/show/page.json")
    Observable<BaseMesBean> stockList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/customer/show/page.json")
    Observable<BaseMesBean> clientPhoneList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/order/show/list.json")
    Observable<BaseMesBean> orderList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/defectdict/show/page.json")
    Observable<BaseMesBean> defectdictList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/modinspo/show/list.json")
    Observable<BaseMesBean> modinspoList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/spotCheckBill/show/page.json")
    Observable<BaseMesBean> spotCheckBillList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/scrapAnalysis/show/list.json")
    Observable<BaseMesBean> scrapAnalysisList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/msSceneFeedbackHistory/showProducts.json")
    Observable<BaseMesBean> historyProductList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/msSceneFeedbackHistory/showSupply.json")
    Observable<BaseMesBean> historySupplyList(@Query("functionId") String functionId, @Body RequestBody requestBody);


    /**
     * 其他中包耐材记录根据ID获取
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedbackHistory/showRef.json")
    Observable<BaseMesBean> historyRefList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 炼钢厂详情
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedbackHistory/show/getBySteel.json")
    Observable<BaseMesBean> historySteelList(@Query("functionId") String functionId, @Body RequestBody requestBody);


    /**
     * 连铸机详情
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedbackHistory/show/getByCaster.json")
    Observable<BaseMesBean> historyCasterList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 首页列表
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedbackHistory/show/page.json")
    Observable<BaseMesBean> historyList(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 用户信息采集历史详情
     *
     * @return
     */
    @POST("/himes/api/msSceneFeedbackHistory/show/getByFeedInfo.json")
    Observable<BaseMesBean> historyDetail(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 用户信息采集历史详情
     *
     * @return
     */
    @POST("/himes/api/mpsProduct/show/getMpsProductByBasket/list.json")
    Observable<BaseMesBean> getMpsProductByBasket(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 用户信息采集历史详情
     *
     * @return
     */
    @POST("/himes/api/quality/show/productBy/productMud.json")
    Observable<BaseMesBean> productMud(@Query("functionId") String functionId, @Body RequestBody requestBody);


    /**
     * 用户信息采集历史详情
     *
     * @return
     */
    @POST("/himes/api/quality/show/productBy/dispatchDetail.json")
    Observable<BaseMesBean> dispatchDetail(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/scrapStatistics/show/list.json")
    Observable<BaseMesBean> scrapStatistics(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/site/show/removes/page.json")
    Observable<BaseMesBean> siteShow(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @POST("/himes/api/spotCheckBill/show/spotCheckBillProject/page.json")
    Observable<BaseMesBean> spotCheckBill(@Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * @return
     */
    @GET("/himes/api/spotCheckBill/show/{id}.json")
    Observable<BaseMesBean> spotCheckDetail(@Path("id") String id, @Query("functionId") String functionId);

    /**
     * @return
     */
    @POST("/himes/api/modinspo/show/modinspoproject/list.json")
    Observable<BaseMesBean> modinspoproject(@Query("functionId") String functionId, @Body RequestBody requestBody);


}
