find('plan_id=:plid',array(':plid'=>$planId)); if ($detail && $detail['report_created'] && $detail['report_data']){ $result = json_decode($detail['report_data'], TRUE); } } return $result; } // 根据学生ids、paperid获取提分册 public function getPlansByPaperIdSids($paperId,$studentIds) { $result = array(); if ($paperId && is_numeric($paperId) && $studentIds && is_array($studentIds)){ $criteria = new CDbCriteria(); $criteria->addCondition("paper_id = '". $paperId ."' AND student_id IN (". implode(',', $studentIds) .")"); $result = $this->findAll($criteria); } return $result; } }