package com.neusoft.smart.pos.constants;

public enum DictionaryConstant {

	PAY_TYPE("PAY_TYPE", "支付方式"),
	PAY_TYPE_WXEWM("1", "微信支付二维码"),
	PAY_TYPE_ZFBEWM("2", "支付宝支付二维码"),
	PAY_TYPE_YHK("3", "银行卡支付"),
	PAY_TYPE_WXZZ("4", "微信转账"),
	PAY_TYPE_ZFBZZ("5", "支付宝转账"),
	PAY_TYPE_XJ("6", "现金支付"),
	PAY_TYPE_HYK("7", "会员卡支付"),
	PAY_TYPE_ZFBZZSQ("8", "支付宝当面资金授权支付"),
	PAY_TYPE_YLEWM("9", "银联二维码支付"),
	PAY_TYPE_FKYS("10", "饭卡(易石)"),
	PAY_TYPE_FACE("11", "人脸支付"),
	PAY_TYPE_WXZF_SERVICE("12", "微信支付(服务商)"),
	PAY_TYPE_FKSY("13", "饭卡(沈阳食堂)"),
	PAY_TYPE_YLSWYS("14", "银联商务(银商)"),
	PAY_TYPE_YLSWGZH("15", "银联商务(公众号)"),
	PAY_TYPE_YLSWBSC("16", "银联商务(B扫C)"),
	PAY_TYPE_ELM("17", "饿了么支付"),
	PAY_TYPE_YMF("18", "一码付"),
	PAY_TYPE_WFT("19", "威富通"),
	PAY_TYPE_XYHF("20", "西银惠付"),
	PAY_TYPE_WXZFYS("21", "微信支付(甘肃银行)"),
	PAY_TYPE_ZFBYS("22", "支付宝(甘肃银行)"),
	PAY_TYPE_BANK_YS("23", "银行卡(银商)"),
	PAY_TYPE_BANK_FLM("24", "银行卡(MISPOS)"),
	PAY_TYPE_WXZFGJ("25", "微信支付(国际)"),
	PAY_TYPE_ZFB_FACE_PAY("26", "支付宝(人脸支付)"),
	PAY_TYPE_WX_FACE_PAY("27", "微信人脸支付"),
	PAY_TYPE_DISCOUNT("29", "折扣"),
	PAY_TYPE_FM_COUPON("30", "富茂优惠券"),
	PAY_TYPE_WX_QRCODE("31", "微信支付(二维码)"),
	PAY_TYPE_ZFB_QRCODE("32", "支付宝(二维码)"),
	PAY_TYPE_FM_CARD("33", "伟业城会员卡"),
	PAY_TYPE_CZ_ONLINE("34", "招行APP线上充值"),
	PAY_TYPE_MULTY_COMBINED("1000","组合支付"),

	ORDER_STATUS("ORDER_STATUS", "订单状态"),
	ORDER_STATUS_DFK("1", "待付款"),
	ORDER_STATUS_YFK("2", "已付款"),
	ORDER_STATUS_TKZ("3", "退款中"),
	ORDER_STATUS_YTK("4", "已退款"),
	ORDER_STATUS_DDQX("5", "订单取消"),

	ORDER_UPDATE_STATUS("ORDER_UPDATE_STATUS", "订单状态"),
	ORDER_UPDATE_STATUS_DFK("1", "待付款"),
	ORDER_UPDATE_STATUS_DDQX("2", "已取消"),
	ORDER_UPDATE_STATUS_ZFZ("3", "支付中"),
	ORDER_UPDATE_STATUS_YZF("4", "已支付"),
	ORDER_UPDATE_STATUS_ZFWC("5", "支付完成"),
	ORDER_UPDATE_STATUS_DTC("6", "待退款"),
	ORDER_UPDATE_STATUS_TKZ("7", "退款中"),
	ORDER_UPDATE_STATUS_YTC("8", "已退款"),
	ORDER_UPDATE_STATUS_TKWC("9", "退款完成"),
	ORDER_UPDATE_STATUS_DFH("11", "商户待发货"),
	ORDER_UPDATE_STATUS_DQH("12", "商户待取货"),
	ORDER_UPDATE_STATUS_DJD("13", "骑手待接单"),
	ORDER_UPDATE_STATUS_YFH("14", "已发货"),
	ORDER_UPDATE_STATUS_YSD("15", "已送达"),
	ORDER_UPDATE_STATUS_YSH("16", "已收货"),

