package com.changhong.epc.bean.tenant.norm.way; import lombok.Getter; /** * 报销方式 * @author WangYX * */ public enum Way{ /** * 定额包干 */ DEBG((billMoney, norm)->norm, EleType.TJ, EleType.JE), /** * 实报实销 */ SBSX((billMoney, norm)->billMoney, EleType.TJ), /** * 标准内限额 */ BZNXEBX((billMoney, norm)->billMoney > norm ? norm : billMoney, EleType.TJ, EleType.BZ, EleType.JE), /** * 标准内据实 */ BZNSBSX((billMoney, norm)->billMoney, EleType.TJ, EleType.BZ) ; /** * 补助标准块 */ @Getter private EleType[] eleTypes; /** * 计算逻辑 */ @Getter private ExpenseMoney expenseMoney; Way(ExpenseMoney expenseMoney, EleType... EleTypes){ this.expenseMoney = expenseMoney; this.eleTypes = EleTypes; } /** * 是否包含此类型 * @param eleType * @return */ public boolean isContain(EleType eleType){ for(EleType type : this.eleTypes){ if(eleType == type){ return true; } } return false; } }