package com.wd.workoffice.retrofit;


import com.wd.workoffice.app.BaseBean;
import com.wd.workoffice.app.BaseMesBean;
import com.wd.workoffice.app.Config;

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/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/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);

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

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


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



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

    /**
     * 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);


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

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


    /**
     * 审核接口
     *
     * @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
     */
    @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/deal/update.json")
    Observable<BaseMesBean> feedbackCheck( @Query("functionId") String functionId, @Body RequestBody requestBody);

    /**
     * 销售经理查询
     *
     * @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/feedback/add/save.json")
    Observable<BaseMesBean> feedbackAdd( @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);

}
