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

import com.yem.wm.im.priceLibrary.validator.PriceLibraryAuditValidator;
import com.yem.wm.im.tracktaskconsole.validator.TracktaskconsoleSubmitvalidator;
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;
import java.util.List;

/**
 * @author zhouc
 * @date 2023/8/12 19:26
 * @className TracktaskconsoleSubmitOp
 * @description 跟单任务控制台保存服务插件
 */
public class TracktaskconsoleSubmitOp extends AbstractOperationServicePlugIn {
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_materiel");
        fieldKeys.add("yem_nqty");
        fieldKeys.add("yem_billtype");
        fieldKeys.add("yem_es_salesorder_r.yem_isvmi");


        fieldKeys.add("yem_es_salesorder_r");
        fieldKeys.add("yem_es_salesorder_r.seq");
        fieldKeys.add("yem_es_salesorder_r.yem_stockway");
//        fieldKeys.add("yem_intauditbusaid");
    }

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