示例#1
0
  // 维护持票单位内部账户余额
  private int doHoldUnitAccont(PfParameterVO vo) throws BusinessException {
    AggregatedValueObject billvo = vo.m_preValueVo;
    ReckonVO reckvo = (ReckonVO) billvo.getParentVO();
    String accont = reckvo.getInacc();
    UFDouble reckmoney = reckvo.getReckonmoneysum();
    BaseDAO basebo = new BaseDAO();
    String sql = null;
    if (reckmoney.compareTo(new UFDouble(0)) > 0) {
      sql =
          "update bd_accid set currmny = currmny + "
              + reckmoney
              + " where pk_accid = '"
              + accont
              + "'";
    } else if (reckmoney.compareTo(new UFDouble(0)) < 0) {
      sql =
          "update bd_accid set currmny = currmny + "
              + reckmoney
              + " where pk_accid = '"
              + accont
              + "' and currmny >= "
              + reckmoney.abs();
    }
    int ret = 0;

    if (sql != null) {
      ret = basebo.executeUpdate(sql);
    }
    return ret;
  }
示例#2
0
 private void changeAccountDetailLiquidFlag(PfParameterVO vo) throws BusinessException {
   AggregatedValueObject billvo = vo.m_preValueVo;
   ReckonBVO[] childvos = (ReckonBVO[]) billvo.getChildrenVO();
   StringBuffer pk_details = new StringBuffer();
   for (int i = 0; i < childvos.length; i++) {
     if (i == 0) {
       pk_details.append(" (");
     }
     pk_details.append("'" + childvos[i].getPk_source() + "'");
     if (i == childvos.length - 1) {
       pk_details.append(" ) ");
     } else {
       pk_details.append(", ");
     }
   }
   BaseDAO basebo = new BaseDAO();
   String sql = "update fbm_accountdetail set isliquid = 'Y' where pk_detail in " + pk_details;
   basebo.executeUpdate(sql);
 }