Conclusão mantis 6971
Com relação ao filtro de linha, são disponibilizadas apenas as linhas que estão vinculadas a um pedágio, facilitando assim a utilização do filtro. Com relação ao tamanho dados exibidos no combo de linhas estarem pequenos, o combo aumenta de tamanho dinamicamente, conforme o tamanho da descrição da linha. Quanto maior a descrição da linha, maior será o tamanho do campo. fixes bug 6971 git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@51516 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
3479dc05e1
commit
996283e7c4
|
@ -12,14 +12,20 @@ import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zul.Combobox;
|
import org.zkoss.zul.Combobox;
|
||||||
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.ListModelArray;
|
import org.zkoss.zul.ListModelArray;
|
||||||
import org.zkoss.zul.Paging;
|
import org.zkoss.zul.Paging;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
import com.rjconsultores.ventaboletos.constantes.Constantes;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.CasetaPeaje;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Empresa;
|
||||||
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
import com.rjconsultores.ventaboletos.entidad.OrgaoConcedente;
|
||||||
|
import com.rjconsultores.ventaboletos.entidad.Parada;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Peaje;
|
import com.rjconsultores.ventaboletos.entidad.Peaje;
|
||||||
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
import com.rjconsultores.ventaboletos.entidad.Ruta;
|
||||||
import com.rjconsultores.ventaboletos.service.CalcularPeajeService;
|
import com.rjconsultores.ventaboletos.service.CalcularPeajeService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.CasetaPeajeService;
|
||||||
|
import com.rjconsultores.ventaboletos.service.EmpresaService;
|
||||||
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
import com.rjconsultores.ventaboletos.service.OrgaoConcedenteService;
|
||||||
import com.rjconsultores.ventaboletos.service.RutaService;
|
import com.rjconsultores.ventaboletos.service.RutaService;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||||
|
@ -27,6 +33,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPedagio;
|
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderPedagio;
|
||||||
|
import com.trg.search.Filter;
|
||||||
|
|
||||||
@Controller("busquedaAlteracaoPrecoPedagioController")
|
@Controller("busquedaAlteracaoPrecoPedagioController")
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
|
@ -37,31 +44,35 @@ public class BusquedaAlteracaoPrecoPedagioController extends MyGenericForwardCo
|
||||||
*/
|
*/
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private OrgaoConcedenteService orgaoConcedenteService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private RutaService rutaService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private transient PagedListWrapper<Peaje> plwPeaje;
|
|
||||||
private Paging pagingPeaje;
|
private Paging pagingPeaje;
|
||||||
|
|
||||||
private List<OrgaoConcedente> lsOrgaoConcedente;
|
private List<OrgaoConcedente> lsOrgaoConcedente;
|
||||||
private List<Ruta> lsRuta;
|
|
||||||
|
|
||||||
private Combobox cmbOrgaoConcedente;
|
private Combobox cmbOrgaoConcedente;
|
||||||
private Combobox cmbRuta;
|
private Combobox cmbRuta;
|
||||||
|
private Combobox cmbOrigen;
|
||||||
|
private Combobox cmbDestino;
|
||||||
|
private Combobox cmbEmpresa;
|
||||||
|
private Combobox cmbPracaPedagio;
|
||||||
private MyListbox pedagioList;
|
private MyListbox pedagioList;
|
||||||
|
private List<CasetaPeaje> lsPracaPedagio;
|
||||||
|
private List<Empresa> lsEmpresa;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrgaoConcedenteService orgaoConcedenteService;
|
||||||
|
@Autowired
|
||||||
|
private transient PagedListWrapper<Peaje> plwPeaje;
|
||||||
@Autowired
|
@Autowired
|
||||||
private CalcularPeajeService calcularPeajeService;
|
private CalcularPeajeService calcularPeajeService;
|
||||||
|
@Autowired
|
||||||
|
private CasetaPeajeService casetaPeajeService;
|
||||||
|
@Autowired
|
||||||
|
private EmpresaService empresaService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void doAfterCompose(Component comp) throws Exception {
|
public void doAfterCompose(Component comp) throws Exception {
|
||||||
super.doAfterCompose(comp);
|
|
||||||
|
lsEmpresa = empresaService.obtenerTodos();
|
||||||
|
lsPracaPedagio = casetaPeajeService.obtenerTodos();
|
||||||
lsOrgaoConcedente = new ArrayList<OrgaoConcedente>();
|
lsOrgaoConcedente = new ArrayList<OrgaoConcedente>();
|
||||||
for (Integer orgaoConcedenteId : Constantes.ORGAOS_CONCEDENTES_CALCULO_ANTT) {
|
for (Integer orgaoConcedenteId : Constantes.ORGAOS_CONCEDENTES_CALCULO_ANTT) {
|
||||||
lsOrgaoConcedente.add(orgaoConcedenteService.obtenerID(orgaoConcedenteId));
|
lsOrgaoConcedente.add(orgaoConcedenteService.obtenerID(orgaoConcedenteId));
|
||||||
|
@ -69,17 +80,14 @@ public class BusquedaAlteracaoPrecoPedagioController extends MyGenericForwardCo
|
||||||
for (Integer orgaoConcedenteId : Constantes.ORGAOS_CONCEDENTES_CALCULO_ARTESP) {
|
for (Integer orgaoConcedenteId : Constantes.ORGAOS_CONCEDENTES_CALCULO_ARTESP) {
|
||||||
lsOrgaoConcedente.add(orgaoConcedenteService.obtenerID(orgaoConcedenteId));
|
lsOrgaoConcedente.add(orgaoConcedenteService.obtenerID(orgaoConcedenteId));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super.doAfterCompose(comp);
|
||||||
|
|
||||||
pedagioList.setItemRenderer(new RenderPedagio());
|
pedagioList.setItemRenderer(new RenderPedagio());
|
||||||
pedagioList.addEventListener("onDoubleClick", new EventListener() {
|
pedagioList.addEventListener("onDoubleClick", new EventListener() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onEvent(Event event) throws Exception {
|
public void onEvent(Event event) throws Exception {}
|
||||||
// Peaje p = (Peaje) pedagioList.getSelected();
|
|
||||||
// verPeaje(p);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
refreshLista();
|
refreshLista();
|
||||||
|
@ -120,14 +128,6 @@ public class BusquedaAlteracaoPrecoPedagioController extends MyGenericForwardCo
|
||||||
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
public void onClick$btnPesquisa(Event ev) throws InterruptedException {
|
||||||
refreshLista();
|
refreshLista();
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Ruta> getLsRuta() {
|
|
||||||
return lsRuta;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setLsRuta(List<Ruta> lsRuta) {
|
|
||||||
this.lsRuta = lsRuta;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Combobox getCmbRuta() {
|
public Combobox getCmbRuta() {
|
||||||
return cmbRuta;
|
return cmbRuta;
|
||||||
|
@ -157,6 +157,32 @@ public class BusquedaAlteracaoPrecoPedagioController extends MyGenericForwardCo
|
||||||
peajeBusqueda.addFilterEqual("ruta.rutaId", ruta.getRutaId());
|
peajeBusqueda.addFilterEqual("ruta.rutaId", ruta.getRutaId());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Comboitem cbiOrigem = cmbOrigen.getSelectedItem();
|
||||||
|
if (cbiOrigem != null) {
|
||||||
|
Parada origen = (Parada) cbiOrigem.getValue();
|
||||||
|
peajeBusqueda.addFilterEqual("origem", origen);
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem cbiDestino = cmbDestino.getSelectedItem();
|
||||||
|
if (cbiDestino != null) {
|
||||||
|
Parada destino = (Parada) cbiDestino.getValue();
|
||||||
|
peajeBusqueda.addFilterEqual("destino", destino);
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem cbiEmpresa = cmbEmpresa.getSelectedItem();
|
||||||
|
if (cbiEmpresa != null){
|
||||||
|
Empresa e = (Empresa) cmbEmpresa.getSelectedItem().getValue();
|
||||||
|
peajeBusqueda.addFilterEqual("ruta.lsRutaEmpresa.empresa", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
Comboitem cbiCasetaPeaje = cmbPracaPedagio.getSelectedItem();
|
||||||
|
if (cbiCasetaPeaje != null) {
|
||||||
|
CasetaPeaje pracaPedagio = (CasetaPeaje) cbiCasetaPeaje.getValue();
|
||||||
|
peajeBusqueda.addFilterEqual("casetaPeaje", pracaPedagio);
|
||||||
|
}
|
||||||
|
|
||||||
|
peajeBusqueda.addSortAsc("casetaPeaje.desccaseta");
|
||||||
|
|
||||||
plwPeaje.init(peajeBusqueda, pedagioList, pagingPeaje);
|
plwPeaje.init(peajeBusqueda, pedagioList, pagingPeaje);
|
||||||
if (pedagioList.getData().length == 0) {
|
if (pedagioList.getData().length == 0) {
|
||||||
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),Labels.getLabel("busquedaAlteracaoPrecoPedagioController.window.title"),Messagebox.OK, Messagebox.INFORMATION);
|
Messagebox.show(Labels.getLabel("MSG.ningunRegistro"),Labels.getLabel("busquedaAlteracaoPrecoPedagioController.window.title"),Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
@ -168,9 +194,31 @@ public class BusquedaAlteracaoPrecoPedagioController extends MyGenericForwardCo
|
||||||
for(int x = 0 ; x < lp.size() ; x++){
|
for(int x = 0 ; x < lp.size() ; x++){
|
||||||
ids[x]=lp.get(x).getRuta().getRutaId();
|
ids[x]=lp.get(x).getRuta().getRutaId();
|
||||||
}
|
}
|
||||||
lsRuta = rutaService.buscarTodosEstos(ids);
|
|
||||||
cmbRuta.setModel(new ListModelArray(calcularPeajeService.buscarRutaWithCasetaPeajeFromOrgao(orgao)));
|
cmbRuta.setModel(new ListModelArray(calcularPeajeService.buscarRutaWithCasetaPeajeFromOrgao(orgao)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<CasetaPeaje> getLsPracaPedagio() {
|
||||||
|
return lsPracaPedagio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsPracaPedagio(List<CasetaPeaje> lsPracaPedagio) {
|
||||||
|
this.lsPracaPedagio = lsPracaPedagio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Combobox getCmbPracaPedagio() {
|
||||||
|
return cmbPracaPedagio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCmbPracaPedagio(Combobox cmbPracaPedagio) {
|
||||||
|
this.cmbPracaPedagio = cmbPracaPedagio;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Empresa> getLsEmpresa() {
|
||||||
|
return lsEmpresa;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setLsEmpresa(List<Empresa> lsEmpresa) {
|
||||||
|
this.lsEmpresa = lsEmpresa;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -37,6 +37,33 @@
|
||||||
width="99%"
|
width="99%"
|
||||||
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
</row>
|
</row>
|
||||||
|
|
||||||
|
<row>
|
||||||
|
<label value="${c:l('busquedaAliasServicoController.lhOrigen.label')}" />
|
||||||
|
<combobox id="cmbOrigen"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||||
|
mold="rounded" buttonVisible="true" width="99%" />
|
||||||
|
|
||||||
|
<label value="${c:l('busquedaAliasServicoController.lbDestino.label')}" />
|
||||||
|
<combobox id="cmbDestino" autodrop="false"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxParada"
|
||||||
|
mold="rounded" buttonVisible="true" width="99%" />
|
||||||
|
</row>
|
||||||
|
<row>
|
||||||
|
<label
|
||||||
|
value="${c:l('busquedaAlteracaoPrecoPedagioController.lhCasetaPeaje.label')}" />
|
||||||
|
<combobox id="cmbPracaPedagio" mold="rounded" buttonVisible="true"
|
||||||
|
width="99%"
|
||||||
|
model="@{winBusquedaAlteracaoPrecoPedagio$composer.lsPracaPedagio}"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar" />
|
||||||
|
|
||||||
|
<label
|
||||||
|
value="${c:l('editarCatalogoDeRutaController.lbEmpresa.value')}" />
|
||||||
|
<combobox id="cmbEmpresa"
|
||||||
|
use="com.rjconsultores.ventaboletos.web.utilerias.MyComboboxEstandar"
|
||||||
|
mold="rounded" buttonVisible="true" width="99%"
|
||||||
|
model="@{winBusquedaAlteracaoPrecoPedagio$composer.lsEmpresa}" />
|
||||||
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
<toolbar>
|
<toolbar>
|
||||||
|
|
Loading…
Reference in New Issue