bug#al-3254
66363 - Serviços - Ajustes na Tela de Configuração de Serviço na ADM dev: qua:master
parent
8945a02c6f
commit
7211d9f48b
6
pom.xml
6
pom.xml
|
@ -4,12 +4,12 @@
|
|||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>br.com.rjconsultores</groupId>
|
||||
<artifactId>ventaboletosadm</artifactId>
|
||||
<version>1.27.2</version>
|
||||
<version>1.28.0</version>
|
||||
<packaging>war</packaging>
|
||||
|
||||
<properties>
|
||||
<modelWeb.version>1.19.1</modelWeb.version>
|
||||
<flyway.version>1.16.0</flyway.version>
|
||||
<modelWeb.version>1.20.0</modelWeb.version>
|
||||
<flyway.version>1.17.0</flyway.version>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional;
|
||||
|
||||
import java.sql.Time;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
@ -17,6 +18,7 @@ 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.DropEvent;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.InputEvent;
|
||||
|
@ -27,15 +29,18 @@ import org.zkoss.zul.Combobox;
|
|||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.Listheader;
|
||||
import org.zkoss.zul.Paging;
|
||||
import org.zkoss.zul.Timebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.ClaseServicio;
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.EsquemaCorrida;
|
||||
import com.rjconsultores.ventaboletos.entidad.HeaderTabelaEsquemaCorrida;
|
||||
import com.rjconsultores.ventaboletos.entidad.Marca;
|
||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||
import com.rjconsultores.ventaboletos.service.ClaseServicioService;
|
||||
import com.rjconsultores.ventaboletos.service.HeaderEsquemaCorridaService;
|
||||
import com.rjconsultores.ventaboletos.service.MarcaService;
|
||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
|
@ -83,6 +88,145 @@ public class BusquedaCorridaController extends MyGenericForwardComposer {
|
|||
|
||||
private Checkbox chkCorridaCancelada;
|
||||
|
||||
private Listheader listHeader1;
|
||||
private Listheader listHeader2;
|
||||
private Listheader listHeader3;
|
||||
private Listheader listHeader4;
|
||||
private Listheader listHeader5;
|
||||
private Listheader listHeader6;
|
||||
private Listheader listHeader7;
|
||||
private Listheader listHeader8;
|
||||
private Listheader listHeader9;
|
||||
private Listheader listHeader10;
|
||||
private Listheader listHeader11;
|
||||
private Listheader listHeader12;
|
||||
private Listheader listHeader13;
|
||||
private Listheader listHeader14;
|
||||
private Listheader listHeader15;
|
||||
|
||||
@Autowired
|
||||
private HeaderEsquemaCorridaService headerService;
|
||||
|
||||
public Listheader getListHeader1() {
|
||||
return listHeader1;
|
||||
}
|
||||
|
||||
public void setListHeader1(Listheader listHeader1) {
|
||||
this.listHeader1 = listHeader1;
|
||||
}
|
||||
|
||||
public Listheader getListHeader2() {
|
||||
return listHeader2;
|
||||
}
|
||||
|
||||
public void setListHeader2(Listheader listHeader1) {
|
||||
this.listHeader2 = listHeader1;
|
||||
}
|
||||
|
||||
public Listheader getListHeader3() {
|
||||
return listHeader3;
|
||||
}
|
||||
|
||||
public void setListHeader3(Listheader listHeader3) {
|
||||
this.listHeader3 = listHeader3;
|
||||
}
|
||||
|
||||
public Listheader getListHeader4() {
|
||||
return listHeader4;
|
||||
}
|
||||
|
||||
public void setListHeader4(Listheader listHeader4) {
|
||||
this.listHeader4 = listHeader4;
|
||||
}
|
||||
|
||||
public Listheader getListHeader5() {
|
||||
return listHeader5;
|
||||
}
|
||||
|
||||
public void setListHeader5(Listheader listHeader5) {
|
||||
this.listHeader5 = listHeader5;
|
||||
}
|
||||
|
||||
public Listheader getListHeader6() {
|
||||
return listHeader6;
|
||||
}
|
||||
|
||||
public void setListHeader6(Listheader listHeader6) {
|
||||
this.listHeader6 = listHeader6;
|
||||
}
|
||||
|
||||
public Listheader getListHeader7() {
|
||||
return listHeader7;
|
||||
}
|
||||
|
||||
public void setListHeader7(Listheader listHeader7) {
|
||||
this.listHeader7 = listHeader7;
|
||||
}
|
||||
|
||||
public Listheader getListHeader8() {
|
||||
return listHeader8;
|
||||
}
|
||||
|
||||
public void setListHeader8(Listheader listHeader8) {
|
||||
this.listHeader8 = listHeader8;
|
||||
}
|
||||
|
||||
public Listheader getListHeader9() {
|
||||
return listHeader9;
|
||||
}
|
||||
|
||||
public void setListHeader9(Listheader listHeader9) {
|
||||
this.listHeader9 = listHeader9;
|
||||
}
|
||||
|
||||
public Listheader getListHeader10() {
|
||||
return listHeader10;
|
||||
}
|
||||
|
||||
public void setListHeader10(Listheader listHeader10) {
|
||||
this.listHeader10 = listHeader10;
|
||||
}
|
||||
|
||||
public Listheader getListHeader11() {
|
||||
return listHeader11;
|
||||
}
|
||||
|
||||
public void setListHeader11(Listheader listHeader11) {
|
||||
this.listHeader11 = listHeader11;
|
||||
}
|
||||
|
||||
public Listheader getListHeader12() {
|
||||
return listHeader12;
|
||||
}
|
||||
|
||||
public void setListHeader12(Listheader listHeader12) {
|
||||
this.listHeader12 = listHeader12;
|
||||
}
|
||||
|
||||
public Listheader getListHeader13() {
|
||||
return listHeader13;
|
||||
}
|
||||
|
||||
public void setListHeader13(Listheader listHeader13) {
|
||||
this.listHeader13 = listHeader13;
|
||||
}
|
||||
|
||||
public Listheader getListHeader14() {
|
||||
return listHeader14;
|
||||
}
|
||||
|
||||
public void setListHeader14(Listheader listHeader14) {
|
||||
this.listHeader14 = listHeader14;
|
||||
}
|
||||
|
||||
public Listheader getListHeader15() {
|
||||
return listHeader15;
|
||||
}
|
||||
|
||||
public void setListHeader15(Listheader listHeader15) {
|
||||
this.listHeader15 = listHeader15;
|
||||
}
|
||||
|
||||
public Combobox getCmbClase() {
|
||||
return cmbClase;
|
||||
}
|
||||
|
@ -240,7 +384,23 @@ public class BusquedaCorridaController extends MyGenericForwardComposer {
|
|||
lsClase = claseService.obtenerTodos();
|
||||
lsRuta = rutaService.obtenerTodos();
|
||||
|
||||
esquemaCorridaList.setItemRenderer(new RenderConfiguracionCorrida());
|
||||
criarListaDinamica();
|
||||
|
||||
btnPesquisa.focus();
|
||||
cmbMarca.setSelectedItem(null);
|
||||
|
||||
refreshLista();
|
||||
}
|
||||
|
||||
Integer posicoesColunasTabela[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
|
||||
List<String> labelsList = new ArrayList<>();
|
||||
private void criarListaDinamica() {
|
||||
|
||||
//Busca do banco as posicoes salvas
|
||||
posicoesColunasTabela = headerService.buscarHeader();
|
||||
|
||||
esquemaCorridaList.setItemRenderer(new RenderConfiguracionCorrida(posicoesColunasTabela));
|
||||
|
||||
esquemaCorridaList.addEventListener("onDoubleClick", new EventListener() {
|
||||
|
||||
@Override
|
||||
|
@ -250,10 +410,114 @@ public class BusquedaCorridaController extends MyGenericForwardComposer {
|
|||
}
|
||||
});
|
||||
|
||||
btnPesquisa.focus();
|
||||
cmbMarca.setSelectedItem(null);
|
||||
iniciarListHeader(listHeader1);
|
||||
iniciarListHeader(listHeader2);
|
||||
iniciarListHeader(listHeader3);
|
||||
iniciarListHeader(listHeader4);
|
||||
iniciarListHeader(listHeader5);
|
||||
iniciarListHeader(listHeader6);
|
||||
iniciarListHeader(listHeader7);
|
||||
iniciarListHeader(listHeader8);
|
||||
iniciarListHeader(listHeader9);
|
||||
iniciarListHeader(listHeader10);
|
||||
iniciarListHeader(listHeader11);
|
||||
iniciarListHeader(listHeader12);
|
||||
iniciarListHeader(listHeader13);
|
||||
iniciarListHeader(listHeader14);
|
||||
iniciarListHeader(listHeader15);
|
||||
|
||||
refreshLista();
|
||||
criarListaDeLabels();
|
||||
atualizaLabelsTabela();
|
||||
}
|
||||
|
||||
private void criarListaDeLabels() {
|
||||
labelsList.add("ZERO");
|
||||
labelsList.add(listHeader1.getLabel());
|
||||
labelsList.add(listHeader2.getLabel());
|
||||
labelsList.add(listHeader3.getLabel());
|
||||
labelsList.add(listHeader4.getLabel());
|
||||
labelsList.add(listHeader5.getLabel());
|
||||
labelsList.add(listHeader6.getLabel());
|
||||
labelsList.add(listHeader7.getLabel());
|
||||
labelsList.add(listHeader8.getLabel());
|
||||
labelsList.add(listHeader9.getLabel());
|
||||
labelsList.add(listHeader10.getLabel());
|
||||
labelsList.add(listHeader11.getLabel());
|
||||
labelsList.add(listHeader12.getLabel());
|
||||
labelsList.add(listHeader13.getLabel());
|
||||
labelsList.add(listHeader14.getLabel());
|
||||
labelsList.add(listHeader15.getLabel());
|
||||
}
|
||||
|
||||
private void atualizaLabelsTabela() {
|
||||
|
||||
int i = 1;
|
||||
for(Integer posicao : posicoesColunasTabela) {
|
||||
|
||||
if(i == 1) {
|
||||
listHeader1.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 2) {
|
||||
listHeader2.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 3) {
|
||||
listHeader3.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 4) {
|
||||
listHeader4.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 5) {
|
||||
listHeader5.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 6) {
|
||||
listHeader6.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 7) {
|
||||
listHeader7.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 8) {
|
||||
listHeader8.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 9) {
|
||||
listHeader9.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 10) {
|
||||
listHeader10.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 11) {
|
||||
listHeader11.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 12) {
|
||||
listHeader12.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 13) {
|
||||
listHeader13.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 14) {
|
||||
listHeader14.setLabel(labelsList.get(posicao));
|
||||
} else if ( i == 15) {
|
||||
listHeader15.setLabel(labelsList.get(posicao));
|
||||
}
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void iniciarListHeader(Listheader listHeader) {
|
||||
listHeader.setDraggable("true");
|
||||
listHeader.setDroppable("true");
|
||||
|
||||
listHeader.addEventListener("onDrop", new EventListener() {
|
||||
public void onEvent(Event inEvent) throws Exception {
|
||||
|
||||
DropEvent dropEvent = (DropEvent) inEvent;
|
||||
Component dragged = dropEvent.getDragged();
|
||||
|
||||
int de = dragged.getParent().getChildren().indexOf(dragged);
|
||||
int para = listHeader.getParent().getChildren().indexOf(listHeader);
|
||||
|
||||
Integer posicaoDe = posicoesColunasTabela[de];
|
||||
Integer posicaoPara = posicoesColunasTabela[para];
|
||||
|
||||
posicoesColunasTabela[para] = posicaoDe;
|
||||
posicoesColunasTabela[de] = posicaoPara;
|
||||
|
||||
headerService.salvarPosicoesHeader(posicoesColunasTabela);
|
||||
|
||||
esquemaCorridaList.setItemRenderer(new RenderConfiguracionCorrida(posicoesColunasTabela));
|
||||
esquemaCorridaList.renderAll();
|
||||
|
||||
atualizaLabelsTabela();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void verPeriodo(EsquemaCorrida rc) {
|
||||
|
|
|
@ -19,107 +19,245 @@ import org.zkoss.zul.ListitemRenderer;
|
|||
*/
|
||||
public class RenderConfiguracionCorrida implements ListitemRenderer {
|
||||
|
||||
private Integer[] posicoes = null;
|
||||
private SimpleDateFormat dt = new SimpleDateFormat("dd/MM/yy");
|
||||
|
||||
public RenderConfiguracionCorrida(Integer[] posicoes) {
|
||||
super();
|
||||
this.posicoes = posicoes;
|
||||
}
|
||||
|
||||
public RenderConfiguracionCorrida() {
|
||||
super();
|
||||
}
|
||||
|
||||
public void render(Listitem lstm, Object o) throws Exception {
|
||||
EsquemaCorrida corrida = (EsquemaCorrida) o;
|
||||
|
||||
Listcell lc = new Listcell(corrida.getEsquemacorridaId().toString());
|
||||
lc.setParent(lstm);
|
||||
if(posicoes != null) {
|
||||
Listcell lc;
|
||||
|
||||
lc = new Listcell(corrida.getNumCorrida().toString());
|
||||
lc.setParent(lstm);
|
||||
for(Integer posicao : posicoes) {
|
||||
lc = buscarListCell(posicao, corrida);
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
SimpleDateFormat dt = new SimpleDateFormat("dd/MM/yy");
|
||||
lc = new Listcell(dt.format(corrida.getEsquemaOperacional().getFecniciovigencia()));
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(dt.format(corrida.getEsquemaOperacional().getFecfinvigencia()));
|
||||
lc.setParent(lstm);
|
||||
|
||||
if (corrida.getHorasalida() == null) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
SimpleDateFormat hr = new SimpleDateFormat("HH:mm");
|
||||
lc = new Listcell(hr.format(corrida.getHorasalida()));
|
||||
Listcell lc = new Listcell(corrida.getEsquemacorridaId().toString());
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
// Ruta
|
||||
lc = new Listcell(corrida.getRuta().getDescruta() == null ? "-" : corrida.getRuta().getDescruta());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(corrida.getRuta().getNumRuta() == null ? "-" : corrida.getRuta().getNumRuta());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(corrida.getNumCorrida().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(corrida.getRuta().getIndSentidoIda() == true ? Labels.getLabel("editarCatalogoDeRutaController.radIda.value") : Labels.getLabel("editarCatalogoDeRutaController.radVolta.value"));
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(dt.format(corrida.getEsquemaOperacional().getFecniciovigencia()));
|
||||
lc.setParent(lstm);
|
||||
|
||||
// Marca
|
||||
lc = new Listcell(corrida.getMarca().getDescmarca() == null ? "-" : corrida.getMarca().getDescmarca());
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(dt.format(corrida.getEsquemaOperacional().getFecfinvigencia()));
|
||||
lc.setParent(lstm);
|
||||
|
||||
// Semana
|
||||
String l = (corrida.getIndlunes() == Boolean.TRUE) ? "S " : "- ";
|
||||
String ma = (corrida.getIndmartes() == Boolean.TRUE) ? "T " : "- ";
|
||||
String mi = (corrida.getIndmiercoles() == Boolean.TRUE) ? "Q " : "- ";
|
||||
String j = (corrida.getIndjueves() == Boolean.TRUE) ? "Q " : "- ";
|
||||
String v = (corrida.getIndviernes() == Boolean.TRUE) ? "S " : "- ";
|
||||
String s = (corrida.getIndsabado() == Boolean.TRUE) ? "S " : "- ";
|
||||
String d = (corrida.getInddomingo() == Boolean.TRUE) ? "D " : "- ";
|
||||
if (corrida.getHorasalida() == null) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
SimpleDateFormat hr = new SimpleDateFormat("HH:mm");
|
||||
lc = new Listcell(hr.format(corrida.getHorasalida()));
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
// Ruta
|
||||
lc = new Listcell(corrida.getRuta().getDescruta() == null ? "-" : corrida.getRuta().getDescruta());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(l + ma + mi + j + v + s + d);
|
||||
lc.setParent(lstm);
|
||||
lc = new Listcell(corrida.getRuta().getNumRuta() == null ? "-" : corrida.getRuta().getNumRuta());
|
||||
lc.setParent(lstm);
|
||||
|
||||
// Clase
|
||||
try {
|
||||
lc = new Listcell(corrida.getClaseServicio().getDescclase() == null ? "-" : corrida.getClaseServicio().getDescclase());
|
||||
lc = new Listcell(corrida.getRuta().getIndSentidoIda() == true ? Labels.getLabel("editarCatalogoDeRutaController.radIda.value") : Labels.getLabel("editarCatalogoDeRutaController.radVolta.value"));
|
||||
lc.setParent(lstm);
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
// EmpC
|
||||
try {
|
||||
lc = new Listcell(corrida.getEmpresa().getNombempresa() == null ? "-" : corrida.getEmpresa().getNombempresa());
|
||||
// Marca
|
||||
lc = new Listcell(corrida.getMarca().getDescmarca() == null ? "-" : corrida.getMarca().getDescmarca());
|
||||
lc.setParent(lstm);
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
// EmpI
|
||||
try {
|
||||
lc = new Listcell(corrida.getEmpresa1().getNombempresa() == null ? "-" : corrida.getEmpresa1().getNombempresa());
|
||||
lc.setParent(lstm);
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
// Semana
|
||||
String l = (corrida.getIndlunes() == Boolean.TRUE) ? "S " : "- ";
|
||||
String ma = (corrida.getIndmartes() == Boolean.TRUE) ? "T " : "- ";
|
||||
String mi = (corrida.getIndmiercoles() == Boolean.TRUE) ? "Q " : "- ";
|
||||
String j = (corrida.getIndjueves() == Boolean.TRUE) ? "Q " : "- ";
|
||||
String v = (corrida.getIndviernes() == Boolean.TRUE) ? "S " : "- ";
|
||||
String s = (corrida.getIndsabado() == Boolean.TRUE) ? "S " : "- ";
|
||||
String d = (corrida.getInddomingo() == Boolean.TRUE) ? "D " : "- ";
|
||||
|
||||
// RolOperativo
|
||||
try {
|
||||
lc = new Listcell(corrida.getRolOperativo().getDescroloperativo() == null ? "-" : corrida.getRolOperativo().getDescroloperativo());
|
||||
lc = new Listcell(l + ma + mi + j + v + s + d);
|
||||
lc.setParent(lstm);
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
// Status
|
||||
if (corrida.getStatusCorrida() == null) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
} else if (corrida.getStatusCorrida().equals("L")) {
|
||||
lc = new Listcell("LATENTE");
|
||||
lc.setParent(lstm);
|
||||
} else if (corrida.getStatusCorrida().equals("A")) {
|
||||
lc = new Listcell("AUTORIZADA");
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
lc = new Listcell("CANCELADA");
|
||||
lc.setParent(lstm);
|
||||
// Clase
|
||||
try {
|
||||
lc = new Listcell(corrida.getClaseServicio().getDescclase() == null ? "-" : corrida.getClaseServicio().getDescclase());
|
||||
lc.setParent(lstm);
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
// EmpC
|
||||
try {
|
||||
lc = new Listcell(corrida.getEmpresa().getNombempresa() == null ? "-" : corrida.getEmpresa().getNombempresa());
|
||||
lc.setParent(lstm);
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
// EmpI
|
||||
try {
|
||||
lc = new Listcell(corrida.getEmpresa1().getNombempresa() == null ? "-" : corrida.getEmpresa1().getNombempresa());
|
||||
lc.setParent(lstm);
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
// RolOperativo
|
||||
try {
|
||||
lc = new Listcell(corrida.getRolOperativo().getDescroloperativo() == null ? "-" : corrida.getRolOperativo().getDescroloperativo());
|
||||
lc.setParent(lstm);
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
|
||||
// Status
|
||||
if (corrida.getStatusCorrida() == null) {
|
||||
lc = new Listcell("-");
|
||||
lc.setParent(lstm);
|
||||
} else if (corrida.getStatusCorrida().equals("L")) {
|
||||
lc = new Listcell("LATENTE");
|
||||
lc.setParent(lstm);
|
||||
} else if (corrida.getStatusCorrida().equals("A")) {
|
||||
lc = new Listcell("AUTORIZADA");
|
||||
lc.setParent(lstm);
|
||||
} else {
|
||||
lc = new Listcell("CANCELADA");
|
||||
lc.setParent(lstm);
|
||||
}
|
||||
}
|
||||
|
||||
lstm.setAttribute("data", corrida);
|
||||
|
||||
}
|
||||
|
||||
private Listcell buscarListCell(Integer posicao, EsquemaCorrida corrida) {
|
||||
Listcell lc = null;
|
||||
|
||||
switch (posicao) {
|
||||
case 1:
|
||||
lc = new Listcell(corrida.getEsquemacorridaId().toString());
|
||||
break;
|
||||
|
||||
case 2:
|
||||
lc = new Listcell(corrida.getNumCorrida().toString());
|
||||
break;
|
||||
|
||||
case 3:
|
||||
lc = new Listcell(dt.format(corrida.getEsquemaOperacional().getFecniciovigencia()));
|
||||
break;
|
||||
|
||||
case 4:
|
||||
lc = new Listcell(dt.format(corrida.getEsquemaOperacional().getFecfinvigencia()));
|
||||
break;
|
||||
|
||||
case 5:
|
||||
if (corrida.getHorasalida() == null) {
|
||||
lc = new Listcell("-");
|
||||
} else {
|
||||
SimpleDateFormat hr = new SimpleDateFormat("HH:mm");
|
||||
lc = new Listcell(hr.format(corrida.getHorasalida()));
|
||||
}
|
||||
break;
|
||||
|
||||
case 6:
|
||||
// Ruta
|
||||
lc = new Listcell(corrida.getRuta().getDescruta() == null ? "-" : corrida.getRuta().getDescruta());
|
||||
break;
|
||||
|
||||
case 7:
|
||||
lc = new Listcell(corrida.getRuta().getNumRuta() == null ? "-" : corrida.getRuta().getNumRuta());
|
||||
break;
|
||||
|
||||
case 8:
|
||||
lc = new Listcell(corrida.getRuta().getIndSentidoIda() == true ? Labels.getLabel("editarCatalogoDeRutaController.radIda.value") : Labels.getLabel("editarCatalogoDeRutaController.radVolta.value"));
|
||||
break;
|
||||
|
||||
case 9:
|
||||
// Marca
|
||||
lc = new Listcell(corrida.getMarca().getDescmarca() == null ? "-" : corrida.getMarca().getDescmarca());
|
||||
break;
|
||||
|
||||
case 10:
|
||||
// Semana
|
||||
String l = (corrida.getIndlunes() == Boolean.TRUE) ? "S " : "- ";
|
||||
String ma = (corrida.getIndmartes() == Boolean.TRUE) ? "T " : "- ";
|
||||
String mi = (corrida.getIndmiercoles() == Boolean.TRUE) ? "Q " : "- ";
|
||||
String j = (corrida.getIndjueves() == Boolean.TRUE) ? "Q " : "- ";
|
||||
String v = (corrida.getIndviernes() == Boolean.TRUE) ? "S " : "- ";
|
||||
String s = (corrida.getIndsabado() == Boolean.TRUE) ? "S " : "- ";
|
||||
String d = (corrida.getInddomingo() == Boolean.TRUE) ? "D " : "- ";
|
||||
|
||||
lc = new Listcell(l + ma + mi + j + v + s + d);
|
||||
break;
|
||||
|
||||
case 11:
|
||||
// Clase
|
||||
try {
|
||||
lc = new Listcell(corrida.getClaseServicio().getDescclase() == null ? "-" : corrida.getClaseServicio().getDescclase());
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
break;
|
||||
|
||||
case 12:
|
||||
// EmpC
|
||||
try {
|
||||
lc = new Listcell(corrida.getEmpresa().getNombempresa() == null ? "-" : corrida.getEmpresa().getNombempresa());
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
break;
|
||||
|
||||
case 13:
|
||||
// EmpI
|
||||
try {
|
||||
lc = new Listcell(corrida.getEmpresa1().getNombempresa() == null ? "-" : corrida.getEmpresa1().getNombempresa());
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
break;
|
||||
|
||||
case 14:
|
||||
// RolOperativo
|
||||
try {
|
||||
lc = new Listcell(corrida.getRolOperativo().getDescroloperativo() == null ? "-" : corrida.getRolOperativo().getDescroloperativo());
|
||||
} catch (Exception e) {
|
||||
lc = new Listcell("-");
|
||||
}
|
||||
break;
|
||||
|
||||
case 15:
|
||||
// Status
|
||||
if (corrida.getStatusCorrida() == null) {
|
||||
lc = new Listcell("-");
|
||||
} else if (corrida.getStatusCorrida().equals("L")) {
|
||||
lc = new Listcell("LATENTE");
|
||||
} else if (corrida.getStatusCorrida().equals("A")) {
|
||||
lc = new Listcell("AUTORIZADA");
|
||||
} else {
|
||||
lc = new Listcell("CANCELADA");
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return lc;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -452,6 +452,7 @@
|
|||
<value>com.rjconsultores.ventaboletos.entidad.GP_PricingHistorico</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.PricingConexao</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.OrgaoComprovanteCustomizado</value>
|
||||
<value>com.rjconsultores.ventaboletos.entidad.HeaderTabelaEsquemaCorrida</value>
|
||||
</list>
|
||||
</property>
|
||||
|
||||
|
|
|
@ -126,48 +126,48 @@
|
|||
use="com.rjconsultores.ventaboletos.web.utilerias.MyListbox"
|
||||
multiple="false" vflex="true" height="50%">
|
||||
<listhead sizable="true">
|
||||
<listheader width="50px" image="/gui/img/builder.gif"
|
||||
<listheader width="50px" image="/gui/img/builder.gif" id="listHeader1"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhId.label')}"
|
||||
sort="auto(esquemacorridaId)" />
|
||||
<listheader width="130px" image="/gui/img/builder.gif"
|
||||
<listheader width="130px" image="/gui/img/builder.gif" id="listHeader2"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lbNumCorrida.label')}"
|
||||
sort="auto(numCorrida)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader3"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhDe.label')}"
|
||||
sort="auto(esquemaOperacional.fecniciovigencia)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader4"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhHasta.label')}"
|
||||
sort="auto(esquemaOperacional.fecfinvigencia)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader5"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhHora.label')}"
|
||||
sort="auto(horasalida)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader6"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhRuta.label')}"
|
||||
sort="auto(ruta.descruta)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader7"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.numRuta.label')}"
|
||||
sort="auto(ruta.numRuta)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader8"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.sentidoRuta.label')}"
|
||||
sort="auto(ruta.indSentidoIda)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader9"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhMarca.value')}"
|
||||
sort="auto(marca.descmarca)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader10"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhSemana.value')}" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader11"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhClase.value')}"
|
||||
sort="auto(claseServicio.descclase)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader12"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhEmpresaCorrida.value')}"
|
||||
sort="auto(empresa.nombempresa)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader13"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhEmpresaIngresso.value')}"
|
||||
sort="auto(empresa1.nombempresa)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader14"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhEmpresaRolOperativo.value')}"
|
||||
sort="auto(rolOperativo.descroloperativo)" />
|
||||
<listheader width="110px" image="/gui/img/builder.gif"
|
||||
<listheader width="110px" image="/gui/img/builder.gif" id="listHeader15"
|
||||
label="${c:l('busquedaConfiguracionCorridaController.lhStatus.value')}"
|
||||
sort="auto(statusCorrida)" />
|
||||
</listhead>
|
||||
|
|
Loading…
Reference in New Issue