Room Status y Housekeeping Status en Opera PMS, consulta web Online desde Smartphone

En este blog mostramos el desarrollo de un sistema web responsivo que muestra el estado de las habitaciones de una propiedad, este sistema web es muy importante para la operativa ágil de los supervisores de habitaciones, los supervisores revisan constantemente el estado de las habitaciones en línea desde sus celulares y evitan tener que acercarse a una PC desktop para consultar el reporte de opera sobre el estado de las habitaciones.

Los estados de las habitaciones a considerar son las siguientes:

SELECT ROOM_STATUS_ID,ROOM_STATUS_CODE,ROOM_STATUS_DESC FROM OPERA.ROOM_STATUS_CODES_ALL

ROOM_STATUS_ID ROOM_STATUS_CODE ROOM_STATUS_DESC
1 CL Clean
2 DI Dirty
3 IP Inspected
4 OS Out of Service
5 OO Out of Order

SELECT DISTINCT HK_STATUS FROM OPERA.ROOM

OCC : ocupado

VAC : vacante

SELECT DISTINCT FO_STATUS FROM OPERA.ROOM

OCC : ocupado

VAC : vacante

Utilice el siguiente Query para la visualización del estado actual de las habitaciones de un determinado Piso:

SELECT r.room,r.room_status,r.hk_status,c.label,c.short_description,
CASE WHEN NVL(v.resv_status,’F’)=’CHECKED IN’ THEN ‘CI’ WHEN NVL(v.resv_status,’F’)=’CHECKED OUT’ THEN ‘CO’ ELSE ” END resv_status,
TO_CHAR(v.arrival,’DD/MM’) arrival,
TO_CHAR(v.departure,’DD/MM’) departure,TO_CHAR(v.departure_time) departure_time
,CASE WHEN r.hk_status<>r.fo_status THEN ‘Y’ ELSE ‘N’ END isdiscrepancy
FROM OPERA.ROOM r
INNER JOIN OPERA.ROOM_CATEGORY_TEMPLATE c ON (r.room_category=c.room_category)
LEFT JOIN (
SELECT r.room,MIN(r.resv_status) resv_status,min(r.arrival) arrival,max(r.departure) departure,max(r.departure_time) departure_time
FROM reservation_general_view r
WHERE r.trunc_departure>=pms_p.business_date and r.room is not null
AND r.resv_status IN (‘CHECKED IN’,’CHECKED OUT’)
GROUP BY r.room
) v ON (v.room=r.room)
WHERE SUITE_TYPE<>’PSUEDO’
AND to_number(r.floor)=4–PISO
ORDER BY to_number(r.floor) ASC, to_number(r.room) ASC

Las pantallas del sistema web que consulta el estado de las habitaciones que se visualizan desde un dispositivo smartphone se muestran de la siguiente manera:

Discrepancias:

Las discrepancias se pueden observar en el reporte “Room Discrepancy” de Opera:

en el módulo de PMS ingrese al menú “Miscellaneous”, submenu “Reports”, buscamos el reporte “Room Discrepancy” y hacemos click en “OK”.

 

Se mostrará la pantalla de “Report Parameters”, en esta pantalla seleccione el “Room Status” que desea visualizar.

En la selecciones de “Room Status”, observe los 2 diferentes estados de discrepancia:

“Skip/Sleep Discrepant”: Discrepancias basadas en estado de habitación.

“Persons Discrepant”: Discrepancias basadas en cantidad de huéspedes por habitación.

En este ejemplo seleccionamos la opción “ALL Rooms”, nos mostrará todas las discrepancias de la propiedad.

Observemos que las discrepancias Skip o Sleep se aparecen si el campo FO Estatus es diferente al campo HK Status.

Las discrepancias en los estado de las habitaciones se producen por los siguientes motivos:

Sleep.- 

FO_STATUS Indica VAC (front office registra el check out de huesped)

HK_STATUS indica OCC (hk indica que alguien todavía está en la habitación)

Skip.-

FO_STATUS Indica OCC (huésped deja la habitación sin hacer check out de manera oficial)