	ORDER_TYPE("ORDER_TYPE", "订单类型"),
	ORDER_TYPE_ZC("1", "普通订单"),
	ORDER_TYPE_BL("2", "POS端补录订单"),
	ORDER_TYPE_HYCZ("3", "会员卡充值订单"),
	ORDER_TYPE_WXDC("4", "微信点餐订单"),
	ORDER_TYPE_ELM("5", "饿了么订单"),

	ORDER_SUB_TYPE("ORDER_SUB_TYPE", "订单子类型"),
	ORDER_SUB_TYPE_COMMON_CONSUME_ORDER("common_consume_order", "堂食订单"),
	ORDER_SUB_TYPE_REQ_DELIVERY_ORDER("req_delivery_order", "需要配送"),

	PAY_STATUS("PAY_STATUS", "订单支付状态"),
	PAY_STATUS_WFK("1", "未付款"),
	PAY_STATUS_YFK("2", "已付款"),
	PAY_STATUS_YQX("3", "交易关闭"),
	PAY_STATUS_TKZ("4", "退款中"),
	PAY_STATUS_YTK("5", "已退款"),

	PAY_REFUND_STATUS("PAY_REFUND_STATUS", "退款支付订单状态"),
	PAY_REFUND_STATUS_WTK("1", "未退款"),
	PAY_REFUND_STATUS__YTK("2", "已退款"),
	PAY_REFUND_STATUS__YQX("3", "已取消"),
	
	PAY_GRANT_STATUS("PAY_GRANT_STATUS", "授权状态"),
	PAY_GRANT_STATUS_CLZ("1", "待授权"),
	PAY_GRANT_STATUS_YSQ("2", "已授权"),
	PAY_GRANT_STATUS_YJD("3", "已解冻"),
	PAY_GRANT_STATUS_YCX("4", "已撤销"),
	PAY_GRANT_STATUS_ZF("5", "授权转支付"),
	PAY_GRANT_STATUS_YTK("6", "已退款"),
	PAY_GRANT_STATUS_SQSB("7", "授权失败"),
	
	REQUEST_TYPE("REQUEST_TYPE", "第三方请求类型"),
	REQUEST_TYPE_ZD("1", "主动请求"),
	REQUEST_TYPE_BD("2", "被动请求"),

	PAYMENT_ORDER_STATUS("PAYMENT_ORDER_STATUS", "聚合支付平台订单状态"),
	PAYMENT_ORDER_STATUS_DZF("1", "待支付"),
	PAYMENT_ORDER_STATUS_YZF("2", "已支付"),
	PAYMENT_ORDER_STATUS_TKZ("3", "退款中"),
	PAYMENT_ORDER_STATUS_YTK("4", "已退款"),
	PAYMENT_ORDER_STATUS_JYGB("5", "交易关闭"),
	PAYMENT_ORDER_STATUS_FINISH("6", "交易结束，不可退款，支付宝特有状态"),

	PAYMENT_PAY_TYPE("PAYMENT_PAY_TYPE", "聚合支付平台支付类型"),
	PAYMENT_PAY_TYPE_WXSM("1", "微信扫码支付"),
	PAYMENT_PAY_TYPE_ZFBSM("2", "支付宝扫码支付"),
	PAYMENT_PAY_TYPE_ZFBZZSQ("3", "支付宝当面资金授权支付"),
	PAYMENT_PAY_TYPE_YLSM("4", "银联二维码支付"),
	PAYMENT_PAY_TYPE_WXZF_SERCIE("5", "微信支付(服务商)"),
	PAYMENT_PAY_TYPE_YLSW_SERCIE("6", "银联商务(银商)"),
	PAYMENT_PAY_TYPE_YLSW_GZH_SERCIE("7", "银联商务(公众号)"),
	PAYMENT_PAY_TYPE_YLSW_BSC_SERCIE("8", "银联商务(B扫C)"),
	PAYMENT_PAY_TYPE_XYHF("9", "西银惠付"),
	PAYMENT_PAY_TYPE_WFT("10", "威富通"),
	PAYMENT_PAY_TYPE_WXZF_US_SERCIE("11", "微信支付(服务商国际)"),
	PAYMENT_PAY_TYPE_ZFB_FACE_PAY("12", "支付宝(人脸支付)"),
	PAYMENT_PAY_TYPE_WX_FACE_PAY("13", "微信人脸支付"),
	PAYMENT_PAY_TYPE_DICOUNT_PAY("15", "折扣支付"),
	PAYMENT_PAY_TYPE_FM_COUPON_PAY("16", "富茂优惠券支付"),
	PAYMENT_PAY_TYPE_CARD_BALANCE_PAY("17", "实体卡余额支付"),

