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

import com.yem.wm.es.exportinvoice.validator.ExportInvoiceSubmitValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;

import java.util.List;

/**
 * @author xwudd
 * @Description
 * @date 16:48
 **/
public class ExportInvoiceSubmitOp extends AbstractOperationServicePlugIn {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_sourcebillid");
        fieldKeys.add("yem_sourcebilltype");
        fieldKeys.add("yem_seatransfee");
        fieldKeys.add("yem_seabase");
        fieldKeys.add("yem_insurefeecurrba");
        fieldKeys.add("yem_commission");
        fieldKeys.add("yem_shareamtc");
    }

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

}