HK_STATUS Indica VAC (HK indica que la habitación está vacante)

Para resolver las discrepancias ingresa al menú  de Rooms Management, seleccione el item “Housekeeping”, se mostrará la pantalla Housekeeping con las opciones a realizar. seleccionamos la opcion “Rm. Discrepancies”

En la pantalla “Room Discrepancies”, se puede observar la discrepancia de estados entre los campos  “FO Status” (Front Office Status) y “HK Status” (HouseKeeping Status), para resolver la discrepancia ambos estados deben coincidir.

package com.hotel.spring.controller;

import java.util.LinkedList;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;

import com.hotel.Constante;
import com.hotel.business.MicrosInvoiceBo;
import com.hotel.business.OperaHkBo;
import com.hotel.business.RegistroEventosBo;
import com.hotel.business.RegistroLeadsBo;
import com.hotel.sendmail.SendEmail;
import com.hotel.vo.AsignaUsuario;
import com.hotel.vo.EventoAlo;
import com.hotel.vo.EventoAyB;
import com.hotel.vo.EventoEve;
import com.hotel.vo.EventoMkt;
import com.hotel.vo.EventoOrg;
import com.hotel.vo.EventoSed;
import com.hotel.vo.Eventos;
import com.hotel.vo.HkRoomStatus;
import com.hotel.vo.MicrosCheck;
import com.hotel.vo.MicrosInvoice;
import com.hotel.vo.Usuario;
import com.hotel.vo.Value;

/**
* @author imssbora
*/
@Controller
public class OperaHkController {


@RequestMapping(path={“/consulta-hk”},method=RequestMethod.GET)
@ResponseBody
public ModelAndView consultaHk(Integer floor,Model model,HttpServletRequest request) {
OperaHkBo bo=new OperaHkBo();

List<HkRoomStatus> lista=new LinkedList<>();
if(floor!=null&&floor>0){
lista = bo.listarHkRoomStatus(floor);
}

ModelAndView mv = new ModelAndView(“/hkstatus/consulta-hk-tabla”);

mv.addObject(“lista”,lista);
return mv;
}


@RequestMapping(path={“/consulta-hks”},method=RequestMethod.GET)
@ResponseBody
public ModelAndView consultaHks(Integer status,Model model,HttpServletRequest request) {
OperaHkBo bo=new OperaHkBo();

List<HkRoomStatus> lista=new LinkedList<>();
if(status!=null&&status>0){
if(status==99){
lista = bo.listarHkRoomStatusByDiscrepancy();
}else{
lista = bo.listarHkRoomStatusByStatus(status);
}
}
ModelAndView mv = new ModelAndView(“/hkstatus/consulta-hks-tabla”);
mv.addObject(“lista”,lista);
return mv;
}

}

package com.hotel.business;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

import com.hotel.Constante;
import com.hotel.dao.ConnectionFactoryOpera;
import com.hotel.vo.HkFloors;
import com.hotel.vo.HkRoomStatus;
import com.hotel.vo.HkValueStatus;

