Exemplo n.º 1
0
 static function IsInqueryFinish($examinee_id)
 {
     $inquery = InqueryAns::findFirst($examinee_id);
     if ($inquery) {
         return true;
     } else {
         return false;
     }
 }
Exemplo n.º 2
0
 public static function insertInquery($examinee_id, $inquery_ans, $project_id)
 {
     try {
         $manager = new TxManager();
         $transaction = $manager->get();
         $inquery = new InqueryAns();
         $inquery->setTransaction($transaction);
         $inquery->examinee_id = $examinee_id;
         $inquery->project_id = $project_id;
         $inquery->option = $inquery_ans;
         if ($inquery->save() == false) {
             $transaction->rollback("插入数据库失败-" . $examinee_id . '-' . $project_id . '-' . $inquery_ans);
         }
         $transaction->commit();
         return true;
     } catch (TxFailed $e) {
         throw new Exception($e->getMessage());
     }
 }