package com.jwipc.order.constant;

import com.dtflys.forest.annotation.JSONBody;
import com.dtflys.forest.annotation.Post;
import com.jwipc.api.dto.ApiResponse;
import com.jwipc.api.interceptor.MesInterceptor;
import com.jwipc.log.annotation.ApiOperateLog;
import com.jwipc.log.constant.ApiDirection;
import com.jwipc.log.constant.ThirdSysType;
import com.jwipc.order.dto.DeliveryOrderToMesDTO;
import com.jwipc.order.dto.QcodeToMesDTO;

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

    @Post(value = "#{sys.mes-host}/api/api/SRMRcvNODataList", interceptor = MesInterceptor.class, dataType =
            "json")
    @ApiOperateLog(code = "pushDeliveryOrder", name = "推送送货单到MES系统", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.MES)
    ApiResponse pushDeliveryOrder(@JSONBody DeliveryOrderToMesDTO deliveryOrderToMesDTO);

    @Post(value = "#{sys.mes-host}/api/api/SRMLabelDataList", interceptor = MesInterceptor.class, dataType =
            "json")
    @ApiOperateLog(code = "pushBarcode", name = "推送标签条码到MES系统", direction = ApiDirection.SRM_TO_OTHER,
            thirdSysType = ThirdSysType.MES)
    ApiResponse pushBarcode(@JSONBody QcodeToMesDTO deliveryOrderToMesDTO);
}
