@Override
    public List<Map<String, ?>> ListFotos(String tipo) {
        List<Map<String, ?>> lista = new ArrayList<Map<String, ?>>();
        this.cnn = FactoryConnectionDB.open(FactoryConnectionDB.ORACLE);
        String sql = "select * " +
         "from  RHTR_FOTOS_TRABAJADOR a , RHTM_TRABAJADOR b " +
         "where a.ID_TRABAJADOR = b.ID_TRABAJADOR" ;
         
        if(tipo.equals("2")){
          sql += " and a.EFOTO BETWEEN 1 and 2";
        }else{
         sql += " and a.EFOTO =0";
        }
        try {
            ResultSet rs = this.cnn.query(sql);
            
            while (rs.next()) {
                Map<String, Object> cd = new HashMap<String, Object>();
                cd.put("ID_TRABAJADOR",rs.getString("ID_TRABAJADOR"));
                cd.put("AR_FOTO",rs.getString("AR_FOTO"));
                cd.put("AP_PATERNO",rs.getString("AP_PATERNO"));
                cd.put("AP_MATERNO",rs.getString("AP_MATERNO"));
                cd.put("NO_TRABAJADOR",rs.getString("NO_TRABAJADOR"));
                cd.put("EFOTO",rs.getString("EFOTO"));
                cd.put("NU_DOC",rs.getString("NU_DOC"));
                
              lista.add(cd);
            }
      } catch (SQLException ex) {
            throw new RuntimeException(ex.getMessage());
        } catch (Exception e) {
            throw new RuntimeException("ERROR : " + e.getMessage());
        } finally {
            try {
                this.cnn.close();
            } catch (Exception e) {
                throw new RuntimeException(e.getMessage());
            }
        }
        return lista;
    }