123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- <?php
- namespace app\api\controller\v1;
- use app\api\controller\Base;
- use app\hander\HelpHander;
- class MeetingApply extends Base
- {
- public function list(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $lists = model('MeetingApply')->lists($page,$size,$this->userId,$this->orgId);
- HelpHander::success($lists);
- }
- // 全部审批列表
- public function blist(){
- $title = input('title','','trim');
- $page = input('page/d',1);
- $size = input('size/d',10);
- $lists = model('MeetingApply')->blist($page,$size,$title,$this->userId,$this->orgId);
- HelpHander::success($lists);
- }
- public function search(){
- $title = input('title','','trim');
- $page = input('page/d',1);
- $size = input('size/d',10);
- $lists = model('MeetingApply')->searchs($page,$size,$title,$this->userId,$this->orgId);
- HelpHander::success($lists);
- }
- public function details(){
- $id = input('id/d',0);
- $info = model('MeetingApply')->details($id);
- HelpHander::success($info);
- }
- //审批通过
- public function confirm(){
- $id = input('id/d');
- $content = input('content','','trim');
- $serviceUserId = input('serviceUserId');
- // if(!$content){
- // HelpHander::error('审批意见不能为空');
- // }
- $ret = model('MeetingApply')->confirms($id,$content,$serviceUserId);
- if($ret){
- HelpHander::success([],'操作成功');
- }else{
- HelpHander::error(model('MeetingApply')->getError());
- }
- }
- //拒绝
- public function reject(){
- $id = input('id/d');
- $content = input('content','','trim');
- if(!$content){
- HelpHander::error('审批意见不能为空');
- }
- $ret = model('MeetingApply')->rejects($id,$content);
- if($ret){
- HelpHander::success([],'操作成功');
- }else{
- HelpHander::error(model('MeetingApply')->getError());
- }
- }
- //我的预定
- public function myReserve(){
- $page = input('page/d',1);
- $size = input('size/d',10);
- $ret = model('MeetingApply')->myReserves($page,$size,$this->userId,$this->orgId);
- HelpHander::success($ret);
- }
- //我的预定取消
- public function cancelReserve(){
- $id = input('id/d');
- $ret = model('MeetingApply')->cancelReserves($id);
- if($ret){
- HelpHander::success([],'预定取消');
- }else{
- HelpHander::error('取消失败');
- }
- }
- //我的预定详情
- public function reserveDetails(){
- $id = input('id/d',0);
- $ret = model('MeetingApply')->reserveDetails($id);
- if($ret){
- HelpHander::success($ret,'成功');
- }else{
- HelpHander::error('参数错误');
- }
- }
- //获取有会议室权限的人
- public function getAllWorker(){
- $ret = model('WorkTypeMode')->getRolesUserApp(12,$this->orgId,-1);
- HelpHander::success($ret);
- }
- }
|