package com.yem.wm.bd.signals.op;

import com.yem.wm.bd.signals.validator.RequireddtValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.form.control.events.UploadListener;

import java.util.EventObject;
import java.util.List;

/**
 * ljw
 * 提交效验附件面板是否有值
 */
public class RequireddtSubmitOp extends AbstractOperationServicePlugIn implements UploadListener {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> keys = e.getFieldKeys();
        keys.add("id");
        keys.add("yem_attsum");
    }

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

    }
}
