AttendanceGroupUser.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 AttendanceGroupUser extends Base
  7. {
  8. // 列表
  9. public function queryGroupUserList(){
  10. $page = input('page/d',1);
  11. $size = input('size/d',10);
  12. $name = input('name','','trim');
  13. $phone = input('phone','','trim');
  14. $code = input('code','','trim');
  15. $jobId = input('jobId/d',0);
  16. $depId = input('depId/d',0);
  17. $ret = model('AttendanceGroupUser')->lists($page,$size,$name,$phone,$code,$jobId,$depId,$this->orgId);
  18. HelpHander::success($ret);
  19. }
  20. // 新增
  21. public function save(){
  22. model('AttendanceGroupUser')->add();
  23. HelpHander::success([],'操作成功');
  24. }
  25. //获取今天要打卡的考勤组
  26. public function mygroup(){
  27. $day = input('day','','trim');
  28. $day = $day?$day:date('Y-m-d');
  29. $ret = model('AttendanceGroupUser')->userGroup($this->userId,$this->orgId,$day);
  30. HelpHander::success($ret,'操作成功');
  31. }
  32. }