WorkReport.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 WorkReport extends Base
  7. {
  8. // 新增
  9. public function save(){
  10. model('WorkReport')->add();
  11. HelpHander::success([],'操作成功');
  12. }
  13. // 详情
  14. public function detail(){
  15. $id = input('id/d',0);
  16. $ret = model('WorkReport')->info($id);
  17. HelpHander::success($ret);
  18. }
  19. // 我收到的汇报详情
  20. public function rdetail(){
  21. $id = input('id/d',0);
  22. $ret = model('WorkReport')->receiveInfo($id);
  23. HelpHander::success($ret);
  24. }
  25. // 我提交的汇报列表
  26. public function list(){
  27. $page = input('page/d',1);
  28. $size = input('size/d',10);
  29. $ret = model('WorkReport')->lists($page,$size,$this->userId,$this->orgId);
  30. HelpHander::success($ret);
  31. }
  32. // 我提交的汇报列表
  33. public function receiveList(){
  34. $page = input('page/d',1);
  35. $size = input('size/d',10);
  36. $ret = model('WorkReport')->receiveList($page,$size,$this->userId,$this->orgId);
  37. HelpHander::success($ret);
  38. }
  39. // 我的接收人
  40. public function receiver(){
  41. $ret = model('WorkReport')->myReceiver($this->userId,$this->orgId);
  42. HelpHander::success($ret);
  43. }
  44. }