码迷,mamicode.com
首页 > 移动开发 > 详细

N_F1_APPROVE

时间:2015-12-26 19:40:35      阅读:308      评论:0      收藏:0      [点我收藏+]

标签:

package nc.bs.pub.action;

import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;

import nc.bs.framework.common.NCLocator;
import nc.bs.pub.compiler.AbstractCompiler2;
import nc.itf.arap.payablebill.IPayablebillItf;
import nc.vo.arap.BusiStatus;
import nc.vo.fipub.exception.ExceptionHandler;
import nc.vo.pub.AggregatedValueObject;
import nc.vo.pub.BusinessException;
import nc.vo.pub.CircularlyAccessibleValueObject;
import nc.vo.pub.compiler.PfParameterVO;

public class N_F1_APPROVE
  extends AbstractCompiler2
{
  private Hashtable<String, Object> m_keyHas = null;
  
  public Object runComClass(PfParameterVO paraVo)
    throws BusinessException
  {
    try
    {
      if (paraVo.m_preValueVos == null) {
        return null;
      }
      Object obj = null;
      this.m_tmpVo = paraVo;
      
      procFlowBacth(paraVo);
      


      List<AggregatedValueObject> list = new ArrayList();
      for (AggregatedValueObject aggvo : paraVo.m_preValueVos)
      {
        Integer bill_status = (Integer)aggvo.getParentVO().getAttributeValue("billstatus");
        if (bill_status.intValue() == BusiStatus.Audit.getBillStatusSubKind()) {
          list.add(aggvo);
        }
      }
      if (list.size() > 0)
      {
        setParameter("context", list.toArray(new AggregatedValueObject[0]));
        Object obj2 = runClass("nc.bs.arap.actions.PayablebillApproveBatchBSAction", "approveVOs", "&context:nc.vo.pub.AggregatedValueObject[]", paraVo, this.m_keyHas);
		//add by 陈志锋  2015-12-25 应付单审批通过后   start
		if(obj2 != null){
			IPayablebillItf iPayablebillItf = NCLocator.getInstance().lookup(IPayablebillItf.class);
			AggregatedValueObject[] vos = (AggregatedValueObject[]) obj2;
			for (int i = 0; i < vos.length; i++) {
				AggregatedValueObject vo = vos[i];
				String billclass = (String) vo.getParentVO().getAttributeValue("billclass");
				String billstatus = vo.getParentVO().getAttributeValue("approvestatus") + "";
				if("yf".equals(billclass) && "1".equals(billstatus)){
					iPayablebillItf.insertInfoMiddle(vo);
				}
			}
			
		}
        //add by 陈志锋  2015-12-25 应付单审批通过后   end
        return obj2;
      }
      return paraVo.m_preValueVos;
    }
    catch (Exception ex)
    {
      throw ExceptionHandler.handleException(getClass(), ex);
    }
  }
  
  public String getCodeRemark()
  {
    return " arap action script not allowed to modify ,all rights reserved!";
  }
  
  protected void setParameter(String key, Object val)
  {
    if (this.m_keyHas == null) {
      this.m_keyHas = new Hashtable();
    }
    if (val != null) {
      this.m_keyHas.put(key, val);
    }
  }
}

  

N_F1_APPROVE

标签:

原文地址:http://www.cnblogs.com/zzzzw/p/5078683.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!