fixes bug#17380
dev: qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@99502 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
cddc8e422e
commit
3daf36bfe4
|
@ -2,7 +2,9 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.seguridad;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -77,17 +79,18 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
|||
|
||||
private Intbox txtIdServico;
|
||||
private Textbox txtDescServico;
|
||||
private Intbox txtNumeroServico;
|
||||
private Combobox cmbMarcaServicio;
|
||||
private Combobox cmbClaseServicioServico;
|
||||
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||
private Textbox txtNombUsuario;
|
||||
private Textbox txtNumeroServicoVirgula;
|
||||
|
||||
private List<ItemRenderRutaOperadorEmbarcada> itensRutaList = new ArrayList<ItemRenderRutaOperadorEmbarcada>();
|
||||
private List<EsquemaCorrida> servicosSelecionados = new ArrayList<EsquemaCorrida>();
|
||||
private List<EsquemaCorrida> novosServicosSelecionados = new ArrayList<EsquemaCorrida>();
|
||||
|
||||
private List<Marca> lsMarca;
|
||||
private Set<EsquemaCorrida> setEsquemaCorrida = new HashSet<EsquemaCorrida>();
|
||||
|
||||
@Autowired
|
||||
private ClaseServicioService claseServicioServicce;
|
||||
|
@ -179,6 +182,7 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
|||
esquemaCorridaList.setData(corridaJaSelecionadas);
|
||||
esquemaCorridaList.selectItems(corridaJaSelecionadas);
|
||||
|
||||
novosServicosSelecionados.addAll(corridaJaSelecionadas);
|
||||
}
|
||||
|
||||
atualizarListaUsuariosSelecionados(false);
|
||||
|
@ -338,8 +342,21 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
|||
busquedaCorrita.addFilterEqual("esquemacorridaId", txtIdServico.getValue());
|
||||
}
|
||||
|
||||
if(txtNumeroServico.getValue() != null) {
|
||||
busquedaCorrita.addFilterEqual("numCorrida", txtNumeroServico.getValue());
|
||||
if (txtNumeroServicoVirgula.getValue() != null && !txtNumeroServicoVirgula.getValue().equals("")) {
|
||||
String[] txtSplit = txtNumeroServicoVirgula.getValue().replace(" ", "").split("\\,");
|
||||
List<Integer> whereIn = new ArrayList<Integer>();
|
||||
|
||||
for (String txt: txtSplit) {
|
||||
try {
|
||||
whereIn.add(Integer.valueOf(txt));
|
||||
} catch (NumberFormatException e) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!whereIn.isEmpty()) {
|
||||
busquedaCorrita.addFilterIn("numCorrida", whereIn);
|
||||
}
|
||||
}
|
||||
|
||||
Comboitem cbiClase = cmbClaseServicioServico.getSelectedItem();
|
||||
|
@ -577,6 +594,20 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
|||
refreshLista();
|
||||
}
|
||||
|
||||
public void onSelect$esquemaCorridaList(SelectEvent event) {
|
||||
if (event != null && event.getReference() != null && event.getReference().getClass() == Listitem.class) {
|
||||
event.stopPropagation();
|
||||
Listitem item = (Listitem) event.getReference();
|
||||
EsquemaCorrida esquemaCorrida = (EsquemaCorrida) esquemaCorridaList.getListData().get(item.getIndex());
|
||||
|
||||
if (item.isSelected()) {
|
||||
novosServicosSelecionados.add(esquemaCorrida);
|
||||
} else {
|
||||
novosServicosSelecionados.remove(esquemaCorrida);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Textbox getTxtLogin() {
|
||||
return txtLogin;
|
||||
}
|
||||
|
@ -705,14 +736,6 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
|||
this.txtIdServico = txtIdServico;
|
||||
}
|
||||
|
||||
public Intbox getTxtNumeroServico() {
|
||||
return txtNumeroServico;
|
||||
}
|
||||
|
||||
public void setTxtNumeroServico(Intbox txtNumeroServico) {
|
||||
this.txtNumeroServico = txtNumeroServico;
|
||||
}
|
||||
|
||||
public Combobox getCmbMarcaServicio() {
|
||||
return cmbMarcaServicio;
|
||||
}
|
||||
|
@ -785,4 +808,11 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
|||
this.txtNombUsuario = txtNombUsuario;
|
||||
}
|
||||
|
||||
public Textbox getTxtNumeroServicoVirgula() {
|
||||
return txtNumeroServicoVirgula;
|
||||
}
|
||||
|
||||
public void setTxtNumeroServicoVirgula(Textbox txtNumeroServicoVirgula) {
|
||||
this.txtNumeroServicoVirgula = txtNumeroServicoVirgula;
|
||||
}
|
||||
}
|
|
@ -8139,6 +8139,7 @@ editarOperadorEmbarcada.linha=Linha
|
|||
editarOperadorEmbarcada.numero=Número
|
||||
editarOperadorEmbarcada.empresa=Empresa
|
||||
editarOperadorEmbarcada.classe=Classe
|
||||
editarOperadorEmbarcada.numerovirgula=Número (Separado por ",")
|
||||
busquedaOperadorEmbarcada.tabela.numero=Número
|
||||
busquedaOperadorEmbarcada.tabela.descricao=Descrição
|
||||
busquedaOperadorEmbarcada.tabela.classe=Classe
|
||||
|
|
|
@ -8666,6 +8666,7 @@ editarOperadorEmbarcada.linha=Linha
|
|||
editarOperadorEmbarcada.numero=Número
|
||||
editarOperadorEmbarcada.empresa=Empresa
|
||||
editarOperadorEmbarcada.classe=Classe
|
||||
editarOperadorEmbarcada.numerovirgula=Número (Separado por ",")
|
||||
busquedaOperadorEmbarcada.tabela.numero=Número
|
||||
busquedaOperadorEmbarcada.tabela.descricao=Descrição
|
||||
busquedaOperadorEmbarcada.tabela.classe=Classe
|
||||
|
|
|
@ -146,12 +146,12 @@
|
|||
<tabpanel id="tbServico" width="100%" height="395px">
|
||||
<grid fixedLayout="true">
|
||||
<columns>
|
||||
<column width="5%" />
|
||||
<column width="24%" />
|
||||
<column width="7%" />
|
||||
<column width="20%" />
|
||||
<column width="10%" />
|
||||
<column />
|
||||
<column width="8%" />
|
||||
<column width="10%" />
|
||||
<column width="24%" />
|
||||
<column width="16%" />
|
||||
<column width="24%" />
|
||||
</columns>
|
||||
|
||||
<rows>
|
||||
|
@ -162,8 +162,8 @@
|
|||
<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%" />
|
||||
<label value="${c:l('editarOperadorEmbarcada.numerovirgula')}" />
|
||||
<textbox id="txtNumeroServicoVirgula" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="97%" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
|
|
Loading…
Reference in New Issue