Sindbad~EG File Manager
�
�
�ep � � � d dl mZ d dl mZmZmZ d dlmZmZmZm Z m
Z
d dlmZm
Z
d dlmZ eej d ddd� � � Z G d
� d� � ZdS )
� )�session)�request� Blueprint�jsonify)�
create_engine�select�MetaData�Table�text)�and_�or_)�app�DATABASE_URITi )�
pool_pre_ping�pool_recycle�futurec �b � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zd
� Zd� ZdS )�AttendanceModelc � � t � � | _ t d| j t �� � | _ d S # t
$ r}t
|� � Y d }~d S d }~ww xY w)N�session_attendance_log)�
autoload_with)r �metar
�enginer � Exception�print)�self�es �i/home/numerotech/public_html/conference.numerotech.com/food_kit_scan_badges/core/model/AttendanceModel.py�__init__zAttendanceModel.__init__ si � ���z�z�4�9�"'�(@���Z`�"a�"a�"a�4����� � � � ���8�8�8�8�8�8�8�8�8��������s �48 �
A�A�Ac �f � t � � � 5 }t dt |� � z dz |z dz |z dz � � }|� |� � � � � }|rt
|j � � nd }|r|cd d d � � S d d d � � d S # 1 swxY w Y d S )Nz)select * from conference where conf_id =z and conf_key ='�' and 'z' <= conf_end_time ;)r �connectr �str�execute�first�dict�_mapping)r �conf_id�conf_key�
current_dt�conn�stmt�result�resultss r �getConf_open_closedz#AttendanceModel.getConf_open_closed s% � �
�~�~��� �4�
�9�#�g�,�,�F�GY�Y�Zb�b�cl�l�mw�w� yO� O�
P�
P�4��L�L����$�$�&�&�6�&,�
6�T�&�/�
"�
"�
"�$�7�
� ��
� � � � � � � � �� � � � � � � � � � � ���� � � � � � s �A1B&�B&�&B*�-B*c �d � t � � � 5 }t dt |� � z dz t |� � z dz � � }|� |� � � � � }|rd� |D � � nd }|r|cd d d � � S d d d � � d S # 1 swxY w Y d S )Nz$SELECT distinct(display_dt),dt from � where conf_id=z order by dt ascc �6 � g | ]}t |j � � ��S � �r&