package com.jwipc.contract.constant;

import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.dtflys.forest.converter.json.GsonEncoder;
import com.jwipc.api.dto.ApiResult;
import com.jwipc.api.interceptor.OAInterceptor;
import com.jwipc.contract.model.po.ContractOA;
import com.jwipc.contract.model.po.ContractPayOA;
import com.jwipc.contract.model.query.OaProcessListQuery;
import com.jwipc.log.annotation.ApiOperateLog;
import com.jwipc.log.constant.ApiDirection;
import com.jwipc.log.constant.ThirdSysType;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
public interface ContractOaClient {

    @GsonEncoder
    @Post(value = "#{sys.oa-host}/api/srm/contract/fixedAssets", interceptor = OAInterceptor.class)
    @ApiOperateLog(code = "saveContractTOOA", name = "推送合同信息到OA", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.OA)
    ApiResult saveContractTOOA(@JSONBody ContractOA contractOA);


    @GsonEncoder
    @Post(value = "#{sys.oa-host}/api/srm/contract/purchase", interceptor = OAInterceptor.class)
    @ApiOperateLog(code = "saveMroTOOA", name = "推送采购类合同评审创建", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.OA)
    ApiResult saveMroTOOA(@JSONBody ContractOA contractOA);



    @GsonEncoder
    @Post(value = "#{sys.oa-host}/api/srm/process/queryProcessListByType", interceptor = OAInterceptor.class)
    @ApiOperateLog(code = "getOaProcessListPage", name = "获取OA流程信息", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.OA)
    ApiResult getOaProcessListPage(@JSONBody OaProcessListQuery oaProcessListQuery);

    @GsonEncoder
    @Post(value = "#{sys.oa-host}/api/srm/payment/fixedAssetPayments", interceptor = OAInterceptor.class)
    @ApiOperateLog(code = "saveConntractPay", name = "推送合同预付款OA", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.OA)
    ApiResult saveConntractPay(@JSONBody ContractPayOA contractPayOA);



}
