package com.zt.plat.module.contractorder.enums.contract;

import lombok.Getter;

/**
 * 字典枚举
 */
@Getter
public enum DictEnum {

    /** 方式系统 */
    BSE_SYS_REL_WY_EXTERNAL("系统外关联","EXTERNAL",null),
    BSE_SYS_REL_WY_INTERNAL("内关联","INTERNAL",null),
    /** 供应链业务大类 */
    SPLY_BSN_TP_03BX("货物保险","03BX",null),
    SPLY_BSN_TP_11CC("货物保管仓储","11CC",null),
    SPLY_BSN_TP_10YS("货物运输","10YS",null),
    SPLY_BSN_TP_13HD("货运代理","13HD",null),
    SPLY_BSN_TP_ENTED("来料加工","ENTED",null),
    SPLY_BSN_TP_ENT("委托加工","ENT",null),
    SPLY_BSN_TP_PUR("采购","PUR",null),
    SPLY_BSN_TP_SALE("销售","SALE",null),
    /** 业务类型 */
    BSN_TP_3("物流合同","3",null),
    /** ERP合同类型编码 */
    ERP_CTRT_HTLXBH_SAP02NCOZC("SAP铜非施工合同支出类","SAP02NCOZC",null),
    /** 交易方式 */
    HS_PYBL_TP_PRE_PAY("先款后货","PRE_PAY",null),
    /** ERP合同类别 */
    ERP_CTRT_HTLB_1("购销合同","1",null),
    /** ERP请求状态 */
    ERP_REQ_STS_RLBK("失败","RLBK",null),
    ERP_REQ_STS_RCVG("执行中","RCVG",null),
    ERP_REQ_STS_FIND("成功","FIND",null),
    ERP_REQ_STS_WAIT("待上传","WAIT",null),
    /** 业务关联类型 */
    BSE_SYS_REL_TP_ORDER("订单","ORDER",null),
    BSE_SYS_REL_TP_CONTRACT("合同","CONTRACT",null),
    /** 提交ERP合同状态 */
    SUBMIT_ERP_CTRT_STS_EF("正在执行","EF","其它所有状态"),
    SUBMIT_ERP_CTRT_STS_BFZT("部分暂停","BFZT",null),
    SUBMIT_ERP_CTRT_STS_QBZT("全部暂停","QBZT",null),
    SUBMIT_ERP_CTRT_STS_HHZZ("合同中止","HHZZ",null),
    SUBMIT_ERP_CTRT_STS_CA("作废","CA","对应合同中的“已作废”"),
    SUBMIT_ERP_CTRT_STS_HTZZ("合同终止","HTZZ",null),
    SUBMIT_ERP_CTRT_STS_ZXWB("执行完毕","ZXWB","对应合同中的“已完结”"),
    /** ERP收支方向 */
    ERP_RCV_DLVY_EXPENSES("支出","2","对应采购"),
    ERP_RCV_DLVY_INCOME("收入","1","对应销售"),
    /** ERP是否 */
    ERP_CTRT_YN_YES("是","1",null),
    ERP_CTRT_YN_NO("否","0",null),
    /** 合同状态 */
    BSE_CTRT_STS_DRAFT("草稿","DRAFT","可以删除"),
    BSE_CTRT_STS_UNDER_REVIEW("正在审核","UNDER_REVIEW","不允许任何操作"),
    BSE_CTRT_STS_REJECTED("已驳回","REJECTED","可以删除"),
    BSE_CTRT_STS_WAIT_PUSH("待推送","WAIT_PUSH",null),
    BSE_CTRT_STS_PUSH_ERROR("推送失败","PUSH_ERROR",null),
    BSE_CTRT_STS_IN_PROGRESS("执行中","IN_PROGRESS","可以终止、归档"),
    BSE_CTRT_STS_DELETED("已删除","DELETED","不允许任何操作"),
    BSE_CTRT_STS_ARCHIVED("已归档","ARCHIVED","不允许任何操作"),
    BSE_CTRT_STS_TERMINATED("已完结","TERMINATED","只允许归档"),
    BSE_CTRT_STS_WAIT_AUDIT("待审核","WAIT_AUDIT",null),
    BSE_CTRT_STS_VOID("已作废","VOID",null);


    DictEnum(String label, String code, String remark) {
        this.label = label;
        this.code = code;
        this.remark = remark;
    }

    /**
     * 字典标签
     */
    private final String label;
    /**
     * 字典编码
     */
    private final String code;
    /**
     * 备注
     */
    private final String remark;

    public static DictEnum getByCodeAndType(String code, String dictType) {
        return DictEnum.valueOf(dictType + "_" +code);
    }
}
