package nckd.jimin.jyyy.fi.mservice;

import java.util.HashMap;
import java.util.Map;

public final class SAPParamHelper {

    // 静态字段表示每个字段的名称
    public static final String ZZTM = "ZZTM";     // 账套名
    public static final String BUKRS = "BUKRS";   // 公司代码
    public static final String WAERS = "WAERS";   // 帽子货币码
    public static final String BLDAT = "BLDAT";   // 凭证日期
    public static final String BUDAT = "BUDAT";   // 过账日期
    public static final String BKTXT = "BKTXT";   // 凭证抬头文本
    public static final String XBLNR = "XBLNR";   // 参照
    public static final String BLART = "BLART";   // 凭证类型
    public static final String USNAM = "USNAM";   // 用户名
    public static final String BUZEI = "BUZEI";   // 行项目
    public static final String BSCHL = "BSCHL";   // 过账码
    public static final String UMSKZ = "UMSKZ";   // 特别总账标识
    public static final String HKONT = "HKONT";   // 总账科目
    public static final String LIFNR = "LIFNR";   // 供应商编码
    public static final String WRBTR = "WRBTR";   // 凭证货币金额
    public static final String ZUONR = "ZUONR";   // 分配
    public static final String SGTXT = "SGTXT";   // 项目文本
    public static final String KOSTL = "KOSTL";   // 成本中心
    public static final String PROJK = "PROJK";   // WBS元素
    public static final String PRCTR = "PRCTR";   // 利润中心
    public static final String RSTGR = "RSTGR";   // 原因代码
    public static final String ZFBDT = "ZFBDT";   // 到期日
    public static final String MWSKZ = "MWSKZ";   // 税码
    public static final String DMBTR = "DMBTR";   // 本币金额
    public static final String VBUND = "VBUND";   // 贸易合作伙伴的公司标识
    public static final String XREF1 = "XREF1";   // 参考 1
    public static final String XREF2 = "XREF2";   // 参考 2
    public static final String XREF3 = "XREF3";   // 参考 3
    public static final String ZZATTRI1 = "ZZATTRI1"; // 文本串
    public static final String ZZATTRI2 = "ZZATTRI2"; // 文本串
    public static final String ZZATTRI3 = "ZZATTRI3"; // 文本串
    public static final String ZTERM = "ZTERM";   // 付款条件代码
    public static final String KUNNR = "KUNNR";   // 客户编号
    public static final String AUFNR = "AUFNR";   // 订单号

    // 私有构造函数，防止实例化
    private SAPParamHelper() {
        throw new UnsupportedOperationException("该类不允许实例化");
    }

    // 描述映射关系
    private static final Map<String, String> FIELD_DESCRIPTIONS = new HashMap<>();

    static {
        FIELD_DESCRIPTIONS.put(ZZTM, "账套名");
        FIELD_DESCRIPTIONS.put(BUKRS, "公司代码");
        FIELD_DESCRIPTIONS.put(WAERS, "币种");
        FIELD_DESCRIPTIONS.put(BLDAT, "凭证日期");
        FIELD_DESCRIPTIONS.put(BUDAT, "过账日期");
        FIELD_DESCRIPTIONS.put(BKTXT, "凭证抬头文本");
        FIELD_DESCRIPTIONS.put(BLART, "凭证类型");
        FIELD_DESCRIPTIONS.put(USNAM, "用户名");
        FIELD_DESCRIPTIONS.put(BUZEI, "行项目");
        FIELD_DESCRIPTIONS.put(BSCHL, "过账码");
        FIELD_DESCRIPTIONS.put(UMSKZ, "特别总账标识");
        FIELD_DESCRIPTIONS.put(HKONT, "总账科目");
        FIELD_DESCRIPTIONS.put(LIFNR, "供应商编码");
        FIELD_DESCRIPTIONS.put(WRBTR, "凭证货币金额");
        FIELD_DESCRIPTIONS.put(ZUONR, "分配");
        FIELD_DESCRIPTIONS.put(SGTXT, "项目文本");
        FIELD_DESCRIPTIONS.put(KOSTL, "成本中心");
        FIELD_DESCRIPTIONS.put(PROJK, "WBS元素");
        FIELD_DESCRIPTIONS.put(PRCTR, "利润中心");
        FIELD_DESCRIPTIONS.put(RSTGR, "原因代码");
        FIELD_DESCRIPTIONS.put(ZFBDT, "到期日");
        FIELD_DESCRIPTIONS.put(MWSKZ, "税码");
        FIELD_DESCRIPTIONS.put(DMBTR, "本币金额");
        FIELD_DESCRIPTIONS.put(VBUND, "贸易合作伙伴的公司标识");
        FIELD_DESCRIPTIONS.put(XREF1, "参考 1");
        FIELD_DESCRIPTIONS.put(XREF2, "参考 2");
        FIELD_DESCRIPTIONS.put(XREF3, "参考 3");
        FIELD_DESCRIPTIONS.put(ZZATTRI1, "文本串1");
        FIELD_DESCRIPTIONS.put(ZZATTRI2, "文本串2");
        FIELD_DESCRIPTIONS.put(ZZATTRI3, "文本串3");
        FIELD_DESCRIPTIONS.put(ZTERM, "付款条件代码");
        FIELD_DESCRIPTIONS.put(KUNNR, "客户编号");
        FIELD_DESCRIPTIONS.put(AUFNR, "订单号");
    }

    /**
     * 获取字段的中文描述
     *
     * @param fieldName 字段名称
     * @return 对应的中文描述
     */
    public static String getDescription(String fieldName) {
        String description = FIELD_DESCRIPTIONS.get(fieldName);
        return description != null ? description : "未知字段";
    }
}


