package cn.stylefeng.team.form.api.parser;

import cn.hutool.core.util.ObjectUtil;
import cn.stylefeng.team.form.api.entity.FormItem;
import cn.stylefeng.team.form.api.parser.base.BaseFormFormat;
import cn.stylefeng.team.form.api.parser.common.FormFormatUtil;

public class FormOrgUserFormat implements BaseFormFormat {

    @Override
    public Object formatProcess(FormItem formItem, Object originValue) {

        if (ObjectUtil.isEmpty(originValue)) {
            return null;
        }

        return FormFormatUtil.getSimpleDictListStringReadable(originValue.toString());
    }

}