public class OperaHkBo {

public List<HkRoomStatus> listarHkRoomStatus(Integer floor){
List<HkRoomStatus> lista = new ArrayList<HkRoomStatus>();

PreparedStatement ps=null;
ResultSet rs=null;
try {
Connection conn = ConnectionFactoryOpera.getInstance().getConnection();

StringBuilder query = new StringBuilder();
query.append(” SELECT r.room,r.room_status,r.hk_status,c.label,c.short_description, “);
query.append(” CASE WHEN NVL(v.resv_status,’F’)=’CHECKED IN’ THEN ‘CI’ WHEN NVL(v.resv_status,’F’)=’CHECKED OUT’ THEN ‘CO’ ELSE ” END resv_status, “);
query.append(” TO_CHAR(v.arrival,’DD/MM’) arrival, “);
query.append(” TO_CHAR(v.departure,’DD/MM’) departure,TO_CHAR(v.departure_time) departure_time “);
query.append(” ,CASE WHEN r.hk_status<>r.fo_status THEN ‘Y’ ELSE ‘N’ END isdiscrepancy “);
query.append(” FROM OPERA.ROOM r “);
query.append(” INNER JOIN OPERA.ROOM_CATEGORY_TEMPLATE c ON (r.room_category=c.room_category) “);
query.append(” LEFT JOIN ( “);
query.append(” select r.room,MIN(r.resv_status) resv_status,min(r.arrival) arrival,max(r.departure) departure,max(r.departure_time) departure_time “);
query.append(” from reservation_general_view_hld r “);
query.append(” where r.trunc_departure>=pms_p.business_date and r.room is not null “);
query.append(” and r.resv_status IN (‘CHECKED IN’,’CHECKED OUT’) “);
query.append(” group by r.room “);
query.append(” ) v ON (v.room=r.room) “);
query.append(” WHERE SUITE_TYPE<>’PSUEDO’ “);
query.append(” AND to_number(r.floor)=? “);
query.append(” ORDER BY to_number(r.floor) ASC, to_number(r.room) ASC “);

ps = conn.prepareStatement(query.toString());
ps.setInt(1, floor);

rs = ps.executeQuery();

while(rs.next()){
HkRoomStatus obj=new HkRoomStatus();
obj.setRoom(rs.getString(“room”));
obj.setRoomStatus(rs.getString(“room_status”));
obj.setHkStatus(rs.getString(“hk_status”));
obj.setRoomType(rs.getString(“label”));
obj.setRoomTypeDescription(rs.getString(“short_description”));
//
obj.setResvStatus(rs.getString(“resv_status”));
obj.setArrival(rs.getString(“arrival”));
obj.setDeparture(rs.getString(“departure”));
obj.setDepartureTime(rs.getString(“departure_time”));
//
obj.setIsDiscrepancy(rs.getString(“isdiscrepancy”).equals(“Y”)?Boolean.TRUE:Boolean.FALSE);
obj.setStatusDiscrepancy(Constante.STATUS_DISCREPANCY_N);

lista.add(obj);
}

} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
if (ps != null) {try {ps.close();} catch (SQLException e) {e.printStackTrace();}}
if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}
}

return lista;
}


public List<HkFloors> listarHkFloors(){
List<HkFloors> lista = new ArrayList<HkFloors>();
PreparedStatement ps=null;
ResultSet rs=null;

try {
Connection conn = ConnectionFactoryOpera.getInstance().getConnection();

StringBuilder query = new StringBuilder();
query.append(” SELECT TO_NUMBER(r.floor) id,LPAD(r.floor,2,’0′) floor, “);
query.append(” SUM(CASE WHEN r.hk_status=’OCC’ THEN 1 ELSE 0 END) CANTIDAD_OCC, “);
query.append(” SUM(CASE WHEN r.hk_status=’VAC’ THEN 1 ELSE 0 END) CANTIDAD_VAC, “);
query.append(” SUM(CASE WHEN r.hk_status<>r.fo_status THEN 1 ELSE 0 END) CANTIDAD_DISC, “);
query.append(” SUM(CASE WHEN r.room_status=’IP’ THEN 1 ELSE 0 END) CANTIDAD_IP, “);
query.append(” SUM(CASE WHEN r.room_status=’DI’ THEN 1 ELSE 0 END) CANTIDAD_DI, “);
query.append(” SUM(CASE WHEN r.room_status=’CL’ THEN 1 ELSE 0 END) CANTIDAD_CL, “);
query.append(” SUM(CASE WHEN r.room_status=’OO’ THEN 1 ELSE 0 END) CANTIDAD_OO, “);
query.append(” SUM(CASE WHEN r.room_status=’OS’ THEN 1 ELSE 0 END) CANTIDAD_OS “);
query.append(” FROM OPERA.ROOM r “);
query.append(” WHERE r.SUITE_TYPE<>’PSUEDO’ “);
query.append(” GROUP BY TO_NUMBER(r.floor),LPAD(r.floor,2,’0′) “);
query.append(” ORDER BY ID ASC “);

ps = conn.prepareStatement(query.toString());

rs = ps.executeQuery();

while(rs.next()){
HkFloors obj=new HkFloors();
obj.setId(rs.getInt(“id”));
obj.setCodigo(rs.getString(“floor”));
obj.setCantidadOcc(rs.getInt(“CANTIDAD_OCC”));
obj.setCantidadVac(rs.getInt(“CANTIDAD_VAC”));
obj.setCantidadDisc(rs.getInt(“CANTIDAD_DISC”));

obj.setCantidadIp(rs.getInt(“CANTIDAD_IP”));
obj.setCantidadDi(rs.getInt(“CANTIDAD_DI”));
obj.setCantidadCl(rs.getInt(“CANTIDAD_CL”));
obj.setCantidadOo(rs.getInt(“CANTIDAD_OO”));
obj.setCantidadOs(rs.getInt(“CANTIDAD_OS”));
lista.add(obj);
}

} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
if (ps != null) {try {ps.close();} catch (SQLException e) {e.printStackTrace();}}
if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}
}

