public function addEmployment()
 {
     $Employment = new EmploymentModel();
     $employment['EP_position'] = $_POST['AR_id'];
     $employment['EP_user'] = session('userid');
     if ($Employment->isHaving($employment)) {
         $this->error('您已申请过了该岗位!');
     } else {
         $employment['EP_time'] = date('Y-m-d H:i:s', time());
         $employment['EP_resume'] = $_POST['resume'];
         $status = $Employment->addEmployment($employment);
         if ($status) {
             $FirstCheck = new FirstcheckModel();
             $CheckList = new ChecklistModel();
             $checklist = $CheckList->getCheckList($employment['EP_position']);
             $fisrtcheck['FC_epid'] = $status;
             $fisrtcheck['FC_user'] = $employment['EP_user'];
             $fisrtcheck['FC_position'] = $employment['EP_position'];
             $fisrtcheck['FC_time'] = $employment['EP_time'];
             for ($i = 0; $i < count($checklist); $i++) {
                 $fisrtcheck['FC_dpid'] = $checklist[$i]['CL_dpid'];
                 $FirstCheck->addToFirstcheck($fisrtcheck);
             }
             $this->success('申请成功!', 'positionCenter');
         } else {
             $this->error('申请失败!');
         }
     }
 }
 public function cancelEmployment()
 {
     $this->checkLogin();
     $Employment = new EmploymentModel();
     $id = $_GET['id'];
     $status = $Employment->cancelEmployment($id);
     if ($status) {
         $this->success('取消申请成功!', 'personCenter');
     } else {
         $this->error('取消申请失败!');
     }
 }