Exemple #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;
 }
Exemple #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;
  }
Exemple #3
0
 private ExchangeSyfBVO SplitToSyfStartBVO(Object[] objF, int billtype) throws BusinessException {
   ExchangeSyfBVO bvo = InitSyfBVO(objF);
   bvo.setProperty(1);
   bvo.setOriginal_sum(new UFDouble(origin_start)); // 原币金额
   bvo.setLocal_sum(new UFDouble(local_start)); // 本币金额
   bvo.setBill_org((String) insertBP.getBillOrg(objF, "始发地")); // 单据组织
   bvo.setFinance(insertBP.getFinance(bvo.getBill_org())); // 财务账簿
   bvo.setTrader(insertBP.getTrader3(objF, 1)); // 客商
   bvo.setCustomer(insertBP.getClient(objF)); // 客户
   bvo.setBilltype(billtype); // 单据类型
   bvo.setDept(insertBP.getAssist_dpm(objF).getPk_dept()); // 组织部门
   return bvo;
 }
Exemple #4
0
  /**
   * 判断F为不拆分单据时,调用此方法,生成一条bvo
   *
   * @param objF
   * @throws BusinessException
   */
  private ExchangeSyfBVO copyWithoutSplitToSyfBvo(Object[] objF) throws BusinessException {
    ExchangeSyfBVO bvo = InitSyfBVO(objF);
    bvo.setBilltype(3);
    bvo.setOriginal_sum(new UFDouble(origin_temp));
    bvo.setLocal_sum(new UFDouble(local_temp));
    // 重新设置的字段
    bvo.setProduct("");
    bvo.setLink("");
    bvo.setProduct(insertBP.getFailProductF(objF)); // 产品
    bvo.setLink(insertBP.getLink_NotSplit(objF)); // 航线
    bvo.setBill_org(insertBP.getOrg_NotSplit(objF)); // 单据组织
    bvo.setFinance(insertBP.getFinance(bvo.getBill_org())); // 财务账簿
    bvo.setDept(insertBP.getDept_NotSplit(objF).getPk_dept()); // 部门
    bvo.setSupplier(getSupplier(objF)); // 供应商

    return bvo;
  }