return lista;
}


public List<HkValueStatus> listarHkRoomStatus(){
List<HkValueStatus> lista = new ArrayList<HkValueStatus>();
PreparedStatement ps=null;
ResultSet rs=null;

try {
Connection conn = ConnectionFactoryOpera.getInstance().getConnection();

StringBuilder query = new StringBuilder();
query.append(” SELECT s.ROOM_STATUS_ID,s.ROOM_STATUS_CODE,s.ROOM_STATUS_DESC, t.cantidad,T.CANTIDAD_OCC,T.CANTIDAD_VAC,T.CANTIDAD_DISC “);
query.append(” FROM OPERA.ROOM_STATUS_CODES_ALL s “);
query.append(” INNER JOIN ( “);
query.append(” SELECT r.room_status, COUNT(1) CANTIDAD, “);
query.append(” SUM(CASE WHEN r.hk_status=’OCC’ THEN 1 ELSE 0 END) CANTIDAD_OCC, “);
query.append(” SUM(CASE WHEN r.hk_status=’VAC’ THEN 1 ELSE 0 END) CANTIDAD_VAC, “);
query.append(” SUM(CASE WHEN r.hk_status<>r.fo_status THEN 1 ELSE 0 END) CANTIDAD_DISC “);
query.append(” FROM OPERA.ROOM r “);
query.append(” WHERE r.SUITE_TYPE<>’PSUEDO’ “);
query.append(” GROUP BY r.room_status “);
query.append(” )t ON (t.room_status=s.ROOM_STATUS_CODE) “);
query.append(” ORDER BY s.ROOM_STATUS_ID ASC “);

ps = conn.prepareStatement(query.toString());

rs = ps.executeQuery();

while(rs.next()){
HkValueStatus obj=new HkValueStatus();
obj.setId(rs.getInt(“ROOM_STATUS_ID”));
obj.setCodigo(rs.getString(“ROOM_STATUS_CODE”));
obj.setDenominacion(rs.getString(“ROOM_STATUS_DESC”));
obj.setCantidad(rs.getInt(“cantidad”));
//
obj.setCantidadOcc(rs.getInt(“CANTIDAD_OCC”));
obj.setCantidadVac(rs.getInt(“CANTIDAD_VAC”));
obj.setCantidadDisc(rs.getInt(“CANTIDAD_DISC”));
lista.add(obj);
}

} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
if (ps != null) {try {ps.close();} catch (SQLException e) {e.printStackTrace();}}
if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}
}

return lista;
}

