package nckd.jxccl.base.common.hbp.formplugin.web.coordination;

import kd.bos.dataentity.serialization.SerializationUtils;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.hr.hbp.formplugin.web.HRDataBaseList;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * Tyx 2026-01-05
 * 核定单列表插件
 * 处理tab页签，添加借调变动大类，标品后续优化，先自行处理
 */
public class EmpChangeCoordinationListTplPluginEx extends HRDataBaseList {

    private final List<String> defaultTabNumbers = (List) Stream.of("tab_all", "tab_1010_s", "tab_1090_s", "tab_1020_s", "tab_1070_s", "tab_1030_s", "tab_1040_s", "tab_1050_s", "tab_1160_s", "tab_1120_s", "tab_9990_s", "tab_9980_s").collect(Collectors.toList());

    @Override
    public void beforeBindData(EventObject e) {
        super.beforeBindData(e);
        this.getPageCache().put("tabNumbers", SerializationUtils.toJsonString(defaultTabNumbers));
    }
}