package nckd.jxccl.swc.hsbs.formplugin.web.basedata.salarygroup;

import kd.bos.form.IFormView;
import kd.bos.form.plugin.AbstractFormPlugin;
import kd.sdk.plugin.Plugin;

import java.util.EventObject;

/**
 * Tyx 2025-10-30
 * 人员薪酬分类表单插件 【nckd_persalarygroup】
 */
public class PerSalaryGroupEdit extends AbstractFormPlugin implements Plugin {

    @Override
    public void afterCreateNewData(EventObject e) {
        IFormView parentView = this.getView().getParentView();
        if(parentView != null) {
            Object employeeIdObj = this.getView().getParentView().getFormShowParameter().getCustomParam("employeeId");
            if (null != employeeIdObj) {
                this.getView().getModel().setValue("nckd_employee", Long.parseLong(String.valueOf(employeeIdObj)));
            }
            Object salaryFileObj = this.getView().getParentView().getFormShowParameter().getCustomParam("salaryfileId");
            if (null != salaryFileObj) {
                this.getView().getModel().setValue("nckd_salaryfile", Long.parseLong(String.valueOf(salaryFileObj)));
            }
        }
    }
}