public List<HkValueStatus> listarHkRoomDiscrepancy(){
List<HkValueStatus> lista = new ArrayList<HkValueStatus>();
PreparedStatement ps=null;
ResultSet rs=null;

try {
Connection conn = ConnectionFactoryOpera.getInstance().getConnection();

StringBuilder query = new StringBuilder();
query.append(” SELECT 99 ROOM_STATUS_ID,’DISC’ room_status_code,’Discrepancy’ room_status_desc, COUNT(1) CANTIDAD, “);
query.append(” SUM(CASE WHEN r.hk_status=’OCC’ THEN 1 ELSE 0 END) CANTIDAD_OCC, “);
query.append(” SUM(CASE WHEN r.hk_status=’VAC’ THEN 1 ELSE 0 END) CANTIDAD_VAC, “);
query.append(” SUM(CASE WHEN r.hk_status<>r.room_status THEN 1 ELSE 0 END) CANTIDAD_DISC “);
query.append(” FROM OPERA.ROOM r “);
query.append(” WHERE r.SUITE_TYPE<>’PSUEDO’ and r.hk_status<>r.fo_status “);
query.append(” HAVING COUNT(1)>0 “);

ps = conn.prepareStatement(query.toString());

rs = ps.executeQuery();

while(rs.next()){
HkValueStatus obj=new HkValueStatus();
obj.setId(rs.getInt(“ROOM_STATUS_ID”));
obj.setCodigo(rs.getString(“ROOM_STATUS_CODE”));
obj.setDenominacion(rs.getString(“ROOM_STATUS_DESC”));
obj.setCantidad(rs.getInt(“cantidad”));
//
obj.setCantidadOcc(rs.getInt(“CANTIDAD_OCC”));
obj.setCantidadVac(rs.getInt(“CANTIDAD_VAC”));
obj.setCantidadDisc(rs.getInt(“CANTIDAD_DISC”));
lista.add(obj);
}

} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
if (ps != null) {try {ps.close();} catch (SQLException e) {e.printStackTrace();}}
if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}
}

return lista;
}

public List<HkRoomStatus> listarHkRoomStatusByStatus(Integer status){
List<HkRoomStatus> lista = new ArrayList<HkRoomStatus>();

PreparedStatement ps=null;
ResultSet rs=null;

try {
Connection conn = ConnectionFactoryOpera.getInstance().getConnection();

StringBuilder query = new StringBuilder();
query.append(” SELECT r.room,r.room_status,r.hk_status,c.label,c.short_description, “);
query.append(” CASE WHEN NVL(v.resv_status,’F’)=’CHECKED IN’ THEN ‘CI’ WHEN NVL(v.resv_status,’F’)=’CHECKED OUT’ THEN ‘CO’ ELSE ” END resv_status, “);
query.append(” TO_CHAR(v.arrival,’DD/MM’) arrival, “);
query.append(” TO_CHAR(v.departure,’DD/MM’) departure,TO_CHAR(v.departure_time) departure_time “);
query.append(” ,CASE WHEN r.hk_status<>r.fo_status THEN ‘Y’ ELSE ‘N’ END isdiscrepancy “);
query.append(” FROM OPERA.ROOM r “);
query.append(” INNER JOIN OPERA.ROOM_CATEGORY_TEMPLATE c ON (r.room_category=c.room_category) “);
query.append(” LEFT JOIN ( “);
query.append(” select r.room,MIN(r.resv_status) resv_status,min(r.arrival) arrival,max(r.departure) departure,max(r.departure_time) departure_time “);
query.append(” from reservation_general_view_hld r “);
query.append(” where r.trunc_departure>=pms_p.business_date and r.room is not null “);
query.append(” and r.resv_status IN (‘CHECKED IN’,’CHECKED OUT’) “);
query.append(” group by r.room “);
query.append(” ) v ON (v.room=r.room) “);
query.append(” WHERE SUITE_TYPE<>’PSUEDO’ “);
query.append(” AND r.room_status=? “);
query.append(” ORDER BY to_number(r.floor) ASC, to_number(r.room) ASC “);

ps = conn.prepareStatement(query.toString());

if(status==1){//CL Clean
ps.setString(1, “CL”);

}else if(status==2){//DI Dirty
ps.setString(1, “DI”);

}else if(status==3){//IP Inspected
ps.setString(1, “IP”);

}else if(status==4){//OS Out of Service
ps.setString(1, “OS”);

}else if(status==5){//OO Out of Order
ps.setString(1, “OO”);
}

rs = ps.executeQuery();

while(rs.next()){
HkRoomStatus obj=new HkRoomStatus();
obj.setRoom(rs.getString(“room”));
obj.setRoomStatus(rs.getString(“room_status”));
obj.setHkStatus(rs.getString(“hk_status”));
obj.setRoomType(rs.getString(“label”));
obj.setRoomTypeDescription(rs.getString(“short_description”));
//
obj.setResvStatus(rs.getString(“resv_status”));
obj.setArrival(rs.getString(“arrival”));
obj.setDeparture(rs.getString(“departure”));
obj.setDepartureTime(rs.getString(“departure_time”));
//
obj.setIsDiscrepancy(rs.getString(“isdiscrepancy”).equals(“Y”)?Boolean.TRUE:Boolean.FALSE);
obj.setStatusDiscrepancy(Constante.STATUS_DISCREPANCY_N);
lista.add(obj);
}

} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
if (ps != null) {try {ps.close();} catch (SQLException e) {e.printStackTrace();}}
if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}
}

