//jrykaZVVf/xc9ZrNMoQVE/nhMRiJTODIEDWyNYJLPveMq6UWr0rEiC2tTU5qPMqj
package nc.bs.pub.action;

import java.util.Hashtable;

import nc.bs.pub.compiler.AbstractCompiler2;
import nc.itf.scmpub.reference.uap.group.SysInitGroupQuery;
import nc.vo.pub.BusinessException;
import nc.vo.pub.compiler.PfParameterVO;
import nc.vo.pubapp.pattern.exception.ExceptionUtils;

/**
 * 备注：库存采购入库单的暂估成本
 * 单据动作执行中的动态执行类的动态执行类。
 * 创建日期：(2010-6-10)
 *
 * @author 平台脚本生成
 */
public class N_45_PUEstimate extends AbstractCompiler2 {
  private java.util.Hashtable m_methodReturnHas = new java.util.Hashtable();

  private Hashtable m_keyHas = null;

  /**
   * N_45_PUEstimate 构造子注解。
   */
  public N_45_PUEstimate() {
    super();
  }

  /*
  * 备注：平台编写规则类
  * 接口执行类
  */
  public Object runComClass(PfParameterVO vo) throws BusinessException {
    try {
      super.m_tmpVo = vo;
      nc.vo.ic.m45.entity.PurchaseInVO[] inVO =
          new nc.vo.ic.m45.entity.PurchaseInVO[] {
            (nc.vo.ic.m45.entity.PurchaseInVO) getVo()
          };
      //add by 注释4004,2014没有启用
//      if (!SysInitGroupQuery.isPOEnabled())
//        return inVO;
      nc.bs.framework.common.NCLocator.getInstance()
          .lookup(nc.pubitf.pu.est.m45.IPurchaseInTOCostAP.class)
          .estimate(inVO);
      return inVO;
    }
    catch (Exception ex) {
      ExceptionUtils.marsh(ex);
    }
    return null;
  }

  /*
  * 备注：平台编写原始脚本
  */
  @Override
  public String getCodeRemark() {
    return nc.vo.ml.NCLangRes4VoTransl.getNCLangRes().getStrByID("4008002_0","04008002-0076")/*@res "不支持修改脚本"*/;
  }

  /*
  * 备注：设置脚本变量的HAS
  */
  private void setParameter(String key, Object val) {
    if (m_keyHas == null) {
      m_keyHas = new Hashtable();
    }
    if (val != null) {
      m_keyHas.put(key, val);
    }
  }
}
//jrykaZVVf/xc9ZrNMoQVE/nhMRiJTODIEDWyNYJLPveMq6UWr0rEiC2tTU5qPMqj