package com.hw.jindie.config;

import com.alibaba.fastjson2.JSONObject;
import com.hw.common.core.utils.DateUtils;
import com.kingdee.bos.webapi.sdk.K3CloudApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 金蝶 bean配置
 */
@Configuration
public class KingdeeConfig {

    @Bean
    public K3CloudApi K3CloudApi() {
        return new K3CloudApi();
    }

    /**
     * 实体主键
     */
    public static Long FID = 0L;

    /**
     * 申请日期
     */
    public static String FApplicationDate = DateUtils.getTime();

    /**
     * 申请类型
     */
    public static String FRequestType = "Material";

    /**
     * 采购申请单formId
     */
    public static String PUR_Requisition = "PUR_Requisition";

    /**
     * 采购入库单formId
     */
    public static String STK_InStock = "STK_InStock";

    /**
     * 其他出库单formId
     */
    public static String STK_MisDelivery = "STK_MisDelivery";

    /**
     * 其他入库单formId
     */
    public static String STK_MISCELLANEOUS = "STK_MISCELLANEOUS";

    /**
     * 京源项目
     */
    public static JSONObject F_TOND_Base = new JSONObject();

    /**
     * 申请组织||需求组织||采购组织
     */
    public static JSONObject FApplicationOrgId = new JSONObject();

    /**
     * 单据类型-单一采购申请单
     */
    public static JSONObject FBillTypeIDPurchase = new JSONObject();

    /**
     * 单据类型-采购入库单
     */
    public static JSONObject FBillTypeIDStorage = new JSONObject();

    /**
     * 单据类型-其他出库单
     */
    public static JSONObject FBillTypeIDOtherOutStorage = new JSONObject();

    /**
     * 单据类型-其他入库单
     */
    public static JSONObject FBillTypeIDOtherInStorage = new JSONObject();

    /**
     * 币别
     */
    public static JSONObject FCurrencyId = new JSONObject();

    /**
     * 汇率类型
     */
    public static JSONObject FExchangeTypeId = new JSONObject();

    /**
     * 京源项目
     */
    public static JSONObject getF_TOND_Base() {
        F_TOND_Base.put("FNumber", "001");
        return F_TOND_Base;
    }

    /**
     * 申请组织||需求组织||采购组织
     */
    public static JSONObject getFApplicationOrgId() {
        FApplicationOrgId.put("FNumber", "100");
        return FApplicationOrgId;
    }

    /**
     * 单据类型-单一采购申请单
     */
    public static JSONObject getFBillTypeIDPurchase() {
        FBillTypeIDPurchase.put("FNUMBER", "CGSQD01_SYS");
        return FBillTypeIDPurchase;
    }

    /**
     * 单据类型-采购入库单
     */
    public static JSONObject getFBillTypeIDStorage() {
        FBillTypeIDStorage.put("FNUMBER", "RKD01_SYS");
        return FBillTypeIDStorage;
    }

    /**
     * 单据类型-其他出库单
     */
    public static JSONObject getFBillTypeIDOtherOutStorage() {
        FBillTypeIDOtherOutStorage.put("FNUMBER", "QTCKD01_SYS");
        return FBillTypeIDOtherOutStorage;
    }

    /**
     * 单据类型-其他入库单
     */
    public static JSONObject getFBillTypeIDOtherInStorage() {
        FBillTypeIDOtherInStorage.put("FNUMBER", "QTRKD01_SYS");
        return FBillTypeIDOtherInStorage;
    }

    /**
     * 币别
     */
    public static JSONObject getFCurrencyId() {
        FCurrencyId.put("FNumber", "PRE001");
        return FCurrencyId;
    }

    /**
     * 汇率类型
     */
    public static JSONObject getFExchangeTypeId() {
        FExchangeTypeId.put("FNumber", "HLTX01_SYS");
        return FExchangeTypeId;
    }


}