Método Operador
bug#14250 dev:trevezani qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@92828 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
3ab3eb27ee
commit
5cb57130be
|
@ -2,6 +2,7 @@ package com.rjconsultores.ventaboletos.rest;
|
|||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -14,11 +15,16 @@ import javax.ws.rs.core.MediaType;
|
|||
import com.rjconsultores.ventaboletos.dao.OperadorEmbarcadaDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.OperadorEmbarcadaLinhaDAO;
|
||||
import com.rjconsultores.ventaboletos.dao.OperadorEmbarcadaServicoDAO;
|
||||
import com.rjconsultores.ventaboletos.entidad.FormaPagoDet;
|
||||
import com.rjconsultores.ventaboletos.entidad.OperadorEmbarcada;
|
||||
import com.rjconsultores.ventaboletos.entidad.OperadorEmbarcadaLinha;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtoVtaSeguro;
|
||||
import com.rjconsultores.ventaboletos.entidad.PtovtaCatInd;
|
||||
import com.rjconsultores.ventaboletos.entidad.PuntoVentaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.corrida.CorridaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.embarcada.FormaPagamentoVO;
|
||||
import com.rjconsultores.ventaboletos.vo.embarcada.OperadorEmbarcadaVO;
|
||||
import com.rjconsultores.ventaboletos.vo.embarcada.SeguroTaxaEmbarqueVO;
|
||||
import com.rjconsultores.ventaboletos.vo.embarcada.TiposPassagensBloqueadasVO;
|
||||
import com.rjconsultores.ventaboletos.vo.ruta.RutaVO;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.spring.AppContext;
|
||||
|
||||
|
@ -55,15 +61,52 @@ public class SincronizarOperador {
|
|||
List<RutaVO>lsRutaVO = operadorEmbarcadaLinhaDAO.getListaRutaVO(operador);
|
||||
List<CorridaVO>lsCorridaVO = operadorEmbarcadaServicoDAO.getListaCorridaVO(operador, empresa, dtIni, dtFim);
|
||||
|
||||
|
||||
OperadorEmbarcadaVO vo = new OperadorEmbarcadaVO();
|
||||
vo.setIdOperador(operadorEmbarcada.getUsuarioId());
|
||||
vo.setOperador(operadorEmbarcada.getUsername());
|
||||
vo.setDescOperador(operadorEmbarcada.getName());
|
||||
|
||||
if (puntoVentaVO != null) {
|
||||
vo.setIdAgencia(puntoVentaVO.getPuntoventaId());
|
||||
vo.setDescAgencia(puntoVentaVO.nombpuntoventa);
|
||||
|
||||
vo.setLsFormasPagamento(new ArrayList<FormaPagamentoVO>());
|
||||
vo.setLsSeguroTaxaEmbarque(new ArrayList<SeguroTaxaEmbarqueVO>());
|
||||
vo.setLsTiposPassagensBloqueadas(new ArrayList<TiposPassagensBloqueadasVO>());
|
||||
|
||||
List<FormaPagoDet> listFP = operadorEmbarcadaDAO.getListaFormaPago(puntoVentaVO.getPuntoventaId());
|
||||
|
||||
for (FormaPagoDet dp : listFP) {
|
||||
vo.getLsFormasPagamento().add(
|
||||
new FormaPagamentoVO(
|
||||
dp.getEmpresa().getEmpresaId(),
|
||||
dp.getEmpresa().getNombempresa(),
|
||||
dp.getFormaPago().getFormapagoId().intValue(),
|
||||
dp.getFormaPago().getDescpago()));
|
||||
}
|
||||
|
||||
List<PtoVtaSeguro> listSTx = operadorEmbarcadaDAO.getListaSeguroTaxaEmbarque(puntoVentaVO.getPuntoventaId());
|
||||
|
||||
for (PtoVtaSeguro st : listSTx) {
|
||||
vo.getLsSeguroTaxaEmbarque().add(
|
||||
new SeguroTaxaEmbarqueVO(
|
||||
st.getEmpresa().getEmpresaId(),
|
||||
st.getIndVendeSeguroOpcEmbarcada(),
|
||||
st.getIndVendeSeguroTabelaEmbarcada(),
|
||||
st.getIndTaxaEmbarqueEmbarcada()));
|
||||
}
|
||||
|
||||
List<PtovtaCatInd> listTPB = operadorEmbarcadaDAO.getListaTiposPassagensBloqueadas(puntoVentaVO.getPuntoventaId());
|
||||
|
||||
for (PtovtaCatInd tpb : listTPB) {
|
||||
vo.getLsTiposPassagensBloqueadas().add(
|
||||
new TiposPassagensBloqueadasVO(
|
||||
tpb.getCategoria().getCategoriaId(),
|
||||
tpb.getUsuarioBloqueado().getUsuarioId(),
|
||||
tpb.getEmpresa().getEmpresaId()));
|
||||
}
|
||||
}
|
||||
|
||||
vo.setLsRutas(lsRutaVO);
|
||||
vo.setLsCorridas(lsCorridaVO);
|
||||
|
||||
|
|
Loading…
Reference in New Issue