Tool.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php
  2. /*
  3. * @Descripttion: 下发工具等相关信息
  4. * @version: 1.0.0
  5. * @Author: likang
  6. * @Date: 2022-06-09 14:58:24
  7. * @LastEditors: likang
  8. * @LastEditTime: 2022-06-10 09:28:54
  9. */
  10. namespace catchAdmin\api\controller;
  11. use catchAdmin\hydraulic\model\maintenancemapper;
  12. use catchAdmin\hydraulic\model\Wrench as ModelWrench;
  13. use catcher\base\CatchRequest as Request;
  14. use catcher\CatchResponse;
  15. use catcher\base\CatchController;
  16. use PhpParser\Node\Expr\FuncCall;
  17. use Wrench;
  18. class Tool extends Base
  19. {
  20. /**
  21. * @Descripttion: 获取扳手列表
  22. * @name: likang
  23. * @return {*}
  24. */
  25. public function getWrenchList()
  26. {
  27. $list = ModelWrench::select();
  28. return json_success('获取成功',$list);
  29. }
  30. /**
  31. * @Descripttion: 获取工作位置列表
  32. * @name: likang
  33. * @return {*}
  34. */
  35. public function getWorkLocal()
  36. {
  37. $list = maintenancemapper::where('device_type',2)->select();
  38. return json_success('获取成功',$list);
  39. }
  40. public function getUserList(){
  41. if (!isset($_GET['imei']) || $_GET['imei']=='') {
  42. json_fail('缺少设备IMEI号参数');
  43. }
  44. //检测imei号是否在数据库中
  45. //请求成功返回数据
  46. json_success('获取成功','');
  47. }
  48. }