fixes bug #7582
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@57932 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
62efd32eba
commit
55a22e99b7
|
@ -4,8 +4,7 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.List;
|
||||
|
@ -20,8 +19,15 @@ import org.zkoss.zk.ui.Component;
|
|||
import org.zkoss.zk.ui.Executions;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.Radio;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||
import com.rjconsultores.ventaboletos.entidad.TaxaEmbarqueParada;
|
||||
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||
import com.rjconsultores.ventaboletos.service.ParadaService;
|
||||
import com.rjconsultores.ventaboletos.service.TaxaEmbarqueParadaService;
|
||||
|
@ -31,9 +37,6 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
|||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyTextboxDecimal;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderTaxaEmbarqueParada;
|
||||
import org.zkoss.zul.Combobox;
|
||||
import org.zkoss.zul.Intbox;
|
||||
import org.zkoss.zul.Radio;
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -49,12 +52,17 @@ public class EditarTaxaEmbarqueParadaController extends MyGenericForwardComposer
|
|||
private OrgaoConcedenteService orgaoConcedenteService;
|
||||
@Autowired
|
||||
private ParadaService paradaService;
|
||||
@Autowired
|
||||
private EmpresaService empresaService;
|
||||
|
||||
private Parada parada;
|
||||
//private TaxaEmbarqueParada taxaEmbarqueParada;
|
||||
private List<TaxaEmbarqueParada> lsTaxaEmbarqueParada;
|
||||
private List<OrgaoConcedente> lsOrgaoConcedente;
|
||||
private List<Empresa> lsEmpresas;
|
||||
private MyListbox taxaEmbarqueParadaList;
|
||||
private MyComboboxEstandar cmbOrgao;
|
||||
private MyComboboxEstandar cmbEmpresa;
|
||||
private Combobox cmbParada;
|
||||
private Button btnApagar;
|
||||
private Button btnAdicionarTaxaEmbarqueParada;
|
||||
|
@ -116,6 +124,7 @@ public class EditarTaxaEmbarqueParadaController extends MyGenericForwardComposer
|
|||
public void doAfterCompose(Component comp) throws Exception {
|
||||
|
||||
lsOrgaoConcedente = orgaoConcedenteService.obtenerTodos();
|
||||
lsEmpresas = empresaService.obtenerTodosIncluindoEmpresaTodas();
|
||||
|
||||
super.doAfterCompose(comp);
|
||||
|
||||
|
@ -185,6 +194,7 @@ public class EditarTaxaEmbarqueParadaController extends MyGenericForwardComposer
|
|||
|
||||
cmbParada.getValue();
|
||||
cmbOrgao.getValue();
|
||||
cmbEmpresa.getValue();
|
||||
txtKm.getValue();
|
||||
txtValor.getValue();
|
||||
|
||||
|
@ -203,19 +213,22 @@ public class EditarTaxaEmbarqueParadaController extends MyGenericForwardComposer
|
|||
for (TaxaEmbarqueParada kmParada : lsTaxaEmbarqueParada) {
|
||||
if (rdSi.isChecked()) {
|
||||
if (kmParada.getOrgaoconcedenteId().equals((OrgaoConcedente) cmbOrgao.getSelectedItem().getValue())
|
||||
&& kmParada.getIndtipo() == 'F') {
|
||||
&& kmParada.getIndtipo() == 'F'
|
||||
&& kmParada.getEmpresa().equals((Empresa)cmbEmpresa.getSelectedItem().getValue())) {
|
||||
existeFixo = true;
|
||||
break;
|
||||
}
|
||||
if (txtKm.getValue() != null
|
||||
&& kmParada.getKmate() != null
|
||||
&& kmParada.getKmate().equals(txtKm.getValue())
|
||||
&& kmParada.getOrgaoconcedenteId().equals((OrgaoConcedente) cmbOrgao.getSelectedItem().getValue())) {
|
||||
&& kmParada.getOrgaoconcedenteId().equals((OrgaoConcedente) cmbOrgao.getSelectedItem().getValue())
|
||||
&& kmParada.getEmpresa().equals((Empresa)cmbEmpresa.getSelectedItem().getValue())) {
|
||||
existeKmOrgao = true;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (kmParada.getOrgaoconcedenteId().equals((OrgaoConcedente) cmbOrgao.getSelectedItem().getValue())) {
|
||||
if (kmParada.getOrgaoconcedenteId().equals((OrgaoConcedente) cmbOrgao.getSelectedItem().getValue())
|
||||
&& kmParada.getEmpresa().equals((Empresa)cmbEmpresa.getSelectedItem().getValue())) {
|
||||
existeFixo = true;
|
||||
break;
|
||||
}
|
||||
|
@ -251,6 +264,7 @@ public class EditarTaxaEmbarqueParadaController extends MyGenericForwardComposer
|
|||
|
||||
txParada.setParadaId(pr);
|
||||
txParada.setOrgaoconcedenteId((OrgaoConcedente) cmbOrgao.getSelectedItem().getValue());
|
||||
txParada.setEmpresa((Empresa)cmbEmpresa.getSelectedItem().getValue());
|
||||
txParada.setKmate(txtKm.getValue());
|
||||
txParada.setValortaxa(txtValor.getValueDecimal());
|
||||
txParada.setActivo(true);
|
||||
|
@ -294,4 +308,14 @@ public class EditarTaxaEmbarqueParadaController extends MyGenericForwardComposer
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
public List<Empresa> getLsEmpresas() {
|
||||
return lsEmpresas;
|
||||
}
|
||||
|
||||
public void setLsEmpresas(List<Empresa> lsEmpresas) {
|
||||
this.lsEmpresas = lsEmpresas;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -34,6 +34,9 @@ public class RenderTaxaEmbarqueParada implements ListitemRenderer {
|
|||
|
||||
lc = new Listcell(taxaParada.getValortaxa() == null ? " - " : taxaParada.getValortaxa().toString());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lc = new Listcell(taxaParada.getEmpresa() == null ? " - " : taxaParada.getEmpresa().getNombempresa());
|
||||
lc.setParent(lstm);
|
||||
|
||||
lstm.setAttribute("data", taxaParada);
|
||||
}
|
||||
|
|
|
@ -5122,6 +5122,7 @@ busquedaTaxaEmbarqueParadaController.btnNovo.tooltiptext = Incluir
|
|||
busquedaTaxaEmbarqueParadaController.btnCerrar.tooltiptext = Cerrar
|
||||
busquedaTaxaEmbarqueParadaController.DescTaxaEmbarqueParada.label = Descripción
|
||||
busquedaTaxaEmbarqueParadaController.orgao = Instituición
|
||||
busquedaTaxaEmbarqueParadaController.empresa = Empresa
|
||||
busquedaTaxaEmbarqueParadaController.localidade = Parada
|
||||
busquedaTaxaEmbarqueParadaController.km = Km
|
||||
busquedaTaxaEmbarqueParadaController.fixo = Es fijo
|
||||
|
|
|
@ -5191,6 +5191,7 @@ busquedaTaxaEmbarqueParadaController.btnNovo.tooltiptext = Incluir
|
|||
busquedaTaxaEmbarqueParadaController.btnCerrar.tooltiptext = Fechar
|
||||
busquedaTaxaEmbarqueParadaController.DescTaxaEmbarqueParada.label = Descrição
|
||||
busquedaTaxaEmbarqueParadaController.orgao = Orgão
|
||||
busquedaTaxaEmbarqueParadaController.empresa = Empresa
|
||||
busquedaTaxaEmbarqueParadaController.localidade = Localidade
|
||||
busquedaTaxaEmbarqueParadaController.km = Km
|
||||
busquedaTaxaEmbarqueParadaController.fixo = É fixo
|
||||
|
|
|
@ -54,6 +54,13 @@
|
|||
model="@{winEditarTaxaEmbarqueParada$composer.lsOrgaoConcedente}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaTaxaEmbarqueParadaController.empresa')}"/>
|
||||
<combobox id="cmbEmpresa" constraint="no empty"
|
||||
mold="rounded" buttonVisible="true" width="90%"
|
||||
model="@{winEditarTaxaEmbarqueParada$composer.lsEmpresas}"
|
||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaTaxaEmbarqueParadaController.fixo')}"/>
|
||||
<radiogroup>
|
||||
|
@ -88,7 +95,7 @@
|
|||
<listheader width="50px" image="/gui/img/builder.gif"
|
||||
label="${c:l('lb.id')}"
|
||||
sort="auto(taxaEmbarqueParadaId)"/>
|
||||
<listheader image="/gui/img/builder.gif" width="200px"
|
||||
<listheader image="/gui/img/builder.gif" width="150px"
|
||||
label="${c:l('busquedaTaxaEmbarqueParadaController.localidade')}"
|
||||
sort="auto(paradaId.descparada)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
|
@ -103,6 +110,9 @@
|
|||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTaxaEmbarqueParadaController.valor')}"
|
||||
sort="auto(valortaxa)"/>
|
||||
<listheader image="/gui/img/builder.gif"
|
||||
label="${c:l('busquedaTaxaEmbarqueParadaController.empresa')}"
|
||||
sort="auto(empresa)"/>
|
||||
</listhead>
|
||||
</listbox>
|
||||
</window>
|
||||
|
|
Loading…
Reference in New Issue