示例#1
0
  private void cargarBufferDePartidas(final Date dia) {
    System.out.println("Cargando buffer de partidas para el dia: " + dia);
    StringBuffer sql = new StringBuffer();
    sql.append("SELECT * FROM ");
    sql.append(ReplicationUtils.resolveTable("ALMACE", dia));
    sql.append(ReplicationUtils.resolveWherePart(new Periodo(dia), "ALMFECHA"));
    String where = " AND  ALMTIPO=\'FAC\'";
    sql.append(where);
    if (logger.isDebugEnabled()) {
      logger.debug("Query generado: " + sql.toString());
    }
    System.out.println("Det SQL: " + sql.toString());
    List<VentaDet> res = getFactory().getJdbcTemplate().query(sql.toString(), getPartidasMapper());

    System.out.println("Res: " + res.size());
    partidasBuffer.addAll(res);
  }
示例#2
0
 public List<VentaDet> buscarVentasDetEnSiipap(final Date dia) {
   StringBuffer sql = new StringBuffer();
   sql.append("SELECT * FROM ");
   sql.append(ReplicationUtils.resolveTable("ALMACE", dia));
   sql.append(ReplicationUtils.resolveWherePart(new Periodo(dia), "ALMFECHA"));
   String where = " AND  ALMTIPO=\'FAC\'";
   sql.append(where);
   if (logger.isDebugEnabled()) {
     logger.debug("Query generado: " + sql.toString());
   }
   System.out.println("Det SQL: " + sql.toString());
   List<VentaDet> res =
       getSupport()
           .getFactory()
           .getJdbcTemplate()
           .query(sql.toString(), getImportadorDeVentas().getPartidasMapper());
   System.out.println("Res: " + res.size());
   return res;
 }