Exemplo n.º 1
0
  /**
   * 根据结算单位,账户取账户对应的VO 拆分出来做公用方法
   *
   * @return
   */
  public static CurrtypeVO getCurrTypeVO(String pk_accid) throws BusinessException {
    StringBuffer whereClause =
        new StringBuffer()
            .append(" bd_currtype.pk_currtype = ")
            .append(" (select e.pk_currtype from bd_accid e where ")
            .append(" e.pk_accid='")
            .append(pk_accid)
            .append("')");
    SuperVO[] vos = null;
    try {
      vos = HYPubBO_Client.queryByCondition(CurrtypeVO.class, whereClause.toString());
    } catch (UifException e) {
      Logger.error(e.getMessage(), e);
      throw new BusinessException(
          nc.ui.ml.NCLangRes.getInstance().getStrByID("fbmcomm", "UPPFBMComm-000155") /*
																								 * @res
																								 * "根据结算单位和账户查询账户币种异常"
																								 */);
    }
    if (vos == null || vos.length == 0) {
      throw new BusinessException(
          nc.ui.ml.NCLangRes.getInstance().getStrByID("fbmcomm", "UPPFBMComm-000156") /*
																								 * @res
																								 * "根据结算单位和账户无法查询到账户对应币种"
																								 */);
    }
    return (CurrtypeVO) vos[0];
  }
Exemplo n.º 2
0
  @Override
  public void doAction(ActionEvent arg0) throws Exception {
    PfUtilClient.childButtonClicked(
        getSourceBillType(),
        getModel().getContext().getPk_group(),
        getModel().getContext().getPk_loginUser(),
        "SHDJ",
        getModel().getContext().getEntranceUI(),
        null,
        null);
    // if (PfUtilClient.isCloseOK()) {
    // AggcrowdProcessHVO[] vos = (AggcrowdProcessHVO[])
    // PfUtilClient.getRetVos();
    // this.getTransferViewProcessor().processBillTransfer(vos);
    // }

    // 更改拉单的界面,只显示其中一张单的表头
    if (PfUtilClient.isCloseOK()) {
      billnolist = new ArrayList<String>();
      AggCrowdProcessHVO[] vos = (AggCrowdProcessHVO[]) PfUtilClient.getRetVos();

      ArrayList<CrowdProcessBeforeBVO> bvos = new ArrayList<CrowdProcessBeforeBVO>();

      for (AggCrowdProcessHVO aggcrowdProcessHVO : vos) {
        // 取得塞货加工前子表
        CrowdProcessBeforeBVO[] bvo =
            (CrowdProcessBeforeBVO[]) aggcrowdProcessHVO.getChildren(CrowdProcessBeforeBVO.class);
        for (CrowdProcessBeforeBVO cpbvo : bvo) {
          bvos.add(cpbvo);
          // 获得进仓单号,并加入list,传到private
          billnolist.add(cpbvo.getEnter_number());
        }
      }
      // 测试
      // 定义所有的VO类名数组
      String[] vosname =
          new String[] {
            AggCrowdProcessHVO.class.getName(),
            CrowdProcessBeforeBVO.class.getName(),
            CrowdProcessAfterBVO.class.getName()
          };
      // Aggcontracthvo[] hisaggvos = maintain.queryBillByPK(new String[]{pk_cont});
      AggCrowdProcessHVO[] hisaggvos =
          (AggCrowdProcessHVO[]) HYPubBO_Client.queryBillVOByCondition(vosname, null);

      // 将主表的单号保存到list中,用于反写
      ICrowdProcessMaintain iCrowdProcessMaintain =
          NCLocator.getInstance().lookup(ICrowdProcessMaintain.class);
      iCrowdProcessMaintain.setList(billnolist);

      // 将数据合成之后设置到加工前子表
      vos[0].setChildren(CrowdProcessBeforeBVO.class, bvos.toArray(new CrowdProcessBeforeBVO[0]));
      // 将数据合成之后设置到加工后子表
      vos[0].setChildren(CrowdProcessAfterBVO.class, bvos.toArray(new CrowdProcessBeforeBVO[0]));
      AggCrowdProcessHVO[] vos1 = {vos[0]};
      this.getTransferViewProcessor().processBillTransfer(vos1);
    }
  }
 /** queryBodyVOs ·½·¨×¢½â¡£ */
 public nc.vo.pub.CircularlyAccessibleValueObject[] queryBodyAllData(
     Class voClass, String billType, String key, String strWhere) throws Exception {
   if (billType == null || billType.trim().length() == 0) return null;
   else {
     if (strWhere == null) strWhere = " nzbnum > 0 ";
     else strWhere = strWhere + " and nzbnum > 0 ";
     return HYPubBO_Client.queryAllBodyData(billType, voClass, key, strWhere);
   }
 }
 @Override
 public SuperVO[] queryHeadAllData(Class headClass, String strBillType, String strWhere)
     throws Exception {
   String where = "";
   if (strWhere != null && strWhere.length() > 0) {
     where =
         " czbresultid in (select distinct zb_result_h.czbresultid from  zb_result_h  ,zb_result_b "
             + " where zb_result_h.czbresultid =  zb_result_b.czbresultid and  isnull( zb_result_h.dr,0)=0 and isnull(zb_result_b.dr,0) = 0 "
             + " and  "
             + strWhere
             + " and zb_result_b.nzbnum > 0) ";
     String s = ZbPubTool.getParam();
     if (s != null && !"".equals(s))
       where =
           where
               + " and zb_result_h.cbiddingid in(select h.cbiddingid from zb_bidding_h h where  nvl(h.dr, 0) = 0 and h.reserve1 = '"
               + s
               + "')";
   }
   SuperVO[] vo = HYPubBO_Client.queryByCondition(headClass, where);
   return vo;
 }