package nc.bs.hr.baod_orders.ace.bp;

import nc.impl.pubapp.pattern.data.bill.BillUpdate;
import nc.vo.th.baod.entity.AggBaodVO;
import nc.vo.pub.pf.BillStatusEnum;
import nc.vo.pub.VOStatus;

/**
 * 标准单据送审的BP
 */
public class AceBaod_ordersSendApproveBP {
  /**
   * 送审动作
   * 
   * @param vos 单据VO数组
   * @param script 单据动作脚本对象
   * @return 送审后的单据VO数组
   */
  
  public AggBaodVO[] sendApprove(AggBaodVO[] clientBills,
      AggBaodVO[] originBills) {
      for(AggBaodVO clientFullVO:clientBills){
		          clientFullVO.getParentVO().setAttributeValue("approvestatus", BillStatusEnum.COMMIT.value());
		          clientFullVO.getParentVO().setStatus(VOStatus.UPDATED);
	      }
    // 数据持久化
    AggBaodVO[] returnVos =
        new BillUpdate<AggBaodVO>().update(clientBills, originBills);
    return returnVos;
  }
}
