123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257 |
- <?php
- Doo::loadCore ( 'db/DooModel' );
- class staff_cld extends DooModel {
-
- // 获得员工信息
- public function Get($id = 0) {
- $detail = $this->getOne ( array (
- 'where' => "sid= ? ",
- 'param' => array (
- $id
- ),
- 'asArray' => TRUE
- ) );
-
- // Doo::loadClass ( 'XDeode' );
- // $XDeode = new XDeode ( 9 );
-
- // $detail ['sid_cld']=$XDeode->encode($detail ['sid']);
- // $detail ['cid']=$XDeode->encode($detail ['cid']);
-
- // //
- // $detail ['cldAccessArray'] = array ();
- // if (! empty ( $detail ['cldAccess'] )) {
- // $detail ['cldAccessArray'] = json_decode ( $detail ['cldAccess'] );
- // }
- if(!empty($detail)){
- $detail=$this->makeStaffView($detail);
- }
- return $detail;
- }
-
-
-
- //办事处ID获得员工
- public function GetCategoryId($categoryId=0){
- $condition=array('where' => "username!='admin' and nature !=4 and (pendStatus!=3 or pendStatus!=4) ",'asArray' => TRUE);
- if($categoryId!=0){
- $condition=array (
- 'where' => "cid= ? and username!='admin' and nature !=4 and (pendStatus!=3 or pendStatus!=4) ",
- 'param' => array (
- $categoryId
- ),
- 'asArray' => TRUE
- );
- }
-
- $list = $this->find ( $condition );
-
- foreach ($list as $key=>$value){
- $list[$key]=$this->makeStaffView($value);
- }
-
- return $list;
- }
-
- public function GetName($name=""){
- $detail = $this->getOne ( array (
- 'where' => "username!='admin' and nature !=4 and (pendStatus!=3 or pendStatus!=4) and username= ? ",
- 'param' => array (
- $name
- ),
- 'asArray' => TRUE
- ) );
- if(!empty($detail)){
- $detail=$this->makeStaffView($detail);
- }
-
- return $detail;
- }
-
- private function makeStaffView($data=array()){
-
- Doo::loadClass ( 'XDeode' );
- $XDeode = new XDeode ( 9 );
-
- $data ['sid_cld']=$XDeode->encode($data ['sid']);
- $data ['cid']=$XDeode->encode($data ['cid']);
-
- $data ['cldAccessArray'] = array ();
- if (! empty ( $data ['cldAccess'] )) {
- $data ['cldAccessArray'] = json_decode ( $data ['cldAccess'] );
- }
-
- return $data;
- }
-
- private $sid;
- private $username;
- private $passwork;
- private $staffManage;
- private $isadmin;
- private $cid;
- private $othercid;
- private $category;
- private $othercategory;
- private $gender;
- private $qq;
- private $phone;
- private $telephone;
- private $email;
- private $birthday;
- private $position;
- private $avatar;
- private $appDate;
- private $hiredate;
- private $hireBiasDate;
- private $wxid;
- private $wecat;
- private $nature;
- private $remittanceName;
- private $bankName;
- private $bankNumber;
- private $coupletNumber;
- private $remittanceBankType;
- private $living;
- private $nativePlace;
- private $emergencyContacts;
- private $did;
- private $didName;
- private $jobNumber;
- private $baseWage;
- private $postWage;
- private $achievementBonus;
- private $pendingApprovals;
- private $processApprovals;
- private $processCC;
- private $InductionDate;
- private $pendStatus;
- private $updateDate;
- private $probationaryDate;
- private $regularsDate;
- private $qualifications;
- private $marriage;
- private $salaryCard;
- private $salaryBank;
- private $pendingApprovalsLeave;
- private $processApprovalsLeave;
- private $processLeaveCC;
- private $staffManageLeave;
- private $dimissionDate;
- private $dimissionReason;
- private $seniorityFormula;
- private $practiceDate;
- private $cldAccess;
- private $IDcards;
- private $IDcardsImgA;
- private $certificate;
- private $diploma;
- private $professionalTitle;
- private $IDcardsImgB;
- private $nation;
- private $graduateInstitutions;
- private $major;
- private $education;
- private $graduationTime;
- private $registeredResidence;
- private $householdRegistrationType;
- private $IDcardsValidity;
- private $positionId;
- private $appliedPromote;
- private $departmentID;
- private $applyLeaveDate;
- public $_table = 'CLD_staff';
- public $_primarykey = 'sid';
- public $_fields = array (
-
- 'nation',
- 'graduateInstitutions',
- 'major',
- 'education',
- 'graduationTime',
- 'registeredResidence',
- 'householdRegistrationType',
- 'IDcardsValidity',
-
- 'IDcards',
- 'IDcardsImgA',
- 'IDcardsImgB',
- 'certificate',
- 'diploma',
- 'professionalTitle',
-
- 'sid',
- 'username',
- 'staffManage',
- 'birthday',
- 'position',
- 'passwork',
- 'isadmin',
- 'cid',
- 'othercid',
- 'appDate',
- 'category',
- 'othercategory',
- 'gender',
- 'qq',
- 'phone',
- 'telephone',
- 'email',
- 'avatar',
- 'hiredate',
- 'hireBiasDate',
- 'wxid',
- 'nature',
- 'remittanceName',
- 'bankName',
- 'bankNumber',
- 'remittanceBankType',
- 'coupletNumber',
- 'did',
- 'jobNumber',
- 'baseWage',
- 'postWage',
- 'achievementBonus',
- 'pendingApprovals',
- 'processApprovals',
- 'processCC',
-
- 'pendingApprovalsLeave',
- 'processApprovalsLeave',
- 'processLeaveCC',
- 'staffManageLeave',
-
- 'InductionDate',
- 'pendStatus',
- 'wecat',
- 'updateDate',
-
- 'dimissionReason',
-
- 'salaryCard',
- 'salaryBank',
- 'qualifications',
- 'marriage',
-
- 'living',
- 'nativePlace',
- 'emergencyContacts',
-
- 'practiceDate',
- 'probationaryDate',
- 'regularsDate',
- 'dimissionDate',
- 'seniorityFormula',
- 'cldAccess',
-
- 'departmentID',
-
- 'didName',
- 'positionId',
- 'appliedPromote',
-
- 'applyLeaveDate'
- );
- }
- ?>
|