123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453 |
- <?php
- namespace app\api\dao\report;
- use app\api\actions\ZskkCache;
- use app\api\dao\ZskkDefaultDao;
- use app\api\model\report\ReportModel;
- use think\facade\Log;
- use think\facade\Cache;
- /**
- * 后台控制器基类
- * 接口方法权限 必传参数 接口返回 错误抛出 通用参数处理
- */
- class ReportDao extends ZskkDefaultDao {
- protected $flag = true;
- protected $logName = "ExamDao";
- protected $report = null;
- public function __construct(ReportModel $reportModel)
- {
- parent::__construct();
- $this->report = $reportModel;
- }
- public function getReportInfo($examId)
- {
- $info = $this->report->getReportInfo($examId);
- return $info;
- }
- public function getRemoteReportInfo($ra_id)
- {
- $info = $this->report->getRemoteReportInfo($ra_id);
- return $info;
- }
- public function getInstitutionData($where, $field)
- {
- $info = $this->report->getInstitutionData($where, $field);
- return $info;
- }
- public function getReportStatus($id)
- {
- $status = $this->report->getStatus($id);
- return $status;
- }
- public function getDoctorsName($id)
- {
- $doctorNames = $this->report->getDoctorName($id);
- if(empty($doctorNames)){
- return null;
- }
- return $doctorNames;
- }
- public function getInstitution($dcotorId)
- {
- $info = $this->report->getInstitutionInfo($dcotorId);
- return $info;
- }
- public function getUser($token)
- {
- $user = $this->getCache($token);
- if(!$user){
- $this->throwError('登陆信息失效,请重新进行登陆','0099');
- }
- return $user;
- }
- public function saveBbs($info)
- {
- $info = $this->report->saveBbs($info);
- return $info;
- }
- public function getUserId($token)
- {
- $user = $this->getCache($token);
- if(!$user){
- $this->throwError('登陆信息失效,请重新进行登陆','0099');
- }
- return $user['id'];
- }
- public function getTrace($reportId)
- {
- $trace = $this->report->getTrace($reportId);
- return $trace;
- }
- public function remoteStage($token)
- {
- $trace = $this->getCache($token);
- if($trace){
- Cache::rm($token);
- }
- }
- public function getOrderMoney($id)
- {
- $money = $this->report->getOrderMoney($id);
- return $money;
- }
- public function getStage($cacheToken)
- {
- $trace = $this->getCache($cacheToken);
- return $trace;
- }
- public function updateInstititonMoney($id,$money)
- {
- $info = $this->report->updateInstititonMoney($id,$money);
- return $info;
- }
- public function getCurrentMoney($id)
- {
- $money = $this->report->getCurrentMoney($id);
- return $money;
- }
- public function updateOrder($id,$status)
- {
- $info = $this->report->updateOrder($id,$status);
- return $info;
- }
- public function getExam($id)
- {
- $info = $this->report->getExam($id);
- return $info;
- }
- public function getOrderId($id)
- {
- $info = $this->report->getOrderId($id);
- return $info;
- }
- public function insertReport($data)
- {
- $info = $this->report->insertReport($data);
- return $info;
- }
- public function getMiddle($where)
- {
- $info = $this->report->getMiddle($where);
- return $info;
- }
- public function saveRmiddle($middle,$middleWhere = [])
- {
- $info = $this->report->saveRmiddle($middle,$middleWhere);
- return $info;
- }
- public function delStage($key)
- {
- $info = $this->delCache($key);
- return $info;
- }
- public function insertShare($data)
- {
- $info = $this->report->insertShare($data);
- return $info;
- }
- public function updateExamMsg($examId, $patientId, $examUp)
- {
- $info = $this->report->updateExam($examId, $patientId, $examUp);
- return $info;
- }
- public function updateRemote($id,$update)
- {
- $info = $this->report->updateRemote($id,$update);
- return $info;
- }
- public function getReportId($examId,$reportType)
- {
- $id = $this->report->getReportId($examId,$reportType);
- return $id;
- }
- public function getRemoteReportId($id)
- {
- $id = $this->report-> getRemoteReportId($id);
- return $id;
- }
- public function getInstitutionSms($id)
- {
- $sms = $this->report->getInstitutionSms($id);
- return $sms;
- }
- public function getInstitutionName($id)
- {
- $name = $this->report->getInstitutionName($id);
- return $name;
- }
- public function getApplicationId($examId)
- {
- $id = $this->report->getApplicationId($examId);
- return $id;
- }
- public function saveCache($key,$value,$time)
- {
- $this->setCache($key,$value,$time);
- }
- public function getDoctorInfo($id,$field)
- {
- $info = $this->report->getDoctorInfo($id,$field);
- return $info;
- }
- public function getPrintInfo($reportId,$is_remote)
- {
- $info = $this->report->getPrintInfo($reportId,$is_remote);
- return $info;
- }
- public function updateReport($examId,$type,$update)
- {
- $info = $this->report->updateReport($examId,$type,$update);
- return $info;
- }
- public function readMessage($id)
- {
- $info = $this->report->readMessage($id);
- return $info;
- }
- public function updateRemoteReport($id,$update)
- {
- $info = $this->report->updateRemoteReport($id,$update);
- return $info;
- }
- public function updateExamStatus($examId,$status)
- {
- $info = $this->report->updateExamStauts($examId,$status);
- return $info;
- }
- public function updateExamInfo($id,$update)
- {
- $info = $this->report->updateExamInfo($update,$id);
- return $info;
- }
- public function insertMessage($data)
- {
- $info = $this->report->insertMessage($data);
- return $info;
- }
- public function updateRemoteStauts($examId,$status)
- {
- $info = $this->report->updateRemoteStauts($examId,$status);
- return $info;
- }
- public function updateremoteExamStatus($examId,$status)
- {
- $info = $this->report->updateremoteExamStatus($examId,$status);
- return $info;
- }
- public function insertReportRecord($info)
- {
- $info = $this->report->insertRecord($info);
- return $info;
- }
- public function getDoctorClass($userId)
- {
- $info = $this->report->getDoctorClass($userId);
- return $info;
- }
- public function getReportById($id,$field)
- {
- $info = $this->report->getReportById($id,$field);
- return $info;
- }
- public function getReport($examId,$type,$ra_id=null)
- {
- $info = $this->report->getReport($examId,$type,$ra_id);
- return $info;
- }
- public function deleteAiReport($examId,$type)
- {
- $info = $this->report->deleteAiReport($examId,$type);
- return $info;
- }
- public function getXzData($id)
- {
- $info = $this->report->getXzData($id);
- return $info;
- }
- public function getDoctorName($id)
- {
- $info = $this->report->getDoctorRealName($id);
- return $info;
- }
- public function getUid($id)
- {
- $uid = $this->report->getUid($id);
- return $uid;
- }
- public function getAccession($id)
- {
- $info = $this->report->getAccession($id);
- return $info;
- }
- public function savePregressLog($log)
- {
- $this->report->savePregressLog($log);
- }
- public function saveVideo($data,$where)
- {
- $info = $this->report->saveVideo($data,$where);
- return $info;
- }
- public function cancel_video($id)
- {
- $info = $this->report->cancel_video($id);
- return $info;
- }
- public function getVideo($id)
- {
- $info = $this->report->getVideo($id);
- return $info;
- }
- public function insertDcmPath($data)
- {
- $info = $this->report->insertDcmPath($data);
- return $info;
- }
- public function updateDcmPath($where,$update)
- {
- $info = $this->report->updateDcmPath($where,$update);
- return $info;
- }
- public function getDcmPath($where,$study)
- {
- $info = $this->report->getDcmPath($where,$study);
- return $info;
- }
- public function getDcmPathData($where,$study)
- {
- $info = $this->report->getDcmPathData($where,$study);
- return $info;
- }
- public function insertReject($data)
- {
- $info = $this->report->insertReject($data);
- return $info;
- }
- public function checkLock($id)
- {
- $info = $this->report->checkLock($id);
- return $info;
- }
- public function updateEmailStatus($study, $email)
- {
- $info = $this->report->updateEmailStatus($study, $email);
- return $info;
- }
- public function getPatientName($study)
- {
- $name = $this->report->getPatientName($study);
- return $name;
- }
- public function insertNote($data)
- {
- $id = $this->report->insertNote($data);
- return $id;
- }
- public function saveDcmReportData($data,$exam,$type,$tsTime)
- {
- $info = $this->report->saveDcmReportData($data,$exam,$type,$tsTime);
- return $info;
- }
- public function getExamByStudy($study)
- {
- $info = $this->report->getExamByStudy($study);
- return $info;
- }
- public function getDmReport($date1, $date2)
- {
- $info = $this->report->getDmReport($date1, $date2);
- return $info;
- }
- public function getInsReport($date1, $date2,$ins,$remote,$page,$num)
- {
- $info = $this->report->getInsReport($date1, $date2,$ins,$remote,$page,$num);
- return $info;
- }
- public function insertDcmCompress($data)
- {
- $info = $this->report->insertDcmCompress($data);
- return $info;
- }
- public function updateDcmCompress($where,$data)
- {
- $info = $this->report->updateDcmCompress($where,$data);
- return $info;
- }
- public function getWechatData($openid)
- {
- $info = $this->report->getWechatData($openid);
- return $info;
- }
- }
|