# 会诊答卷页面
![](./img/2019-01-18_175222.png)
http://course.wmxuetang.com/index.php?r=croom/assessment/diagnosis&aeid=2459369
```
/**
* 会诊答卷页面
* @author chenzsh 2015/5/21
*/
public function actionDiagnosis() {
$this->layout = "/layouts/assessment_diagnosis_layout";
$aeid = Yii::app()->request->getParam('aeid') ; //aeid
$assignmentItemID = Yii::app()->request->getParam('assignmentItemID') ;
$ae = AnswerExam::model()->findByPk($aeid) ; // wkwke.'.tbAnswerExam'
$uid = Yii::app()->user->id ;
if(!$ae || $ae->fdStatus == 1)
ResponseUtils::exception(1,'该试卷不存在或已经完成') ;
if($ae->fdUserID != $uid)
ResponseUtils::exception(403) ;
if(!$_GET['formKetangTagID'] && !$record =AssessmentService::factory()->getAssessmentRecord(array('aeid'=> $aeid ,'with' => 'tag')))
ResponseUtils::exception(1,'该试卷不存在或已经完成') ;
if(!V2UserService::factory()->isVip($uid,WK::XUETANG) && $record->fdTypeID > 1)
ResponseUtils::exception(1,'您还不是学员,请购买会员加入我们吧') ;
if($_GET['formKetangTagID'])
$lev1Tag = Tag::model()->findByPk($_GET['formKetangTagID']) ;
else
$lev1Tag = AssessmentService::factory()->getAssessmentTag($record->fdAssessmentID) ;
$spend = $ae->fdUsed * 1000 ;
$examID = $ae->fdExamID ;
$lev3Tag = $record->tag ?: null ;
$schoolType = WeikeService::factory()->getWKInteger(WK::SECTION_ATTR_ID,$lev1Tag->id) ;
$subject = WeikeService::factory()->getWKInteger(WK::SUJT_ATTR_ID,$lev1Tag->id) ;
$data['assessmentid'] = $record->fdAssessmentID ;
$data['recordid'] = $record->id ;
$data['type'] = $record->fdTypeID ;
$data['eid'] = $ae->fdExamID ;
$data['examID'] = $ae->fdExamID ;
$data['aeid'] = $aeid;
$data['title'] = $lev1Tag->fdName ;
$data['tagID'] = $lev1Tag->id ;
$data['schoolType'] = Yii::app()->params['SCHOOLTYPE_ARR_NAME'][$schoolType->fdValue] ;
$data['subject'] = Yii::app()->params['SUBJECT_ARR'][$subject->fdValue] ;
$data['schoolTypeID'] = $schoolType->fdValue ;
$data['subjectID'] = $subject->fdValue ;
$data['spend'] = $spend ;
$data['examTime'] = $ae->_exam->fdSpend ;
$data['rate'] = $ae->fdRate ;
$data['situation'] = V2AnswerService::factory()->getSituation($aeid,$examID) ;
$data['assignmentItemID'] = $assignmentItemID ;
if($record->fdTypeID == WK::ASSESSMENT_CURE){
$data['boxData'] = array(
'lev3TagID' => $lev3Tag ? $lev3Tag->id : 0 ,
'lev3Title' => $lev3Tag ? $lev3Tag->fdName : '' ,
'reviewTagID' => AssessmentService::factory()->getReviewTagID($record->fdAssessmentID) ,
'preScoreRate'=> AssessmentService::factory()->getAvgScoreRate($record->fdAssessmentID) ,
'targetRate' => AssessmentService::factory()->getTargetRate($record->fdAssessmentID) ,
'allSche' => AssessmentService::factory()->countAllSche($record->fdAssessmentID) ,
'finishSche' => AssessmentService::factory()->countCureFinishSche($record->fdAssessmentID) ,
'finishCount' => AssessmentService::factory()->countAssessmentRecords(array('assessmentID'=>$record->fdAssessmentID,'typeID'=>WK::ASSESSMENT_CURE,'finish'=>true)) ,
'isReview' => 0
) ;
$curTagID = $record->fdTagID ;
$flag = AssessmentService::factory()->getAssessmentRecord(array(
'assessmentID' => $record->fdAssessmentID ,
'typeID' => $record->fdTypeID,
'finish' => true ,
'tagID' => $curTagID ,
'order' => 'answerExam.fdScoreRate DESC'
)) ;
if($flag){
$data['boxData']['isReview'] = 1 ;
$data['boxData']['curMaxScoreRate'] = $flag->answerExam->fdScoreRate ;
}
}
if($record->fdTypeID == WK::ASSESSMENT_CONSULTATION){
$guideType = WK::CROOM_CONSULTATION_GUIDE ;
$view = 'diagnosis_consultation' ;
}elseif($record->fdTypeID == WK::ASSESSMENT_CURE){
$guideType = WK::CROOM_CURE_GUIDE ;
$view = 'diagnosis_cure' ;
}elseif($record->fdTypeID == WK::ASSESSMENT_DETECTION){
$guideType = WK::CROOM_DETECTION_GUIDE ;
$view = 'diagnosis_detection' ;
}
$json = CJSON::encode(array('data'=>$data,'status'=>0,'msg'=>'success')) ;
$guide = UserService::factory()->getItemValue(array('userID'=>$uid,'itemID'=>$guideType)) ? 1:0 ;
$this->render($view,array( 'data' => $json ,'guide'=>$guide));
}
```
## 数据表:wkwke.tbTaskSchedule
```
CREATE TABLE `tbTaskSchedule` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`fdTagID` int(11) DEFAULT NULL COMMENT '任务系统章节对应的ID,\r\n 对应到tbTag.id',
`fdName` varchar(256) DEFAULT NULL COMMENT '章节名称',
`fdLevel` int(11) DEFAULT NULL COMMENT '任务系统章节所在层级',
`fdLeft` int(11) DEFAULT NULL COMMENT '任务系统节点哈希树left',
`fdRight` int(11) DEFAULT NULL COMMENT '任务系统节点哈希树right',
`fdLvl` int(11) DEFAULT NULL COMMENT '任务系统节点哈希树所在层级',
`fdParentID` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_Reference_2` (`fdTagID`)
) ENGINE=MyISAM AUTO_INCREMENT=447 DEFAULT CHARSET=utf8;
```
- 说明
- 开发任务
- 星课-真光
- 课表
- Excel Down
- 调课
- 课表修改
- 课表代码分析
- 课堂
- 课堂:应用商店通信管理协议
- 教师账号强制绑定手机或邮箱
- 强制绑定手机和修改密码的规则
- 学堂
- 课程学习:讨论功能
- 后台:课程讨论管理
- 课程直播接口
- 学习统计功能(旧版)
- 学习统计功能(新版)
- 同步课程统计功能
- 同步课程编辑-新增视频
- 第三方接口
- 学科网
- 安徽第三方
- 大赛
- 管控系统
- 日志管理
- 设备日志
- 平板接口
- 渝教
- 教学总结
- 空白目录
- Yii 1.1
- 学堂架构
- Yii 1.1一些方法的解读
- MVCS结构
- 基础使用语法
- 创建1个新模块
- 关联模型
- CDbCriteria
- 学生-课堂记录
- 学生端页面展示
- 教师端页面展示
- 编辑课程文档
- SQL
- 课堂项目运行入口
- 上传资源示意图
- 行为
- PHPStorm
- 源码阅读
- 会诊答卷页面
- 考点练习
- 资源首页
- 同步课程
- 同步课程:章节信息
- 升学复习
- 统计图-范例
- 模块
- 非法词
- 服务层
- MongoDB类
- 学堂作答记录从Mongo新集合获取数据
- MongoYii
- 错题集
- 小技巧
- 完善资料
- 邮件发送
- K12
- JSpang视频课程
- MongoDB
- 创业
- 项目
- 包包