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;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.VigenciaTarifa;
|
import java.util.Date;
|
||||||
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.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.stereotype.Controller;
|
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.Datebox;
|
||||||
import org.zkoss.zul.Paging;
|
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
|
* @author rodrigo
|
||||||
|
@ -116,8 +119,20 @@ public class BusquedaVigenciaTarifaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void refreshLista() {
|
private void refreshLista() {
|
||||||
HibernateSearchObject<VigenciaTarifa> vigenciaTarifaBusqueda =
|
Date inicio = fecInicio.getValue();
|
||||||
new HibernateSearchObject<VigenciaTarifa>(VigenciaTarifa.class, pagingVigencia.getPageSize());
|
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.addFilterEqual("activo", Boolean.TRUE);
|
||||||
|
|
||||||
vigenciaTarifaBusqueda.addFilterGreaterOrEqual("feciniciovigencia", fecInicio.getValue());
|
vigenciaTarifaBusqueda.addFilterGreaterOrEqual("feciniciovigencia", fecInicio.getValue());
|
||||||
|
|
|
@ -4,15 +4,10 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.tarifas;
|
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.Calendar;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Scope;
|
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.Button;
|
||||||
import org.zkoss.zul.Datebox;
|
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
|
* @author rodrigo
|
||||||
|
@ -108,18 +111,17 @@ public class EditarVigenciaTarifaController extends MyGenericForwardComposer {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
public void onClick$btnSalvar(Event ev) throws InterruptedException {
|
||||||
fecInicio.getValue();
|
Date inicio = fecInicio.getValue();
|
||||||
fecFinal.getValue();
|
Date fim = fecFinal.getValue();
|
||||||
//fecVenta.getValue();
|
|
||||||
|
|
||||||
java.util.Date inicio = vigenciaTarifa.getFeciniciovigencia();
|
|
||||||
java.util.Date fim = vigenciaTarifa.getFecfinvigencia();
|
|
||||||
|
|
||||||
inicio.setSeconds(0);
|
inicio.setSeconds(0);
|
||||||
|
inicio.setMinutes(0);
|
||||||
|
inicio.setHours(0);
|
||||||
fim.setSeconds(0);
|
fim.setSeconds(0);
|
||||||
|
fim.setMinutes(59);
|
||||||
|
fim.setHours(23);
|
||||||
|
|
||||||
List<VigenciaTarifa> lsVT1 =
|
List<VigenciaTarifa> lsVT1 = vigenciaTarifaService.buscarVigenciasIntervalo(vigenciaTarifa);
|
||||||
vigenciaTarifaService.buscarVigenciasIntervalo(vigenciaTarifa);
|
|
||||||
|
|
||||||
// checando se o fim da vigencia eh menor que o inicio:
|
// checando se o fim da vigencia eh menor que o inicio:
|
||||||
if (!fim.before(inicio)) {
|
if (!fim.before(inicio)) {
|
||||||
|
@ -168,7 +170,6 @@ public class EditarVigenciaTarifaController extends MyGenericForwardComposer {
|
||||||
closeWindow();
|
closeWindow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(
|
Messagebox.show(
|
||||||
Labels.getLabel("editarVigenciaTarifaController.MSG.conflitoVigencias"),
|
Labels.getLabel("editarVigenciaTarifaController.MSG.conflitoVigencias"),
|
||||||
|
@ -188,7 +189,6 @@ public class EditarVigenciaTarifaController extends MyGenericForwardComposer {
|
||||||
vigenciaTarifa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
vigenciaTarifa.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
vigenciaTarifa.setActivo(Boolean.FALSE);
|
vigenciaTarifa.setActivo(Boolean.FALSE);
|
||||||
|
|
||||||
|
|
||||||
int opcao = Messagebox.show(
|
int opcao = Messagebox.show(
|
||||||
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.Deseja.Borrar"),
|
Labels.getLabel("editarVigenciaTarifaController.btnFechar.MSG.Deseja.Borrar"),
|
||||||
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
Labels.getLabel("editarVigenciaTarifaController.window.title"),
|
||||||
|
|
|
@ -27,11 +27,11 @@
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaVigenciaTarifaController.lbFecInicio.value')}"/>
|
<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>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaVigenciaTarifaController.lbFecFinal.value')}"/>
|
<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>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
</grid>
|
</grid>
|
||||||
|
|
|
@ -32,12 +32,12 @@
|
||||||
<rows>
|
<rows>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaVigenciaTarifaController.lbFecInicio.value')}"/>
|
<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}"/>
|
value="@{winEditarVigenciaTarifa$composer.vigenciaTarifa.feciniciovigencia}"/>
|
||||||
</row>
|
</row>
|
||||||
<row>
|
<row>
|
||||||
<label value="${c:l('busquedaVigenciaTarifaController.lbFecFinal.value')}"/>
|
<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}"/>
|
value="@{winEditarVigenciaTarifa$composer.vigenciaTarifa.fecfinvigencia}"/>
|
||||||
</row>
|
</row>
|
||||||
</rows>
|
</rows>
|
||||||
|
|
Loading…
Reference in New Issue