Appointment.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. <?php
  2. /*
  3. * @Author: wang jun
  4. * @Date: 2022-01-18 10:57:14
  5. * @Last Modified by: wang jun
  6. * @Last Modified time: 2022-01-19 10:38:56
  7. * 微信类
  8. */
  9. namespace app\app\controller;
  10. use app\app\logic\appointmentlogic;
  11. use think\Controller;
  12. class Appointment extends BaseController
  13. {
  14. /**
  15. * 根据id获取信息
  16. *
  17. * @return void
  18. * @author wj
  19. * @date 2022-07-25
  20. */
  21. public function getinfobyid()
  22. {
  23. $param = request()->param();
  24. $this->checktoken($param);
  25. $l_a = new appointmentlogic();
  26. $result = $l_a->getinfobyid($param);
  27. if (1 != $result['status']) {
  28. if ($result['status'] < 0) {
  29. return backjson2($result['status'], $result['msg'], $result['data']);
  30. } else {
  31. return backjson2(0, $result['msg'], $result['data']);
  32. }
  33. }
  34. return backjson2(200, 'success', $result['data']);
  35. }
  36. /**
  37. * 请求数据完成
  38. * 根据appointment_id和testtubeno
  39. *
  40. * @return void
  41. * @author wj
  42. * @date 2022-07-25
  43. */
  44. public function finishedbyaid()
  45. {
  46. $param = request()->param();
  47. $this->checktoken($param);
  48. $l_a = new appointmentlogic();
  49. $result = $l_a->finishedbyaid($param);
  50. if (!$result['status']) {
  51. return backjson2(0, $result['msg']);
  52. }
  53. return backjson2(200, 'success', $result['data']);
  54. }
  55. /**
  56. * 获取测试类型
  57. *
  58. * @return void
  59. * @author wj
  60. * @date 2022-07-26
  61. */
  62. public function gettesttypelist()
  63. {
  64. $l_a = new appointmentlogic();
  65. $list = $l_a->gettesttypelist();
  66. foreach ($list as $key => $value) {
  67. $item = [
  68. 'key' => $key,
  69. 'value' => $value,
  70. ];
  71. $list[$key] = $item;
  72. }
  73. return backjson2(200, 'success', $list);
  74. }
  75. }