diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java
index d53afd074..1c5cef899 100644
--- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java
+++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/catalogos/EditarPuntoVentaController.java
@@ -873,65 +873,7 @@ public class EditarPuntoVentaController extends MyGenericForwardComposer {
throw UiException.Aide.wrap(ex);
}
}
-
-
-// public PtovtaTitular preencherTitular(){
-//
-// txtTitularNome.getValue();
-// txtTitularCpf.getValue();
-// txtTitularRg.getValue();
-// txtTitularEmissor.getValue();
-//
-// PtovtaTitular titular = new PtovtaTitular();
-// titular.setNome(txtTitularNome.getValue());
-// titular.setCpf(txtTitularCpf.getValue());
-// titular.setRg(txtTitularRg.getValue());
-// titular.setOrgaoemissor(txtTitularEmissor.getValue());
-// if (img.getContent() != null) {
-// titular.setImagem(img.getContent().getByteData());
-// }
-//
-//
-// titular.setActivo(Boolean.TRUE);
-// titular.setFecmodif(Calendar.getInstance().getTime());
-// titular.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
-//
-// return titular;
-//
-// }
-//
-//
-// public PtovtaAgenciaBancaria preencherAgenciaBancaria() {
-// cmbBanco.getValue();
-// cmbPessoa.getValue();
-// txtNumAg.getValue();
-//
-// txtConta.getValue();
-// txtDigito.getValue();
-// txtBilhetes.getValue();
-// txtCarga.getValue();
-//
-//
-// PtovtaAgenciaBancaria agencia = new PtovtaAgenciaBancaria();
-// if (cmbBanco.getSelectedItem() != null){
-// agencia.setBancoId((PtovtaBanco) cmbBanco.getSelectedItem().getValue());
-// }
-//
-// if (cmbPessoa.getSelectedItem() != null){
-// agencia.setPessoa((String) cmbPessoa.getSelectedItem().getValue());
-// }
-// if (cmbTipoConta.getSelectedItem() != null){
-// agencia.setTipo((String) cmbTipoConta.getSelectedItem().getValue());
-// }
-//
-// agencia.setActivo(Boolean.TRUE);
-// agencia.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
-// agencia.setFecmodif(Calendar.getInstance().getTime());
-//
-// return agencia;
-//
-//
-// }
+
public void onClick$btnSalvarAntecipa()throws InterruptedException{
dateAntecipData.getValue();
diff --git a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/EditarEstacionController.java b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/EditarEstacionController.java
index bf49d1281..ab83dce86 100644
--- a/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/EditarEstacionController.java
+++ b/src/java/com/rjconsultores/ventaboletos/web/gui/controladores/seguridad/EditarEstacionController.java
@@ -17,9 +17,11 @@ import org.zkoss.zk.ui.Executions;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.util.Clients;
import org.zkoss.zul.Button;
+import org.zkoss.zul.Intbox;
import org.zkoss.zul.Textbox;
import com.rjconsultores.ventaboletos.entidad.Estacion;
+import com.rjconsultores.ventaboletos.entidad.EstacionSitef;
import com.rjconsultores.ventaboletos.exception.BusinessException;
import com.rjconsultores.ventaboletos.service.EstacionService;
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
@@ -44,6 +46,9 @@ public class EditarEstacionController extends MyGenericForwardComposer {
private Textbox txtDescMac;
private Estacion estacion;
private MyComboboxPuntoVenta cmbPuntoVenta;
+ private Intbox txtNumEmpresa;
+ private Intbox txtNumFilial;
+ private Intbox txtNumPdv;
private static Logger log = Logger.getLogger(EditarEstacionController.class);
public Estacion getEstacion() {
@@ -77,14 +82,22 @@ public class EditarEstacionController extends MyGenericForwardComposer {
txtDescMac.setText(descMac.toUpperCase());
}
+
+ if(estacion.getEstacionSitefId() == null){
+ estacion.setEstacionSitefId(new EstacionSitef());
+ }
+
}
txtDescEstacion.focus();
}
public void onClick$btnSalvar(Event ev) throws InterruptedException {
-
+ Boolean salvar = false;
cmbPuntoVenta.getValue(true);
+ txtNumEmpresa.getValue();
+ txtNumFilial.getValue();
+ txtNumPdv.getValue();
String descMac = txtDescMac.getText();
@@ -92,18 +105,40 @@ public class EditarEstacionController extends MyGenericForwardComposer {
estacion.setFecmodif(Calendar.getInstance().getTime());
estacion.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
estacion.setDescmac(estacionService.getDecimalMAC(descMac).toString());
+
+
+ if((txtNumEmpresa.getValue() == null)&& (txtNumFilial.getValue()== null)&&(txtNumPdv.getValue()== null)){
+ salvar = true;
+ estacion.setEstacionSitefId(null);
+ }else{
- try {
- estacionService.suscribirActualizar(estacion);
- Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"),
+ if((!(txtNumEmpresa.getValue()== null))&& (!(txtNumFilial.getValue()== null))&&(!(txtNumPdv.getValue()== null))){
+ salvar = true;
+ estacion.getEstacionSitefId().setActivo(Boolean.TRUE);
+ estacion.getEstacionSitefId().setFecmodif(Calendar.getInstance().getTime());
+ estacion.getEstacionSitefId().setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
+ }else{
+ salvar = false;
+ }
+ }
+ if(salvar){
+
+ try {
+ estacionService.suscribirActualizar(estacion);
+ Messagebox.show(Labels.getLabel("editarEstacionController.MSG.suscribirOK"),
+ Labels.getLabel("editarEstacionController.window.title"),
+ Messagebox.OK, Messagebox.INFORMATION);
+
+ estacionList.updateItem(estacion);
+
+ closeWindow();
+ } catch (BusinessException e) {
+ Messagebox.show(e.getMessage(), Labels.getLabel("editarEstacionController.window.title"),
+ Messagebox.OK, Messagebox.EXCLAMATION);
+ }
+ }else{
+ Messagebox.show(Labels.getLabel("editarEstacionController.MSG.sitef"),
Labels.getLabel("editarEstacionController.window.title"),
- Messagebox.OK, Messagebox.INFORMATION);
-
- estacionList.updateItem(estacion);
-
- closeWindow();
- } catch (BusinessException e) {
- Messagebox.show(e.getMessage(), Labels.getLabel("editarEstacionController.window.title"),
Messagebox.OK, Messagebox.EXCLAMATION);
}
}
diff --git a/src/java/spring-config.xml b/src/java/spring-config.xml
index e5ee8328d..695ebf1cd 100644
--- a/src/java/spring-config.xml
+++ b/src/java/spring-config.xml
@@ -93,6 +93,7 @@
com.rjconsultores.ventaboletos.entidad.EmpresaEquivalencia
com.rjconsultores.ventaboletos.entidad.Estacion
+ com.rjconsultores.ventaboletos.entidad.EstacionSitef
com.rjconsultores.ventaboletos.entidad.Estado
com.rjconsultores.ventaboletos.entidad.EsquemaAsiento
com.rjconsultores.ventaboletos.entidad.EsquemaCorrida
diff --git a/web/WEB-INF/i3-label_pt_BR.label b/web/WEB-INF/i3-label_pt_BR.label
index a67a38a7a..55127cbc2 100644
--- a/web/WEB-INF/i3-label_pt_BR.label
+++ b/web/WEB-INF/i3-label_pt_BR.label
@@ -2576,6 +2576,13 @@ editarEstacionController.MSG.suscribirOK = Estação Registrada com Sucesso.
editarEstacionController.MSG.borrarPergunta = Eliminar Estação?
editarEstacionController.MSG.borrarOK = Estação Excluida com Sucesso.
+#Editar Estacion Sitef
+editarEstacionController.tab.label.sitef = SiTef
+editarEstacionController.MSG.sitef = Todos os campos da aba SiTef devem ser preenchidos
+editarEstacionController.lbNumEmpresa.value = Código da Empresa
+editarEstacionController.lbNumFilial.value = Código da Filial
+editarEstacionController.lbNumPdv.value = Númedo PDV
+
# Pesquisa Exceção Ida e Volta
busquedaExceptionRedondoController.window.title = Exceção Viagem Ida e Volta
busquedaExceptionRedondoController.btnRefresh.tooltiptext = Atualizar
diff --git a/web/gui/seguridad/editarEstacion.zul b/web/gui/seguridad/editarEstacion.zul
index 0d1b1af88..01ec5e801 100644
--- a/web/gui/seguridad/editarEstacion.zul
+++ b/web/gui/seguridad/editarEstacion.zul
@@ -23,83 +23,117 @@
tooltiptext="${c:l('editarEstacionController.btnFechar.tooltiptext')}" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+