123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469 |
- <?php
- namespace app\api\dao\butt;
- use app\api\actions\ZskkCache;
- use app\api\dao\ZskkDefaultDao;
- use app\api\model\hr\HrModel;
- use app\api\model\report\ReportModel;
- /**
- * 后台控制器基类
- * 接口方法权限 必传参数 接口返回 错误抛出 通用参数处理
- */
- class ButtDao extends ZskkDefaultDao {
- protected $flag = true;
- protected $logName = "ButtDao";
- protected $report = null;
- protected $hrModel = null;
- public function __construct(ReportModel $reportModel,HrModel $hrModel)
- {
- parent::__construct();
- $this->report = $reportModel;
- $this->hrModel = $hrModel;
- }
- public function getExams($institutionId,$num,$where,$timeWhere='',$status='')
- {
- $info = $this->report->getExams($institutionId,$num,$where,$timeWhere,$status);
- return $info;
- }
- public function getReports($institutionId,$page,$num,$timeWhere='')
- {
- $info = $this->report->getReports($institutionId,$page,$num,$timeWhere);
- return $info;
- }
- public function getConfirmExams($institutionId,$num)
- {
- $info = $this->report->getConfirmExams($institutionId,$num);
- return $info;
- }
- public function getExamById($id)
- {
- $info = $this->report->getExamById($id);
- return $info;
- }
- public function getDcotorId($name,$institution_id)
- {
- if($name == ''){
- return '';
- }
- $sql = "SELECT id FROM doctors where instr('$name',realname) and institution_id='$institution_id' and realname <> ''";
- $info = $this->report->getDoctorId($sql);
- $id = '';
- if(!empty($info)){
- $id = $info[0]['id'];
- }
- return $id;
- }
- public function getDcotorByNull($institution)
- {
- $data = $this->report->getDoctorByNull($institution);
- return $data;
- }
- public function makeDcotor($doctor)
- {
- $info = $this->report->makeDoctor($doctor);
- return $info;
- }
- public function checkReport($id)
- {
- $info = $this->report->checkReport($id);
- return $info;
- }
- public function saveReport($report,$id=null)
- {
- $info = $this->report->saveReport($report,$id);
- return $info;
- }
- public function saveAiReport($data)
- {
- $info = $this->report->saveAiReport($data);
- return $info;
- }
- public function getBodyByProject($project)
- {
- $info = $this->report->getBodyByProject($project);
- return $info;
- }
- public function getStudyByExamId($examId)
- {
- $info = $this->report->getStudyByExamId($examId);
- return $info;
- }
- public function updateExam($exam,$id)
- {
- $info = $this->report->updateExamInfo($exam,$id);
- return $info;
- }
- public function getPatientId($examId)
- {
- $id = $this->report->getPatientId($examId);
- return $id;
- }
- public function updatePatient($patient,$id)
- {
- $info = $this->report->updatePatient($patient,$id);
- return $info;
- }
- public function getIns($id)
- {
- $info = $this->report->getIns($id);
- return $info;
- }
- public function getHistorySend($exam,$study)
- {
- $info = $this->report->getHistorySend($exam,$study);
- return $info;
- }
- public function getUserWechat()
- {
- $info = $this->report->getUserWechat();
- return $info;
- }
- public function getExamData()
- {
- $info = $this->report->getExamData();
- return $info;
- }
- public function getExamReport($where,$field,$whereTime)
- {
- $info = $this->report->getExamReport($where,$field,$whereTime);
- return $info;
- }
- public function getPicNumber()
- {
- $info = $this->report->getPicNumber();
- return $info;
- }
- public function getYestNumber()
- {
- $info = $this->report->getYestNumber();
- return $info;
- }
- public function getInsInfo()
- {
- $info = $this->report->getInsInfo();
- return $info;
- }
- public function getAllInsInfo()
- {
- $info = $this->report->getAllInsInfo();
- return $info;
- }
- public function insertDing($data)
- {
- $info = $this->report->insertDing($data);
- return $info;
- }
- public function get2Ins()
- {
- $num = $this->report->get2Ins();
- return $num;
- }
- public function get3Ins()
- {
- $num = $this->report->get3Ins();
- return $num;
- }
- public function getInstitutionId($study_id)
- {
- $id = $this->report->getInstitutionId($study_id);
- return $id;
- }
- public function getPatientByStudyId($study_id)
- {
- $id = $this->report->getPatientByStudyId($study_id);
- return $id;
- }
- public function getPatientNameByStudyId($study_id)
- {
- $id = $this->report->getPatientNameByStudyId($study_id);
- return $id;
- }
- public function getExamBySearch($where,$institution)
- {
- $info = $this->report->getExamBySearch($where,$institution);
- return $info;
- }
- public function getExamByPatient($where)
- {
- $info = $this->report->getExamByPatient($where);
- return $info;
- }
- public function save_video_url($data)
- {
- $info = $this->report->save_video_url($data);
- return $info;
- }
- public function getHrItems($project)
- {
- return $this->hrModel->where('name',$project)->find();
- }
- public function getWorkList()
- {
- $info = $this->report->getWorkList();
- return $info;
- }
- public function getNotInsReport($where_status,$where_institution,$time,$field)
- {
- $info = $this->report->getNotInsReport($where_status,$where_institution,$time,$field);
- return $info;
- }
- public function getRisVersion()
- {
- $info = $this->report->getRisVersion();
- return $info;
- }
- public function saveCache($k,$v,$time=86400*2)
- {
- $cache = $this->setCache($k,$v,$time);
- return $cache;
- }
- public function getInsIds()
- {
- $ids = $this->report->getInsIds();
- return $ids;
- }
- public function getExamMaxTime($id)
- {
- $time = $this->report->getExamMaxTime($id);
- return $time;
- }
- public function get7OutExam($id)
- {
- $count = $this->report->get7OutExam($id);
- return $count;
- }
- public function getProjectName($id)
- {
- $name = $this->report->getProjectName($id);
- return $name;
- }
- public function getVersionInfo($project)
- {
- $info = $this->report->getVersionInfo($project);
- return $info;
- }
- public function getBindInfo($ins,$start,$finish)
- {
- $info = $this->report->getBindInfo($ins,$start,$finish);
- return $info;
- }
- public function getExamByIds($ids)
- {
- $info = $this->report->getExamByIds($ids);
- return $info;
- }
- public function getInsById($id)
- {
- $info = $this->report->getInsById($id);
- return $info;
- }
- public function checkAnnes($where)
- {
- $info = $this->report->checkAnnes($where);
- return $info;
- }
- public function saveAnnex($data)
- {
- $info = $this->report->saveAnnex($data);
- return $info;
- }
- public function updateAnnex($data,$where)
- {
- $info = $this->report->updateAnnex($data,$where);
- return $info;
- }
- public function getRegisterExam($where)
- {
- $info = $this->report->getRegisterExam($where);
- return $info;
- }
- public function getField($ins)
- {
- $info = $this->report->getField($ins);
- return $info;
- }
- public function getExam($where,$field)
- {
- $id = $this->report->getExamInfo($where,$field);
- return $id;
- }
- public function getPrint($where)
- {
- $info = $this->report->getPrint($where);
- return $info;
- }
- public function updatePrintSync($data,$where)
- {
- $info = $this->report->updatePrintSync($data,$where);
- return $info;
- }
- public function savePrintSync($data)
- {
- $info = $this->report->savePrintSync($data);
- return $info;
- }
- public function checkPrint($where,$time)
- {
- $info = $this->report->checkPrint($where,$time);
- return $info;
- }
- public function printZz($where)
- {
- $info = $this->report->printZz($where);
- return $info;
- }
- public function getExamFromReport($id)
- {
- $info = $this->report->getExamFromReport($id);
- return $info;
- }
- public function insertExam($data)
- {
- $info = $this->report->insertExam($data);
- return $info;
- }
- public function saveFileData($data)
- {
- $info = $this->report->saveFileData($data);
- return $info;
- }
- public function insertPatient($data)
- {
- $info = $this->report->insertPatient($data);
- return $info;
- }
- public function getPayExam($where,$time)
- {
- $info = $this->report->getPayExam($where,$time);
- return $info;
- }
- public function getPayExams($where,$field)
- {
- $info = $this->report->getPayExams($where,$field);
- return $info;
- }
- public function changeSyncStatus($id)
- {
- $info = $this->report->changeSyncStatus($id);
- return $info;
- }
- public function changePayStatus($patientNum,$ins)
- {
- $info = $this->report->changePayStatus($patientNum,$ins);
- return $info;
- }
- public function getMiddleInfo($where)
- {
- $info = $this->report->getMiddleInfo($where);
- return $info;
- }
- public function changeMiddleStatus($where,$update)
- {
- $info = $this->report->changeMiddleStatus($where,$update);
- return $info;
- }
- public function saveMiddle($data)
- {
- $info = $this->report->saveMiddle($data);
- return $info;
- }
- public function getNoteUrl($id)
- {
- $info = $this->report->getNoteUrl($id);
- return $info;
- }
- public function insertSpecialLog($url, $diff)
- {
- $this->report->insertSpecialLog($url, $diff);
- }
- public function getAllIns()
- {
- $info = $this->report->getAllIns();
- return $info;
- }
- public function getYestExams()
- {
- $info = $this->report->getYestExams();
- return $info;
- }
- public function getYestCompleteExams()
- {
- $info = $this->report->getYestCompleteExams();
- return $info;
- }
- }
|