return lista;
}

public List<HkRoomStatus> listarHkRoomStatusByDiscrepancy(){
List<HkRoomStatus> lista = new ArrayList<HkRoomStatus>();
PreparedStatement ps=null;
ResultSet rs=null;
try {
Connection conn = ConnectionFactoryOpera.getInstance().getConnection();

StringBuilder query = new StringBuilder();
query.append(” SELECT r.room,r.room_status,r.hk_status,c.label,c.short_description, “);
query.append(” CASE WHEN NVL(v.resv_status,’F’)=’CHECKED IN’ THEN ‘CI’ WHEN NVL(v.resv_status,’F’)=’CHECKED OUT’ THEN ‘CO’ ELSE ” END resv_status, “);
query.append(” TO_CHAR(v.arrival,’DD/MM’) arrival, “);
query.append(” TO_CHAR(v.departure,’DD/MM’) departure,TO_CHAR(v.departure_time) departure_time “);
query.append(” ,CASE WHEN r.hk_status<>r.fo_status THEN ‘Y’ ELSE ‘N’ END isdiscrepancy “);
query.append(” FROM OPERA.ROOM r “);
query.append(” INNER JOIN OPERA.ROOM_CATEGORY_TEMPLATE c ON (r.room_category=c.room_category) “);
query.append(” LEFT JOIN ( “);
query.append(” select r.room,MIN(r.resv_status) resv_status,min(r.arrival) arrival,max(r.departure) departure,max(r.departure_time) departure_time “);
query.append(” from reservation_general_view_hld r “);
query.append(” where r.trunc_departure>=pms_p.business_date and r.room is not null “);
query.append(” and r.resv_status IN (‘CHECKED IN’,’CHECKED OUT’) “);
query.append(” group by r.room “);
query.append(” ) v ON (v.room=r.room) “);
query.append(” WHERE SUITE_TYPE<>’PSUEDO’ “);
query.append(” AND r.fo_status<>r.hk_status “);
query.append(” ORDER BY to_number(r.floor) ASC, to_number(r.room) ASC “);

ps = conn.prepareStatement(query.toString());
rs = ps.executeQuery();

while(rs.next()){
HkRoomStatus obj=new HkRoomStatus();
obj.setRoom(rs.getString(“room”));
obj.setRoomStatus(rs.getString(“room_status”));
obj.setHkStatus(rs.getString(“hk_status”));
obj.setRoomType(rs.getString(“label”));
obj.setRoomTypeDescription(rs.getString(“short_description”));
//
obj.setResvStatus(rs.getString(“resv_status”));
obj.setArrival(rs.getString(“arrival”));
obj.setDeparture(rs.getString(“departure”));
obj.setDepartureTime(rs.getString(“departure_time”));
//
obj.setIsDiscrepancy(rs.getString(“isdiscrepancy”).equals(“Y”)?Boolean.TRUE:Boolean.FALSE);
obj.setStatusDiscrepancy(Constante.STATUS_DISCREPANCY_Y);
lista.add(obj);
}

} catch (SQLException e) {
throw new RuntimeException(e);
} finally {
if (ps != null) {try {ps.close();} catch (SQLException e) {e.printStackTrace();}}
if (rs != null) {try {rs.close();} catch (SQLException e) {e.printStackTrace();}}
}

return lista;
}



}

