package com.kingdee.eas.custom.dormitorysystem.waterelectricity.handler;

import com.kingdee.util.enums.IntEnum;
import java.util.Locale;
/**
 * description: HRBillStateExEnum <br>
 * date: 2025/4/30 15:19 <br>
 * author: lhbj <br>
 * version: 1.0 <br>
 */
public class HRBillStateExEnum {
    private String name;
    private int value;
    private String alias;
    public static final int SAVED_VALUE = 0;
    public static final int SUBMITED_VALUE = 1;
    public static final int AUDITING_VALUE = 2;
    public static final int AUDITED_VALUE = 3;
    public static final int AUDITEND_VALUE = 4;
    public static final HRBillStateExEnum SAVED = new HRBillStateExEnum("SAVED", 0);
    public static final HRBillStateExEnum SUBMITED = new HRBillStateExEnum("SUBMITED", 1);
    public static final HRBillStateExEnum AUDITING = new HRBillStateExEnum("AUDITING", 2);
    public static final HRBillStateExEnum AUDITED = new HRBillStateExEnum("AUDITED", 3);
    public static final HRBillStateExEnum AUDITEND = new HRBillStateExEnum("AUDITEND", 4);
    protected HRBillStateExEnum(String name,int value) {
      this.name=name;
      this.value=value;
      this.getAlias();
    }

    @Override
    public String toString() {
        return alias;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public void setAlias(String alias) {
        this.alias = alias;
    }

    public static HRBillStateExEnum getEnum(int hRBillStateEnum) {
        HRBillStateExEnum hRBillState=SAVED;
        switch (hRBillStateEnum){
            case SAVED_VALUE: hRBillState=SAVED;break;
            case SUBMITED_VALUE: hRBillState=SUBMITED;break;
            case AUDITING_VALUE: hRBillState=AUDITING;break;
            case AUDITED_VALUE: hRBillState=AUDITED;break;
            case AUDITEND_VALUE:  hRBillState=AUDITEND;break;
        }
        return hRBillState;
    }

    public String getAlias() {
        this.alias ="薪酬未锁定";
        switch (this.value){
            case AUDITING_VALUE:
            case AUDITED_VALUE:
            case AUDITEND_VALUE: alias="薪酬锁定"; break;
            default:alias="薪酬未锁定";
        }
        return alias;
    }

}
