package com.chy.borrow.eum;

public enum  BorrowStatusEnum {

    STATUS_CHECKING(1,"1","待部门审核"),
    STATUS_CHECK_PASS(2,"2","待应用处审批"),
    STATUS_CHECK_REJECT(3,"3","部门审核拒绝"),
    STATUS_EXAMINEING(4,"4","待数据确认"),
    STATUS_EXAMINE_REJECT(5,"5","应用处审批拒绝"),
    STATUS_CONFIRM_PASS(6,"6","待数据下载"),
    STATUS_CONFIRM_REJECT(7,"7","数据确认拒绝"),
    STATUS_CONFIRM_DOWNLOAD(8,"8","完成");

    private Integer statusCode;
    private String statusCodeString;
    private String statusName;

    BorrowStatusEnum(Integer statusCode, String statusCodeString, String statusName) {
        this.statusCode = statusCode;
        this.statusCodeString = statusCodeString;
        this.statusName = statusName;
    }

    public Integer getStatusCode() {
        return statusCode;
    }

    public void setStatusCode(Integer statusCode) {
        this.statusCode = statusCode;
    }

    public String getStatusCodeString() {
        return statusCodeString;
    }

    public void setStatusCodeString(String statusCodeString) {
        this.statusCodeString = statusCodeString;
    }

    public String getStatusName() {
        return statusName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public static BorrowStatusEnum get(Integer statusCode){
        for(BorrowStatusEnum borrowStatusEnum:values()){
            if (borrowStatusEnum.getStatusCode().equals(statusCode)){
                return borrowStatusEnum;
            }
        }
        return null;
    }
}
