package nckd.jxccl.hr.psms.plugin.form.performance;

import com.alibaba.fastjson.JSONObject;
import kd.hrmp.hies.multientry.common.dto.EntryImptBillData;
import kd.hrmp.hies.multientry.common.plugin.impt.AfterBackFillDataEventArgs;
import kd.hrmp.hies.multientry.common.plugin.impt.AfterValidateEventArgs;
import kd.hrmp.hies.multientry.common.plugin.impt.BeforeInitValidatorEventArgs;
import kd.hrmp.hies.multientry.common.plugin.impt.BeforeValidateEventArgs;
import kd.hrmp.hies.multientry.common.plugin.impt.HREntryImportPlugin;

import java.util.List;

/**
* 多分录导入插件
* 实体标识：nckd_perfrankmgmt
* @author W.Y.C
* @date 2025/10/30 14:16
* @version 1.0
*/
public class PerfrankMgmtImportEntryPlugin implements HREntryImportPlugin {


    @Override
    public void beforeInitValidator(BeforeInitValidatorEventArgs args) {
        HREntryImportPlugin.super.beforeInitValidator(args);
    }

    @Override
    public void beforeValidate(BeforeValidateEventArgs args) {
        HREntryImportPlugin.super.beforeValidate(args);
    }

    @Override
    public void afterValidate(AfterValidateEventArgs args) {
        List<EntryImptBillData> billDatas = args.getBillDatas();
        for (EntryImptBillData billData : billDatas) {
            JSONObject data = billData.getData();
            Long aLong = data.getLong("nckd_perfrankmgmtentry_id");
        }
        HREntryImportPlugin.super.afterValidate(args);
    }

    @Override
    public void afterBackFillData(AfterBackFillDataEventArgs args) {
        HREntryImportPlugin.super.afterBackFillData(args);
    }
}