package com.yem.ia.intebilllogon.op;

import com.yem.ia.intebilllogon.validator.IntebilllogonSaveValidator;
import com.yem.wm.es.shippingdetails.validator.ShippingDetailSubmitValidator;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.AddValidatorsEventArgs;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;

import java.util.List;

/**
 * @author zhouc
 * @date 2023/11/11 17:24
 * @className IntebilllogonSaveEdit
 * @description 智能审批单据注册【保存】服务插件
 */
public class IntebilllogonSaveEdit   extends AbstractOperationServicePlugIn {

    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        List<String> fieldKeys = e.getFieldKeys();
        fieldKeys.add("yem_billtype");
        fieldKeys.add("yem_isvmi");
//        fieldKeys.add("yem_businesssort");
//        fieldKeys.add("yem_qty");
//        fieldKeys.add("yem_resourcenog");
//        fieldKeys.add("yem_es_salesorder_z");
//        fieldKeys.add("yem_vehicleno");
    }

    @Override
    public void endOperationTransaction(EndOperationTransactionArgs e) {
        super.endOperationTransaction(e);
    }


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