AttendanceLeave.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. use think\Db;
  6. class AttendanceLeave extends Base
  7. {
  8. // 列表
  9. public function list(){
  10. $page = input('page/d',1);
  11. $size = input('size/d',10);
  12. $name = input('name','','trim');
  13. $type = input('type/d',0);
  14. $ret = model('AttendanceLeave')->lists($page,$size,$name,$type,$this->orgId);
  15. HelpHander::success($ret);
  16. }
  17. public function userList(){
  18. $page = input('page/d',1);
  19. $size = input('size/d',10);
  20. $name = input('name','','trim');
  21. $type = input('type/d',0);
  22. $uid = input('uid/d',0);
  23. $ret = model('AttendanceLeave')->lists($page,$size,$name,$type,$this->orgId,$uid);
  24. HelpHander::success($ret);
  25. }
  26. public function leaveRecord(){
  27. $page = input('page/d',1);
  28. $size = input('size/d',10);
  29. $startTime = input('startTime','','trim');
  30. $endTime = input('endTime','','trim');
  31. $uid = input('uId/d',0);
  32. $ret = model('AttendanceLeave')->leaveRecord($page,$size,$this->orgId,$uid,$startTime,$endTime);
  33. HelpHander::success($ret);
  34. }
  35. }