	PAYMENT_REQUEST_TYPE("PAYMENT_REQUEST_TYPE", "第三方请求类型"),
	PAYMENT_REQUEST_TYPE_ZD("1", "主动向业务系统发起请求(如支付成功回调)"),
	PAYMENT_REQUEST_TYPE_BD("2", "接收业务系统请求，如创建订单、订单信息查询"),

	PAYMENT_APPLY_TYPE("PAYMENT_APPLY_TYPE", "聚合支付平台商户申请类型"),
	PAYMENT_APPLY_TYPE_NB("1", "内部申请"),
	PAYMENT_APPLY_TYPE_GR("2", "个人用户申请"),
	PAYMENT_APPLY_TYPE_GS("3", "公司集团用户申请"),

	PAYMENT_MCH_STATUS("PAYMENT_MCH_STATUS", "聚合支付平台商户状态"),
	PAYMENT_MCH_STATUS_BC("1", "保存"),
	PAYMENT_MCH_STATUS_TJSQ("2", "提交申请"),
	PAYMENT_MCH_STATUS_SHTG("3", "审核通过"),
	PAYMENT_MCH_STATUS_DJ("4", "冻结"),
	PAYMENT_MCH_STATUS_LJSC("5", "逻辑删除"),

	IS_ENABLE("IS_ENABLE", "是否启用"),
	IS_ENABLE_TY("0", "未启用"),
	IS_ENABLE_QY("1", "启用"),

	IS_SHOW("IS_SHOW", "是否显示"),
	IS_SHOW_F("0", "不显示"),
	IS_SHOW_S("1", "显示"),

	TRADE_MCH_PAY_CHANNEL_ACTIVE_STATUS("ACTIVE_STATUS", "店铺支付渠道状态"),
	TRADE_MCH_PAY_CHANNEL_ACTIVE_STATUS_SHOWN_ON_POS("shown_on_pos", "POS端显示"),
	TRADE_MCH_PAY_CHANNEL_ACTIVE_STATUS_NOT_SHOWN_ON_POS("not_shown_on_pos", "POS端不显示"),

	SETTLEMENT_TYPE("SETTLEMENT_TYPE", "商户结算类型"),
	SETTLEMENT_TYPE_JT("1", "集团结算"),
	SETTLEMENT_TYPE_MD("2", "门店结算"),

	REFUND_STATUS("REFUND_STATUS", "退款状态"),
	REFUND_STATUS_DTK("1", "待退款"),
	REFUND_STATUS_TKZ("2", "退款中"),
	REFUND_STATUS_TKWC("3", "退款完成"),
	REFUND_STATUS_TKQX("4", "退款取消"),

	WX_TRADE_TYPE("WX_TRADE_TYPE", "微信交易类型"),
	WX_TRADE_TYPE_JSAPI("JSAPI", "公众号支付"),
	WX_TRADE_TYPE_NATIVE("NATIVE", "原生扫码支付"),
	WX_TRADE_TYPE_APP("APP", "app支付"),
	WX_TRADE_TYPE_MICROPAY("MICROPAY", "刷卡支付"),
	WX_TRADE_TYPE_MWEB("MWEB", "H5支付"),
	
	INVENTORY_FLOW_TYPE("INVENTORY_FLOW_TYPE","库存流水类型"),
	INVENTORY_FLOW_TYPE_STOCK_IN("10","进货"),
	INVENTORY_FLOW_TYPE_USER_RETURN("11","用户退货"),
	INVENTORY_FLOW_TYPE_CHECK_ADD("12","盘盈"),
	INVENTORY_FLOW_TYPE_SUP_RETURN("20","向供应货退货"),
	INVENTORY_FLOW_TYPE_GOODS_SALE("21","销售"),
	INVENTORY_FLOW_TYPE_CHECK_DEC("22","盘损"),
	INVENTORY_FLOW_TYPE_GOODS_TAKE("23","领用"),
	
	INVENTORY_STATUS("INVENTORY_STATUS","库存批次状态"),
	INVENTORY_STATUS_USABLE("1","可用批次"),
	INVENTORY_STATUS_ZERO("0","库存为0批次"),
	INVENTORY_STATUS_SOLDOUT("-1","下架产品"),
	
	GRANT_OPERATION_TYPE("GRANT_OPERATION_TYPE","预授权操作类型"),
	GRANT_OPERATION_TYPE_1("1","授权申请"),
	GRANT_OPERATION_TYPE_2("2","授权成功"),
	GRANT_OPERATION_TYPE_3("3","解冻"),
	GRANT_OPERATION_TYPE_4("4","撤销"),
	GRANT_OPERATION_TYPE_5("5","授权转支付"),
	GRANT_OPERATION_TYPE_6("6","退款"),
	
