106 lines
2.8 KiB
PHP
106 lines
2.8 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\oa\controller\works\rcbg;
|
||
|
||
|
||
use app\admin\controller\BaseAdminController;
|
||
use app\oa\lists\works\rcbg\OaWorkLists;
|
||
use app\oa\logic\works\rcbg\OaWorkLogic;
|
||
use app\oa\validate\works\rcbg\OaWorkValidate;
|
||
|
||
|
||
/**
|
||
* 工作汇报控制器
|
||
* Class OaWorkController
|
||
* @package app\adminapi\controller\works\rcbg
|
||
*/
|
||
class OaWorkController extends BaseAdminController
|
||
{
|
||
|
||
|
||
/**
|
||
* @notes 获取工作汇报列表
|
||
* @author likeadmin
|
||
* @date 2024/05/23 15:56
|
||
*/
|
||
public function lists()
|
||
{
|
||
return $this->dataLists(new OaWorkLists());
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 添加工作汇报
|
||
* @author likeadmin
|
||
* @date 2024/05/23 15:56
|
||
*/
|
||
public function add()
|
||
{
|
||
$params = (new OaWorkValidate())->post()->goCheck('add');
|
||
$result = OaWorkLogic::add($params,$this->adminId);
|
||
if (true === $result) {
|
||
return $this->success('添加成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OaWorkLogic::getError());
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 编辑工作汇报
|
||
* @author likeadmin
|
||
* @date 2024/05/23 15:56
|
||
*/
|
||
public function edit()
|
||
{
|
||
$params = (new OaWorkValidate())->post()->goCheck('edit');
|
||
$result = OaWorkLogic::edit($params);
|
||
if (true === $result) {
|
||
return $this->success('编辑成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OaWorkLogic::getError());
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 删除工作汇报
|
||
* @author likeadmin
|
||
* @date 2024/05/23 15:56
|
||
*/
|
||
public function delete()
|
||
{
|
||
$params = (new OaWorkValidate())->post()->goCheck('delete');
|
||
$result = OaWorkLogic::delete($params);
|
||
if (true === $result) {
|
||
return $this->success('删除成功', [], 1, 1);
|
||
}
|
||
return $this->fail(OaWorkLogic::getError());
|
||
}
|
||
|
||
|
||
/**
|
||
* @notes 获取工作汇报详情
|
||
* @author likeadmin
|
||
* @date 2024/05/23 15:56
|
||
*/
|
||
public function detail()
|
||
{
|
||
$params = (new OaWorkValidate())->goCheck('detail');
|
||
$result = OaWorkLogic::detail($params);
|
||
return $this->data($result);
|
||
}
|
||
|
||
|
||
} |