123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153 |
- <?php
- namespace app\api\dao\exam;
- use app\api\actions\ZskkCache;
- use app\api\dao\ZskkDefaultDao;
- use app\api\model\exam\ExamModel;
- use think\facade\Log;
- /**
- * 后台控制器基类
- * 接口方法权限 必传参数 接口返回 错误抛出 通用参数处理
- */
- class ExamDao extends ZskkDefaultDao {
- protected $flag = true;
- protected $logName = "ExamDao";
- protected $exam = null;
- public function __construct(ExamModel $examModel)
- {
- parent::__construct();
- $this->exam = $examModel;
- }
- public function getExamClass($class)
- {
- $where = [];
- if($class == '*')
- {
- return $where;
- }else{
- $where[] = ['exam_class','in',explode(',',$class)];
- return $where;
- }
- }
- public function getDoctorDepart($id)
- {
- $depart = $this->exam->getDoctorDepart($id);
- return $depart;
- }
- public function getInsInfo($id)
- {
- $info = $this->exam->geInsInfo($id);
- return $info;
- }
- public function getRemoteExamClass($class)
- {
- $where = [];
- if($class == '*')
- {
- return $where;
- }else{
- $where[] = ['a.exam_class','in',explode(',',$class)];
- return $where;
- }
- }
- public function getInstitution($token)
- {
- $institution = $this->getCache($token)['institution_id'] ?? false;
- if(!$institution){
- $this->throwError('登陆信息失效,请重新进行登陆','0099');
- }
- return $institution;
- }
- public function checkIsSet($studyId)
- {
- $id = $this->exam->check($studyId);
- return $id;
- }
- public function getExamList($institutionId, $fuzzyWhere, $moreWhere,$class_where, $params,$report_where,$gradeWhere)
- {
- $info = $this->exam->getExamList($institutionId, $fuzzyWhere, $moreWhere,$class_where, $params,$report_where,$gradeWhere);
- return $info;
- }
- public function getRemoteExamList($institutionId, $fuzzyWhere, $moreWhere,$class_where, $params,$report_where)
- {
- $info = $this->exam->getRemoteExamList($institutionId, $fuzzyWhere, $moreWhere,$class_where, $params,$report_where);
- return $info;
- }
- public function getRemoteList($id,$institutionId)
- {
- $info = $this->exam->getRemoteList($id,$institutionId);
- return $info;
- }
- public function updateExam($id,$update)
- {
- $info = $this->exam->updateExam($update,$id);
- return $info;
- }
- public function insertExam($data)
- {
- $info = $this->exam->insertExam($data);
- return $info;
- }
- public function getReport($where,$institution)
- {
- $info = $this->exam->getReport($where,$institution);
- return $info;
- }
- public function getDoctorClass($doctor)
- {
- $class = $this->exam->getDoctorClass($doctor);
- return $class;
- }
- public function changeDoctor($doctor,$id)
- {
- $info = $this->exam->changeDoctor($doctor,$id);
- return $info;
- }
- public function getFilmAnnex($id,$exam_datetime,$code)
- {
- $info = $this->exam->getFilmAnnex($id,$exam_datetime,$code);
- return $info;
- }
- public function del_exam($id)
- {
- $info = $this->exam->del_exam($id);
- return $info;
- }
- public function insertDcmDel($data)
- {
- $info = $this->exam->insertDcmDel($data);
- return $info;
- }
- public function getSyncAi($where)
- {
- return $this->exam->getSyncAi($where);
- }
- public function getAiNode($where)
- {
- return $this->exam->getAiNode($where);
- }
- }
|