	PAY_CATEGORY_TYPE("PAY_CATEGORY_TYPE","支付方式处理类别"),
	PAY_CATEGORY_TYPE_1("1","三方支付类(微信支付宝等)"),
	PAY_CATEGORY_TYPE_2("2","现金支付类"),
	PAY_CATEGORY_TYPE_3("3","银行卡支付类"),
	PAY_CATEGORY_TYPE_4("4","饭卡类"),
	PAY_CATEGORY_TYPE_5("5","会员卡支付类"),
	PAY_CATEGORY_TYPE_6("6","人脸支付"),
	PAY_CATEGORY_TYPE_7("7","第三方资金授权支付类"),
	
    
    PRINTER_DEVICE_TYPE("PRINTER_DEVICE_TYPE","打印机类型"),
    PRINTER_DEVICE_TYPE_1("1","中转设备"),
    PRINTER_DEVICE_TYPE_2("2","打印机"),
    
    PRINTER_RELATIONSHIP_TYPE("PRINTER_RELATIONSHIP_TYPE","打印关系类型"),
    PRINTER_RELATIONSHIP_TYPE_1("1","菜品编号"),
    PRINTER_RELATIONSHIP_TYPE_2("2","菜品分类"),
    
    PRINTER_PRINTER_TYPE("PRINTER_PRINTER_TYPE","打印机类型"),
    PRINTER_PRINTER_TYPE_1("1","打印机打印"),
    PRINTER_PRINTER_TYPE_2("2","中转打印"),
    
    PRINTER_ORDER_TYPE("PRINTER_ORDER_TYPE","打印订单类型"),
    PRINTER_ORDER_TYPE_1("1","后厨打印"),
    PRINTER_ORDER_TYPE_2("2","预结算订单"),
    PRINTER_ORDER_TYPE_3("3","结算订单"),
    PRINTER_ORDER_TYPE_4("4","不干胶打印"),
    
    PRINTER_TASK_STATUS("PRINTER_TASK_STATUS","打印任务状态"),
    PRINTER_TASK_STATUS_1("1","未打印"),
    PRINTER_TASK_STATUS_2("2","已发送，未打印"),
    PRINTER_TASK_STATUS_3("3","已打印"),
	
	PRINTER_STATUS("PRINTER_STATUS","打印机状态"),
	PRINTER_STATUS_0("0","停用"),
	PRINTER_STATUS_1("1","启用"),
	
	PRINTER_TEMPLATE_TYPE("PRINTER_TEMPLATE_TYPE","打印模板类型"),
	PRINTER_TEMPLATE_TYPE_1("1","后结下单模板"),
	PRINTER_TEMPLATE_TYPE_2("2","前结结算模板"),
	PRINTER_TEMPLATE_TYPE_3("3","后结结算模板"),
	
	PRINTER_OPERATION_TYPE("PRINTER_OPERATION_TYPE","打印操作类型"),
	PRINTER_OPERATION_TYPE_1("1","下单"),
	PRINTER_OPERATION_TYPE_2("2","结算"),
	
    BILL_CYCLE_TYPE("BILL_CYCLE_TYPE","周期类型"),
    BILL_CYCLE_TYPE_MONTH("1","月结"),
    BILL_CYCLE_TYPE_YEAR("2","年结"),
    BILL_CYCLE_TYPE_QUARTER("3","季结"),
    BILL_CYCLE_TYPE_WEEK("4","周结"),
    
    BILL_ACCEPT_STATUS("BILL_ACCEPT_STATUS","归档状态"),
    BILL_ACCEPT_STATUS_NO("1","未归档"),
    BILL_ACCEPT_STATUS_YES("2","已归档"),
    
    BILL_RULE_STATUS("BILL_RULE_STATUS","规则状态"),
    BILL_RULE_STATUS_YES("1","生效"),
    BILL_RULE_STATUS_NO("2","失效"),
    
    BILL_TASK_STATUS("BILL_TASK_STATUS","任务状态"),
    BILL_TASK_STATUS_1("1","执行中"),
    BILL_TASK_STATUS_2("2","执行完成"),
    BILL_TASK_STATUS_3("3","执行失败"),
	;

	private String code;
	private String value;

	DictionaryConstant(String code, String value) {
		this.code = code;
		this.value = value;
	}

	public String getCode() {
		return code;
	}

	public String getValue() {
		return value;
	}

	public static DictionaryConstant getEnumByCode(String enumName,String code){
		for(DictionaryConstant dictEnum : DictionaryConstant.values()){
			if(dictEnum.name().startsWith(enumName) && code.equals(dictEnum.getCode())){
				return dictEnum;
			}
		}
		return null;
	}

}
