fixed bug #7659: Modificação na tela Vigências Tarifa
mel.: O formato da data nos períodos de vigência nas telas de busca e criação não apresentam mais hora git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@57621 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
223989728e
commit
f01a0e835e
|
@ -4,15 +4,10 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderVigenciaTarifa;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
@ -24,6 +19,14 @@ import org.zkoss.zk.ui.event.EventListener;
|
|||
import org.zkoss.zul.Datebox;
|
||||
import org.zkoss.zul.Paging;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.HibernateSearchObject;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.paginacion.PagedListWrapper;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.render.RenderVigenciaTarifa;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author rodrigo
|
||||
|
@ -116,8 +119,20 @@ public class BusquedaVigenciaTarifaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
private void refreshLista() {
|
||||
HibernateSearchObject<VigenciaTarifa> vigenciaTarifaBusqueda =
|
||||
new HibernateSearchObject<VigenciaTarifa>(VigenciaTarifa.class, pagingVigencia.getPageSize());
|
||||
Date inicio = fecInicio.getValue();
|
||||
Date fim = fecFinal.getValue();
|
||||
|
||||
if (inicio != null) {
|
||||
inicio.setSeconds(0);
|
||||
inicio.setMinutes(0);
|
||||
inicio.setHours(0);
|
||||
}
|
||||
if (fim != null) {
|
||||
fim.setSeconds(0);
|
||||
fim.setMinutes(59);
|
||||
fim.setHours(23);
|
||||
}
|
||||
HibernateSearchObject<VigenciaTarifa> vigenciaTarifaBusqueda = new HibernateSearchObject<VigenciaTarifa>(VigenciaTarifa.class, pagingVigencia.getPageSize());
|
||||
vigenciaTarifaBusqueda.addFilterEqual("activo", Boolean.TRUE);
|
||||
|
||||
vigenciaTarifaBusqueda.addFilterGreaterOrEqual("feciniciovigencia", fecInicio.getValue());
|
||||
|
|
|
@ -4,15 +4,10 @@
|
|||
*/
|
||||
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Tarifa;
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.service.TarifaService;
|
||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.log4j.Logger;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
|
@ -25,6 +20,14 @@ import org.zkoss.zk.ui.event.Event;
|
|||
import org.zkoss.zul.Button;
|
||||
import org.zkoss.zul.Datebox;
|
||||
|
||||
import com.rjconsultores.ventaboletos.entidad.Tarifa;
|
||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
||||
import com.rjconsultores.ventaboletos.service.TarifaService;
|
||||
import com.rjconsultores.ventaboletos.service.VigenciaTarifaService;
|
||||
import com.rjconsultores.ventaboletos.utilerias.UsuarioLogado;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyGenericForwardComposer;
|
||||
import com.rjconsultores.ventaboletos.web.utilerias.MyListbox;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author rodrigo
|
||||
|
@ -108,18 +111,17 @@ public class EditarVigenciaTarifaController extends MyGenericForwardComposer {
|
|||
}
|
||||
|
||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||
fecInicio.getValue();
|
||||
fecFinal.getValue();
|
||||
//fecVenta.getValue();
|
||||
|
||||
java.util.Date inicio = vigenciaTarifa.getFeciniciovigencia();
|
||||
java.util.Date fim = vigenciaTarifa.getFecfinvigencia();
|
||||
Date inicio = fecInicio.getValue();
|
||||
Date fim = fecFinal.getValue();
|
||||
|
||||
inicio.setSeconds(0);
|
||||
inicio.setMinutes(0);
|
||||
inicio.setHours(0);
|
||||
fim.setSeconds(0);
|
||||
fim.setMinutes(59);
|
||||
fim.setHours(23);
|
||||
|
||||
List<VigenciaTarifa> lsVT1 =
|
||||
vigenciaTarifaService.buscarVigenciasIntervalo(vigenciaTarifa);
|
||||
List<VigenciaTarifa> lsVT1 = vigenciaTarifaService.buscarVigenciasIntervalo(vigenciaTarifa);
|
||||
|
||||
// checando se o fim da vigencia eh menor que o inicio:
|
||||
if (!fim.before(inicio)) {
|
||||
|
@ -168,7 +170,6 @@ public class EditarVigenciaTarifaController extends MyGenericForwardComposer {
|
|||
closeWindow();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
Messagebox.show(
|
||||
Labels.getLabel("editarVigenciaTarifaController.MSG.conflitoVigencias"),
|
||||
|
@ -188,7 +189,6 @@ public class EditarVigenciaTarifaController extends MyGenericForwardComposer {
|
|||
vigenciaTarifa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||
vigenciaTarifa.setActivo(Boolean.FALSE);
|
||||
|
||||
|
||||
int opcao = Messagebox.show(
|
||||
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.Deseja.Borrar"),
|
||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||
|
|
|
@ -27,11 +27,11 @@
|
|||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('busquedaVigenciaTarifaController.lbFecInicio.value')}"/>
|
||||
<datebox id="fecInicio" format="dd/MM/yyyy HH:mm" width="60%" mold="rounded" lenient="false"/>
|
||||
<datebox id="fecInicio" format="dd/MM/yyyy" width="60%" mold="rounded" lenient="false"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaVigenciaTarifaController.lbFecFinal.value')}"/>
|
||||
<datebox id="fecFinal" format="dd/MM/yyyy HH:mm" width="60%" mold="rounded" lenient="false"/>
|
||||
<datebox id="fecFinal" format="dd/MM/yyyy" width="60%" mold="rounded" lenient="false"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
|
|
@ -32,12 +32,12 @@
|
|||
<rows>
|
||||
<row>
|
||||
<label value="${c:l('busquedaVigenciaTarifaController.lbFecInicio.value')}"/>
|
||||
<datebox id="fecInicio" width="100%" format="dd/MM/yyyy HH:mm" mold="rounded" constraint="no empty" lenient="false"
|
||||
<datebox id="fecInicio" width="100%" format="dd/MM/yyyy" mold="rounded" constraint="no empty" lenient="false"
|
||||
value="@{winEditarVigenciaTarifa$composer.vigenciaTarifa.feciniciovigencia}"/>
|
||||
</row>
|
||||
<row>
|
||||
<label value="${c:l('busquedaVigenciaTarifaController.lbFecFinal.value')}"/>
|
||||
<datebox id="fecFinal" width="100%" format="dd/MM/yyyy HH:mm" mold="rounded" constraint="no empty" lenient="false"
|
||||
<datebox id="fecFinal" width="100%" format="dd/MM/yyyy" mold="rounded" constraint="no empty" lenient="false"
|
||||
value="@{winEditarVigenciaTarifa$composer.vigenciaTarifa.fecfinvigencia}"/>
|
||||
</row>
|
||||
</rows>
|
||||
|
|
Loading…
Reference in New Issue