package com.engine.recruit.entity.card.process;

import org.apache.commons.lang3.StringUtils;
import weaver.general.BaseBean;
import weaver.hrm.resource.ResourceComInfo;

/**
 * @author:dxfeng
 * @createTime: 2024/08/07
 * @version: 1.0
 */
public class ScreenProcess {
    private String zt;
    private String jg;
    private String fkr;

    public static final String ICON_NAME = "screen.png";
    public static final String TITLE = "最近筛选结果";

    public String getZt() {
        if("1".equals(zt)){
            return "已反馈";
        }
        return "待反馈";
    }

    public void setZt(String zt) {
        this.zt = zt;
    }

    public String getJg() {
        if ("0".equals(jg)) {
            return "通过";
        } else if ("1".equals(jg)) {
            return "不通过";
        }
        return "待定";
    }

    public void setJg(String jg) {
        this.jg = jg;
    }

    public String getFkr() {
        try {
            String lastnames = new ResourceComInfo().getLastnames(fkr);
            if (StringUtils.isNotBlank(lastnames)) {
                return "反馈人：" + lastnames;
            }
        } catch (Exception e) {
            new BaseBean().writeLog("人员姓名转换失败", e);
        }
        return "";
    }

    public void setFkr(String fkr) {
        this.fkr = fkr;
    }

    @Override
    public String toString() {
        if ("1".equals(zt)) {
            return getJg() + "(" + getFkr() + ")";
        }
        return getZt() + "(" + getFkr() + ")";
    }
}
