Gravação de Data/Hora de Reserva na ADM (fixed bug #5354)
git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@35759 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
46fd4d3a44
commit
e32ac4b9fd
|
@ -4,14 +4,10 @@
|
||||||
*/
|
*/
|
||||||
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
|
package com.rjconsultores.ventaboletos.web.gui.controladores.configuracioneccomerciales;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.entidad.ReservacionCtrl;
|
import java.util.Date;
|
||||||
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.RenderConfiguracionReservacion;
|
|
||||||
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;
|
||||||
|
@ -23,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.ReservacionCtrl;
|
||||||
|
import com.rjconsultores.ventaboletos.utilerias.DateUtil;
|
||||||
|
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.RenderConfiguracionReservacion;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Rafius
|
* @author Rafius
|
||||||
|
@ -31,6 +35,7 @@ import org.zkoss.zul.Paging;
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class BusquedaConfiguracionReservacionController extends MyGenericForwardComposer {
|
public class BusquedaConfiguracionReservacionController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
private transient PagedListWrapper<ReservacionCtrl> plwReservacionCtrl;
|
private transient PagedListWrapper<ReservacionCtrl> plwReservacionCtrl;
|
||||||
private MyListbox reservacionCtrlList;
|
private MyListbox reservacionCtrlList;
|
||||||
|
@ -121,8 +126,13 @@ public class BusquedaConfiguracionReservacionController extends MyGenericForward
|
||||||
new HibernateSearchObject<ReservacionCtrl>(ReservacionCtrl.class, pagingReservacionCtrl.getPageSize());
|
new HibernateSearchObject<ReservacionCtrl>(ReservacionCtrl.class, pagingReservacionCtrl.getPageSize());
|
||||||
|
|
||||||
if (fecInicio.getValue() != null && fecFinal.getValue() != null) {
|
if (fecInicio.getValue() != null && fecFinal.getValue() != null) {
|
||||||
claseServicioBusqueda.addFilterGreaterOrEqual("fecinicio", fecInicio.getValue());
|
|
||||||
claseServicioBusqueda.addFilterLessOrEqual("fecfinal", fecFinal.getValue());
|
Date inicio = DateUtil.inicioFecha(fecInicio.getValue());
|
||||||
|
Date fin = DateUtil.fimFecha(fecFinal.getValue());
|
||||||
|
|
||||||
|
claseServicioBusqueda.addFilterGreaterOrEqual("fecinicio", inicio);
|
||||||
|
claseServicioBusqueda.addFilterLessOrEqual("fecfinal", fin);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Messagebox.show(Labels.getLabel("busquedaConfiguracionReservacionController.periodo.label"),
|
Messagebox.show(Labels.getLabel("busquedaConfiguracionReservacionController.periodo.label"),
|
||||||
Labels.getLabel("busquedaConfiguracionReservacionController.window.title"),
|
Labels.getLabel("busquedaConfiguracionReservacionController.window.title"),
|
||||||
|
|
|
@ -62,6 +62,7 @@ import com.rjconsultores.ventaboletos.web.utilerias.render.RenderConfiguracionRe
|
||||||
@Scope("prototype")
|
@Scope("prototype")
|
||||||
public class EditarConfiguracionReservacionController extends MyGenericForwardComposer {
|
public class EditarConfiguracionReservacionController extends MyGenericForwardComposer {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ReservacionCtrlService reservacionCtrlService;
|
private ReservacionCtrlService reservacionCtrlService;
|
||||||
@Autowired
|
@Autowired
|
||||||
|
@ -199,7 +200,6 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
||||||
String[] horaMinuto = new String[2];
|
String[] horaMinuto = new String[2];
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
c.setTime(data);
|
c.setTime(data);
|
||||||
System.out.println(DateUtil.getFecInicio().getTime() + " " + c.getTime());
|
|
||||||
Long tempo = DateUtil.getElapsedMinutos(DateUtil.getFecInicio().getTime(), c.getTime());
|
Long tempo = DateUtil.getElapsedMinutos(DateUtil.getFecInicio().getTime(), c.getTime());
|
||||||
long minutos = (tempo % 60);
|
long minutos = (tempo % 60);
|
||||||
Integer horas = (tempo.intValue() / 60);
|
Integer horas = (tempo.intValue() / 60);
|
||||||
|
@ -541,7 +541,6 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
||||||
|
|
||||||
NumAsientosCorrida.getValue();
|
NumAsientosCorrida.getValue();
|
||||||
|
|
||||||
|
|
||||||
if (fecInicio.getValue().after(fecFinal.getValue())) {
|
if (fecInicio.getValue().after(fecFinal.getValue())) {
|
||||||
Messagebox.show(Labels.getLabel("editarPeriodoVacacionalController.MSG.busquedaPeriodo"),
|
Messagebox.show(Labels.getLabel("editarPeriodoVacacionalController.MSG.busquedaPeriodo"),
|
||||||
Labels.getLabel("editarConfiguracionReservacionController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
Labels.getLabel("editarConfiguracionReservacionController.window.title"), Messagebox.OK, Messagebox.INFORMATION);
|
||||||
|
@ -626,6 +625,11 @@ public class EditarConfiguracionReservacionController extends MyGenericForwardCo
|
||||||
reservacionCtrl.setFecmodif(Calendar.getInstance().getTime());
|
reservacionCtrl.setFecmodif(Calendar.getInstance().getTime());
|
||||||
reservacionCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
reservacionCtrl.setUsuarioId(UsuarioLogado.getUsuarioLogado().getUsuarioId());
|
||||||
|
|
||||||
|
Date inicio = DateUtil.inicioFecha(fecInicio.getValue());
|
||||||
|
Date fin = DateUtil.fimFecha(fecFinal.getValue());
|
||||||
|
reservacionCtrl.setFecinicio(inicio);
|
||||||
|
reservacionCtrl.setFecfinal(fin);
|
||||||
|
|
||||||
reservacionCtrl.setTiempoliberacion(spTiempoLiberacionHora.getValue(), spTiempoLiberacionMinuto.getValue());
|
reservacionCtrl.setTiempoliberacion(spTiempoLiberacionHora.getValue(), spTiempoLiberacionMinuto.getValue());
|
||||||
reservacionCtrl.setTiempoliberacioninternet(spTiempoLiberacionInternetHora.getValue(), spTiempoLiberacionInternetMinuto.getValue());
|
reservacionCtrl.setTiempoliberacioninternet(spTiempoLiberacionInternetHora.getValue(), spTiempoLiberacionInternetMinuto.getValue());
|
||||||
reservacionCtrl.setTiempoprevio(spTiempoPrevioHora.getValue(), spTiempoPrevioMinuto.getValue());
|
reservacionCtrl.setTiempoprevio(spTiempoPrevioHora.getValue(), spTiempoPrevioMinuto.getValue());
|
||||||
|
|
|
@ -74,7 +74,6 @@ public class RenderConfiguracionReservacion implements ListitemRenderer {
|
||||||
String[] horaMinuto = new String[2];
|
String[] horaMinuto = new String[2];
|
||||||
Calendar c = Calendar.getInstance();
|
Calendar c = Calendar.getInstance();
|
||||||
c.setTime(data);
|
c.setTime(data);
|
||||||
System.out.println(DateUtil.getFecInicio().getTime() + " " + c.getTime());
|
|
||||||
Long tempo = DateUtil.getElapsedMinutos(DateUtil.getFecInicio().getTime(), c.getTime());
|
Long tempo = DateUtil.getElapsedMinutos(DateUtil.getFecInicio().getTime(), c.getTime());
|
||||||
long minutos = (tempo % 60);
|
long minutos = (tempo % 60);
|
||||||
Integer horas = (tempo.intValue() / 60);
|
Integer horas = (tempo.intValue() / 60);
|
||||||
|
|
Loading…
Reference in New Issue