12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394 |
- <?php
- // +----------------------------------------------------------------------
- // | ThinkAdmin
- // +----------------------------------------------------------------------
- // | 版权所有 2014~2022 广州楚才信息科技有限公司 [ http://www.cuci.cc ]
- // +----------------------------------------------------------------------
- // | 官方网站: https://thinkadmin.top
- // +----------------------------------------------------------------------
- // | 开源协议 ( https://mit-license.org )
- // | 免费声明 ( https://thinkadmin.top/disclaimer )
- // +----------------------------------------------------------------------
- // | gitee 代码仓库:https://gitee.com/zoujingli/ThinkAdmin
- // | github 代码仓库:https://github.com/zoujingli/ThinkAdmin
- // +----------------------------------------------------------------------
- namespace app\admin\controller;
- use app\data\model\DataRecruitment;
- use app\data\model\DataPoolTalent;
- use app\data\model\DataTeachingKnowledge;
- use app\data\model\DataUser;
- use app\data\model\DataUserApplyJobInfo;
- use app\data\model\DataZhicheng;
- use Carbon\Carbon;
- use think\admin\Controller;
- use app\data\model\SystemUser;
- use think\Db;
- use think\db\Query;
- /**
- * 应聘信息列表
- * Class ApplyJobInfo
- * @package app\admin\controller
- */
- class ApplyJobInfo extends Controller
- {
- /**
- * 应聘信息管理
- * @auth true
- * @menu true
- */
- public function index(){
- $this->title='应聘信息列表';
- $name=input('title');
- DataUserApplyJobInfo::mQuery()
- ->when($name,function (Query $query) use ($name) {
- $query->hasWhere('user',function (Query $query) use ($name) {
- $query->whereLike('nickname',"%{$name}%");
- });
- })
- ->where('audit','<>',0)
- ->with(['user','workexperience','professionalskills','certificate'])
- ->order('id','desc')
- ->layTable();
- }
- protected function _index_page_filter(&$data)
- {
- //dump($data);die;
- }
- /**
- * 应聘信息审核
- * @auth true
- * @menu true
- */
- public function audit($id){
- $this->title='应聘信息审核';
- $row=DataUserApplyJobInfo::mk()
- ->with(['user','workexperience','professionalskills','certificate'])
- ->findOrFail($id);
- if($this->request->isGet()){
- // dump($row);
- $this->assign('row',$row);
- $this->fetch();
- }else{
- if($row['audit']>1){
- $this->error('该记录已审核');
- }
- $data=$this->_vali([
- 'audit.require'=>'结果必须',
- 'audit.in:2,3'=>'结果有误',
- 'why.requireIf:audit,3'=>'原因必须',
- 'why.max:200'=>'原因有误',
- ]);
- $row['audit']=$data['audit'];
- $row['why']=$data['why']??'';
- $row['audit_at']=Carbon::now();
- $row->save();
- $this->success('审核成功');
- }
- }
- }
|