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

import com.yem.wm.es.salesorder.validator.SaleOrderDelValidator;
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 SaleOrderDelOp extends AbstractOperationServicePlugIn implements Plugin {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_es_materialinfo");
        fieldKeys.add("yem_intauditbusano");
        fieldKeys.add("yem_intauditbusaid");
    }

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