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

import com.yem.wm.es.salescontrac.validator.SalescontracSubmitVaildator;
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/4/22 21:17
 * @className SalescontracSubmitOp
 * @description 框架合同提交服务插件
 */
public class SalescontracSubmitOp extends AbstractOperationServicePlugIn {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_internationalrate");
        fieldKeys.add("yem_currency");
        fieldKeys.add("yem_currencybase");
    }
    @Override
    public void onAddValidators(AddValidatorsEventArgs e) {
        super.onAddValidators(e);
        e.addValidator(new SalescontracSubmitVaildator());
    }
}
