fixes bug#13501
dev:JULIO qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@90881 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
180fc6c1e2
commit
5f225ceabd
|
@ -12,4 +12,6 @@ public interface ClienteDAO extends GenericDAO<Cliente, Integer> {
|
|||
public Cliente buscarPorNumeroFidelidade(Integer numeroFidelidade, Empresa empresa);
|
||||
|
||||
public List<Cliente> buscarPorDocumento(String documento);
|
||||
|
||||
public Cliente buscarPorNumeroFidelidade(Integer numeroFidelidade);
|
||||
}
|
||||
|
|
|
@ -72,4 +72,22 @@ public class ClienteHibernateDAO extends GenericHibernateDAO<Cliente, Integer>
|
|||
criteria.add(Restrictions.eq(FIELD_ACTIVO, Boolean.TRUE));
|
||||
return criteria;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Cliente buscarPorNumeroFidelidade(Integer numeroFidelidade) {
|
||||
Criteria c = getSession().createCriteria(getPersistentClass());
|
||||
|
||||
Criteria clienteFidelidad = null;
|
||||
clienteFidelidad = c.createCriteria("listClienteFidelidad");
|
||||
clienteFidelidad.add(Restrictions.eq(FIELD_ACTIVO, Boolean.TRUE));
|
||||
|
||||
|
||||
Criteria tarjetaFidelidad = null;
|
||||
tarjetaFidelidad = clienteFidelidad.createCriteria("tarjetaFidelidad");
|
||||
tarjetaFidelidad.add(Restrictions.eq("numTarjeta", Long.valueOf(numeroFidelidade)));
|
||||
tarjetaFidelidad.add(Restrictions.eq(FIELD_ACTIVO, Boolean.TRUE));
|
||||
|
||||
|
||||
c.setMaxResults(1);
|
||||
return (Cliente)c.uniqueResult(); }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
package com.rjconsultores.ventaboletos.passageirofrequente.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.TipoIdentificacion;
|
||||
|
||||
public class ClienteExcelVo {
|
||||
private String cpf;
|
||||
private String rg;
|
||||
private String nome;
|
||||
private String email;
|
||||
private String telefone;
|
||||
private String celular;
|
||||
private String fax;
|
||||
private String nascimento;
|
||||
private String sexo;
|
||||
private String endereco;
|
||||
private String bairro;
|
||||
private String cidade;
|
||||
private String estado;
|
||||
|
||||
|
||||
public String getCpf() {
|
||||
return cpf;
|
||||
}
|
||||
public void setCpf(String cpf) {
|
||||
this.cpf = cpf;
|
||||
}
|
||||
public String getRg() {
|
||||
return rg;
|
||||
}
|
||||
public void setRg(String rg) {
|
||||
this.rg = rg;
|
||||
}
|
||||
public String getNome() {
|
||||
return nome;
|
||||
}
|
||||
public void setNome(String nome) {
|
||||
this.nome = nome;
|
||||
}
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
public String getTelefone() {
|
||||
return telefone;
|
||||
}
|
||||
public void setTelefone(String telefone) {
|
||||
this.telefone = telefone;
|
||||
}
|
||||
public String getCelular() {
|
||||
return celular;
|
||||
}
|
||||
public void setCelular(String celular) {
|
||||
this.celular = celular;
|
||||
}
|
||||
public String getFax() {
|
||||
return fax;
|
||||
}
|
||||
public void setFax(String fax) {
|
||||
this.fax = fax;
|
||||
}
|
||||
public String getSexo() {
|
||||
return sexo;
|
||||
}
|
||||
public void setSexo(String sexo) {
|
||||
this.sexo = sexo;
|
||||
}
|
||||
public String getEndereco() {
|
||||
return endereco;
|
||||
}
|
||||
public void setEndereco(String endereco) {
|
||||
this.endereco = endereco;
|
||||
}
|
||||
public String getCidade() {
|
||||
return cidade;
|
||||
}
|
||||
public void setCidade(String cidade) {
|
||||
this.cidade = cidade;
|
||||
}
|
||||
public String getEstado() {
|
||||
return estado;
|
||||
}
|
||||
public void setEstado(String estado) {
|
||||
this.estado = estado;
|
||||
}
|
||||
public String getNascimento() {
|
||||
return nascimento;
|
||||
}
|
||||
public void setNascimento(String nascimento) {
|
||||
this.nascimento = nascimento;
|
||||
}
|
||||
public String getBairro() {
|
||||
return bairro;
|
||||
}
|
||||
public void setBairro(String bairro) {
|
||||
this.bairro = bairro;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -16,4 +16,6 @@ public interface ClienteService extends GenericService<Cliente, Integer> {
|
|||
public Cliente buscarPorNumeroFidelidade(Integer numeroFidelidade, Empresa empresa);
|
||||
|
||||
public List<Cliente> buscarPorDocumento(String documento);
|
||||
|
||||
public Cliente buscarPorNumeroFidelidade(Integer numeroFidelidade);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
package com.rjconsultores.ventaboletos.service;
|
||||
|
||||
|
||||
import java.io.Reader;
|
||||
import java.util.List;
|
||||
|
||||
import org.zkoss.util.media.Media;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
|
||||
public interface ImportacaoClientesService {
|
||||
public String[] lerArquivo(Reader reader, List<Empresa> empresas);
|
||||
|
||||
public String[] lerArquivoExcel(Media media, List<Empresa> empresas);
|
||||
|
||||
public Integer[] salvarClientes(String[] cliente, List<Empresa> empresas) throws Exception;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue