Beispiel #1
0
 /**
  * 拆分到辅组织汇兑损益应付单-始发地
  *
  * @param objF
  * @return
  */
 private AggExchangeAssistSyfHVO SplitToAssistSyfStart(Object[] objF, Object[] objSYF)
     throws BusinessException {
   AggExchangeAssistSyfHVO aggvo = new AggExchangeAssistSyfHVO();
   ExchangeAssistSyfHVO hvo = InitSyfAssistHVO(objF, objSYF);
   // --差异部分:
   hvo.setPk_org(insertBP.getAssisOrg(objF)); // 组织
   hvo.setDept(insertBP.getAssist_dpm(objF).getPk_dept()); // 组织部门
   hvo.setOriginal_sum(new UFDouble(origin_start));
   hvo.setLocal_sum(new UFDouble(local_start));
   hvo.setBill_org(hvo.getPk_org()); // 单据组织=组织
   hvo.setFinance(insertBP.getFinance(hvo.getBill_org())); // 财务账簿
   // --差异部分
   aggvo.setParent(hvo);
   ExchangeAssistSyfBVO[] bvos = new ExchangeAssistSyfBVO[1];
   bvos[0] = initSyfAssistBVO(objF);
   bvos[0].setProperty(1);
   bvos[0].setBilltype(2);
   bvos[0].setBill_org(hvo.getBill_org());
   bvos[0].setDept(hvo.getDept());
   bvos[0].setOriginal_sum(new UFDouble(origin_start)); // 原币金额
   bvos[0].setLocal_sum(new UFDouble(local_start)); // 本币金额
   bvos[0].setFinance(insertBP.getFinance(hvo.getBill_org())); // 财务账簿
   bvos[0].setTrader(insertBP.getTrader3(objF, 1)); // 客商
   aggvo.setChildren(ExchangeAssistSyfBVO.class, bvos);
   return aggvo;
 }
Beispiel #2
0
  /**
   * 不拆分的单据生成辅组织汇兑损益应付单
   *
   * @return aggvo
   * @throws BusinessException
   */
  private AggExchangeAssistSyfHVO notSplitAssistSyfHVO(Object[] objF, ExchangeSyfBVO bvo)
      throws BusinessException {
    AggExchangeAssistSyfHVO aggvo = new AggExchangeAssistSyfHVO();
    ExchangeAssistSyfHVO hvo = InitSyfAssistHVO(objF, null);
    // 需要单独单独设置的字段
    hvo.setOriginal_sum(new UFDouble(origin_temp));
    hvo.setLocal_sum(new UFDouble(local_temp));
    hvo.setPk_group(pk_group_choice);
    hvo.setProduct(bvo.getProduct());
    hvo.setLink(bvo.getLink());
    hvo.setBill_org(bvo.getBill_org());
    hvo.setPk_org(bvo.getBill_org());
    hvo.setDept(bvo.getDept());

    aggvo.setParent(hvo);
    // 表体
    ExchangeAssistSyfBVO[] bvos = new ExchangeAssistSyfBVO[1];
    bvos[0] = initSyfAssistBVO(objF);
    bvos[0].setBilltype(3);
    //		bvos[0].setProperty(bvo.getProperty());//属性,不拆分单据没有
    bvos[0].setOriginal_sum(new UFDouble(origin_temp)); // 原币金额
    bvos[0].setLocal_sum(new UFDouble(local_temp)); // 本币金额
    bvos[0].setFinance(insertBP.getFinance(bvo.getBill_org())); // 财务账簿
    //		bvos[0].setTrader(insertBP.getTrader3(objF, 2));//客商
    // 需要单独设置的字段
    bvos[0].setProduct(bvo.getProduct());
    bvos[0].setLink(bvo.getLink());
    bvos[0].setBill_org(bvo.getBill_org());
    bvos[0].setDept(bvo.getDept());
    aggvo.setChildren(ExchangeAssistSyfBVO.class, bvos);
    return aggvo;
  }