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

import com.yem.wm.es.salesorder.validator.NewVersionValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;

import java.util.List;

/**
 * @author zhouc
 * @date 2024/1/30 12:24
 * @className NewVersionOp
 * @description 外销合同变更操作服务插件
 */
public class NewVersionOp extends AbstractOperationServicePlugIn {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_es_materialinfo");
        fieldKeys.add("yem_intauditbusano");
        fieldKeys.add("yem_intauditbusaid");
        fieldKeys.add("billno");
    }

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