Index.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /*
  3. * To change this license header, choose License Headers in Project Properties.
  4. * To change this template file, choose Tools | Templates
  5. * and open the template in the editor.
  6. */
  7. namespace app\index\controller;
  8. use app\common\library\UUIDs;
  9. use think\Controller;
  10. use think\Db;
  11. class Index extends Controller
  12. {
  13. public function index(){
  14. // 医生类别 1.临床医生2.报告医生3.审核医生4.确认医生5.登记医生6远程申请医生7.远程报告医生8.远程审核医生(可多选)
  15. $info = DB::table('doctors')->where('institution_id','73090001')->where('department_id','')->select();
  16. foreach($info as $k=>$v){
  17. $a = array();
  18. $a['id'] = UUIDs::uuid16();
  19. $a['doctor_id'] = $v['id'];
  20. $a['department_id'] = '';
  21. $a['doctor_class'] = '';
  22. DB::table('doctor_class')->insert($a);
  23. }
  24. // $menuIdArr = explode(",", $menuIds);
  25. // $menus = Db::table("menu")->whereIn("id", $menuIdArr)->select();
  26. // $menuIdArr = array();
  27. // foreach ($menus as $key => $val) {
  28. // array_push($menuIdArr, $val["id"]);
  29. // }
  30. // foreach ($info as $k => $v) {
  31. // Db::table("dr_cla_permission")->where("doctor_id", $v['id'])->where("type", "1")->delete();
  32. // foreach ($menuIdArr as $key => $val) {
  33. // $newRow = array();
  34. // $newRow["id"] = UUIDs::uuid16();
  35. // $newRow["type"] = "1";
  36. // $newRow["pass"] = $val;
  37. // $newRow["doctor_id"] = $v['id'];
  38. // Db::table("dr_cla_permission")->insert($newRow);
  39. // }
  40. // }
  41. echo "index";
  42. }
  43. }