<%@ page language=”java” contentType=”text/html; charset=ISO-8859-1″
pageEncoding=”ISO-8859-1″%>
<%@ include file=”/common/taglibs.jsp”%>

<!DOCTYPE html>
<html lang=”en”>
<head>
<link id=”contextPathHolder” data-contextPath=”${pageContext.request.contextPath}”/>
<meta http-equiv=”X-UA-Compatible” content=”IE=edge”>

<meta charset=”utf-8″>
<meta name=”viewport” content=”width=device-width, initial-scale=1″ />
<meta name=”description” content=”” />
<meta name=”author” content=”” />

<link rel=”icon” href=”<c:url value=”/resources/assets/images/favicon.ico”/>”>

<title></title>

<link rel=”stylesheet” href=”<c:url value=”/resources/assets/js/jquery-ui/css/no-theme/jquery-ui-1.10.3.custom.min.css”/>”>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/css/font-icons/entypo/css/entypo.css”/>”>
<link rel=”stylesheet” href=”//fonts.googleapis.com/css?family=Noto+Sans:400,700,400italic”>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/css/bootstrap.css”/>”>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/css/neon-core.css”/>”>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/css/neon-theme.css”/>”>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/css/neon-forms.css”/>”>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/css/custom.css”/>”>

<script src=”./resources/assets/js/jquery-1.11.3.min.js”></script>

<script type=”text/javascript” src=”<c:url value=”/resources/js/fn_login.js” />”></script>

<style>

.panel-brown > .panel-heading {
background-color: #c97f7f;
}

.label-brown {
background-color: #A52A2A;
}

</style>

</head>

<body>

<div class=”container”>
<div class=”panel-group” id=”accordion”>

<div class=”panel panel-info”>

<div class=”panel-heading clearfix”>
<h4 class=”panel-title pull-left” style=”padding-top: 7.5px;”><b>HK by Status</b></h4>
<div class=”btn-group pull-right”>

<a href=”<c:url value=”/hk”/>” class=”btn btn-success btn-sm”><i class=”entypo-layout”></i> By Floors</a>

<a href=”<c:url value=”/hks”/>” class=”btn btn-info btn-sm”><i class=”entypo-menu”></i> By Status</a>

</div>
</div>

</div>

<c:forEach items=”${lista}” var=”o” varStatus=”i” >
<div class=”panel ${o.panelColor}”>
<div class=”panel-heading ” onclick=”collapseRoomStatus(${o.id})” role=”button” data-toggle=”collapse” data-parent=”#accordion” data-target=”#rooms${o.id}” aria-expanded=”false” aria-controls=”rooms${o.id}” >
<div class=”panel-title”>

<i class=”entypo-down-open”></i>${o.codigo} (${o.cantidad} at ${o.denominacion})&nbsp;::&nbsp;OCC:${o.cantidadOcc}&nbsp;&nbsp;VAC:${o.cantidadVac}&nbsp;&nbsp;DISC:${o.cantidadDisc}
</div>
</div>
<div id=”rooms${o.id}” class=”panel-collapse collapse” >
<div class=”row”>
<div id=”subViewDiv${o.id}”></div>
</div>
</div>
</div>
</c:forEach>

<c:forEach items=”${listaDisc}” var=”o” varStatus=”i” >
<div class=”panel panel-dark”>
<div class=”panel-heading ” onclick=”collapseRoomStatus(${o.id})” role=”button” data-toggle=”collapse” data-parent=”#accordion” data-target=”#rooms${o.id}” aria-expanded=”false” aria-controls=”rooms${o.id}” >
<div class=”panel-title”>
<i class=”entypo-down-open”></i>${o.codigo} (${o.cantidad} at ${o.denominacion})&nbsp;::&nbsp;OCC:${o.cantidadOcc}&nbsp;&nbsp;VAC:${o.cantidadVac}&nbsp;&nbsp;DISC:${o.cantidadDisc}
</div>
</div>
<div id=”rooms${o.id}” class=”panel-collapse collapse” >
<div class=”row”>
<div id=”subViewDiv${o.id}”></div>
</div>
</div>
</div>
</c:forEach>

