package com.yem.wm.es.exportcost.op;

import com.yem.wm.es.exportcost.vaildator.ExportCostAmountValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;

import java.util.List;

/**
 * 出口费用申请提交
 */
public class ExportCostAmountValidatorOp extends AbstractOperationServicePlugIn {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_applyamt_b");
        fieldKeys.add("yem_splitcost");
        fieldKeys.add("yem_applyforamt");
        fieldKeys.add("yem_csotdetail");
    }

    @Override
    public void onAddValidators(AddValidatorsEventArgs e) {
        super.onAddValidators(e);
        e.addValidator(new ExportCostAmountValidator());
    }
}
