package com.engine.recruit.util;

import weaver.general.Util;
import weaver.hrm.User;
import weaver.hrm.definedfield.HrmFieldManager;

/**
 * @author:dxfeng
 * @createTime: 2024/04/07
 * @version: 1.0
 */
public class WeaBrowserUtil {


    /**
     * 获取浏览按钮的展示内容
     *
     * @param user
     * @param browserType
     * @param value
     * @return
     */
    public static String getBrowserShowNames(User user, int browserType, String value) {
        HrmFieldManager hrmFieldManager = new HrmFieldManager();
        String fieldShowName;
        try {
            fieldShowName = hrmFieldManager.getFieldvalue(user, null, 0, 3, browserType, value, 0);
            fieldShowName = Util.formatMultiLang(fieldShowName, Util.null2String(user.getLanguage()));
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
        return fieldShowName;
    }
}
