Appointment.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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 (!$result['status']) {
  28. return backjson2(0, $result['msg']);
  29. }
  30. return backjson2(200, 'success', $result['data']);
  31. }
  32. /**
  33. * 请求数据完成
  34. * 根据appointment_id和testtubeno
  35. *
  36. * @return void
  37. * @author wj
  38. * @date 2022-07-25
  39. */
  40. public function finishedbyaid()
  41. {
  42. $param = request()->param();
  43. $this->checktoken($param);
  44. $l_a = new appointmentlogic();
  45. $result = $l_a->finishedbyaid($param);
  46. if (!$result['status']) {
  47. return backjson2(0, $result['msg']);
  48. }
  49. return backjson2(200, 'success', $result['data']);
  50. }
  51. /**
  52. * 获取测试类型
  53. *
  54. * @return void
  55. * @author wj
  56. * @date 2022-07-26
  57. */
  58. public function gettesttypelist()
  59. {
  60. $l_a = new appointmentlogic();
  61. $list = $l_a->gettesttypelist();
  62. foreach ($list as $key => $value) {
  63. $item = [
  64. 'key' => $key,
  65. 'value' => $value,
  66. ];
  67. $list[$key] = $item;
  68. }
  69. return backjson2(200, 'success', $list);
  70. }
  71. }