81 lines
2.4 KiB
PHP
81 lines
2.4 KiB
PHP
<?php
|
||
// +----------------------------------------------------------------------
|
||
// | likeadmin快速开发前后端分离管理后台(PHP版)
|
||
// +----------------------------------------------------------------------
|
||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||
// | 开源版本可自由商用,可去除界面版权logo
|
||
// | gitee下载:https://gitee.com/likeshop_gitee/likeadmin
|
||
// | github下载:https://github.com/likeshop-github/likeadmin
|
||
// | 访问官网:https://www.likeadmin.cn
|
||
// | likeadmin团队 版权所有 拥有最终解释权
|
||
// +----------------------------------------------------------------------
|
||
// | author: likeadminTeam
|
||
// +----------------------------------------------------------------------
|
||
|
||
|
||
namespace app\adminapi\controller\oa;
|
||
|
||
|
||
use app\adminapi\controller\BaseAdminController;
|
||
use app\adminapi\lists\oa\FlowApproveLists;
|
||
use app\adminapi\logic\oa\FlowApproveLogic;
|
||
use app\adminapi\validate\oa\FlowApproveValidate;
|
||
|
||
|
||
/**
|
||
* 日常审批控制器
|
||
* Class FlowApproveController
|
||
* @package app\adminapi\controller\oa
|
||
*/
|
||
class FlowApproveController extends BaseAdminController
|
||
{
|
||
|
||
|
||
/**
|
||
* @notes 获取日常审批列表
|
||
* @return \think\response\Json
|
||
* @author likeadmin
|
||
* @date 2024/02/01 11:26
|
||
*/
|
||
public function lists()
|
||
{
|
||
$params = (new FlowApproveValidate())->get()->goCheck('lists');
|
||
return $this->dataLists(new FlowApproveLists($params['type']));
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 获取日常审批详情
|
||
* @return \think\response\Json
|
||
* @author likeadmin
|
||
* @date 2024/02/01 11:26
|
||
*/
|
||
public function detail()
|
||
{
|
||
$params = (new FlowApproveValidate())->goCheck('detail');
|
||
$result = FlowApproveLogic::detail($params);
|
||
return $this->data($result);
|
||
}
|
||
|
||
//撤销申请
|
||
public function revoke() {
|
||
$params = (new FlowApproveValidate())->post()->goCheck('revoke');
|
||
$result = FlowApproveLogic::revoke($params,$this->adminId);
|
||
if (true === $result) {
|
||
return $this->success('撤销成功', [], 1, 1);
|
||
}
|
||
return $this->fail(FlowApproveLogic::getError());
|
||
}
|
||
|
||
//审核
|
||
public function check(){
|
||
$params = (new FlowApproveValidate())->post()->goCheck('check');
|
||
$result = FlowApproveLogic::check($params,$this->adminId);
|
||
if (true === $result) {
|
||
return $this->success('审核成功', [], 1, 1);
|
||
}
|
||
return $this->fail(FlowApproveLogic::getError());
|
||
}
|
||
|
||
|
||
} |