package com.yem.wm.im.csrCreditLine.op;

import com.yem.wm.im.csrCreditLine.validator.CsrCreditSubmitLineValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.sdk.plugin.Plugin;

import java.util.List;

/**
 * 单据操作
 */
public class CsrCreditLineSubmitOp extends AbstractOperationServicePlugIn implements Plugin {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_customer");
        fieldKeys.add("org");
        fieldKeys.add("yem_bizdate");
        fieldKeys.add("yem_payment");
    }

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