package cn.keking.utils;

import cn.keking.config.ConfigConstants;
import cn.keking.config.SpringContextConfig;

import java.io.File;

/**
 * @author Hikaru
 */
public final class Consts {
    /**
     * 销售合同名称
     */
   public static final  String SELL_CONTRACT = "sellContract";
    /**
     * 框架合同名称
     */
    public static final String FRAME_CONTRACT = "frameContract";
    /**
     * 服务合同名称
     */
    public static final String SERVICE_CONTRACT = "commoService";
    /**
     * DD6401
     */
    public static final String SPACIAL_CONTRACT = "spacialContract";
    /**
     *  代理商
     */
    public static final Object AGENT_CONTRACT = "agent";
    /**
     *  基蛋
     */
    public static final Object GETEIN_CONTRACT = "Getein";
    /**
     *  潮州凯普
     */
    public static final Object HYBRIBIO_CONTRACT = "Hybribio";
    /**
     *  思路迪
     */
    public static final Object MEDICINES_CONTRACT = "Medicines";

    /**
     * 签收单
     */
    public static final String RECEIPT_FORM = "receiptForm";
    /**
     * 发票签收单
     */
    public static final String RECEIPT_INVOICE = "receiptInvoice";

    /**
     * 模板目录
     */
    public static final String TEMPLATE_PATH_NAME = "template";

    /**
     * upload目录
     */
    public static final String UPLOAD_PATH_NAME = "upload";


    /**
     * 实际的文件预览时上传的绝对目录
     * @return
     */
    public  static String uploadAbsDir(){
        ConfigConstants configConstants = SpringContextConfig.getBean(ConfigConstants.class);
        return configConstants.getFileDir()+ Consts.UPLOAD_PATH_NAME;
    }

    /**
     * 模板绝对目录
     * @return
     */
    public static String getTemplatePath() {
        ConfigConstants configConstants = SpringContextConfig.getBean(ConfigConstants.class);
        return configConstants.getFileDir()  + Consts.TEMPLATE_PATH_NAME;
    }
}
