0013747: Configuração Venda Embarcada
bug#13747 dev:daniel qua:rogerio git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@91414 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
355fb44e3c
commit
7774b7c527
|
@ -0,0 +1,195 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
import org.zkoss.zhtml.Messagebox;
|
||||||
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
import org.zkoss.zul.Comboitem;
|
||||||
|
import org.zkoss.zul.Intbox;
|
||||||
|
import org.zkoss.zul.Paging;
|
||||||
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OperadorEmbarcada;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.PuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderOperadorEmbarcada;
|
||||||
|
import com.trg.search.Filter;
|
||||||
|
|
||||||
|
@Controller("BusquedaOperadorEmbarcadaController")
|
||||||
|
@Scope("prototype")
|
||||||
|
public class BusquedaOperadorEmbarcadaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private transient PagedListWrapper<OperadorEmbarcada> plwOperador;
|
||||||
|
|
||||||
|
private List<PuntoVenta> lspuntoVenta;
|
||||||
|
private Paging pagingOperadores;
|
||||||
|
private MyListbox operadorList;
|
||||||
|
private List<PuntoVenta> lsPuntoVenta;
|
||||||
|
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||||
|
private Intbox txtIdOperador;
|
||||||
|
private Textbox txtLogin;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
setLsPuntoVenta(new ArrayList<PuntoVenta>());
|
||||||
|
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
|
operadorList.setItemRenderer(new RenderOperadorEmbarcada());
|
||||||
|
operadorList.addEventListener("onDoubleClick", new EventListener() {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onEvent(Event event) throws Exception {
|
||||||
|
OperadorEmbarcada s = (OperadorEmbarcada) operadorList.getSelected();
|
||||||
|
abrirTelaCadastroOperador(s);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
refreshLista();
|
||||||
|
|
||||||
|
txtIdOperador.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings({ "rawtypes", "unchecked" })
|
||||||
|
private void abrirTelaCadastroOperador(OperadorEmbarcada s) {
|
||||||
|
if (s == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Map args = new HashMap();
|
||||||
|
args.put("Operador", s);
|
||||||
|
|
||||||
|
openWindow("/gui/esquema_operacional/editarOperadorEmbarcada.zul",
|
||||||
|
Labels.getLabel("editarOperadorEmbarcada.titulo"), args, MODAL);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("static-access")
|
||||||
|
private void refreshLista() {
|
||||||
|
HibernateSearchObject<OperadorEmbarcada> sistemaBusqueda =
|
||||||
|
new HibernateSearchObject<OperadorEmbarcada>(OperadorEmbarcada.class, pagingOperadores.getPageSize());
|
||||||
|
|
||||||
|
sistemaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||||
|
|
||||||
|
if (txtIdOperador.getValue() != null) {
|
||||||
|
sistemaBusqueda.addFilterEqual("operadorEmbarcadaId", txtIdOperador.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
String login = txtLogin.getText();
|
||||||
|
if (!login.equals("")) {
|
||||||
|
sistemaBusqueda.addFilterILike("usuario.claveUsuario", "%" + login.trim().concat("%"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem puntoVentaSeleccionada = cmbPuntoVenta.getSelectedItem();
|
||||||
|
|
||||||
|
if (puntoVentaSeleccionada != null) {
|
||||||
|
PuntoVenta puntoVenta = (PuntoVenta) puntoVentaSeleccionada.getValue();
|
||||||
|
sistemaBusqueda.addFilterSome("usuario.usuarioUbicacionList", Filter.and(Filter.equal("puntoVenta", puntoVenta),
|
||||||
|
Filter.equal("activo", Boolean.TRUE)));
|
||||||
|
}
|
||||||
|
|
||||||
|
plwOperador.init(sistemaBusqueda, operadorList, pagingOperadores);
|
||||||
|
|
||||||
|
if (operadorList.getData().length == 0) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||||
|
Labels.getLabel("busquedaOperadorEmbarcada.titulo"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnNovo(Event ev) {
|
||||||
|
abrirTelaCadastroOperador(new OperadorEmbarcada());
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnPesquisa(Event ev) {
|
||||||
|
refreshLista();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnRefresh(Event ev) {
|
||||||
|
refreshLista();
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getOperadorList() {
|
||||||
|
return operadorList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setOperadorList(MyListbox operadorList) {
|
||||||
|
this.operadorList = operadorList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Paging getPagingOperadores() {
|
||||||
|
return pagingOperadores;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPagingOperadores(Paging pagingOperadores) {
|
||||||
|
this.pagingOperadores = pagingOperadores;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PuntoVenta> getLspuntoVenta() {
|
||||||
|
return lspuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLspuntoVenta(List<PuntoVenta> lspuntoVenta) {
|
||||||
|
this.lspuntoVenta = lspuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<PuntoVenta> getLsPuntoVenta() {
|
||||||
|
return lsPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsPuntoVenta(List<PuntoVenta> lsPuntoVenta) {
|
||||||
|
this.lsPuntoVenta = lsPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyComboboxPuntoVenta getCmbPuntoVenta() {
|
||||||
|
return cmbPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbPuntoVenta(MyComboboxPuntoVenta cmbPuntoVenta) {
|
||||||
|
this.cmbPuntoVenta = cmbPuntoVenta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public PagedListWrapper<OperadorEmbarcada> getPlwOperador() {
|
||||||
|
return plwOperador;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPlwOperador(PagedListWrapper<OperadorEmbarcada> plwOperador) {
|
||||||
|
this.plwOperador = plwOperador;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Intbox getTxtIdOperador() {
|
||||||
|
return txtIdOperador;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtIdOperador(Intbox txtIdOperador) {
|
||||||
|
this.txtIdOperador = txtIdOperador;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Textbox getTxtLogin() {
|
||||||
|
return txtLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtLogin(Textbox txtLogin) {
|
||||||
|
this.txtLogin = txtLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,715 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
import org.zkoss.zhtml.Messagebox;
|
||||||
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.Executions;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zul.Button;
|
||||||
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Comboitem;
|
||||||
|
import org.zkoss.zul.Intbox;
|
||||||
|
import org.zkoss.zul.Paging;
|
||||||
|
import org.zkoss.zul.Tabbox;
|
||||||
|
import org.zkoss.zul.Textbox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.dao.RutaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.dao.RutaEmpresaDAO;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OperadorEmbarcada;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OperadorEmbarcadaLinha;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OperadorEmbarcadaServico;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RutaEmpresa;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||||
|
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.OperadorEmbarcadaService;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.ItemRenderRutaOperadorEmbarcada;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderConfiguracionCorrida;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderRutasOperadorEmbarcada;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderSelecionarUsuario;
|
||||||
|
|
||||||
|
@Controller("editarOperadorEmbarcadaController")
|
||||||
|
@Scope("prototype")
|
||||||
|
public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
private static Logger log = Logger.getLogger(EditarOperadorEmbarcadaController.class);
|
||||||
|
private Intbox txtIdUsuario;
|
||||||
|
private Textbox txtLogin;
|
||||||
|
|
||||||
|
private Intbox txtIdLinha;
|
||||||
|
private Textbox txtDescLinha;
|
||||||
|
private Textbox txtNumeroLinha;
|
||||||
|
|
||||||
|
private MyListbox usuarioList;
|
||||||
|
private Paging pagingUsuario;
|
||||||
|
private Combobox cmbEmpresa;
|
||||||
|
private List<Empresa> lsEmpresas;
|
||||||
|
private Combobox cmbClaseServicio;
|
||||||
|
private List<ClaseServicio> lsClaseServicio;
|
||||||
|
private Paging pagingRuta;
|
||||||
|
private MyListbox linhaList;
|
||||||
|
private Combobox cmbSentido;
|
||||||
|
private List<String> lsSentido;
|
||||||
|
|
||||||
|
private Intbox txtIdServico;
|
||||||
|
private Textbox txtDescServico;
|
||||||
|
private Intbox txtNumeroServico;
|
||||||
|
private Combobox cmbMarcaServicio;
|
||||||
|
private Combobox cmbClaseServicioServico;
|
||||||
|
|
||||||
|
private List<ItemRenderRutaOperadorEmbarcada> itensRutaList = new ArrayList<ItemRenderRutaOperadorEmbarcada>();
|
||||||
|
private List<EsquemaCorrida> servicosSelecionados = new ArrayList<EsquemaCorrida>();
|
||||||
|
|
||||||
|
private List<Marca> lsMarca;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ClaseServicioService claseServicioServicce;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RutaDAO rutaDAO;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private RutaEmpresaDAO rutaEmpresaDAO;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OperadorEmbarcadaService operadorService;
|
||||||
|
|
||||||
|
private List<Usuario> usuariosSelecionados;
|
||||||
|
private List<ItemRenderRutaOperadorEmbarcada> itemRutaSelecionados;
|
||||||
|
|
||||||
|
private OperadorEmbarcada operadorEdicao;
|
||||||
|
|
||||||
|
private Tabbox tabBox;
|
||||||
|
private Paging pagingEsquemaCorrida;
|
||||||
|
private MyListbox esquemaCorridaList;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MarcaService marcaService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private transient PagedListWrapper<Usuario> plwFormaPago;
|
||||||
|
@Autowired
|
||||||
|
private transient PagedListWrapper<EsquemaCorrida> plwEsquemaCorrida;
|
||||||
|
|
||||||
|
private Button btnPesquisaUsuario;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
usuariosSelecionados = new ArrayList<Usuario>();
|
||||||
|
new ArrayList<OperadorEmbarcada>();
|
||||||
|
lsEmpresas = UsuarioLogado.getUsuarioLogado().getEmpresa();
|
||||||
|
|
||||||
|
lsClaseServicio = claseServicioServicce.buscarPorEmpresasDoUsuario(lsEmpresas);
|
||||||
|
|
||||||
|
lsSentido = new ArrayList<String>();
|
||||||
|
lsSentido.add(" - ");
|
||||||
|
lsSentido.add("IDA");
|
||||||
|
lsSentido.add("VOLTA");
|
||||||
|
|
||||||
|
lsMarca = marcaService.buscarMarcaPorEmpresa(lsEmpresas);
|
||||||
|
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
|
operadorEdicao = (OperadorEmbarcada) Executions.getCurrent().getArg().get("Operador");
|
||||||
|
|
||||||
|
usuarioList.setItemRenderer( new RenderSelecionarUsuario());
|
||||||
|
usuarioList.setMultiple(true);
|
||||||
|
|
||||||
|
linhaList.setItemRenderer(new RenderRutasOperadorEmbarcada());
|
||||||
|
linhaList.setMultiple(true);
|
||||||
|
|
||||||
|
esquemaCorridaList.setItemRenderer(new RenderConfiguracionCorrida());
|
||||||
|
esquemaCorridaList.setMultiple(true);
|
||||||
|
|
||||||
|
if(operadorEdicao != null && operadorEdicao.getUsuario() != null ) {
|
||||||
|
btnPesquisaUsuario.setDisabled(true);
|
||||||
|
usuariosSelecionados.add(operadorEdicao.getUsuario());
|
||||||
|
|
||||||
|
List<Ruta> rutaJaSelecionadas = new ArrayList<Ruta>();
|
||||||
|
for(OperadorEmbarcadaLinha opl : operadorEdicao.getLinhas()) {
|
||||||
|
rutaJaSelecionadas.add(opl.getRuta());
|
||||||
|
}
|
||||||
|
|
||||||
|
separarRutasRenderer(rutaJaSelecionadas, true);
|
||||||
|
|
||||||
|
List<EsquemaCorrida> corridaJaSelecionadas = new ArrayList<EsquemaCorrida>();
|
||||||
|
|
||||||
|
for(OperadorEmbarcadaServico ops : operadorEdicao.getServicos()) {
|
||||||
|
corridaJaSelecionadas.add(ops.getCorrida());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
esquemaCorridaList.setData(corridaJaSelecionadas);
|
||||||
|
esquemaCorridaList.selectItems(corridaJaSelecionadas);
|
||||||
|
|
||||||
|
} else {
|
||||||
|
refreshLista();
|
||||||
|
}
|
||||||
|
|
||||||
|
atualizarListaUsuariosSelecionados(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshLista() {
|
||||||
|
usuariosSelecionados = usuarioList.getItensSelecionados(Usuario.class);
|
||||||
|
|
||||||
|
HibernateSearchObject<Usuario> sistemaBusqueda = new HibernateSearchObject<Usuario>(Usuario.class, pagingUsuario.getPageSize());
|
||||||
|
|
||||||
|
|
||||||
|
if (txtIdUsuario.getValue() != null) {
|
||||||
|
sistemaBusqueda.addFilterEqual("usuarioId", txtIdUsuario.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
String cveUsuario = txtLogin.getText();
|
||||||
|
if (!cveUsuario.equals("")) {
|
||||||
|
sistemaBusqueda.addFilterLike("claveUsuario", "%" + cveUsuario.trim().concat("%"));
|
||||||
|
}
|
||||||
|
|
||||||
|
sistemaBusqueda.addSortAsc("claveUsuario");
|
||||||
|
sistemaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||||
|
|
||||||
|
plwFormaPago.init(sistemaBusqueda, usuarioList, pagingUsuario);
|
||||||
|
|
||||||
|
if (usuarioList.getData().length == 0) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||||
|
Labels.getLabel("busquedaUsuarioController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
atualizarListaUsuariosSelecionados(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void atualizarListaUsuariosSelecionados(boolean consulta) {
|
||||||
|
if (usuariosSelecionados != null && !usuariosSelecionados.isEmpty()) {
|
||||||
|
|
||||||
|
usuarioList.clear();
|
||||||
|
if (!consulta) {
|
||||||
|
usuarioList.setData(usuariosSelecionados);
|
||||||
|
}
|
||||||
|
usuarioList.selectItems(usuariosSelecionados);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void refreshListaLinha() {
|
||||||
|
itemRutaSelecionados = linhaList.getItensSelecionados(ItemRenderRutaOperadorEmbarcada.class);
|
||||||
|
|
||||||
|
List<Integer> empresasIds = new ArrayList<Integer>();;
|
||||||
|
Integer rutaId = null;
|
||||||
|
String descRuta = txtDescLinha.getText();
|
||||||
|
ClaseServicio classe = null;
|
||||||
|
String numeroLinha = null;
|
||||||
|
|
||||||
|
if (cmbEmpresa.getSelectedIndex() >= 0) {
|
||||||
|
Empresa e = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||||
|
empresasIds.add(e.getEmpresaId());
|
||||||
|
} else {
|
||||||
|
empresasIds.addAll(getIdEmpresas(lsEmpresas));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (txtIdLinha.getValue() != null) {
|
||||||
|
rutaId = txtIdLinha.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (txtNumeroLinha.getValue() != null && !txtNumeroLinha.getValue().isEmpty()) {
|
||||||
|
numeroLinha = txtNumeroLinha.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem cbiClaseServicio = cmbClaseServicio.getSelectedItem();
|
||||||
|
if (cbiClaseServicio != null) {
|
||||||
|
classe = (ClaseServicio) cbiClaseServicio.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Ruta> rutasList = rutaDAO.buscarRutasVendaEmbarcada(empresasIds, rutaId, numeroLinha, descRuta, classe);
|
||||||
|
|
||||||
|
if (rutasList.isEmpty()) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"), Labels.getLabel("busquedaCatalogoDeRutaController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
separarRutasRenderer(rutasList, false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void separarRutasRenderer(List<Ruta> rutasList, boolean selecionadas) {
|
||||||
|
for(Ruta r : rutasList) {
|
||||||
|
List<RutaEmpresa> listRutaEmpresa = rutaEmpresaDAO.obtenerPorRuta(r);
|
||||||
|
if(itensRutaList.isEmpty()) {
|
||||||
|
itensRutaList.add(new ItemRenderRutaOperadorEmbarcada(r.getDescruta(), r.getClaseServicio().getDescclase(), r.getPrefixo(), listRutaEmpresa, r));
|
||||||
|
} else {
|
||||||
|
boolean adicionou = false;
|
||||||
|
for(int i = 0 ; i < itensRutaList.size(); i++) {
|
||||||
|
if(itensRutaList.get(i).getPrefixo().equals(r.getPrefixo())) {
|
||||||
|
boolean idIgual = false;
|
||||||
|
for(Ruta rs : itensRutaList.get(i).getListaRutas()) {
|
||||||
|
if(rs.getRutaId().equals(r.getRutaId())) {
|
||||||
|
idIgual = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//Para não adicionar a mesma ruta mais de uma vez
|
||||||
|
if(!idIgual) {
|
||||||
|
itensRutaList.get(i).getListaRutas().add(r);
|
||||||
|
}
|
||||||
|
adicionou = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!adicionou) {
|
||||||
|
itensRutaList.add(new ItemRenderRutaOperadorEmbarcada(r.getDescruta(), r.getClaseServicio().getDescclase(), r.getPrefixo(), listRutaEmpresa, r));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(selecionadas) {
|
||||||
|
itemRutaSelecionados = itensRutaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
linhaList.setData(itensRutaList);
|
||||||
|
linhaList.selectItems(itemRutaSelecionados);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void refreshListaServico() {
|
||||||
|
servicosSelecionados = esquemaCorridaList.getItensSelecionados(EsquemaCorrida.class);
|
||||||
|
|
||||||
|
HibernateSearchObject<EsquemaCorrida> busquedaCorrita = new HibernateSearchObject<EsquemaCorrida>(EsquemaCorrida.class, pagingEsquemaCorrida.getPageSize());
|
||||||
|
|
||||||
|
busquedaCorrita.addFilterEqual("activo", Boolean.TRUE);
|
||||||
|
|
||||||
|
if(txtIdServico.getValue() != null) {
|
||||||
|
busquedaCorrita.addFilterEqual("esquemacorridaId", txtIdServico.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
if(txtNumeroServico.getValue() != null) {
|
||||||
|
busquedaCorrita.addFilterEqual("numCorrida", txtNumeroServico.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem cbiClase = cmbClaseServicioServico.getSelectedItem();
|
||||||
|
if (cbiClase != null) {
|
||||||
|
ClaseServicio claseServicio = (ClaseServicio) cbiClase.getValue();
|
||||||
|
busquedaCorrita.addFilterEqual("claseServicio", claseServicio);
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem cbiSentido = cmbSentido.getSelectedItem();
|
||||||
|
if (cbiSentido != null && !cbiSentido.getValue().toString().equals(" - ")) {
|
||||||
|
String sentido = (String) cbiSentido.getValue();
|
||||||
|
busquedaCorrita.addFilterEqual("ruta.indSentidoIda", sentido.equals("IDA"));
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem cbiMarca = cmbMarcaServicio.getSelectedItem();
|
||||||
|
if (cbiMarca != null) {
|
||||||
|
Marca marca = (Marca) cbiMarca.getValue();
|
||||||
|
busquedaCorrita.addFilterEqual("marca", marca);
|
||||||
|
} else {
|
||||||
|
busquedaCorrita.addFilterIn("marca", lsMarca);
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Ruta> linhasSelecionadas = new ArrayList<Ruta>();
|
||||||
|
for(ItemRenderRutaOperadorEmbarcada itr : itemRutaSelecionados) {
|
||||||
|
linhasSelecionadas.addAll(itr.getListaRutas());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (linhasSelecionadas != null && !linhasSelecionadas.isEmpty()) {
|
||||||
|
busquedaCorrita.addFilterIn("ruta", linhasSelecionadas);
|
||||||
|
}
|
||||||
|
|
||||||
|
busquedaCorrita.addSortDesc("esquemacorridaId");
|
||||||
|
|
||||||
|
plwEsquemaCorrida.init(busquedaCorrita, esquemaCorridaList, pagingEsquemaCorrida);
|
||||||
|
|
||||||
|
esquemaCorridaList.selectItems(servicosSelecionados);
|
||||||
|
|
||||||
|
if (esquemaCorridaList.getData().length == 0) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),
|
||||||
|
Labels.getLabel("selecionarServicosGerarController.window.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (InterruptedException ex) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Integer> getIdEmpresas(List<Empresa> lsEmpresa2) {
|
||||||
|
|
||||||
|
if (lsEmpresa2 == null || lsEmpresa2.isEmpty()) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
List<Integer> ids = new ArrayList<Integer>();
|
||||||
|
for (Empresa empresa : lsEmpresa2) {
|
||||||
|
ids.add(empresa.getEmpresaId());
|
||||||
|
}
|
||||||
|
|
||||||
|
return ids;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onSelect$tabLinhas(Event event) {
|
||||||
|
List<Usuario> selected = usuarioList.getItensSelecionados(Usuario.class);
|
||||||
|
|
||||||
|
if(selected != null && selected.isEmpty()) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("busquedaOperadorEmbarcada.mensage.escolherUsuario"),
|
||||||
|
Labels.getLabel("busquedaOperadorEmbarcada.mensage.escolherUsuario.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
tabBox.setSelectedIndex(0);
|
||||||
|
} else {
|
||||||
|
usuariosSelecionados = selected;
|
||||||
|
refreshListaLinha();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onSelect$tabServico(Event event) {
|
||||||
|
List<ItemRenderRutaOperadorEmbarcada> selected = linhaList.getItensSelecionados(ItemRenderRutaOperadorEmbarcada.class);
|
||||||
|
|
||||||
|
if(selected != null && selected.isEmpty()) {
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("busquedaOperadorEmbarcada.mensage.escolherLinha"),
|
||||||
|
Labels.getLabel("busquedaOperadorEmbarcada.mensage.escolherLinha.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
if(usuariosSelecionados.isEmpty()) {
|
||||||
|
tabBox.setSelectedIndex(0);
|
||||||
|
} else {
|
||||||
|
tabBox.setSelectedIndex(1);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
itemRutaSelecionados = selected;
|
||||||
|
refreshListaServico();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnSalvar(Event ev) {
|
||||||
|
try {
|
||||||
|
servicosSelecionados = esquemaCorridaList.getItensSelecionados(EsquemaCorrida.class);
|
||||||
|
|
||||||
|
if (usuariosSelecionados.isEmpty() || itemRutaSelecionados.isEmpty() || servicosSelecionados.isEmpty()) {
|
||||||
|
|
||||||
|
Messagebox.show(Labels.getLabel("busquedaOperadorEmbarcada.mensage.naoEpossivelSalvar"), Labels.getLabel("busquedaOperadorEmbarcada.mensage.naoEpossivelSalvar.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
for(Usuario us : usuariosSelecionados) {
|
||||||
|
OperadorEmbarcada operador = new OperadorEmbarcada();
|
||||||
|
|
||||||
|
if(operadorEdicao != null && operadorEdicao.getUsuario() != null && us.getUsuarioId() == operadorEdicao.getUsuario().getUsuarioId()) {
|
||||||
|
operador = operadorEdicao;
|
||||||
|
}
|
||||||
|
|
||||||
|
operador.setActivo(Boolean.TRUE);
|
||||||
|
operador.setFecmodif(new Date());
|
||||||
|
operador.setUsuario(us);
|
||||||
|
|
||||||
|
//Separa todas as rutas selecionadas
|
||||||
|
List<Ruta> rutasSelecionadas = new ArrayList<Ruta>();
|
||||||
|
for(ItemRenderRutaOperadorEmbarcada r :itemRutaSelecionados) {
|
||||||
|
rutasSelecionadas.addAll(r.getListaRutas());
|
||||||
|
}
|
||||||
|
|
||||||
|
List<OperadorEmbarcadaLinha> linhas = new ArrayList<OperadorEmbarcadaLinha>();
|
||||||
|
for(Ruta r : rutasSelecionadas) {
|
||||||
|
OperadorEmbarcadaLinha opl = new OperadorEmbarcadaLinha();
|
||||||
|
|
||||||
|
opl.setActivo(Boolean.TRUE);
|
||||||
|
opl.setOperadorEmbarcada(operador);
|
||||||
|
opl.setRuta(r);
|
||||||
|
|
||||||
|
linhas.add(opl);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Separa os servicos selecionados
|
||||||
|
List<OperadorEmbarcadaServico> listaServicos = new ArrayList<OperadorEmbarcadaServico>();
|
||||||
|
for (EsquemaCorrida cor : servicosSelecionados) {
|
||||||
|
OperadorEmbarcadaServico servicos = new OperadorEmbarcadaServico();
|
||||||
|
|
||||||
|
servicos.setOperadorEmbarcada(operador);
|
||||||
|
servicos.setActivo(Boolean.TRUE);
|
||||||
|
servicos.setCorrida(cor);
|
||||||
|
|
||||||
|
listaServicos.add(servicos);
|
||||||
|
}
|
||||||
|
|
||||||
|
operador = operadorService.suscribirActualizar(operador, linhas, listaServicos);
|
||||||
|
|
||||||
|
try {
|
||||||
|
Messagebox.show(Labels.getLabel("busquedaOperadorEmbarcada.mensage.operadorSalvo"), Labels.getLabel("busquedaOperadorEmbarcada.mensage.operadorSalvo.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
closeWindow();
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
try {
|
||||||
|
log.error("Erro: ", e);
|
||||||
|
Messagebox.show(Labels.getLabel("busquedaOperadorEmbarcada.mensage.erroAoSalvar"), Labels.getLabel("busquedaOperadorEmbarcada.mensage.naoEpossivelSalvar.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
return;
|
||||||
|
} catch (InterruptedException e1) {
|
||||||
|
log.error("Erro: ", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnApagar(Event ev) {
|
||||||
|
try {
|
||||||
|
int resp = Messagebox.show(
|
||||||
|
Labels.getLabel("busquedaOperadorEmbarcada.MSG.borrarPergunta"),
|
||||||
|
Labels.getLabel("busquedaOperadorEmbarcada.MSG.borrarPergunta.title"),
|
||||||
|
Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||||
|
|
||||||
|
if (resp == Messagebox.YES) {
|
||||||
|
|
||||||
|
operadorService.apagar(operadorEdicao);
|
||||||
|
|
||||||
|
Messagebox.show(
|
||||||
|
Labels.getLabel("busquedaOperadorEmbarcada.MSG..borrarOK"),
|
||||||
|
Labels.getLabel("busquedaOperadorEmbarcada.MSG.borrarPergunta.title"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
|
closeWindow();
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
log.error("Erro ao deletar: ", ex);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnPesquisaLinha(Event ev) {
|
||||||
|
refreshListaLinha();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnPesquisaServico(Event ev) {
|
||||||
|
refreshListaServico();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void onClick$btnPesquisaUsuario(Event ev) {
|
||||||
|
refreshLista();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Intbox getTxtIdUsuario() {
|
||||||
|
return txtIdUsuario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtIdUsuario(Intbox txtIdUsuario) {
|
||||||
|
this.txtIdUsuario = txtIdUsuario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Textbox getTxtLogin() {
|
||||||
|
return txtLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtLogin(Textbox txtLogin) {
|
||||||
|
this.txtLogin = txtLogin;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getUsuarioList() {
|
||||||
|
return usuarioList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuarioList(MyListbox usuarioList) {
|
||||||
|
this.usuarioList = usuarioList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Paging getPagingUsuario() {
|
||||||
|
return pagingUsuario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPagingUsuario(Paging pagingUsuario) {
|
||||||
|
this.pagingUsuario = pagingUsuario;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbEmpresa() {
|
||||||
|
return cmbEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbEmpresa(Combobox cmbEmpresa) {
|
||||||
|
this.cmbEmpresa = cmbEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresas() {
|
||||||
|
return lsEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresas(List<Empresa> lsEmpresas) {
|
||||||
|
this.lsEmpresas = lsEmpresas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbClaseServicio() {
|
||||||
|
return cmbClaseServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbClaseServicio(Combobox cmbClaseServicio) {
|
||||||
|
this.cmbClaseServicio = cmbClaseServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<ClaseServicio> getLsClaseServicio() {
|
||||||
|
return lsClaseServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsClaseServicio(List<ClaseServicio> lsClaseServicio) {
|
||||||
|
this.lsClaseServicio = lsClaseServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Intbox getTxtIdLinha() {
|
||||||
|
return txtIdLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtIdLinha(Intbox txtIdLinha) {
|
||||||
|
this.txtIdLinha = txtIdLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Textbox getTxtDescLinha() {
|
||||||
|
return txtDescLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtDescLinha(Textbox txtDescLinha) {
|
||||||
|
this.txtDescLinha = txtDescLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Textbox getTxtNumeroLinha() {
|
||||||
|
return txtNumeroLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtNumeroLinha(Textbox txtNumeroLinha) {
|
||||||
|
this.txtNumeroLinha = txtNumeroLinha;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Paging getPagingRuta() {
|
||||||
|
return pagingRuta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPagingRuta(Paging pagingRuta) {
|
||||||
|
this.pagingRuta = pagingRuta;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getLinhaList() {
|
||||||
|
return linhaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLinhaList(MyListbox linhaList) {
|
||||||
|
this.linhaList = linhaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Tabbox getTabBox() {
|
||||||
|
return tabBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTabBox(Tabbox tabBox) {
|
||||||
|
this.tabBox = tabBox;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbSentido() {
|
||||||
|
return cmbSentido;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbSentido(Combobox cmbSentido) {
|
||||||
|
this.cmbSentido = cmbSentido;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<String> getLsSentido() {
|
||||||
|
return lsSentido;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsSentido(List<String> lsSentido) {
|
||||||
|
this.lsSentido = lsSentido;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Intbox getTxtIdServico() {
|
||||||
|
return txtIdServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtIdServico(Intbox txtIdServico) {
|
||||||
|
this.txtIdServico = txtIdServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Intbox getTxtNumeroServico() {
|
||||||
|
return txtNumeroServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtNumeroServico(Intbox txtNumeroServico) {
|
||||||
|
this.txtNumeroServico = txtNumeroServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbMarcaServicio() {
|
||||||
|
return cmbMarcaServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbMarcaServicio(Combobox cmbMarcaServicio) {
|
||||||
|
this.cmbMarcaServicio = cmbMarcaServicio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Marca> getLsMarca() {
|
||||||
|
return lsMarca;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsMarca(List<Marca> lsMarca) {
|
||||||
|
this.lsMarca = lsMarca;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Usuario> getUsuariosSelecionados() {
|
||||||
|
return usuariosSelecionados;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUsuariosSelecionados(List<Usuario> usuariosSelecionados) {
|
||||||
|
this.usuariosSelecionados = usuariosSelecionados;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Textbox getTxtDescServico() {
|
||||||
|
return txtDescServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTxtDescServico(Textbox txtDescServico) {
|
||||||
|
this.txtDescServico = txtDescServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbClaseServicioServico() {
|
||||||
|
return cmbClaseServicioServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbClaseServicioServico(Combobox cmbClaseServicioServico) {
|
||||||
|
this.cmbClaseServicioServico = cmbClaseServicioServico;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Paging getPagingEsquemaCorrida() {
|
||||||
|
return pagingEsquemaCorrida;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPagingEsquemaCorrida(Paging pagingEsquemaCorrida) {
|
||||||
|
this.pagingEsquemaCorrida = pagingEsquemaCorrida;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MyListbox getEsquemaCorridaList() {
|
||||||
|
return esquemaCorridaList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEsquemaCorridaList(MyListbox esquemaCorridaList) {
|
||||||
|
this.esquemaCorridaList = esquemaCorridaList;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,26 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional;
|
||||||
|
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.constantes.ConstantesFuncionSistema;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||||
|
|
||||||
|
public class ItemMenuCadastroOperadorEmbarcada extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public ItemMenuCadastroOperadorEmbarcada() {
|
||||||
|
super("indexController.mniConfVendaEmbarcada.cadastroOperador.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return ConstantesFuncionSistema.CLAVE_CONFIGURACAO_VENDA_EMBARCADA;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ejecutar() {
|
||||||
|
PantallaUtileria.openWindow("/gui/esquema_operacional/busquedaOperadorEmbarcada.zul",
|
||||||
|
Labels.getLabel("busquedaOperadorEmbarcada.titulo"), getArgs() ,desktop);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||||
|
|
||||||
|
public class SubMenuConfiguracaoVendaEmbarcada extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public SubMenuConfiguracaoVendaEmbarcada() {
|
||||||
|
super("indexController.mniConfVendaEmbarcada.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.ESQUEMAOPERACIONAL.MENU.CONFVENDAEMBARCADA";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -90,6 +90,8 @@ esquemaOperacional.confrestricaocanalventa.itemMenuEmpValMin=com.rjconsultores.v
|
||||||
esquemaOperacional.selecionarservicosgerar=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemSelecionarServicosGerar
|
esquemaOperacional.selecionarservicosgerar=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemSelecionarServicosGerar
|
||||||
esquemaOperacional.atualizacorridafechusofecverano=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemAtualizaCorridaFecHusoFecVerano
|
esquemaOperacional.atualizacorridafechusofecverano=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemAtualizaCorridaFecHusoFecVerano
|
||||||
esquemaOperacional.geracaoArquivoEMTU=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemGeracaoArquivoEMTU
|
esquemaOperacional.geracaoArquivoEMTU=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemGeracaoArquivoEMTU
|
||||||
|
esquemaOperacional.configuracaoVendaEmbarcada=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.SubMenuConfiguracaoVendaEmbarcada
|
||||||
|
esquemaOperacional.configuracaoVendaEmbarcada.ItemMenuCadastroOperadorEmbarcada=com.rjconsultores.ventaboletos.web.utilerias.menu.item.esquemaoperacional.ItemMenuCadastroOperadorEmbarcada
|
||||||
tarifasOficial=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.MenuTarifasOficial
|
tarifasOficial=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.MenuTarifasOficial
|
||||||
tarifasOficial.seguroKm=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.ItemMenuSeguroKm
|
tarifasOficial.seguroKm=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.ItemMenuSeguroKm
|
||||||
tarifasOficial.seguroTarifa=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.ItemMenuSeguroTarifa
|
tarifasOficial.seguroTarifa=com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifasOficial.ItemMenuSeguroTarifa
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.RutaEmpresa;
|
||||||
|
|
||||||
|
public class ItemRenderRutaOperadorEmbarcada implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
private String descricao;
|
||||||
|
private String classe;
|
||||||
|
private String prefixo;
|
||||||
|
private String empresa;
|
||||||
|
|
||||||
|
public ItemRenderRutaOperadorEmbarcada(String descricao, String classe, String prefixo, List<RutaEmpresa> empresas, Ruta ruta) {
|
||||||
|
super();
|
||||||
|
this.descricao = descricao;
|
||||||
|
this.classe = classe;
|
||||||
|
this.prefixo = prefixo;
|
||||||
|
|
||||||
|
this.empresa = "";
|
||||||
|
int i = 0;
|
||||||
|
for(RutaEmpresa r : empresas) {
|
||||||
|
if(i > 0) {
|
||||||
|
this.empresa += " / ";
|
||||||
|
}
|
||||||
|
|
||||||
|
this.empresa += r.getEmpresa().getNombempresa();
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.listaRutas = new ArrayList<Ruta>();
|
||||||
|
this.listaRutas.add(ruta);
|
||||||
|
}
|
||||||
|
|
||||||
|
private List<Ruta> listaRutas = new ArrayList<Ruta>();
|
||||||
|
|
||||||
|
public String getDescricao() {
|
||||||
|
return descricao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescricao(String descricao) {
|
||||||
|
this.descricao = descricao;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getClasse() {
|
||||||
|
return classe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setClasse(String classe) {
|
||||||
|
this.classe = classe;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPrefixo() {
|
||||||
|
return prefixo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPrefixo(String prefixo) {
|
||||||
|
this.prefixo = prefixo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getEmpresa() {
|
||||||
|
return empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEmpresa(String empresa) {
|
||||||
|
this.empresa = empresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Ruta> getListaRutas() {
|
||||||
|
return listaRutas;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setListaRutas(List<Ruta> listaRutas) {
|
||||||
|
this.listaRutas = listaRutas;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.zkoss.zul.Listcell;
|
||||||
|
import org.zkoss.zul.Listitem;
|
||||||
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OperadorEmbarcada;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.UsuarioUbicacion;
|
||||||
|
|
||||||
|
public class RenderOperadorEmbarcada implements ListitemRenderer {
|
||||||
|
|
||||||
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
|
OperadorEmbarcada operador = (OperadorEmbarcada) o;
|
||||||
|
|
||||||
|
Listcell lc = new Listcell(operador.getOperadorEmbarcadaId().toString());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lc = new Listcell(operador.getUsuario().getClaveUsuario());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lc = new Listcell(operador.getUsuario().getName());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
List<UsuarioUbicacion> usuarioUbicacionList = operador.getUsuario().getUsuarioUbicacionActivoList();
|
||||||
|
StringBuilder ubicacionsBuilder = new StringBuilder();
|
||||||
|
if(!usuarioUbicacionList.isEmpty()){
|
||||||
|
|
||||||
|
Iterator<UsuarioUbicacion> usuarioUbicacionIt = usuarioUbicacionList.iterator();
|
||||||
|
ubicacionsBuilder.append(usuarioUbicacionIt.next().getPuntoVenta().getNombpuntoventa());
|
||||||
|
|
||||||
|
while(usuarioUbicacionIt.hasNext())
|
||||||
|
ubicacionsBuilder.append(" \\ ")
|
||||||
|
.append(usuarioUbicacionIt.next().getPuntoVenta().getNombpuntoventa());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
lc = new Listcell(ubicacionsBuilder.toString());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lstm.setAttribute("data", operador);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
|
import org.zkoss.zul.Listcell;
|
||||||
|
import org.zkoss.zul.Listitem;
|
||||||
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
|
public class RenderRutasOperadorEmbarcada implements ListitemRenderer {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
|
ItemRenderRutaOperadorEmbarcada ruta = (ItemRenderRutaOperadorEmbarcada) o;
|
||||||
|
|
||||||
|
Listcell lc = new Listcell(ruta.getDescricao());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lc = new Listcell(ruta.getClasse());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lc = new Listcell(ruta.getPrefixo());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lc = new Listcell(ruta.getEmpresa());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lstm.setAttribute("data", ruta);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.render;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.zkoss.zul.Listcell;
|
||||||
|
import org.zkoss.zul.Listitem;
|
||||||
|
import org.zkoss.zul.ListitemRenderer;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Usuario;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.UsuarioUbicacion;
|
||||||
|
|
||||||
|
public class RenderSelecionarUsuario implements ListitemRenderer {
|
||||||
|
|
||||||
|
public void render(Listitem lstm, Object o) throws Exception {
|
||||||
|
Usuario usuario = (Usuario) o;
|
||||||
|
|
||||||
|
Listcell lc = new Listcell();
|
||||||
|
|
||||||
|
lc = new Listcell(usuario.getUsuarioId().toString());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lc = new Listcell(usuario.getClaveUsuario());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lc = new Listcell(usuario.getNombusuario());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
List<UsuarioUbicacion> usuarioUbicacionList = usuario.getUsuarioUbicacionActivoList();
|
||||||
|
StringBuilder ubicacionsBuilder = new StringBuilder();
|
||||||
|
if(!usuarioUbicacionList.isEmpty()){
|
||||||
|
|
||||||
|
Iterator<UsuarioUbicacion> usuarioUbicacionIt = usuarioUbicacionList.iterator();
|
||||||
|
ubicacionsBuilder.append(usuarioUbicacionIt.next().getPuntoVenta().getNombpuntoventa());
|
||||||
|
|
||||||
|
while(usuarioUbicacionIt.hasNext())
|
||||||
|
ubicacionsBuilder.append(" \\ ")
|
||||||
|
.append(usuarioUbicacionIt.next().getPuntoVenta().getNombpuntoventa());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
lc = new Listcell(ubicacionsBuilder.toString());
|
||||||
|
lc.setParent(lstm);
|
||||||
|
|
||||||
|
lstm.setAttribute("data", usuario);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -478,6 +478,9 @@
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.EmpresaEmailConfig</value>
|
<value>com.rjconsultores.ventaboletos.entidad.EmpresaEmailConfig</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.CtrlFechamentoCaixa</value>
|
<value>com.rjconsultores.ventaboletos.entidad.CtrlFechamentoCaixa</value>
|
||||||
<value>com.rjconsultores.ventaboletos.entidad.PtovtaAntifraude</value>
|
<value>com.rjconsultores.ventaboletos.entidad.PtovtaAntifraude</value>
|
||||||
|
<value>com.rjconsultores.ventaboletos.entidad.OperadorEmbarcada</value>
|
||||||
|
<value>com.rjconsultores.ventaboletos.entidad.OperadorEmbarcadaLinha</value>
|
||||||
|
<value>com.rjconsultores.ventaboletos.entidad.OperadorEmbarcadaServico</value>
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
|
|
||||||
|
|
|
@ -7924,4 +7924,53 @@ dispositivoVendaEmbarcadaController.btnSalvar.tooltiptext = Salvar
|
||||||
dispositivoVendaEmbarcadaController.MSG.suscribirOK = Customização Registrada com Sucesso.
|
dispositivoVendaEmbarcadaController.MSG.suscribirOK = Customização Registrada com Sucesso.
|
||||||
dispositivoVendaEmbarcadaController.MSG.borrarPergunta = Eliminar customização?
|
dispositivoVendaEmbarcadaController.MSG.borrarPergunta = Eliminar customização?
|
||||||
dispositivoVendaEmbarcadaController.MSG.borrarOK = Customização Excluida com Sucesso.
|
dispositivoVendaEmbarcadaController.MSG.borrarOK = Customização Excluida com Sucesso.
|
||||||
dispositivoVendaEmbarcadaController.MSG.modificar = Cuidado! Ao alterar este valor o sistema será modificado automaticamente.
|
dispositivoVendaEmbarcadaController.MSG.modificar = Cuidado! Ao alterar este valor o sistema será modificado automaticamente.
|
||||||
|
|
||||||
|
#cadastro Operador Embarcada
|
||||||
|
indexController.mniConfVendaEmbarcada.label=Configuração Venda embarcada
|
||||||
|
indexController.mniConfVendaEmbarcada.cadastroOperador.label=Cadastro de Operador
|
||||||
|
busquedaOperadorEmbarcada.titulo=Operador Venda Embarcada
|
||||||
|
busquedaOperadorEmbarcada.btnRefresh.tooltiptext = Atualizar
|
||||||
|
busquedaOperadorEmbarcada.btnNovo.tooltiptext = Incluir
|
||||||
|
busquedaOperadorEmbarcada.btnCerrar.tooltiptext = Fechar
|
||||||
|
busquedaOperadorEmbarcada.idOperadorEmbarcada.label=ID
|
||||||
|
busquedaOperadorEmbarcada.login.label=Login
|
||||||
|
busquedaOperadorEmbarcada.pontoVenda.label=Ponto de Venda
|
||||||
|
busquedaOperadorEmbarcada.btnPesquisa.label=Pesquisar
|
||||||
|
#Tabela
|
||||||
|
busquedaOperadorEmbarcada.tabela.id=ID
|
||||||
|
busquedaOperadorEmbarcada.tabela.nome=Nome
|
||||||
|
busquedaOperadorEmbarcada.tabela.login=Login
|
||||||
|
busquedaOperadorEmbarcada.tabela.puntoVenta=Ponto de Venda
|
||||||
|
#Editar Operador Embarcada
|
||||||
|
editarOperadorEmbarcada.titulo=Editar Operador Embarcada
|
||||||
|
editarOperadorEmbarcada.tabUsuario.titulo=Usuário
|
||||||
|
editarOperadorEmbarcada.tabLinha.titulo=Linhas
|
||||||
|
editarOperadorEmbarcada.tabServico.titulo=Serviços
|
||||||
|
editarOperadorEmbarcada.idUsuario=ID
|
||||||
|
editarOperadorEmbarcada.login=Login
|
||||||
|
editarOperadorEmbarcada.btnPesquisar=Pesquisar
|
||||||
|
editarOperadorEmbarcada.linha=Linha
|
||||||
|
editarOperadorEmbarcada.numero=Número
|
||||||
|
editarOperadorEmbarcada.empresa=Empresa
|
||||||
|
editarOperadorEmbarcada.classe=Classe
|
||||||
|
busquedaOperadorEmbarcada.tabela.numero=Número
|
||||||
|
busquedaOperadorEmbarcada.tabela.descricao=Descrição
|
||||||
|
busquedaOperadorEmbarcada.tabela.classe=Classe
|
||||||
|
busquedaOperadorEmbarcada.tabela.prefixo=Prefixo
|
||||||
|
busquedaOperadorEmbarcada.tabela.empresa=Empresa
|
||||||
|
busquedaOperadorEmbarcada.mensage.escolherUsuario=Primeiro é preciso selecionar ao menos um usuário.
|
||||||
|
busquedaOperadorEmbarcada.mensage.escolherUsuario.title=Escolha um usuário
|
||||||
|
editarOperadorEmbarcada.servico=Servico
|
||||||
|
editarOperadorEmbarcada.marca=Marca
|
||||||
|
editarOperadorEmbarcada.sentido=Sentido
|
||||||
|
busquedaOperadorEmbarcada.mensage.escolherLinha=Primeiro é preciso selecionar ao menos uma linha.
|
||||||
|
busquedaOperadorEmbarcada.mensage.escolherLinha.title=Escolha uma linha
|
||||||
|
busquedaOperadorEmbarcada.mensage.naoEpossivelSalvar=Não é possível salvar sem selecionar os Usuário/Linha/Serviço;
|
||||||
|
busquedaOperadorEmbarcada.mensage.naoEpossivelSalvar.title=Não pode ser salvo.
|
||||||
|
busquedaOperadorEmbarcada.mensage.erroAoSalvar=Ocorreu um erro ao salvar o operador.
|
||||||
|
busquedaOperadorEmbarcada.mensage.operadorSalvo=Operador Cadastrado com sucesso.
|
||||||
|
busquedaOperadorEmbarcada.mensage.operadorSalvo.title=Sucesso
|
||||||
|
busquedaOperadorEmbarcada.MSG.borrarPergunta= Eliminar o operador?
|
||||||
|
busquedaOperadorEmbarcada.MSG.borrarPergunta.title=Apagar
|
||||||
|
busquedaOperadorEmbarcada.MSG..borrarOK=Registro excluído.
|
||||||
|
|
|
@ -8448,4 +8448,54 @@ editarDispositivoVendaEmbarcadaController.MSG.ningunRegistro = Nenhum histórico
|
||||||
dispositivoVendaEmbarcadaController.MSG.suscribirOK = Customização Registrada com Sucesso.
|
dispositivoVendaEmbarcadaController.MSG.suscribirOK = Customização Registrada com Sucesso.
|
||||||
dispositivoVendaEmbarcadaController.MSG.borrarPergunta = Eliminar customização?
|
dispositivoVendaEmbarcadaController.MSG.borrarPergunta = Eliminar customização?
|
||||||
dispositivoVendaEmbarcadaController.MSG.borrarOK = Customização Excluida com Sucesso.
|
dispositivoVendaEmbarcadaController.MSG.borrarOK = Customização Excluida com Sucesso.
|
||||||
dispositivoVendaEmbarcadaController.MSG.modificar = Cuidado! Ao alterar este valor o sistema será modificado automaticamente.
|
dispositivoVendaEmbarcadaController.MSG.modificar = Cuidado! Ao alterar este valor o sistema será modificado automaticamente.
|
||||||
|
|
||||||
|
|
||||||
|
#cadastro Operador Embarcada
|
||||||
|
indexController.mniConfVendaEmbarcada.label=Configuração Venda embarcada
|
||||||
|
indexController.mniConfVendaEmbarcada.cadastroOperador.label=Cadastro de Operador
|
||||||
|
busquedaOperadorEmbarcada.titulo=Operador Venda Embarcada
|
||||||
|
busquedaOperadorEmbarcada.btnRefresh.tooltiptext = Atualizar
|
||||||
|
busquedaOperadorEmbarcada.btnNovo.tooltiptext = Incluir
|
||||||
|
busquedaOperadorEmbarcada.btnCerrar.tooltiptext = Fechar
|
||||||
|
busquedaOperadorEmbarcada.idOperadorEmbarcada.label=ID
|
||||||
|
busquedaOperadorEmbarcada.login.label=Login
|
||||||
|
busquedaOperadorEmbarcada.pontoVenda.label=Ponto de Venda
|
||||||
|
busquedaOperadorEmbarcada.btnPesquisa.label=Pesquisar
|
||||||
|
#Tabela
|
||||||
|
busquedaOperadorEmbarcada.tabela.id=ID
|
||||||
|
busquedaOperadorEmbarcada.tabela.nome=Nome
|
||||||
|
busquedaOperadorEmbarcada.tabela.login=Login
|
||||||
|
busquedaOperadorEmbarcada.tabela.puntoVenta=Ponto de Venda
|
||||||
|
#Editar Operador Embarcada
|
||||||
|
editarOperadorEmbarcada.titulo=Editar Operador Embarcada
|
||||||
|
editarOperadorEmbarcada.tabUsuario.titulo=Usuário
|
||||||
|
editarOperadorEmbarcada.tabLinha.titulo=Linhas
|
||||||
|
editarOperadorEmbarcada.tabServico.titulo=Serviços
|
||||||
|
editarOperadorEmbarcada.idUsuario=ID
|
||||||
|
editarOperadorEmbarcada.login=Login
|
||||||
|
editarOperadorEmbarcada.btnPesquisar=Pesquisar
|
||||||
|
editarOperadorEmbarcada.linha=Linha
|
||||||
|
editarOperadorEmbarcada.numero=Número
|
||||||
|
editarOperadorEmbarcada.empresa=Empresa
|
||||||
|
editarOperadorEmbarcada.classe=Classe
|
||||||
|
busquedaOperadorEmbarcada.tabela.numero=Número
|
||||||
|
busquedaOperadorEmbarcada.tabela.descricao=Descrição
|
||||||
|
busquedaOperadorEmbarcada.tabela.classe=Classe
|
||||||
|
busquedaOperadorEmbarcada.tabela.prefixo=Prefixo
|
||||||
|
busquedaOperadorEmbarcada.tabela.empresa=Empresa
|
||||||
|
busquedaOperadorEmbarcada.mensage.escolherUsuario=Primeiro é preciso selecionar ao menos um usuário.
|
||||||
|
busquedaOperadorEmbarcada.mensage.escolherUsuario.title=Escolha um usuário
|
||||||
|
editarOperadorEmbarcada.servico=Servico
|
||||||
|
editarOperadorEmbarcada.marca=Marca
|
||||||
|
editarOperadorEmbarcada.sentido=Sentido
|
||||||
|
busquedaOperadorEmbarcada.mensage.escolherLinha=Primeiro é preciso selecionar ao menos uma linha.
|
||||||
|
busquedaOperadorEmbarcada.mensage.escolherLinha.title=Escolha uma linha
|
||||||
|
busquedaOperadorEmbarcada.mensage.naoEpossivelSalvar=Não é possível salvar sem selecionar os Usuário/Linha/Serviço;
|
||||||
|
busquedaOperadorEmbarcada.mensage.naoEpossivelSalvar.title=Não pode ser salvo.
|
||||||
|
busquedaOperadorEmbarcada.mensage.erroAoSalvar=Ocorreu um erro ao salvar o operador.
|
||||||
|
busquedaOperadorEmbarcada.mensage.operadorSalvo=Operador Cadastrado com sucesso.
|
||||||
|
busquedaOperadorEmbarcada.mensage.operadorSalvo.title=Sucesso
|
||||||
|
busquedaOperadorEmbarcada.MSG.borrarPergunta= Eliminar o operador?
|
||||||
|
busquedaOperadorEmbarcada.MSG.borrarPergunta.title=Apagar
|
||||||
|
busquedaOperadorEmbarcada.MSG..borrarOK=Registro excluído.
|
||||||
|
|
|
@ -0,0 +1,78 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?page contentType="text/html;charset=UTF-8"?>
|
||||||
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
|
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winOperadorEmbarcada"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
<zk>
|
||||||
|
<window id="winOperadorEmbarcada"
|
||||||
|
title="${c:l('busquedaOperadorEmbarcada.titulo')}"
|
||||||
|
apply="${BusquedaOperadorEmbarcadaController}"
|
||||||
|
contentStyle="overflow:auto" height="500px" width="1000px"
|
||||||
|
border="normal" sizable="true">
|
||||||
|
<toolbar>
|
||||||
|
<button id="btnRefresh" image="/gui/img/refresh.png"
|
||||||
|
width="35px"
|
||||||
|
tooltiptext="${c:l('busquedaOperadorEmbarcada.btnRefresh.tooltiptext')}" />
|
||||||
|
<separator orient="vertical" />
|
||||||
|
<button id="btnNovo" image="/gui/img/add.png" width="35px"
|
||||||
|
tooltiptext="${c:l('busquedaOperadorEmbarcada.btnNovo.tooltiptext')}" />
|
||||||
|
<separator orient="vertical" />
|
||||||
|
<button id="btnCerrar"
|
||||||
|
onClick="winOperadorEmbarcada.detach()" image="/gui/img/exit.png"
|
||||||
|
width="35px"
|
||||||
|
tooltiptext="${c:l('busquedaOperadorEmbarcada.btnCerrar.tooltiptext')}" />
|
||||||
|
</toolbar>
|
||||||
|
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="5%" />
|
||||||
|
<column width="15%" />
|
||||||
|
<column width="5%" />
|
||||||
|
<column />
|
||||||
|
<column width="10%" />
|
||||||
|
<column width="25%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('busquedaOperadorEmbarcada.idOperadorEmbarcada.label')}" />
|
||||||
|
<intbox id="txtIdOperador" width="98%" maxlength="6" />
|
||||||
|
|
||||||
|
<label value="${c:l('busquedaOperadorEmbarcada.login.label')}" />
|
||||||
|
<textbox id="txtLogin" width="98%" maxlength="20" />
|
||||||
|
|
||||||
|
<label value="${c:l('busquedaOperadorEmbarcada.pontoVenda.label')}" />
|
||||||
|
<combobox id="cmbPuntoVenta"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxPuntoVenta"
|
||||||
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
|
model="@{winBusquedaUsuario$composer.lspuntoVenta}" />
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
|
||||||
|
<toolbar>
|
||||||
|
<button id="btnPesquisa" image="/gui/img/find.png"
|
||||||
|
label="${c:l('busquedaOperadorEmbarcada.btnPesquisa.label')}"/>
|
||||||
|
</toolbar>
|
||||||
|
|
||||||
|
<listbox id="operadorList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
multiple="false" width="100%">
|
||||||
|
<listhead sizable="true">
|
||||||
|
<listheader image="/gui/img/create_doc.gif"
|
||||||
|
label="${c:l('busquedaOperadorEmbarcada.tabela.id')}" width="10%"
|
||||||
|
sort="auto(usuarioId)"/>
|
||||||
|
<listheader image="/gui/img/create_doc.gif" width="20%"
|
||||||
|
label="${c:l('busquedaOperadorEmbarcada.tabela.login')}"
|
||||||
|
sort="auto(claveUsuario)"/>
|
||||||
|
<listheader image="/gui/img/create_doc.gif"
|
||||||
|
label="${c:l('busquedaOperadorEmbarcada.tabela.nome')}"
|
||||||
|
sort="auto(empleado.cveEmpleado)"/>
|
||||||
|
<listheader image="/gui/img/create_doc.gif"
|
||||||
|
label="${c:l('busquedaOperadorEmbarcada.tabela.puntoVenta')}" width="30%"
|
||||||
|
sort="auto(nombusuario)"/>
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
<paging id="pagingOperadores" pageSize="20" />
|
||||||
|
|
||||||
|
</window>
|
||||||
|
</zk>
|
|
@ -0,0 +1,247 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?page contentType="text/html;charset=UTF-8"?>
|
||||||
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
|
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winEditarOperadorEmbarcada"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
|
<window id="winEditarOperadorEmbarcada"
|
||||||
|
title="${c:l('editarOperadorEmbarcada.titulo')}"
|
||||||
|
apply="${editarOperadorEmbarcadaController}"
|
||||||
|
contentStyle="overflow:auto" height="500px" width="1000px"
|
||||||
|
border="normal" sizable="false">
|
||||||
|
<toolbar>
|
||||||
|
<hbox spacing="5px" style="padding:1px" align="right">
|
||||||
|
<button id="btnApagar" height="20"
|
||||||
|
image="/gui/img/remove.png" width="35px"
|
||||||
|
tooltiptext="${c:l('tooltiptext.btnEliminar')}" />
|
||||||
|
<button id="btnSalvar" height="20"
|
||||||
|
image="/gui/img/save.png" width="35px"
|
||||||
|
tooltiptext="${c:l('tooltiptext.btnGuardar')}" />
|
||||||
|
<button id="btnFechar" height="20"
|
||||||
|
image="/gui/img/exit.png" width="35px"
|
||||||
|
onClick="winEditarOperadorEmbarcada.detach()"
|
||||||
|
tooltiptext="${c:l('tooltiptext.btnFechar')}" />
|
||||||
|
</hbox>
|
||||||
|
</toolbar>
|
||||||
|
|
||||||
|
<tabbox id="tabBox">
|
||||||
|
<tabs id="tabs">
|
||||||
|
<tab id="tabUsuario"
|
||||||
|
label="${c:l('editarOperadorEmbarcada.tabUsuario.titulo')}" />
|
||||||
|
<tab id="tabLinhas"
|
||||||
|
label="${c:l('editarOperadorEmbarcada.tabLinha.titulo')}" />
|
||||||
|
<tab id="tabServico"
|
||||||
|
label="${c:l('editarOperadorEmbarcada.tabServico.titulo')}" />
|
||||||
|
</tabs>
|
||||||
|
<tabpanels>
|
||||||
|
<tabpanel id="tbUsuario" width="100%" height="395px">
|
||||||
|
<grid fixedLayout="true" >
|
||||||
|
<columns>
|
||||||
|
<column width="7%" />
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="10%" />
|
||||||
|
<column />
|
||||||
|
<column width="15%" />
|
||||||
|
</columns>
|
||||||
|
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.idUsuario')}"/>
|
||||||
|
<intbox id="txtIdUsuario" maxlength="10" width="97%" />
|
||||||
|
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.login')}" />
|
||||||
|
<textbox id="txtLogin" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="97%" />
|
||||||
|
|
||||||
|
<button id="btnPesquisaUsuario" image="/gui/img/find.png" label="${c:l('busquedaOperadorEmbarcada.btnPesquisa.label')}" width="95%"/>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
|
||||||
|
<listbox id="usuarioList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" multiple="true" checkmark="true" width="100%" height="315px">
|
||||||
|
<listhead sizable="true" >
|
||||||
|
<listheader image="/gui/img/create_doc.gif" label="${c:l('busquedaOperadorEmbarcada.tabela.id')}" width="15%" sort="auto(usuarioId)" />
|
||||||
|
|
||||||
|
<listheader image="/gui/img/create_doc.gif" width="20%" label="${c:l('busquedaOperadorEmbarcada.tabela.login')}" sort="auto(claveUsuario)" />
|
||||||
|
|
||||||
|
<listheader image="/gui/img/create_doc.gif" label="${c:l('busquedaOperadorEmbarcada.tabela.nome')}" sort="auto(nombusuario)" />
|
||||||
|
|
||||||
|
<listheader image="/gui/img/create_doc.gif" label="${c:l('busquedaOperadorEmbarcada.tabela.puntoVenta')}" width="30%" sort="auto(usuarioUbicacionList.puntoVenta.nombpuntoventa)" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
|
||||||
|
<paging id="pagingUsuario" pageSize="16" />
|
||||||
|
|
||||||
|
</tabpanel>
|
||||||
|
|
||||||
|
<tabpanel width="100%" height="395px">
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="7%" />
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="10%" />
|
||||||
|
<column />
|
||||||
|
<column width="5%" />
|
||||||
|
<column width="10%" />
|
||||||
|
</columns>
|
||||||
|
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.idUsuario')}" />
|
||||||
|
<intbox id="txtIdLinha" maxlength="10" width="97%" />
|
||||||
|
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.linha')}" />
|
||||||
|
<textbox id="txtDescLinha" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="97%" />
|
||||||
|
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.numero')}" />
|
||||||
|
<textbox id="txtNumeroLinha" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="95%" />
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.empresa')}" />
|
||||||
|
<hbox>
|
||||||
|
<combobox
|
||||||
|
id="cmbEmpresa" mold="rounded" buttonVisible="true"
|
||||||
|
width="100%" model="@{winEditarOperadorEmbarcada$composer.lsEmpresas}"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.classe')}" />
|
||||||
|
<hbox>
|
||||||
|
<combobox id="cmbClaseServicio"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
mold="rounded" buttonVisible="true" width="100%"
|
||||||
|
model="@{winEditarOperadorEmbarcada$composer.lsClaseServicio}" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<label value="" />
|
||||||
|
<button id="btnPesquisaLinha" image="/gui/img/find.png" label="${c:l('editarOperadorEmbarcada.btnPesquisar')}" />
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
|
||||||
|
<listbox mold="paging" pageSize="17" id="linhaList" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox" multiple="true" checkmark="true" width="100%" height="315px">
|
||||||
|
<listhead sizable="true">
|
||||||
|
<listheader image="/gui/img/create_doc.gif" label="${c:l('busquedaOperadorEmbarcada.tabela.descricao')}" sort="auto(descricao)" />
|
||||||
|
|
||||||
|
<listheader image="/gui/img/create_doc.gif" label="${c:l('busquedaOperadorEmbarcada.tabela.classe')}" width="15%" sort="auto(classe)" />
|
||||||
|
|
||||||
|
<listheader image="/gui/img/create_doc.gif" label="${c:l('busquedaOperadorEmbarcada.tabela.prefixo')}" width="15%" sort="auto(prefixo)" />
|
||||||
|
|
||||||
|
<listheader image="/gui/img/create_doc.gif" label="${c:l('busquedaOperadorEmbarcada.tabela.empresa')}" width="15%" sort="auto(empresa)" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
|
||||||
|
</tabpanel>
|
||||||
|
|
||||||
|
<tabpanel id="tbServico" width="100%" height="395px">
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="7%" />
|
||||||
|
<column width="20%" />
|
||||||
|
<column width="10%" />
|
||||||
|
<column />
|
||||||
|
<column width="8%" />
|
||||||
|
<column width="10%" />
|
||||||
|
</columns>
|
||||||
|
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.idUsuario')}" />
|
||||||
|
<intbox id="txtIdServico" maxlength="10" width="97%" />
|
||||||
|
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.linha')}" />
|
||||||
|
<textbox id="txtDescServico" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="97%" />
|
||||||
|
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.numero')}" />
|
||||||
|
<intbox id="txtNumeroServico" maxlength="10" width="95%" />
|
||||||
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.marca')}" />
|
||||||
|
<hbox>
|
||||||
|
<combobox
|
||||||
|
id="cmbMarcaServicio" mold="rounded" buttonVisible="true"
|
||||||
|
width="100%" model="@{winEditarOperadorEmbarcada$composer.lsMarca}"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.classe')}" />
|
||||||
|
<hbox>
|
||||||
|
<combobox id="cmbClaseServicioServico"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
mold="rounded" buttonVisible="true" width="100%"
|
||||||
|
model="@{winEditarOperadorEmbarcada$composer.lsClaseServicio}" />
|
||||||
|
</hbox>
|
||||||
|
|
||||||
|
<label value="${c:l('editarOperadorEmbarcada.sentido')}" />
|
||||||
|
<hbox>
|
||||||
|
<combobox id="cmbSentido"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
|
model="@{winEditarOperadorEmbarcada$composer.lsSentido}" />
|
||||||
|
</hbox>
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
|
||||||
|
<toolbar>
|
||||||
|
<button id="btnPesquisaServico" image="/gui/img/find.png" label="${c:l('editarOperadorEmbarcada.btnPesquisar')}" />
|
||||||
|
</toolbar>
|
||||||
|
|
||||||
|
<listbox id="esquemaCorridaList" checkmark="true" use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||||
|
multiple="true" vflex="true" height="310px">
|
||||||
|
<listhead sizable="true">
|
||||||
|
<listheader width="60px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhId.label')}"
|
||||||
|
sort="auto(esquemacorridaId)" />
|
||||||
|
<listheader width="130px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lbNumCorrida.label')}"
|
||||||
|
sort="auto(numCorrida)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhDe.label')}"
|
||||||
|
sort="auto(esquemaOperacional.fecniciovigencia)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhHasta.label')}"
|
||||||
|
sort="auto(esquemaOperacional.fecfinvigencia)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhHora.label')}"
|
||||||
|
sort="auto(horasalida)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhRuta.label')}"
|
||||||
|
sort="auto(ruta.descruta)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.numRuta.label')}"
|
||||||
|
sort="auto(ruta.numRuta)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.sentidoRuta.label')}"
|
||||||
|
sort="auto(ruta.indSentidoIda)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhMarca.value')}"
|
||||||
|
sort="auto(marca.descmarca)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhSemana.value')}" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhClase.value')}"
|
||||||
|
sort="auto(claseServicio.descclase)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhEmpresaCorrida.value')}"
|
||||||
|
sort="auto(empresa.nombempresa)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhEmpresaIngresso.value')}"
|
||||||
|
sort="auto(empresa1.nombempresa)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhEmpresaRolOperativo.value')}"
|
||||||
|
sort="auto(rolOperativo.descroloperativo)" />
|
||||||
|
<listheader width="110px" image="/gui/img/builder.gif"
|
||||||
|
label="${c:l('busquedaConfiguracionCorridaController.lhStatus.value')}"
|
||||||
|
sort="auto(statusCorrida)" />
|
||||||
|
</listhead>
|
||||||
|
</listbox>
|
||||||
|
<paging id="pagingEsquemaCorrida" pageSize="20" />
|
||||||
|
</tabpanel>
|
||||||
|
</tabpanels>
|
||||||
|
</tabbox>
|
||||||
|
|
||||||
|
</window>
|
||||||
|
</zk>
|
Loading…
Reference in New Issue