DiagnosisCateController.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. <?php
  2. namespace app\api\controller\diagnosis;
  3. use app\admin\model\diagnosis\DiagnosisCate;
  4. use app\admin\model\diagnosis\DiagnosisService;
  5. use app\admin\model\system\{
  6. SystemAttachment, ShippingTemplates
  7. };
  8. use app\admin\model\user\User;
  9. use app\Request;
  10. use crmeb\services\{
  11. CacheService,
  12. ExpressService,
  13. SystemConfigService,
  14. UtilService
  15. };
  16. /**
  17. * 陪诊类型
  18. * Class StoreOrderController
  19. * @package app\api\controller\order
  20. */
  21. class DiagnosisCateController
  22. {
  23. /**
  24. * 陪诊代办类型
  25. * @param Request $request
  26. * @return mixed
  27. * @throws \think\db\exception\DataNotFoundException
  28. * @throws \think\db\exception\DbException
  29. * @throws \think\db\exception\ModelNotFoundException
  30. */
  31. public function type(Request $request)
  32. {
  33. $data = UtilService::getMore([
  34. ['type']
  35. ]);
  36. $list = DiagnosisCate::where('type', $data['type'])->where('status', 1)->select()->toArray();
  37. return app('json')->successful($list);
  38. }
  39. /**
  40. * 陪诊服务
  41. * @param Request $request
  42. * @return mixed
  43. * @throws \think\db\exception\DataNotFoundException
  44. * @throws \think\db\exception\DbException
  45. * @throws \think\db\exception\ModelNotFoundException
  46. */
  47. public function service(Request $request)
  48. {
  49. $list = DiagnosisService::select()->where('status', 1)->toArray();
  50. return app('json')->successful($list);
  51. }
  52. }