package com.jwipc.supplier.constant;

import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.jwipc.api.dto.ApiResult;
import com.jwipc.api.interceptor.OAInterceptor;
import com.jwipc.log.annotation.ApiOperateLog;
import com.jwipc.log.constant.ApiDirection;
import com.jwipc.log.constant.ThirdSysType;
import com.jwipc.supplier.dto.CreateOrUpdateOaDTO;
import com.jwipc.supplier.dto.MaterialDemoOaParamDTO;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
public interface SupplierOaClient {
    @Post(value = "#{sys.oa-host}/api/srm/supplierData/import", interceptor = OAInterceptor.class)
    @ApiOperateLog(code = "supplierCreateOrUpdateToOa", name = "供应商准入和变更推送OA", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.OA)
    ApiResult<String> createOrUpdate(@JSONBody CreateOrUpdateOaDTO createOrUpdateOaDTO);

    @Post(value = "#{sys.oa-host}/api/srm/wlRenZheng/import", interceptor = OAInterceptor.class)
    @ApiOperateLog(code = "materailDemo", name = "物料认证推送OA", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.OA)
    ApiResult<String> materailDemo(@JSONBody MaterialDemoOaParamDTO materialDemoOaParamDTO);
}
