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.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
@ -77,17 +79,18 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
||||||
|
|
||||||
private Intbox txtIdServico;
|
private Intbox txtIdServico;
|
||||||
private Textbox txtDescServico;
|
private Textbox txtDescServico;
|
||||||
private Intbox txtNumeroServico;
|
|
||||||
private Combobox cmbMarcaServicio;
|
private Combobox cmbMarcaServicio;
|
||||||
private Combobox cmbClaseServicioServico;
|
private Combobox cmbClaseServicioServico;
|
||||||
private MyComboboxPuntoVenta cmbPuntoVenta;
|
private MyComboboxPuntoVenta cmbPuntoVenta;
|
||||||
private Textbox txtNombUsuario;
|
private Textbox txtNombUsuario;
|
||||||
|
private Textbox txtNumeroServicoVirgula;
|
||||||
|
|
||||||
private List<ItemRenderRutaOperadorEmbarcada> itensRutaList = new ArrayList<ItemRenderRutaOperadorEmbarcada>();
|
private List<ItemRenderRutaOperadorEmbarcada> itensRutaList = new ArrayList<ItemRenderRutaOperadorEmbarcada>();
|
||||||
private List<EsquemaCorrida> servicosSelecionados = new ArrayList<EsquemaCorrida>();
|
private List<EsquemaCorrida> servicosSelecionados = new ArrayList<EsquemaCorrida>();
|
||||||
private List<EsquemaCorrida> novosServicosSelecionados = new ArrayList<EsquemaCorrida>();
|
private List<EsquemaCorrida> novosServicosSelecionados = new ArrayList<EsquemaCorrida>();
|
||||||
|
|
||||||
private List<Marca> lsMarca;
|
private List<Marca> lsMarca;
|
||||||
|
private Set<EsquemaCorrida> setEsquemaCorrida = new HashSet<EsquemaCorrida>();
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ClaseServicioService claseServicioServicce;
|
private ClaseServicioService claseServicioServicce;
|
||||||
|
@ -179,6 +182,7 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
||||||
esquemaCorridaList.setData(corridaJaSelecionadas);
|
esquemaCorridaList.setData(corridaJaSelecionadas);
|
||||||
esquemaCorridaList.selectItems(corridaJaSelecionadas);
|
esquemaCorridaList.selectItems(corridaJaSelecionadas);
|
||||||
|
|
||||||
|
novosServicosSelecionados.addAll(corridaJaSelecionadas);
|
||||||
}
|
}
|
||||||
|
|
||||||
atualizarListaUsuariosSelecionados(false);
|
atualizarListaUsuariosSelecionados(false);
|
||||||
|
@ -338,9 +342,22 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
||||||
busquedaCorrita.addFilterEqual("esquemacorridaId", txtIdServico.getValue());
|
busquedaCorrita.addFilterEqual("esquemacorridaId", txtIdServico.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
if(txtNumeroServico.getValue() != null) {
|
if (txtNumeroServicoVirgula.getValue() != null && !txtNumeroServicoVirgula.getValue().equals("")) {
|
||||||
busquedaCorrita.addFilterEqual("numCorrida", txtNumeroServico.getValue());
|
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();
|
Comboitem cbiClase = cmbClaseServicioServico.getSelectedItem();
|
||||||
if (cbiClase != null) {
|
if (cbiClase != null) {
|
||||||
|
@ -577,6 +594,20 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
||||||
refreshLista();
|
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() {
|
public Textbox getTxtLogin() {
|
||||||
return txtLogin;
|
return txtLogin;
|
||||||
}
|
}
|
||||||
|
@ -705,14 +736,6 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
||||||
this.txtIdServico = txtIdServico;
|
this.txtIdServico = txtIdServico;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Intbox getTxtNumeroServico() {
|
|
||||||
return txtNumeroServico;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTxtNumeroServico(Intbox txtNumeroServico) {
|
|
||||||
this.txtNumeroServico = txtNumeroServico;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Combobox getCmbMarcaServicio() {
|
public Combobox getCmbMarcaServicio() {
|
||||||
return cmbMarcaServicio;
|
return cmbMarcaServicio;
|
||||||
}
|
}
|
||||||
|
@ -785,4 +808,11 @@ public class EditarOperadorEmbarcadaController extends MyGenericForwardComposer
|
||||||
this.txtNombUsuario = txtNombUsuario;
|
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.numero=Número
|
||||||
editarOperadorEmbarcada.empresa=Empresa
|
editarOperadorEmbarcada.empresa=Empresa
|
||||||
editarOperadorEmbarcada.classe=Classe
|
editarOperadorEmbarcada.classe=Classe
|
||||||
|
editarOperadorEmbarcada.numerovirgula=Número (Separado por ",")
|
||||||
busquedaOperadorEmbarcada.tabela.numero=Número
|
busquedaOperadorEmbarcada.tabela.numero=Número
|
||||||
busquedaOperadorEmbarcada.tabela.descricao=Descrição
|
busquedaOperadorEmbarcada.tabela.descricao=Descrição
|
||||||
busquedaOperadorEmbarcada.tabela.classe=Classe
|
busquedaOperadorEmbarcada.tabela.classe=Classe
|
||||||
|
|
|
@ -8666,6 +8666,7 @@ editarOperadorEmbarcada.linha=Linha
|
||||||
editarOperadorEmbarcada.numero=Número
|
editarOperadorEmbarcada.numero=Número
|
||||||
editarOperadorEmbarcada.empresa=Empresa
|
editarOperadorEmbarcada.empresa=Empresa
|
||||||
editarOperadorEmbarcada.classe=Classe
|
editarOperadorEmbarcada.classe=Classe
|
||||||
|
editarOperadorEmbarcada.numerovirgula=Número (Separado por ",")
|
||||||
busquedaOperadorEmbarcada.tabela.numero=Número
|
busquedaOperadorEmbarcada.tabela.numero=Número
|
||||||
busquedaOperadorEmbarcada.tabela.descricao=Descrição
|
busquedaOperadorEmbarcada.tabela.descricao=Descrição
|
||||||
busquedaOperadorEmbarcada.tabela.classe=Classe
|
busquedaOperadorEmbarcada.tabela.classe=Classe
|
||||||
|
|
|
@ -146,12 +146,12 @@
|
||||||
<tabpanel id="tbServico" width="100%" height="395px">
|
<tabpanel id="tbServico" width="100%" height="395px">
|
||||||
<grid fixedLayout="true">
|
<grid fixedLayout="true">
|
||||||
<columns>
|
<columns>
|
||||||
|
<column width="5%" />
|
||||||
|
<column width="24%" />
|
||||||
<column width="7%" />
|
<column width="7%" />
|
||||||
<column width="20%" />
|
<column width="24%" />
|
||||||
<column width="10%" />
|
<column width="16%" />
|
||||||
<column />
|
<column width="24%" />
|
||||||
<column width="8%" />
|
|
||||||
<column width="10%" />
|
|
||||||
</columns>
|
</columns>
|
||||||
|
|
||||||
<rows>
|
<rows>
|
||||||
|
@ -161,9 +161,9 @@
|
||||||
|
|
||||||
<label value="${c:l('editarOperadorEmbarcada.linha')}" />
|
<label value="${c:l('editarOperadorEmbarcada.linha')}" />
|
||||||
<textbox id="txtDescServico" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="97%" />
|
<textbox id="txtDescServico" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="97%" />
|
||||||
|
|
||||||
<label value="${c:l('editarOperadorEmbarcada.numero')}" />
|
<label value="${c:l('editarOperadorEmbarcada.numerovirgula')}" />
|
||||||
<intbox id="txtNumeroServico" maxlength="10" width="95%" />
|
<textbox id="txtNumeroServicoVirgula" use="com.rjconsultores.ventaboletos.web.utilerias.MyTextbox" width="97%" />
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
<row>
|
<row>
|
||||||
|
@ -182,14 +182,14 @@
|
||||||
mold="rounded" buttonVisible="true" width="100%"
|
mold="rounded" buttonVisible="true" width="100%"
|
||||||
model="@{winEditarOperadorEmbarcada$composer.lsClaseServicio}" />
|
model="@{winEditarOperadorEmbarcada$composer.lsClaseServicio}" />
|
||||||
</hbox>
|
</hbox>
|
||||||
|
|
||||||
<label value="${c:l('editarOperadorEmbarcada.sentido')}" />
|
<label value="${c:l('editarOperadorEmbarcada.sentido')}" />
|
||||||
<hbox>
|
<hbox>
|
||||||
<combobox id="cmbSentido"
|
<combobox id="cmbSentido"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
mold="rounded" buttonVisible="true" width="90%"
|
mold="rounded" buttonVisible="true" width="90%"
|
||||||
model="@{winEditarOperadorEmbarcada$composer.lsSentido}" />
|
model="@{winEditarOperadorEmbarcada$composer.lsSentido}" />
|
||||||
</hbox>
|
</hbox>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
Loading…
Reference in New Issue