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

import com.yem.wm.im.giftapply.validator.ReceiveSubmitOpValidator;
import com.yem.wm.im.giftapply.validator.ReceiveVaildator;
import com.yem.wm.im.yearlybudget.validator.YearlyBudgetValidator;
import kd.bos.dataentity.entity.DynamicObject;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.BeforeOperationArgs;
import kd.bos.orm.query.QCP;
import kd.bos.orm.query.QFilter;
import kd.bos.servicehelper.BusinessDataServiceHelper;

import java.math.BigDecimal;
import java.util.Arrays;

/**
 * @author power
 * @ClassName: ReceiveSubmitOp
 * @description: 礼品领用申请提交服务插件
 * @date 2023/7/26
 */
public class ReceiveSubmitOp extends AbstractOperationServicePlugIn {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        e.getFieldKeys().add("yem_customer");
        e.getFieldKeys().add("yem_amountbase");
        e.getFieldKeys().add("yem_billtype");
        e.getFieldKeys().add("yem_bd_products");


        e.getFieldKeys().add("yem_im_entryentity");
        e.getFieldKeys().add("yem_im_entryentity.yem_materialnum");
        e.getFieldKeys().add("yem_im_entryentity.seq");
        e.getFieldKeys().add("billstatus");


        e.getFieldKeys().add("yem_companyorg");

    }

    @Override
    public void onAddValidators(AddValidatorsEventArgs e) {
        e.addValidator(new ReceiveSubmitOpValidator());
//        e.addValidator(new ReceiveVaildator());
    }


}
