招聘PHP聚合系统,Thinkphp5开发OA办公系统之招聘申请
開發(fā)運(yùn)行環(huán)境:
神舟筆記本K650D-G6D1 i5-6400 GTX950M
Windows 10 專業(yè)版
Nginx 或 Apache Web 服務(wù)器軟件
MySQL5.7.x 數(shù)據(jù)庫
PHP7.1.0
PHPStrom 2017
PowerDesigner 16.5
Axure RP8
原型設(shè)計(jì)圖(招聘申請)
數(shù)據(jù)庫表(招聘申請):招聘申請ID,申請日期,崗位,崗位編制人數(shù),到崗時(shí)間,隸屬部門,在崗人數(shù),招聘人數(shù),招聘原因,招聘原因其它,職責(zé)說明,任職資格說明,學(xué)歷,學(xué)科知識,職能等級,綜合能力,語言能力,計(jì)算機(jī)水平,工作經(jīng)驗(yàn),性別,年齡,其它,添加時(shí)間,編輯時(shí)間,添加人,編輯人,是否刪除。
招聘申請表SQL代碼:
create table zy_recruit_apply
(
apply_id int not null auto_increment comment '招聘申請ID',
apply_date int not null default 0 comment '申請日期',
post char(50) not null default '' comment '崗位',
post_count smallint not null default 0 comment '崗位編制人數(shù)',
arrival_time int not null default 0 comment '到崗時(shí)間',
org_dpm_id int not null default 0 comment '隸屬部門',
on_post_count smallint not null default 0 comment '在崗人數(shù)',
recruit_count smallint not null default 0 comment '招聘人數(shù)',
recruit_reason char(100) not null default '' comment '招聘原因:0-其它 1-儲(chǔ)備人才 2-兼職 3-離職補(bǔ)充 4-擴(kuò)大編制 (多選用 "," 分隔)',
recruit_reason_other char(100) not null default '' comment '招聘原因其它:記錄招聘原因-其它選項(xiàng)的說明',
duty_explain text comment '職責(zé)說明',
post_explain varchar(500) not null default '' comment '任職資格說明',
education char(50) not null default '' comment '學(xué)歷',
subject_knowledge char(200) not null default '' comment '學(xué)科知識',
function_level char(255) not null default '' comment '職能等級',
composite_ability char(255) not null default '' comment '綜合能力',
language_ability char(255) not null default '' comment '語言能力',
computer_level char(255) not null default '' comment '計(jì)算機(jī)水平',
work_experience char(255) not null default '' comment '工作經(jīng)驗(yàn)',
sex tinyint not null default 0 comment '性別:0 不限 1 男 2 女',
age char(50) not null default '' comment '年齡',
other char(255) not null default '' comment '其它',
add_time int not null default 0 comment '添加時(shí)間',
edit_time int not null default 0 comment '編輯時(shí)間',
add_uid int not null default 0 comment '添加人',
edit_uid int not null default 0 comment '編輯人',
is_del tinyint not null default 0 comment '是否刪除:0否 1是',
primary key (apply_id)
);
alter table zy_recruit_apply comment '招聘申請';
招聘申請表單界面:
PHP實(shí)現(xiàn)代碼:
public function add(){
$orgDpmLogic = new OrgDepartmentLogic();
$listTree = $orgDpmLogic->listOrderTree(0);
$this->assign('listTree',$listTree);
$recruitReason = config('recruit_reason');
$this->assign('recruitReason',$recruitReason);
$this->assign('sex',[0=>'不限',1=>'男',2=>'女']);
//審批模板類型 - 1 招聘申請
$templateType = 1;
$approvalTypeLogic = new ApprovalTypeLogic();
$approvalType = $approvalTypeLogic->getRecordByTemplateType($templateType);
if(!$approvalType){
$this->error('審批模板不存在!');
exit;
}
//獲取招聘申請流程
$approvalFlowLogic = new ApprovalFlowLogic();
$approvalFlowList = $approvalFlowLogic->getRecordList($approvalType['type_id']);
$this->assign('approvalType',$approvalType);
$this->assign('approvalFlowList',$approvalFlowList);
return $this->fetch();
}
public function add_save(){
$result = new Result();
if($this->request->isPost() == false){
$result->msg = '添加失敗:非法操作!';
$result->success = false;
return $result;
}
$postData = $this->request->post();
$result = $this->addEditEmptyCheck($postData);
if(!$result->success) return $result;
$postData['apply_date'] = strtotime($postData['apply_date']);
$postData['arrival_time'] = strtotime($postData['arrival_time']);
if(isset($postData['recruit_reason']) && count($postData['recruit_reason'])){
$postData['recruit_reason'] = implode(',',$postData['recruit_reason']);
}else{
$postData['recruit_reason'] = '';
}
$uid = $this->userId;
$time = time();
$postData['add_time'] = $time;
$postData['add_uid'] = $uid;
$postData['edit_time'] = $time;
$postData['edit_uid'] = $uid;
$detail = $postData['detail'];
unset($postData['detail']);
$typeId = $postData['type_id'];
unset($postData['type_id']);
$result = $this->logic->addRecruitApply($postData);
//發(fā)起審批
if($result->success){
$approval = array();
$approval['type_id'] = $typeId;
$approval['title'] = '招聘申請-'.date('YmdHis',time());
$approval['approval_status'] = 0;
$approval['initiate_uid'] = $this->userId;
$approval['source_id'] = $result->data;
$detailList = array();
foreach($detail['approval_uid'] as $k=>$v){
$data = array();
$data['approval_id'] = 0;
$data['approval_uid'] = $v;
$data['flow_id'] = $detail['flow_id'][$k];
$data['approval_weight'] = $detail['approval_weight'][$k];
array_push($detailList,$data);
}
$approvalLogic = new ApprovalLogic();
$approvalLogic->startApproval($approval,$detailList);
}
return $result;
}
這是Controller層的代碼,業(yè)務(wù)實(shí)現(xiàn)邏輯都放到了Logic業(yè)務(wù)邏輯層實(shí)現(xiàn)。
原創(chuàng)作者:ACRM保險(xiǎn)師,kjuQ-kjuQ:282130106。
如有轉(zhuǎn)載,敬請注明原創(chuàng)作者與出處,謝謝。
總結(jié)
以上是生活随笔為你收集整理的招聘PHP聚合系统,Thinkphp5开发OA办公系统之招聘申请的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【Linux】FTP文件下载
- 下一篇: 【Masm】使用教程