package com.aucma.api.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @Author YinQ
 * @create 2023-09-26 15:39
 */
@Component
public class SAPConstants {


    /**
     * SAP-URL前缀
     */
    public static String SAP_PREFIX_URL;

    /**
     * SAP-用户名
     */
    public static String USER_NAME;

    /**
     * SAP-密码
     */
    public static String PASS_WORD;

    /**
     * 获取物料主数据(MES2019)
     */
    public static final String MATERIAL_URL = "/SdGetSB/SdSapGetMaterialToMesSvcRSProxy/merge";

    /**
     * 获取生产工单(MES2019)
     */
    public static final String PRODUCTION_ORDERS_URL = "/SdGetSB/SdSapGetPOToMesSvcRSProxy/merge";

    /**
     * 获取设备模具信息(MES2019)
     */
    public static final String EQUIPMENT_URL = "/SdGetSB/SdSapGetEQToMesSvcRSProxy/merge";

    /**
     * 获取产品BOM信息(MES2019)
     */
    public static final String PRODUCTS_BOM_URL = "/SdGetSB/SdSapGetBomToMesSvcRSProxy/merge";

    /**
     * 河南工厂编号
     */
    public static final String FACTORY_CODE = "1301";


    @Value("${sap.prefix}")
    public void setPrefix(String value) {
        SAP_PREFIX_URL = value;
    }

    @Value("${sap.username}")
    public void setUserName(String value) {
        USER_NAME = value;
    }

    @Value("${sap.password}")
    public void setPassWord(String value) {
        PASS_WORD = value;
    }

}
