14283: Ajuste no Método de Sicronização na Máquina de Venda Embarcada
fixes bug#14283 dev:valdevir qua:leo git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@93017 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
73ecf5ee02
commit
b16d8a14a0
|
@ -12,6 +12,7 @@ import com.rjconsultores.ventaboletos.entidad.Parada;
|
|||
import com.rjconsultores.ventaboletos.entidad.PtovtaTipoEstoque;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVentaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.embarcada.UsuarioEmbarcadaVO;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -40,4 +41,6 @@ public interface PuntoVentaDAO extends GenericDAO<PuntoVenta, Integer> {
|
|||
public List<PuntoVenta> buscarPuntoVentaPtoVtaComissao(List<Integer> empresas);
|
||||
|
||||
public List<PuntoVenta> buscaPuntoVentaEmpresa(Empresa empresa);
|
||||
|
||||
public List<UsuarioEmbarcadaVO> buscaUsuariosDoPuntoVenta(Long puntoventaId);
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.dao.hibernate;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.hibernate.Criteria;
|
||||
|
@ -30,8 +31,10 @@ import com.rjconsultores.ventaboletos.entidad.Parada;
|
|||
import com.rjconsultores.ventaboletos.entidad.PtovtaTipoEstoque;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVentaVO;
|
||||
import com.rjconsultores.ventaboletos.entidad.UsuarioUbicacion;
|
||||
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||
import com.rjconsultores.ventaboletos.vo.busquedapacotes.transformer.DatosPuntoVentaResultTransformer;
|
||||
import com.rjconsultores.ventaboletos.vo.embarcada.UsuarioEmbarcadaVO;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -304,4 +307,25 @@ public class PuntoVentaHibernateDAO extends GenericHibernateDAO<PuntoVenta, Inte
|
|||
|
||||
return qr.list();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UsuarioEmbarcadaVO> buscaUsuariosDoPuntoVenta(Long puntoventaId){
|
||||
StringBuilder sQuery = new StringBuilder("SELECT uu ");
|
||||
sQuery.append("FROM UsuarioUbicacion uu ")
|
||||
.append("WHERE puntoVenta.puntoventaId = :puntoventaId ");
|
||||
|
||||
Query qr = getSession().createQuery(sQuery.toString());
|
||||
|
||||
qr.setLong("puntoventaId", puntoventaId);
|
||||
List<UsuarioEmbarcadaVO> result = new ArrayList<UsuarioEmbarcadaVO>();
|
||||
for (UsuarioUbicacion u : (List<UsuarioUbicacion>)qr.list()){
|
||||
UsuarioEmbarcadaVO vo = new UsuarioEmbarcadaVO(u.getUsuario().getUsuarioId().longValue(),
|
||||
u.getUsuario().getUsername(),
|
||||
u.getUsuario().getClaveUsuario(),
|
||||
u.getUsuario().getSenha(),
|
||||
u.getUsuario().getDescCorreo());
|
||||
result.add(vo);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ public class DispositivoEmbarcadaVO {
|
|||
private String enderecoAgencia;
|
||||
private String cnpjEmpresa;
|
||||
private String enderecoEmpresa;
|
||||
private String msg;
|
||||
|
||||
public void add(EstadoDispositivoEmbarcadaVO estado){
|
||||
estados.add(estado);
|
||||
|
@ -117,5 +118,13 @@ public class DispositivoEmbarcadaVO {
|
|||
public void setDispositivoId(Long dispositivoId) {
|
||||
this.dispositivoId = dispositivoId;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return msg;
|
||||
}
|
||||
|
||||
public void setMsg(String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
package com.rjconsultores.ventaboletos.vo.embarcada;
|
||||
|
||||
public class UsuarioEmbarcadaVO {
|
||||
private Long usuarioId;
|
||||
private String nome;
|
||||
private String cveusuario;
|
||||
private String senha;
|
||||
private String email;
|
||||
|
||||
public UsuarioEmbarcadaVO(Long usuarioId, String nome, String cveusuario, String senha, String email) {
|
||||
super();
|
||||
this.usuarioId = usuarioId;
|
||||
this.nome = nome;
|
||||
this.cveusuario = cveusuario;
|
||||
this.senha = senha;
|
||||
this.email = email;
|
||||
}
|
||||
|
||||
public Long getUsuarioId() {
|
||||
return usuarioId;
|
||||
}
|
||||
public void setUsuarioId(Long usuarioId) {
|
||||
this.usuarioId = usuarioId;
|
||||
}
|
||||
public String getNome() {
|
||||
return nome;
|
||||
}
|
||||
public void setNome(String nome) {
|
||||
this.nome = nome;
|
||||
}
|
||||
public String getCveusuario() {
|
||||
return cveusuario;
|
||||
}
|
||||
public void setCveusuario(String cveusuario) {
|
||||
this.cveusuario = cveusuario;
|
||||
}
|
||||
public String getSenha() {
|
||||
return senha;
|
||||
}
|
||||
public void setSenha(String senha) {
|
||||
this.senha = senha;
|
||||
}
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue