git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@20627 d1611594-4594-4d17-8e1d-87c2c4800839
parent
882e3bcfa0
commit
2a80d2d90a
|
@ -630,7 +630,7 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvarCoeficiente(Event ev) {
|
public void onClick$btnSalvarCoeficiente(Event ev) throws InterruptedException {
|
||||||
if (lsOrgamoTramo == null) {
|
if (lsOrgamoTramo == null) {
|
||||||
lsOrgamoTramo = new ArrayList<OrgaoTramo>();
|
lsOrgamoTramo = new ArrayList<OrgaoTramo>();
|
||||||
}
|
}
|
||||||
|
@ -655,9 +655,13 @@ public class EditarTramosController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
Comboitem cbiOrgaoConcedente = cmbOrgaoConcedente.getSelectedItem();
|
Comboitem cbiOrgaoConcedente = cmbOrgaoConcedente.getSelectedItem();
|
||||||
OrgaoConcedente orgaoConcedente = null;
|
OrgaoConcedente orgaoConcedente = null;
|
||||||
if (cbiOrgaoConcedente != null) {
|
if (cbiOrgaoConcedente == null) {
|
||||||
orgaoConcedente = (OrgaoConcedente) cbiOrgaoConcedente.getValue();
|
Messagebox.show(Labels.getLabel("editarTramosController.msg.orgaoObligatorio"),
|
||||||
|
Labels.getLabel("editarTramosController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
orgaoConcedente = (OrgaoConcedente) cbiOrgaoConcedente.getValue();
|
||||||
|
|
||||||
Integer kmCoeficiente1 = txtKMCoeficiente1.getValue();
|
Integer kmCoeficiente1 = txtKMCoeficiente1.getValue();
|
||||||
Integer kmCoeficiente2 = txtKMCoeficiente2.getValue();
|
Integer kmCoeficiente2 = txtKMCoeficiente2.getValue();
|
||||||
|
|
|
@ -0,0 +1,66 @@
|
||||||
|
/*
|
||||||
|
* To change this template, choose Tools | Templates
|
||||||
|
* and open the template in the editor.
|
||||||
|
*/
|
||||||
|
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.apache.log4j.Logger;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
import org.zkoss.zk.ui.Component;
|
||||||
|
import org.zkoss.zk.ui.event.Event;
|
||||||
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Messagebox;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||||
|
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.TarifaOficialService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Gleimar
|
||||||
|
*/
|
||||||
|
@Controller("copiarTarifaOficialController")
|
||||||
|
@Scope("prototype")
|
||||||
|
public class CopiarTarifaOficialController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static Logger log = Logger.getLogger(CopiarTarifaOficialController.class);
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private VigenciaTarifaService vigenciaTarifaService;
|
||||||
|
@Autowired
|
||||||
|
private TarifaOficialService tarifaOficialService;
|
||||||
|
private List<VigenciaTarifa> lsVigenciaTarifa;
|
||||||
|
private Combobox cmbVigencia;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
|
lsVigenciaTarifa = vigenciaTarifaService.obtenerTodos();
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void onClick$btnGenerarVigencia(Event ev) throws InterruptedException {
|
||||||
|
|
||||||
|
cmbVigencia.getValue();
|
||||||
|
|
||||||
|
tarifaOficialService.copiarParaTarifa((VigenciaTarifa) cmbVigencia.getSelectedItem().getValue());
|
||||||
|
|
||||||
|
Messagebox.show(Labels.getLabel("copiarTarifaOficialController.MSG.copiaOK"),
|
||||||
|
Labels.getLabel("indexController.mniGenerarTarifaOrgao.label"),
|
||||||
|
Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<VigenciaTarifa> getLsVigenciaTarifa() {
|
||||||
|
return lsVigenciaTarifa;
|
||||||
|
}
|
||||||
|
}
|
|
@ -46,16 +46,13 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
||||||
private OrgaoConcedenteService orgaoConcedenteService;
|
private OrgaoConcedenteService orgaoConcedenteService;
|
||||||
private List<Ruta> lsRuta;
|
private List<Ruta> lsRuta;
|
||||||
private List<OrgaoConcedente> lsOrgaoConcedente;
|
private List<OrgaoConcedente> lsOrgaoConcedente;
|
||||||
private List<VigenciaTarifa> lsVigenciaTarifa;
|
|
||||||
private Combobox cmbRuta;
|
private Combobox cmbRuta;
|
||||||
private Combobox cmbOrgaoConcedente;
|
private Combobox cmbOrgaoConcedente;
|
||||||
private Combobox cmbVigencia;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
lsOrgaoConcedente = new ArrayList<OrgaoConcedente>();
|
lsOrgaoConcedente = new ArrayList<OrgaoConcedente>();
|
||||||
lsOrgaoConcedente.add(orgaoConcedenteService.obtenerID(3));
|
lsOrgaoConcedente.add(orgaoConcedenteService.obtenerID(3));
|
||||||
lsVigenciaTarifa = vigenciaTarifaService.obtenerTodos();
|
|
||||||
|
|
||||||
lsRuta = rutaService.obtenerTodos();
|
lsRuta = rutaService.obtenerTodos();
|
||||||
|
|
||||||
|
@ -64,7 +61,7 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
public void onClick$btnGenerarVigencia(Event ev) throws InterruptedException {
|
public void onClick$btnGenerarVigencia(Event ev) throws InterruptedException {
|
||||||
cmbOrgaoConcedente.getValue();
|
cmbOrgaoConcedente.getValue();
|
||||||
cmbVigencia.getValue();
|
|
||||||
|
|
||||||
Integer rutaId = null;
|
Integer rutaId = null;
|
||||||
|
|
||||||
|
@ -72,9 +69,7 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
||||||
rutaId=((Ruta)cmbRuta.getSelectedItem().getValue()).getRutaId();
|
rutaId=((Ruta)cmbRuta.getSelectedItem().getValue()).getRutaId();
|
||||||
}
|
}
|
||||||
|
|
||||||
Integer qtd = tarifaOficialService.gerarTarifaANTT(rutaId);
|
Integer qtd = tarifaOficialService.gerarAtualizarTarifaANTT(rutaId);
|
||||||
|
|
||||||
tarifaOficialService.copiarParaTarifa((VigenciaTarifa) cmbVigencia.getSelectedItem().getValue());
|
|
||||||
|
|
||||||
Messagebox.show(Labels.getLabel("generarTarifaOrgaoController.MSG.suscribirOK").concat(qtd.toString()),
|
Messagebox.show(Labels.getLabel("generarTarifaOrgaoController.MSG.suscribirOK").concat(qtd.toString()),
|
||||||
Labels.getLabel("indexController.mniGenerarTarifaOrgao.label"),
|
Labels.getLabel("indexController.mniGenerarTarifaOrgao.label"),
|
||||||
|
@ -89,7 +84,4 @@ public class GenerarTarifaOrgaoController extends MyGenericForwardComposer {
|
||||||
return lsOrgaoConcedente;
|
return lsOrgaoConcedente;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<VigenciaTarifa> getLsVigenciaTarifa() {
|
|
||||||
return lsVigenciaTarifa;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.rjconsultores.ventaboletos.web.utilerias.menu.item.tarifas;
|
||||||
|
|
||||||
|
import org.zkoss.util.resource.Labels;
|
||||||
|
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.PantallaUtileria;
|
||||||
|
import com.rjconsultores.ventaboletos.web.utilerias.menu.DefaultItemMenuSistema;
|
||||||
|
|
||||||
|
public class ItemMenuCopiarTarifaOficial extends DefaultItemMenuSistema {
|
||||||
|
|
||||||
|
public ItemMenuCopiarTarifaOficial() {
|
||||||
|
super("indexController.mniCopiarTarifaOficial.label");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getClaveMenu() {
|
||||||
|
return "COM.RJCONSULTORES.ADMINISTRACION.GUI.TARIFAS.MENU.COPIARTARIFAOFICIAL";
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void ejecutar() {
|
||||||
|
PantallaUtileria.openWindow("/gui/tarifas/copiarTarifaOficial.zul",Labels.getLabel("indexController.mniCopiarTarifaOficial.label"), null,desktop);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -184,7 +184,8 @@ indexController.mniPtovtaEmpresa.label = Ponto de Venda Empresa
|
||||||
indexController.mniConfRestricaoCanalVenta.label = Configurar Restrição de Canal de Venda
|
indexController.mniConfRestricaoCanalVenta.label = Configurar Restrição de Canal de Venda
|
||||||
indexController.mniOrgaoConcedente.label = Orgão Concedente
|
indexController.mniOrgaoConcedente.label = Orgão Concedente
|
||||||
indexController.mniCoeficienteTarifa.label = Coeficiente Tarifario
|
indexController.mniCoeficienteTarifa.label = Coeficiente Tarifario
|
||||||
indexController.mniGenerarTarifaOrgao.label= Gerar Tarifa
|
indexController.mniGenerarTarifaOrgao.label= Gerar/Atualizar Tarifa Oficial
|
||||||
|
indexController.mniCopiarTarifaOficial.label= Copiar Tarifa Oficial
|
||||||
|
|
||||||
#PARTE REALIZADA POR MANUEL
|
#PARTE REALIZADA POR MANUEL
|
||||||
indexController.mnCortesias.label = Cortesias
|
indexController.mnCortesias.label = Cortesias
|
||||||
|
@ -1116,6 +1117,7 @@ editarTramosController.labelKMCoeficiente3.value = KM Coeficiente 3
|
||||||
editarTramosController.labelOrgaoConcedente.value = Órgão Concedente
|
editarTramosController.labelOrgaoConcedente.value = Órgão Concedente
|
||||||
editarTramosController.btnApagarCoeficiente.tooltiptext = Eliminar Coeficiente
|
editarTramosController.btnApagarCoeficiente.tooltiptext = Eliminar Coeficiente
|
||||||
editarTramosController.btnSalvarCoeficiente.tooltiptext = Salvar Coeficiente
|
editarTramosController.btnSalvarCoeficiente.tooltiptext = Salvar Coeficiente
|
||||||
|
editarTramosController.msg.orgaoObligatorio = Informe o Órgão Concedente
|
||||||
|
|
||||||
#Panatalla VentaBoletos Comissionistas
|
#Panatalla VentaBoletos Comissionistas
|
||||||
pantalla.VentaBoletosTDO.window.title = Grupo Senda - Comissionista onLine
|
pantalla.VentaBoletosTDO.window.title = Grupo Senda - Comissionista onLine
|
||||||
|
@ -3594,4 +3596,12 @@ editarCoeficienteTarifaController.MSG.borrarPergunta = Deseja elminar Coeficient
|
||||||
editarCoeficienteTarifaController.MSG.borrarOK = Coeficiente Tarifario eliminado com sucesso.
|
editarCoeficienteTarifaController.MSG.borrarOK = Coeficiente Tarifario eliminado com sucesso.
|
||||||
|
|
||||||
#Gerar Tarifa
|
#Gerar Tarifa
|
||||||
generarTarifaOrgaoController.MSG.suscribirOK=Operação realizada com sucesso: Quandidade de tarifas geradas:
|
generarTarifaOrgaoController.MSG.suscribirOK=Operação realizada com sucesso: Quandidade de tarifas atualizadas:
|
||||||
|
generarTarifaOrgaoController.btnGenerarVigencia.toolTipoText=Gerar Tarifas
|
||||||
|
|
||||||
|
#Copiar Tarifa Oficial
|
||||||
|
copiarTarifaOficialController.MSG.copiaOK=Tarifa copia com sucesso
|
||||||
|
copiarTarifaOficialController.window.title=Copiar Tarifa Oficial
|
||||||
|
copiarTarifaOficialController.btnGenerarVigencia.Label=Copiar Tarifa
|
||||||
|
copiarTarifaOficialController.vigencia.label=Vigência Tarifa
|
||||||
|
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 497 B |
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<?page contentType="text/html;charset=UTF-8"?>
|
||||||
|
<?variable-resolver class="org.zkoss.zkplus.spring.DelegatingVariableResolver"?>
|
||||||
|
<?init class="org.zkoss.zkplus.databind.AnnotateDataBinderInit" arg0="winCopiarTarifaOficial"?>
|
||||||
|
<?taglib uri="http://www.zkoss.org/dsp/web/core" prefix="c"?>
|
||||||
|
|
||||||
|
<zk xmlns="http://www.zkoss.org/2005/zul">
|
||||||
|
<window id="winCopiarTarifaOficial" border="normal" apply="${copiarTarifaOficialController}" width="400px" height="457x" contentStyle="overflow:auto"
|
||||||
|
title="${c:l('copiarTarifaOficialController.window.title')}">
|
||||||
|
<toolbar>
|
||||||
|
<hbox spacing="5px" style="padding:1px" align="right">
|
||||||
|
<button id="btnFechar" height="20" image="/gui/img/exit.png" width="35px" onClick="winCopiarTarifaOficial.detach()" tooltiptext="${c:l('tooltiptext.btnFechar')}" />
|
||||||
|
<button id="btnGenerarVigencia" image="/gui/img/copiar.png" tooltiptext="${c:l('copiarTarifaOficialController.btnGenerarVigencia.Label')}" />
|
||||||
|
</hbox>
|
||||||
|
</toolbar>
|
||||||
|
|
||||||
|
<grid fixedLayout="true">
|
||||||
|
<columns>
|
||||||
|
<column width="40%" />
|
||||||
|
<column width="60%" />
|
||||||
|
</columns>
|
||||||
|
<rows>
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('copiarTarifaOficialController.vigencia.label')}" />
|
||||||
|
<combobox id="cmbVigencia" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" constraint="no empty" mold="rounded"
|
||||||
|
buttonVisible="true" width="99%" model="@{winCopiarTarifaOficial$composer.lsVigenciaTarifa}" />
|
||||||
|
</row>
|
||||||
|
</rows>
|
||||||
|
</grid>
|
||||||
|
</window>
|
||||||
|
</zk>
|
|
@ -9,8 +9,9 @@
|
||||||
title="${c:l('generarTarifaController.window.title')}">
|
title="${c:l('generarTarifaController.window.title')}">
|
||||||
<toolbar>
|
<toolbar>
|
||||||
<hbox spacing="5px" style="padding:1px" align="right">
|
<hbox spacing="5px" style="padding:1px" align="right">
|
||||||
<button id="btnFechar" height="20" image="/gui/img/exit.png" width="35px" onClick="winGenerarTarifaOrgao.detach()"
|
<button id="btnFechar" height="20" image="/gui/img/exit.png" width="35px" onClick="winGenerarTarifaOrgao.detach()" tooltiptext="${c:l('generarTarifaController.btnFechar.tooltiptext')}" />
|
||||||
tooltiptext="${c:l('generarTarifaController.btnFechar.tooltiptext')}" />
|
<button id="btnGenerarVigencia" image="/gui/img/create_doc.gif" tooltiptext="${c:l('generarTarifaOrgaoController.btnGenerarVigencia.toolTipoText')}" />
|
||||||
|
|
||||||
</hbox>
|
</hbox>
|
||||||
</toolbar>
|
</toolbar>
|
||||||
|
|
||||||
|
@ -24,12 +25,6 @@
|
||||||
<label value="${c:l('editarConfiguracionCorridaController.cmbRuta.value')}" />
|
<label value="${c:l('editarConfiguracionCorridaController.cmbRuta.value')}" />
|
||||||
<combobox id="cmbRuta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" mold="rounded" buttonVisible="true"
|
<combobox id="cmbRuta" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" mold="rounded" buttonVisible="true"
|
||||||
model="@{winGenerarTarifaOrgao$composer.lsRuta}" width="99%"/>
|
model="@{winGenerarTarifaOrgao$composer.lsRuta}" width="99%"/>
|
||||||
</row>
|
|
||||||
<row>
|
|
||||||
<label value="${c:l('cambioVigenciaController.Vigencia')}"/>
|
|
||||||
<combobox id="cmbVigencia" use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" constraint="no empty"
|
|
||||||
mold="rounded" buttonVisible="true" width="99%"
|
|
||||||
model="@{winGenerarTarifaOrgao$composer.lsVigenciaTarifa}"/>
|
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('editarTramosController.labelOrgaoConcedente.value')}" />
|
<label value="${c:l('editarTramosController.labelOrgaoConcedente.value')}" />
|
||||||
|
@ -39,12 +34,5 @@
|
||||||
|
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
||||||
<toolbar>
|
|
||||||
<hbox spacing="5px" style="padding:1px" align="right">
|
|
||||||
<button id="btnGenerarVigencia" label="Generar Tarifas" />
|
|
||||||
</hbox>
|
|
||||||
</toolbar>
|
|
||||||
|
|
||||||
</window>
|
</window>
|
||||||
</zk>
|
</zk>
|
||||||
|
|
Loading…
Reference in New Issue