/**
  * 生成招聘信息报表
  *
  * @access public
  * @param int $startTime
  * @param int $endTime
  * @return array
  */
 public function recruitment($startTime, $endTime)
 {
     #获取时间段内产生的招聘信息
     $userList = F::db()->query('select user_id from user_tag where tag_id = ? and bind_time between ? and ?', array(self::CANdDIDATE_TAG_ID, date('Y-m-d H:i:s', $startTime), date('Y-m-d H:i:s', $endTime)))->fetch_column_all('user_id');
     #计算参加初试人数/参加复试人数/通过招聘人数/入职人数
     $returnData = array('first' => 0, 'second' => 0, 'success' => 0, 'entry' => 0);
     $returnDataDetail = array('first' => array(), 'second' => array(), 'success' => array(), 'entry' => array());
     foreach ($userList as $key => $value) {
         $eventList = F::db()->fetch_all('select * from event where user_id = ? and status = 1', array($value));
         $auditionInfo = $this->auditionModel->seachById($value);
         $returnData['first']++;
         $returnDataDetail['first'][$value] = $auditionInfo;
         foreach ($eventList as $eventIndex => $eventValue) {
             if ($eventValue['content'] == '#复试 @王则琼') {
                 $returnData['second']++;
                 $returnDataDetail['second'][$value] = $auditionInfo;
             }
         }
         if ($this->tagModel->userHadTagById($value, self::INTERVIEW_SUCCESS)) {
             $returnData['success']++;
             $returnDataDetail['success'][$value] = $auditionInfo;
         }
         if ($this->tagModel->userHadTagById($value, self::ENTRY)) {
             $returnData['entry']++;
             $returnDataDetail['entry'][$value] = $auditionInfo;
         }
         unset($eventList);
         unset($auditionInfo);
     }
     return array('rate' => $returnData, 'detail' => $returnDataDetail);
 }
 /**
  * 搜索面试人员信息
  * 
  * @access public
  * @param string phoneNum
  * @return array
  * @example
  * 
  */
 public function seach()
 {
     $this->params = $this->require_params(array('phoneNum'));
     if (!FValidator::phone($this->params['phoneNum'])) {
         throw new Exception('无效的手机号码', 100);
     }
     $this->returnData = $this->auditionModel->seach($this->params['phoneNum']);
     if (empty($this->returnData)) {
         throw new Exception('相关信息未找到', 204);
     }
     F::rest()->show_result($this->returnData);
 }