package com.yem.wm.fm.gathering.op;

import com.yem.wm.fm.gathering.validator.ClaimCentersSaveValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;

import java.util.List;

/**
 * @author xwudd
 * @Description
 * @date 11:12
 **/
public class ClaimCentersSaveOp extends AbstractOperationServicePlugIn {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_salcontractno");
        fieldKeys.add("yem_salcontractamt");
        fieldKeys.add("yem_salcontractclaamt");
    }

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