ReportDao.php 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453
  1. <?php
  2. namespace app\api\dao\report;
  3. use app\api\actions\ZskkCache;
  4. use app\api\dao\ZskkDefaultDao;
  5. use app\api\model\report\ReportModel;
  6. use think\facade\Log;
  7. use think\facade\Cache;
  8. /**
  9. * 后台控制器基类
  10. * 接口方法权限 必传参数 接口返回 错误抛出 通用参数处理
  11. */
  12. class ReportDao extends ZskkDefaultDao {
  13. protected $flag = true;
  14. protected $logName = "ExamDao";
  15. protected $report = null;
  16. public function __construct(ReportModel $reportModel)
  17. {
  18. parent::__construct();
  19. $this->report = $reportModel;
  20. }
  21. public function getReportInfo($examId)
  22. {
  23. $info = $this->report->getReportInfo($examId);
  24. return $info;
  25. }
  26. public function getRemoteReportInfo($ra_id)
  27. {
  28. $info = $this->report->getRemoteReportInfo($ra_id);
  29. return $info;
  30. }
  31. public function getInstitutionData($where, $field)
  32. {
  33. $info = $this->report->getInstitutionData($where, $field);
  34. return $info;
  35. }
  36. public function getReportStatus($id)
  37. {
  38. $status = $this->report->getStatus($id);
  39. return $status;
  40. }
  41. public function getDoctorsName($id)
  42. {
  43. $doctorNames = $this->report->getDoctorName($id);
  44. if(empty($doctorNames)){
  45. return null;
  46. }
  47. return $doctorNames;
  48. }
  49. public function getInstitution($dcotorId)
  50. {
  51. $info = $this->report->getInstitutionInfo($dcotorId);
  52. return $info;
  53. }
  54. public function getUser($token)
  55. {
  56. $user = $this->getCache($token);
  57. if(!$user){
  58. $this->throwError('登陆信息失效,请重新进行登陆','0099');
  59. }
  60. return $user;
  61. }
  62. public function saveBbs($info)
  63. {
  64. $info = $this->report->saveBbs($info);
  65. return $info;
  66. }
  67. public function getUserId($token)
  68. {
  69. $user = $this->getCache($token);
  70. if(!$user){
  71. $this->throwError('登陆信息失效,请重新进行登陆','0099');
  72. }
  73. return $user['id'];
  74. }
  75. public function getTrace($reportId)
  76. {
  77. $trace = $this->report->getTrace($reportId);
  78. return $trace;
  79. }
  80. public function remoteStage($token)
  81. {
  82. $trace = $this->getCache($token);
  83. if($trace){
  84. Cache::rm($token);
  85. }
  86. }
  87. public function getOrderMoney($id)
  88. {
  89. $money = $this->report->getOrderMoney($id);
  90. return $money;
  91. }
  92. public function getStage($cacheToken)
  93. {
  94. $trace = $this->getCache($cacheToken);
  95. return $trace;
  96. }
  97. public function updateInstititonMoney($id,$money)
  98. {
  99. $info = $this->report->updateInstititonMoney($id,$money);
  100. return $info;
  101. }
  102. public function getCurrentMoney($id)
  103. {
  104. $money = $this->report->getCurrentMoney($id);
  105. return $money;
  106. }
  107. public function updateOrder($id,$status)
  108. {
  109. $info = $this->report->updateOrder($id,$status);
  110. return $info;
  111. }
  112. public function getExam($id)
  113. {
  114. $info = $this->report->getExam($id);
  115. return $info;
  116. }
  117. public function getOrderId($id)
  118. {
  119. $info = $this->report->getOrderId($id);
  120. return $info;
  121. }
  122. public function insertReport($data)
  123. {
  124. $info = $this->report->insertReport($data);
  125. return $info;
  126. }
  127. public function getMiddle($where)
  128. {
  129. $info = $this->report->getMiddle($where);
  130. return $info;
  131. }
  132. public function saveRmiddle($middle,$middleWhere = [])
  133. {
  134. $info = $this->report->saveRmiddle($middle,$middleWhere);
  135. return $info;
  136. }
  137. public function delStage($key)
  138. {
  139. $info = $this->delCache($key);
  140. return $info;
  141. }
  142. public function insertShare($data)
  143. {
  144. $info = $this->report->insertShare($data);
  145. return $info;
  146. }
  147. public function updateExamMsg($examId, $patientId, $examUp)
  148. {
  149. $info = $this->report->updateExam($examId, $patientId, $examUp);
  150. return $info;
  151. }
  152. public function updateRemote($id,$update)
  153. {
  154. $info = $this->report->updateRemote($id,$update);
  155. return $info;
  156. }
  157. public function getReportId($examId,$reportType)
  158. {
  159. $id = $this->report->getReportId($examId,$reportType);
  160. return $id;
  161. }
  162. public function getRemoteReportId($id)
  163. {
  164. $id = $this->report-> getRemoteReportId($id);
  165. return $id;
  166. }
  167. public function getInstitutionSms($id)
  168. {
  169. $sms = $this->report->getInstitutionSms($id);
  170. return $sms;
  171. }
  172. public function getInstitutionName($id)
  173. {
  174. $name = $this->report->getInstitutionName($id);
  175. return $name;
  176. }
  177. public function getApplicationId($examId)
  178. {
  179. $id = $this->report->getApplicationId($examId);
  180. return $id;
  181. }
  182. public function saveCache($key,$value,$time)
  183. {
  184. $this->setCache($key,$value,$time);
  185. }
  186. public function getDoctorInfo($id,$field)
  187. {
  188. $info = $this->report->getDoctorInfo($id,$field);
  189. return $info;
  190. }
  191. public function getPrintInfo($reportId,$is_remote)
  192. {
  193. $info = $this->report->getPrintInfo($reportId,$is_remote);
  194. return $info;
  195. }
  196. public function updateReport($examId,$type,$update)
  197. {
  198. $info = $this->report->updateReport($examId,$type,$update);
  199. return $info;
  200. }
  201. public function readMessage($id)
  202. {
  203. $info = $this->report->readMessage($id);
  204. return $info;
  205. }
  206. public function updateRemoteReport($id,$update)
  207. {
  208. $info = $this->report->updateRemoteReport($id,$update);
  209. return $info;
  210. }
  211. public function updateExamStatus($examId,$status)
  212. {
  213. $info = $this->report->updateExamStauts($examId,$status);
  214. return $info;
  215. }
  216. public function updateExamInfo($id,$update)
  217. {
  218. $info = $this->report->updateExamInfo($update,$id);
  219. return $info;
  220. }
  221. public function insertMessage($data)
  222. {
  223. $info = $this->report->insertMessage($data);
  224. return $info;
  225. }
  226. public function updateRemoteStauts($examId,$status)
  227. {
  228. $info = $this->report->updateRemoteStauts($examId,$status);
  229. return $info;
  230. }
  231. public function updateremoteExamStatus($examId,$status)
  232. {
  233. $info = $this->report->updateremoteExamStatus($examId,$status);
  234. return $info;
  235. }
  236. public function insertReportRecord($info)
  237. {
  238. $info = $this->report->insertRecord($info);
  239. return $info;
  240. }
  241. public function getDoctorClass($userId)
  242. {
  243. $info = $this->report->getDoctorClass($userId);
  244. return $info;
  245. }
  246. public function getReportById($id,$field)
  247. {
  248. $info = $this->report->getReportById($id,$field);
  249. return $info;
  250. }
  251. public function getReport($examId,$type,$ra_id=null)
  252. {
  253. $info = $this->report->getReport($examId,$type,$ra_id);
  254. return $info;
  255. }
  256. public function deleteAiReport($examId,$type)
  257. {
  258. $info = $this->report->deleteAiReport($examId,$type);
  259. return $info;
  260. }
  261. public function getXzData($id)
  262. {
  263. $info = $this->report->getXzData($id);
  264. return $info;
  265. }
  266. public function getDoctorName($id)
  267. {
  268. $info = $this->report->getDoctorRealName($id);
  269. return $info;
  270. }
  271. public function getUid($id)
  272. {
  273. $uid = $this->report->getUid($id);
  274. return $uid;
  275. }
  276. public function getAccession($id)
  277. {
  278. $info = $this->report->getAccession($id);
  279. return $info;
  280. }
  281. public function savePregressLog($log)
  282. {
  283. $this->report->savePregressLog($log);
  284. }
  285. public function saveVideo($data,$where)
  286. {
  287. $info = $this->report->saveVideo($data,$where);
  288. return $info;
  289. }
  290. public function cancel_video($id)
  291. {
  292. $info = $this->report->cancel_video($id);
  293. return $info;
  294. }
  295. public function getVideo($id)
  296. {
  297. $info = $this->report->getVideo($id);
  298. return $info;
  299. }
  300. public function insertDcmPath($data)
  301. {
  302. $info = $this->report->insertDcmPath($data);
  303. return $info;
  304. }
  305. public function updateDcmPath($where,$update)
  306. {
  307. $info = $this->report->updateDcmPath($where,$update);
  308. return $info;
  309. }
  310. public function getDcmPath($where,$study)
  311. {
  312. $info = $this->report->getDcmPath($where,$study);
  313. return $info;
  314. }
  315. public function getDcmPathData($where,$study)
  316. {
  317. $info = $this->report->getDcmPathData($where,$study);
  318. return $info;
  319. }
  320. public function insertReject($data)
  321. {
  322. $info = $this->report->insertReject($data);
  323. return $info;
  324. }
  325. public function checkLock($id)
  326. {
  327. $info = $this->report->checkLock($id);
  328. return $info;
  329. }
  330. public function updateEmailStatus($study, $email)
  331. {
  332. $info = $this->report->updateEmailStatus($study, $email);
  333. return $info;
  334. }
  335. public function getPatientName($study)
  336. {
  337. $name = $this->report->getPatientName($study);
  338. return $name;
  339. }
  340. public function insertNote($data)
  341. {
  342. $id = $this->report->insertNote($data);
  343. return $id;
  344. }
  345. public function saveDcmReportData($data,$exam,$type,$tsTime)
  346. {
  347. $info = $this->report->saveDcmReportData($data,$exam,$type,$tsTime);
  348. return $info;
  349. }
  350. public function getExamByStudy($study)
  351. {
  352. $info = $this->report->getExamByStudy($study);
  353. return $info;
  354. }
  355. public function getDmReport($date1, $date2)
  356. {
  357. $info = $this->report->getDmReport($date1, $date2);
  358. return $info;
  359. }
  360. public function getInsReport($date1, $date2,$ins,$remote,$page,$num)
  361. {
  362. $info = $this->report->getInsReport($date1, $date2,$ins,$remote,$page,$num);
  363. return $info;
  364. }
  365. public function insertDcmCompress($data)
  366. {
  367. $info = $this->report->insertDcmCompress($data);
  368. return $info;
  369. }
  370. public function updateDcmCompress($where,$data)
  371. {
  372. $info = $this->report->updateDcmCompress($where,$data);
  373. return $info;
  374. }
  375. public function getWechatData($openid)
  376. {
  377. $info = $this->report->getWechatData($openid);
  378. return $info;
  379. }
  380. }