package nc.bs.pub.action;

import nc.bs.pubapp.pf.action.AbstractPfAction;
import nc.bs.hr.baod_orders.ace.bp.AceBaod_ordersDeleteBP;
import nc.bs.hr.baod_orders.plugin.bpplugin.Baod_ordersPluginPoint;
import nc.impl.pubapp.pattern.rule.processer.CompareAroundProcesser;
import nc.impl.pubapp.pattern.rule.IRule;
import nc.vo.th.baod.entity.AggBaodVO;
import nc.vo.pub.BusinessException;
import nc.vo.pubapp.pattern.exception.ExceptionUtils;
import nc.bs.framework.common.NCLocator;

public class N_YGBD_DELETE extends AbstractPfAction<AggBaodVO> {

  @Override
  protected CompareAroundProcesser<AggBaodVO> getCompareAroundProcesserWithRules(
      Object userObj) {
    CompareAroundProcesser<AggBaodVO> processor =
      new CompareAroundProcesser<AggBaodVO>(Baod_ordersPluginPoint.SCRIPT_DELETE);
    // TODO 在此处添加前后规则
   IRule<AggBaodVO> rule=null;
				  
				      return processor;
  }

  @Override
  protected AggBaodVO[] processBP(Object userObj,
      AggBaodVO[] clientFullVOs,AggBaodVO[] originBills) {
    nc.itf.hr.IBaod_ordersMaintain operator = NCLocator.getInstance().lookup(nc.itf.hr.IBaod_ordersMaintain.class);
    try {
          operator.delete(clientFullVOs,originBills);
      } catch (BusinessException e) {
				          ExceptionUtils.wrappBusinessException(e.getMessage());
			      }
    return clientFullVOs;
  }

}
