fixed bug #6497
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@51457 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
197298c520
commit
44802281b8
|
@ -2,6 +2,7 @@ package com.rjconsultores.ventaboletos.web.gui.controladores.esquemaoperacional;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
@ -16,10 +17,14 @@ import org.zkoss.zk.ui.Executions;
|
|||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Checkbox;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Comboitem;
|
||||
import org.zkoss.zul.Decimalbox;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.Label;
|
||||
import org.zkoss.zul.Messagebox;
|
||||
import org.zkoss.zul.Textbox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Conexion;
|
||||
import com.rjconsultores.ventaboletos.entidad.ConexionConf;
|
||||
|
@ -35,6 +40,7 @@ import com.rjconsultores.ventaboletos.vo.conexion.ConexionVO;
|
|||
import com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderConexionExcepcion;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderEditarConexion;
|
||||
|
||||
|
@ -79,6 +85,15 @@ public class EditarConexionController extends MyGenericForwardComposer {
|
|||
private ConexionCtrl conexionCtrl;
|
||||
private Button btnApagar;
|
||||
private ConexionExcepcion conexionExcepcion;
|
||||
private Textbox txtConexaoFixa1;
|
||||
private Checkbox chkConFix;
|
||||
private Label lblConexaoFixa1;
|
||||
private Textbox txtConexaoFixa2;
|
||||
private Label lblConexaoFixa2;
|
||||
private Textbox txtConexaoFixa3;
|
||||
private Label lblConexaoFixa3;
|
||||
private Textbox txtConexaoFixa4;
|
||||
private Label lblConexaoFixa4;
|
||||
|
||||
public ConexionCtrl getConexionCtrl() {
|
||||
return conexionCtrl;
|
||||
|
@ -173,19 +188,36 @@ public class EditarConexionController extends MyGenericForwardComposer {
|
|||
public void onSelect$cmbDestinoConexaoPasso1(Event ev) {
|
||||
Comboitem cbiDestino = cmbDestinoConexaoPasso1.getSelectedItem();
|
||||
Parada destino = (Parada) cbiDestino.getValue();
|
||||
cmbOrigemConexaoPasso2.setInitialValue(destino);
|
||||
cmbOrigemConexaoPasso2.setInitialValue(destino);
|
||||
}
|
||||
|
||||
public void onSelect$cmbDestinoConexaoPasso2(Event ev) {
|
||||
Comboitem cbiDestino = cmbDestinoConexaoPasso2.getSelectedItem();
|
||||
Parada destino = (Parada) cbiDestino.getValue();
|
||||
cmbOrigemConexaoPasso3.setInitialValue(destino);
|
||||
|
||||
if (chkConFix.isChecked()){
|
||||
txtConexaoFixa2.setVisible(true);
|
||||
lblConexaoFixa2.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void onSelect$cmbDestinoConexaoPasso3(Event ev) {
|
||||
Comboitem cbiDestino = cmbDestinoConexaoPasso3.getSelectedItem();
|
||||
Parada destino = (Parada) cbiDestino.getValue();
|
||||
cmbOrigemConexaoPasso4.setInitialValue(destino);
|
||||
|
||||
if (chkConFix.isChecked()){
|
||||
txtConexaoFixa3.setVisible(true);
|
||||
lblConexaoFixa3.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void onSelect$cmbDestinoConexaoPasso4(Event ev) {
|
||||
if (chkConFix.isChecked()){
|
||||
txtConexaoFixa4.setVisible(true);
|
||||
lblConexaoFixa4.setVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnAddConexaoExcepcion(Event ev) throws InterruptedException {
|
||||
|
@ -230,7 +262,43 @@ public class EditarConexionController extends MyGenericForwardComposer {
|
|||
Labels.getLabel("editarConexionExcepcionController.window.title"), args, MODAL);
|
||||
}
|
||||
|
||||
|
||||
public void onCheck$chkConFix(Event ev){
|
||||
if (chkConFix.isChecked()){
|
||||
txtConexaoFixa1.setVisible(true);
|
||||
lblConexaoFixa1.setVisible(true);
|
||||
|
||||
if (!cmbDestinoConexaoPasso2.getValue().isEmpty()){
|
||||
txtConexaoFixa2.setVisible(true);
|
||||
lblConexaoFixa2.setVisible(true);
|
||||
}
|
||||
|
||||
if (!cmbDestinoConexaoPasso3.getValue().isEmpty()){
|
||||
txtConexaoFixa3.setVisible(true);
|
||||
lblConexaoFixa3.setVisible(true);
|
||||
}
|
||||
|
||||
if (!cmbDestinoConexaoPasso4.getValue().isEmpty()){
|
||||
txtConexaoFixa4.setVisible(true);
|
||||
lblConexaoFixa4.setVisible(true);
|
||||
}
|
||||
} else{
|
||||
txtConexaoFixa1.setVisible(false);
|
||||
lblConexaoFixa1.setVisible(false);
|
||||
|
||||
txtConexaoFixa2.setVisible(false);
|
||||
lblConexaoFixa2.setVisible(false);
|
||||
|
||||
txtConexaoFixa3.setVisible(false);
|
||||
lblConexaoFixa3.setVisible(false);
|
||||
|
||||
txtConexaoFixa4.setVisible(false);
|
||||
lblConexaoFixa4.setVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
public void onClick$btnAddConexao(Event ev) throws InterruptedException {
|
||||
|
||||
Comboitem cbiOrigem1 = cmbOrigemConexaoPasso1.getSelectedItem();
|
||||
if (cbiOrigem1 == null) {
|
||||
Messagebox.show(Labels.getLabel("editarConexionController.MSG.origem1"),
|
||||
|
@ -304,6 +372,40 @@ public class EditarConexionController extends MyGenericForwardComposer {
|
|||
txtPorSec2.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (chkConFix.isChecked()){
|
||||
if (txtConexaoFixa1.getValue().isEmpty()){
|
||||
Messagebox.show(Labels.getLabel("editarConexionController.MSG.conexaoFixa1"),
|
||||
Labels.getLabel("editarConexionController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
txtConexaoFixa1.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cmbDestinoConexaoPasso2.getValue().isEmpty() && txtConexaoFixa2.getValue().isEmpty()){
|
||||
Messagebox.show(Labels.getLabel("editarConexionController.MSG.conexaoFixa2"),
|
||||
Labels.getLabel("editarConexionController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
txtConexaoFixa2.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cmbDestinoConexaoPasso3.getValue().isEmpty() && txtConexaoFixa3.getValue().isEmpty()){
|
||||
Messagebox.show(Labels.getLabel("editarConexionController.MSG.conexaoFixa3"),
|
||||
Labels.getLabel("editarConexionController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
txtConexaoFixa3.focus();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!cmbDestinoConexaoPasso4.getValue().isEmpty() && txtConexaoFixa4.getValue().isEmpty()){
|
||||
Messagebox.show(Labels.getLabel("editarConexionController.MSG.conexaoFixa4"),
|
||||
Labels.getLabel("editarConexionController.window.title"),
|
||||
Messagebox.OK, Messagebox.INFORMATION);
|
||||
txtConexaoFixa4.focus();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
grupo++;
|
||||
|
||||
|
@ -312,12 +414,18 @@ public class EditarConexionController extends MyGenericForwardComposer {
|
|||
conexionPasso1.setDestinoId(destinoPasso1.getParadaId());
|
||||
conexionPasso1.setNumgrupo(grupo);
|
||||
conexionPasso1.setNumsecuencia((short) 1);
|
||||
if (!txtConexaoFixa1.getValue().isEmpty()){
|
||||
conexionPasso1.setCorridaId(Long.parseLong(txtConexaoFixa1.getValue()));
|
||||
}
|
||||
|
||||
Conexion conexionPasso2 = new Conexion();
|
||||
conexionPasso2.setOrigenId(origemPasso2.getParadaId());
|
||||
conexionPasso2.setDestinoId(destinoPasso2.getParadaId());
|
||||
conexionPasso2.setNumgrupo(grupo);
|
||||
conexionPasso2.setNumsecuencia((short) 2);
|
||||
if (!txtConexaoFixa2.getValue().isEmpty()){
|
||||
conexionPasso2.setCorridaId(Long.parseLong(txtConexaoFixa2.getValue()));
|
||||
}
|
||||
|
||||
Comboitem cbiDestino = cmbDestinoFinal.getSelectedItem();
|
||||
Parada destino = (Parada) cbiDestino.getValue();
|
||||
|
@ -409,6 +517,10 @@ public class EditarConexionController extends MyGenericForwardComposer {
|
|||
conexionPasso3.setDestinoId(destinoPasso3.getParadaId());
|
||||
conexionPasso3.setNumgrupo(grupo);
|
||||
conexionPasso3.setNumsecuencia((short) 3);
|
||||
if (!txtConexaoFixa3.getValue().isEmpty()){
|
||||
conexionPasso3.setCorridaId(Long.parseLong(txtConexaoFixa3.getValue()));
|
||||
}
|
||||
|
||||
lsConexiones.add(conexionPasso3);
|
||||
}
|
||||
|
||||
|
@ -435,6 +547,9 @@ public class EditarConexionController extends MyGenericForwardComposer {
|
|||
conexionPasso4.setDestinoId(destinoPasso4.getParadaId());
|
||||
conexionPasso4.setNumgrupo(grupo);
|
||||
conexionPasso4.setNumsecuencia((short) 4);
|
||||
if (!txtConexaoFixa4.getValue().isEmpty()){
|
||||
conexionPasso4.setCorridaId(Long.parseLong(txtConexaoFixa4.getValue()));
|
||||
}
|
||||
|
||||
lsConexiones.add(conexionPasso4);
|
||||
}
|
||||
|
@ -535,8 +650,25 @@ public class EditarConexionController extends MyGenericForwardComposer {
|
|||
|
||||
conexionCtrl.setOrigenId(origem.getParadaId());
|
||||
conexionCtrl.setDestinoId(destino.getParadaId());
|
||||
|
||||
|
||||
for (Conexion conexion: lsConexiones){
|
||||
if (conexion.getCorridaId()!=null){
|
||||
conexionCtrl.setIndfixa(1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
conexionCtrlService.suscribir(conexionCtrl);
|
||||
} else{
|
||||
|
||||
for (Conexion conexion: lsConexiones){
|
||||
if (conexion.getCorridaId()!=null){
|
||||
conexionCtrl.setIndfixa(1);
|
||||
conexionCtrlService.actualizacion(conexionCtrl);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (Conexion conexion : lsConexiones) {
|
||||
|
|
|
@ -6022,4 +6022,10 @@ relatorioObservacaoEventosFinanceirosController.btnPesquisa.label = Búsqueda
|
|||
relatorioObservacaoEventosFinanceirosController.lbDataIni.value = Fecha Inicio
|
||||
relatorioObservacaoEventosFinanceirosController.lbDataFin.value = Fecha Final
|
||||
relatorioObservacaoEventosFinanceirosController.lbEmpresa.value = Empresa
|
||||
relatorioObservacaoEventosFinanceirosController.lbPuntoVenta.value = Punto venta
|
||||
relatorioObservacaoEventosFinanceirosController.lbPuntoVenta.value = Punto venta
|
||||
|
||||
editarConexionController.labelConexaoFixa = Conexión Fijo
|
||||
editarConexionController.MSG.conexaoFixa1 = Informe la conexión fijo del primero paso de la conexión.
|
||||
editarConexionController.MSG.conexaoFixa2 = Informe la conexión fijo del segundo paso de la conexión.
|
||||
editarConexionController.MSG.conexaoFixa3 = Informe la conexión fijo del tercero paso de la conexión.
|
||||
editarConexionController.MSG.conexaoFixa4 = Informe la conexión fijo del cuarto paso de la conexión.
|
|
@ -5543,6 +5543,11 @@ editarConexionController.MSG.destinoFinal = O destino selecionado deve ser o des
|
|||
editarConexionController.MSG.origem3 = Se o quarto passo for adcionado deve ter o terceiro passo na conexão.
|
||||
editarConexionController.MSG.ConexaoExistente = Já existe configurado uma conexão para {0} e {1}.
|
||||
editarConexionController.MSG.conexaoInexistente = Adicione pelo menos uma conexão.
|
||||
editarConexionController.labelConexaoFixa = Conexão Fixa
|
||||
editarConexionController.MSG.conexaoFixa1 = Informe a conexão fixa do primeiro passo da conexão.
|
||||
editarConexionController.MSG.conexaoFixa2 = Informe a conexão fixa do segundo passo da conexão.
|
||||
editarConexionController.MSG.conexaoFixa3 = Informe a conexão fixa do terceiro passo da conexão.
|
||||
editarConexionController.MSG.conexaoFixa4 = Informe a conexão fixa do quarto passo da conexão.
|
||||
|
||||
# Editar Configuracao de Conexion
|
||||
editarConexionConfController.window.title = Editar Configuração de Conexão
|
||||
|
|
|
@ -68,6 +68,11 @@
|
|||
value="${c:l('editarConexionController.labelTiempoMax.value')}" />
|
||||
<intbox id="txtTiempoMax" />
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<checkbox id="chkConFix" label="${c:l('editarConexionController.labelConexaoFixa')}"/>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarConexionController.labelOrigenConexaoPasso1.value')}" />
|
||||
|
@ -82,11 +87,15 @@
|
|||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||
mold="rounded" buttonVisible="true" width="100%" />
|
||||
</row>
|
||||
<row />
|
||||
<row spans="1,3">
|
||||
<row >
|
||||
<label
|
||||
value="${c:l('editarConexionController.labelPorSec1.value')}" />
|
||||
<decimalbox id="txtPorSec1" width="20%" />
|
||||
|
||||
<div>
|
||||
<label id="lblConexaoFixa1" value="${c:l('relatorioAproveitamentoController.lbServico.value')}" visible="false"/>
|
||||
<textbox id="txtConexaoFixa1" visible="false"/>
|
||||
</div>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
|
@ -102,10 +111,15 @@
|
|||
mold="rounded" buttonVisible="true" width="100%" />
|
||||
</row>
|
||||
<row />
|
||||
<row spans="1,3">
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarConexionController.labelPorSec2.value')}" />
|
||||
<decimalbox id="txtPorSec2" width="20%" />
|
||||
|
||||
<div>
|
||||
<label id="lblConexaoFixa2" value="${c:l('relatorioAproveitamentoController.lbServico.value')}" visible="false"/>
|
||||
<textbox id="txtConexaoFixa2" visible="false"/>
|
||||
</div>
|
||||
</row>
|
||||
<row>
|
||||
<label
|
||||
|
@ -121,10 +135,15 @@
|
|||
mold="rounded" buttonVisible="true" width="100%" />
|
||||
</row>
|
||||
<row />
|
||||
<row spans="1,3">
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarConexionController.labelPorSec3.value')}" />
|
||||
<decimalbox id="txtPorSec3" width="20%" />
|
||||
|
||||
<div>
|
||||
<label id="lblConexaoFixa3" value="${c:l('relatorioAproveitamentoController.lbServico.value')}" visible="false"/>
|
||||
<textbox id="txtConexaoFixa3" visible="false"/>
|
||||
</div>
|
||||
</row>
|
||||
|
||||
<row>
|
||||
|
@ -141,12 +160,16 @@
|
|||
mold="rounded" buttonVisible="true" width="100%" />
|
||||
</row>
|
||||
<row />
|
||||
<row spans="1,3">
|
||||
<row>
|
||||
<label
|
||||
value="${c:l('editarConexionController.labelPorSec4.value')}" />
|
||||
<decimalbox id="txtPorSec4" width="20%" />
|
||||
|
||||
<div>
|
||||
<label id="lblConexaoFixa4" value="${c:l('relatorioAproveitamentoController.lbServico.value')}" visible="false"/>
|
||||
<textbox id="txtConexaoFixa4" visible="false"/>
|
||||
</div>
|
||||
</row>
|
||||
|
||||
</rows>
|
||||
</grid>
|
||||
<toolbar>
|
||||
|
|
Loading…
Reference in New Issue