package com.yem.wm.bc.bill.op;

import com.yem.wm.bc.change.business.ChangeModelHelper;
import com.yem.wm.bc.change.op.common.ChangeOppluginUtils;
import kd.bos.entity.plugin.AbstractOperationServicePlugIn;
import kd.bos.entity.plugin.PreparePropertysEventArgs;
import kd.bos.entity.plugin.args.BeginOperationTransactionArgs;
import kd.bos.entity.plugin.args.EndOperationTransactionArgs;

/**
 * @author 夜子
 * @ClassName YemBillSave
 * @description: 外贸基类保存操作插件
 * @date 2023年08月10日
 * @version: 1.0
 */
public class YemBillSaveOp extends AbstractOperationServicePlugIn {

    @Override
    public void onPreparePropertys(PreparePropertysEventArgs e) {
        super.onPreparePropertys(e);
        if(ChangeModelHelper.getChangeModel5XBill(this.billEntityType.getName())!=null){
            ChangeOppluginUtils.xBillSaveOpOnPreparePropertys(e,this);
        }
    }

    @Override
    public void beginOperationTransaction(BeginOperationTransactionArgs e) {
        super.beginOperationTransaction(e);
        if(ChangeModelHelper.getChangeModel5XBill(this.billEntityType.getName())!=null){
            ChangeOppluginUtils.xBillSaveOpBeginOperationTransaction(e,this);
        }
    }

    @Override
    public void endOperationTransaction(EndOperationTransactionArgs e) {
        super.endOperationTransaction(e);
        if(ChangeModelHelper.getChangeModel5XBill(this.billEntityType.getName())!=null){
            ChangeOppluginUtils.XBillSaveOpEndOperationTransaction(e ,this);
        }
    }
}
