ApprovalCate.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. namespace app\api\controller\v1;
  3. use app\api\controller\Base;
  4. use app\hander\HelpHander;
  5. class ApprovalCate extends Base
  6. {
  7. // 新增
  8. public function save(){
  9. model('ApprovalCate')->add();
  10. HelpHander::success([],'操作成功');
  11. }
  12. // 编辑
  13. public function update(){
  14. model('ApprovalCate')->add();
  15. HelpHander::success([],'操作成功');
  16. }
  17. // 详情
  18. public function detail(){
  19. $id = input('id/d',0);
  20. $ret = model('ApprovalCate')->info($id);
  21. HelpHander::success($ret);
  22. }
  23. // 列表
  24. public function list(){
  25. $ret = model('ApprovalCate')->lists($this->orgId);
  26. HelpHander::success($ret);
  27. }
  28. // 删除
  29. public function del(){
  30. $id = input('id/d',0);
  31. model('ApprovalCate')->del($id,$this->orgId);
  32. HelpHander::success([],'操作成功');
  33. }
  34. // 流程类别和流程数据封装树状结构查询
  35. public function approvalCateGroup(){
  36. $ret = model('ApprovalCate')->approvalCateGroup($this->orgId);
  37. HelpHander::success($ret,'操作成功');
  38. }
  39. }