3
ַ['                 @   sx   d dl mZ d dlmZ d dlmZ d dlmZ d dlm	Z	 d dl
mZ d dljZd dlmZ ejZG d	d
 d
eZdS )    )BlogPostManager)CampusManager)CandidateQueueManager)UserPermissionManager)CandidateAlarmManager)HandlerN)UserPermissionc               @   s   e Zd ZdZdZdd ZdS )IndexGET/c             C   s   | j   | jtj| jtddd| j_| jtj| jtddd| j_| jtj| jtddd| j_	| jtj| jtddd| j_
| jtj | j_t }d |_d|_| jtj }| jjdtjd	| jtj  d
 }| jd|||| jtj dS )N	CandidateView)Group
PermissionExport	ViewQueueServiceAppointmentFa  
			SELECT Candidate.Id AS Id,
				   Candidate.student_name,
				   CandidateAppointment.AppointmentDateTime,
				   Campus.name AS campusName
			FROM Candidate
				 INNER JOIN CandidateAppointment
				   ON CandidateAppointment.CandidateId = Candidate.Id
				 LEFT OUTER JOIN Campus
			       ON Candidate.CampusId = Campus.id
			WHERE DATE(CandidateAppointment.AppointmentDateTime)
					= DATE(NOW()) AND
				  CandidateAppointment.UserId IS NULL AND zCandidate.CampusIdzZ
			ORDER BY Campus.name, CandidateAppointment.AppointmentDateTime, Candidate.student_namez
View/Index)candidateAppointmentsexpiredCandidateAlarmListnextExamnews)RequireLogin
GetManagerr   HasPermissionCurrentUserr   ModelZCanView	CanExportZCanViewCandidateQueueCanServiceAppointmentr   GetAllZCandidateQueueListDBRowdateZis_todayr   
GetExpiredDatabaseCursorExecutedbquery_inr   GetAuthorizedRenderTemplater   	GetLatest)selfr   r   r    r*   0/var/www/html/adap/lawrence/Controllers/index.pyHandle   s6    



zIndex.HandleN)__name__
__module____qualname__
__method____path__r,   r*   r*   r*   r+   r	      s   r	   )BlogPost.Businessr   Campus.Businessr   (Candidate.Business.CandidateQueueManagerr   #User.Business.UserPermissionManagerr   CandidateAlarm.Businessr   lawrence.baser   lawrence.dbr$   User.Entity.UserPermissionr   r   r	   r*   r*   r*   r+   <module>   s   
