package com.jwipc.order.constant;

import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.jwipc.api.dto.SapResposeBody;
import com.jwipc.api.interceptor.SapInterceptor;
import com.jwipc.log.annotation.ApiOperateLog;
import com.jwipc.log.constant.ApiDirection;
import com.jwipc.log.constant.ThirdSysType;
import com.jwipc.order.dto.*;

/**
 * <p> </p>
 *
 * @author ZhangJie
 * @version 1.0
 * @since JDK 1.8
 */
public interface PoSapClient {
    @Post(value = "#{sys.sap-host}/RESTAdapter/ERP/ZFM_MM_SRM_003", interceptor = SapInterceptor.class, dataType =
            "json")
    @ApiOperateLog(code = "updateDevPlan", name = "更新SAP送货计划", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.SAP)
    SapResposeBody updateDevPlan(@JSONBody DevPlanToSapDTO devPlanToSapDTO);

    @Post(value = "#{sys.sap-host}/RESTAdapter/ERP/ZFM_MM_SRM_026", interceptor = SapInterceptor.class, dataType =
            "json")
    @ApiOperateLog(code = "createDelivery", name = "创建交货单", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.SAP)
    SapResposeBody createDelivery(@JSONBody CreateDeliveryToSapDTO devPlanToSapDTO);


    @Post(value = "#{sys.sap-host}/RESTAdapter/ERP/ZIF_MM_033", interceptor = SapInterceptor.class, dataType =
            "json")
    @ApiOperateLog(code = "getAppointmentQuantity", name = "拉取订单可以预约数", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.SAP)
    AppointmentQuantityResposeDTO getAppointmentQuantity(@JSONBody AppointmentQuantitySapDTO quantitySapDTO);

    @Post(value = "#{sys.sap-host}/RESTAdapter/ERP/ZFM_MM_SRM_002", interceptor = SapInterceptor.class, dataType =
            "json")
    @ApiOperateLog(code = "getComponentCount", name = "拉取订单组件物料数量", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.SAP)
    ComponentCountResposeDTO getComponentCount(@JSONBody ComponentCountSapDTO quantitySapDTO);
    @Post(value = "#{sys.sap-host}/RESTAdapter/ERP/ZFM_MM_SRM_018", interceptor = SapInterceptor.class, dataType =
            "json")
    @ApiOperateLog(code = "updateShortagePlan", name = "推送欠料回复", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.SAP)
    SapResposeBody updateShortagePlan(@JSONBody UpdateShortagePlanSapDTO updateShortagePlanSapDTO);
}
