package com.glxp.mipsdl.service.file;

import com.glxp.mipsdl.client.ClientProcessor;
import com.glxp.mipsdl.req.post.PostFileThrOrderRequest;
import com.glxp.mipsdl.req.post.PostThrCorpRequest;
import com.glxp.mipsdl.req.post.PostThrInvProductsRequest;
import com.glxp.mipsdl.req.post.PostThrProductsRequest;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

/**
 * 回传解析文件数据到UDI管理系统
 */
@Slf4j
@Service
public class UdiInfoUploadService {

    /**
     * 回传产品信息
     *
     * @param postThrProductsRequest
     */
    public void postProducts(PostThrProductsRequest postThrProductsRequest) {
        ClientProcessor.getHttpClient().postProducts(postThrProductsRequest);
    }

    /**
     * 回传往来单位信息
     *
     * @param postThrCorpRequest
     */
    public void postCorps(PostThrCorpRequest postThrCorpRequest) {
        ClientProcessor.getHttpClient().postCorps(postThrCorpRequest);
    }

    /**
     * 回传库存产品信息
     *
     * @param postThrInvProductsRequest
     */
    public void postInvPi(PostThrInvProductsRequest postThrInvProductsRequest) {
        ClientProcessor.getHttpClient().postInvProducts(postThrInvProductsRequest);
    }

    /**
     * 回传单据信息
     *
     * @param postFileThrOrderRequest
     */
    public void postOrders(PostFileThrOrderRequest postFileThrOrderRequest) {
        ClientProcessor.getHttpClient().postOrderDetail(postFileThrOrderRequest);
    }

}
