package com.yem.tws.op;
import java.util.List;

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;
/**
 * 关务单据注册保存校
 * @author lzb
 *
 */
public class BilllogonSaveOp extends AbstractOperationServicePlugIn{
    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        List<String> keys = e.getFieldKeys();
        keys.add("");
    }

    @Override
    public void onAddValidators(AddValidatorsEventArgs e) {
        // TODO Auto-generated method stub
        super.onAddValidators(e);
        e.addValidator(new BilllogonSaveValidator());
    }

    @Override
    public void endOperationTransaction(EndOperationTransactionArgs e) {
        super.endOperationTransaction(e);
//        if (("save".equals(e.getOperationKey()) || "submit".equals(e.getOperationKey())) && !CommonUtils.isNull(e.getDataEntities())) {
//            DynamicObject[] bills = e.getDataEntities();
//            for (int i = 0; i < bills.length; ++i) {
////                DynamicObject bill = bills[i];
//            }
//        }
    }
}
