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

import com.yem.wm.im.priceLibrary.validator.PriceLibrarySubmitValidator;
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/3/18 21:26
 * @className PriceLibrarySubmitOp
 * @description 价格库提交服务插件
 */
public class PriceLibrarySubmitOp extends AbstractOperationServicePlugIn {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        e.getFieldKeys().addAll(this.billEntityType.getAllFields().keySet());
    }

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