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

import com.yem.wm.im.yearlybudget.validator.YearlyBudgetValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;

import java.util.Arrays;
/**
 * @author 张立攀
 * @ClassName YearlyBudgetSaveOp
 * @description: 年度预算单-保存校验器
 * @date 2023年07月21日
 * @version: 1.0
 */
public class YearlyBudgetSaveOp extends AbstractOperationServicePlugIn {

    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        e.getFieldKeys().add(YearlyBudgetValidator.salesVolume);
        e.getFieldKeys().addAll(Arrays.asList(YearlyBudgetValidator.idents));
        e.getFieldKeys().add(YearlyBudgetValidator.entry);
        e.getFieldKeys().add(YearlyBudgetValidator.sonEntry);
        e.getFieldKeys().add("yem_salesman.name");
        e.getFieldKeys().add("yem_client.name");
        e.getFieldKeys().add("yem_productmodel.name");
        e.getFieldKeys().add("yem_im_monthlyplan");
        e.getFieldKeys().add("yem_salesvolume");
    }
    @Override
    public void onAddValidators(AddValidatorsEventArgs e) {
        e.addValidator(new YearlyBudgetValidator());
    }




}