</div>
</div>

<script>
var baseURL=$(‘#contextPathHolder’).attr(‘data-contextPath’);

function collapseRoomStatus(id){
$.ajax({
url : baseURL + “/consulta-hks”,
data : {
status:id
},
async:false,
type : “get”,
success : function(response) {
if(id==1){
$(“#subViewDiv1”).html(response)
}else if(id==2){
$(“#subViewDiv2”).html(response)
}else if(id==3){
$(“#subViewDiv3”).html(response)
}else if(id==4){
$(“#subViewDiv4”).html(response)
}else if(id==5){
$(“#subViewDiv5”).html(response)
}else if(id==99){
$(“#subViewDiv99”).html(response)
}

}
});
}

</script>

<!– Imported styles on this page –>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/js/jvectormap/jquery-jvectormap-1.2.2.css” />”>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/js/rickshaw/rickshaw.min.css” />”>
<link rel=”stylesheet” href=”<c:url value=”/resources/assets/css/font-icons/font-awesome/css/font-awesome.min.css” />”>

<!– Bottom scripts (common) –>
<script src=”<c:url value=”/resources/assets/js/gsap/TweenMax.min.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/jquery-ui/js/jquery-ui-1.10.3.minimal.min.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/bootstrap.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/joinable.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/resizeable.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/neon-api.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/jvectormap/jquery-jvectormap-1.2.2.min.js” />”></script>


<!– Imported scripts on this page –>
<script src=”<c:url value=”/resources/assets/js/jvectormap/jquery-jvectormap-europe-merc-en.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/jquery.sparkline.min.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/rickshaw/vendor/d3.v3.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/rickshaw/rickshaw.min.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/raphael-min.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/morris.min.js” />”></script>
<script src=”<c:url value=”/resources/assets/js/toastr.js” />”></script>


<!– JavaScripts initializations and stuff –>
<script src=”<c:url value=”/resources/assets/js/neon-custom.js” />”></script>


<!– Demo Settings –>
<script src=”<c:url value=”/resources/assets/js/neon-demo.js” />”></script>

</body>
</html>

<%@page contentType=”text/html; charset=UTF-8″ pageEncoding=”UTF-8″ %>
<%@ include file=”/common/taglibs.jsp”%>

<!DOCTYPE html>
<html lang=”en”>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=UTF-8″>
</head>

<body>
<table class=”table table-bordered table-responsive”>
<tbody>
<c:forEach items=”${lista}” var=”o” varStatus=”i” >
<tr>
<td>
<c:if test=”${o.isDiscrepancy}”>
<span class=”label label-danger”>
<i class=”entypo-block”></i>
</span>
</c:if>
<span class=”label ${o.labelRoomStatus}”>
<b>
${o.room} ${o.roomType} – ${o.roomStatus}
</b>
</span>

<c:set var=”hkStatus” value=”${o.hkStatus}”/>
<c:set var=”hkStatus_OCC” value=”OCC”/>
<c:set var=”hkStatus_VAC” value=”VAC”/>

<c:set var=”roomStatus” value=”${o.roomStatus}”/>
<c:set var=”roomStatus_IP” value=”IP”/>


<span class=”label label-default”>
${o.hkStatus}
<c:if test=”${hkStatus == hkStatus_OCC}”>
<i class=”entypo-users”></i>
</c:if>
<c:if test=”${hkStatus == hkStatus_VAC}”>
<i class=”entypo-light-down”></i>
</c:if>
</span>

<c:if test=”${hkStatus==hkStatus_OCC}”>
<c:if test=”${!(empty o.resvStatus)}”>
CI ${o.arrival} – CO ${o.departure} ${o.departureTime}
</c:if>
<c:if test=”${(empty o.resvStatus)}”>
&nbsp;
</c:if>
</c:if>
<c:if test=”${(hkStatus==hkStatus_VAC)}”>
&nbsp;
</c:if>
</td>
</tr>
</c:forEach>

</tbody>

</table>

</body>

</html>