staff.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741
  1. <?php
  2. Doo::loadCore ( 'db/DooModel' );
  3. class staff extends DooModel {
  4. public $sid;
  5. public $username;
  6. public $passwork;
  7. public $staffManage;
  8. public $isadmin;
  9. public $cid;
  10. public $othercid;
  11. public $category;
  12. public $othercategory;
  13. public $gender;
  14. public $qq;
  15. public $phone;
  16. public $telephone;
  17. public $email;
  18. public $birthday;
  19. public $position;
  20. public $avatar;
  21. public $appDate;
  22. public $hiredate;
  23. public $hireBiasDate;
  24. public $wxid;
  25. public $wecat;
  26. public $nature;
  27. public $remittanceName;
  28. public $bankName;
  29. public $bankNumber;
  30. public $coupletNumber;
  31. public $remittanceBankType;
  32. public $living;
  33. public $nativePlace;
  34. public $emergencyContacts;
  35. public $did;
  36. public $didName;
  37. public $jobNumber;
  38. public $baseWage;
  39. public $postWage;
  40. public $achievementBonus;
  41. public $pendingApprovals;
  42. public $processApprovals;
  43. public $processCC;
  44. public $InductionDate;
  45. public $pendStatus;
  46. public $updateDate;
  47. public $probationaryDate;
  48. public $regularsDate;
  49. public $qualifications;
  50. public $marriage;
  51. public $salaryCard;
  52. public $salaryBank;
  53. public $pendingApprovalsLeave;
  54. public $processApprovalsLeave;
  55. public $processLeaveCC;
  56. public $staffManageLeave;
  57. public $dimissionDate;
  58. public $dimissionReason;
  59. public $seniorityFormula;
  60. public $practiceDate;
  61. public $cldAccess;
  62. public $IDcards;
  63. public $IDcardsImgA;
  64. public $certificate;
  65. public $diploma;
  66. public $professionalTitle;
  67. public $IDcardsImgB;
  68. public $nation;
  69. public $graduateInstitutions;
  70. public $major;
  71. public $education;
  72. public $graduationTime;
  73. public $registeredResidence;
  74. public $householdRegistrationType;
  75. public $IDcardsValidity;
  76. public $positionId;
  77. public $appliedPromote;
  78. public $departmentID;
  79. public $applyLeaveDate;
  80. public $_table = 'CLD_staff';
  81. public $_primarykey = 'sid';
  82. public $_fields = array (
  83. 'nation',
  84. 'graduateInstitutions',
  85. 'major',
  86. 'education',
  87. 'graduationTime',
  88. 'registeredResidence',
  89. 'householdRegistrationType',
  90. 'IDcardsValidity',
  91. 'IDcards',
  92. 'IDcardsImgA',
  93. 'IDcardsImgB',
  94. 'certificate',
  95. 'diploma',
  96. 'professionalTitle',
  97. 'sid',
  98. 'username',
  99. 'staffManage',
  100. 'birthday',
  101. 'position',
  102. 'passwork',
  103. 'isadmin',
  104. 'cid',
  105. 'othercid',
  106. 'appDate',
  107. 'category',
  108. 'othercategory',
  109. 'gender',
  110. 'qq',
  111. 'phone',
  112. 'telephone',
  113. 'email',
  114. 'avatar',
  115. 'hiredate',
  116. 'hireBiasDate',
  117. 'wxid',
  118. 'nature',
  119. 'remittanceName',
  120. 'bankName',
  121. 'bankNumber',
  122. 'remittanceBankType',
  123. 'coupletNumber',
  124. 'did',
  125. 'jobNumber',
  126. 'baseWage',
  127. 'postWage',
  128. 'achievementBonus',
  129. 'pendingApprovals',
  130. 'processApprovals',
  131. 'processCC',
  132. 'pendingApprovalsLeave',
  133. 'processApprovalsLeave',
  134. 'processLeaveCC',
  135. 'staffManageLeave',
  136. 'InductionDate',
  137. 'pendStatus',
  138. 'wecat',
  139. 'updateDate',
  140. 'dimissionReason',
  141. 'salaryCard',
  142. 'salaryBank',
  143. 'qualifications',
  144. 'marriage',
  145. 'living',
  146. 'nativePlace',
  147. 'emergencyContacts',
  148. 'practiceDate',
  149. 'probationaryDate',
  150. 'regularsDate',
  151. 'dimissionDate',
  152. 'seniorityFormula',
  153. 'cldAccess',
  154. 'departmentID',
  155. 'didName',
  156. 'positionId',
  157. 'appliedPromote',
  158. 'applyLeaveDate',
  159. );
  160. public function checkUser($uid, $passwork) {
  161. return $this->find ( array (
  162. 'select' => 'position,birthday,sid,username,isadmin,cid,othercid,category,othercategory,gender,qq,phone,telephone,email,avatar,hiredate,nature',
  163. 'where' => "username= '" . $uid . "' and passwork = '" . md5 ( $passwork ) . "' and nature!=4",
  164. 'asArray' => TRUE
  165. ) );
  166. }
  167. public function getStaffByName($username = '') {
  168. if (empty($username))
  169. return array();
  170. $detail=$this->getOne ( array (
  171. 'asc' => 'sid',
  172. 'where' => "username= '" . $username . "'",
  173. 'asArray' => TRUE
  174. ) );
  175. if (empty($detail))
  176. return array();
  177. Doo::loadModel ( 'department' );
  178. $department = new department ();
  179. $detail ['departmentName']=array();
  180. if($detail['departmentID']!=0){
  181. $detail ['departmentName'] =$department->getDepartmentByDid($detail['departmentID']);
  182. }
  183. Doo::loadClass ( 'XDeode' );
  184. $XDeode = new XDeode ( 5 );
  185. if (!empty($detail))
  186. $detail['sidKey'] = $XDeode->encode ( $detail ['sid'] );
  187. return $detail;
  188. }
  189. /**
  190. * @return string
  191. */
  192. public function getStaff($admin=false) {
  193. Doo::loadClass ( 'XDeode' );
  194. $XDeode = new XDeode ( 5 );
  195. Doo::loadModel ( 'department' );
  196. $department = new department ();
  197. Doo::loadModel ( 'position' );
  198. $position = new position ();
  199. $condition = array (
  200. 'desc' => 'jobNumber',
  201. 'asArray' => TRUE
  202. );
  203. if ($admin)
  204. $condition += array (
  205. 'where' => "username != 'admin' and nature !=4",
  206. );
  207. $list = $this->find ( $condition);
  208. foreach ( $list as $key => $value ) {
  209. $list [$key] ['departmentName'] ='';
  210. if($value['departmentID']!=0){
  211. $list [$key] ['departmentName'] =$department->getDepartmentByDid($value['departmentID']);
  212. }
  213. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  214. $list [$key] ['cidKey'] = $XDeode->encode ( $value ['cid'] );
  215. $list [$key] ['didKey'] = '';
  216. if (!empty($value ['departmentID']))
  217. $list [$key] ['didKey'] = $XDeode->encode ( $value ['departmentID'] );
  218. $list [$key] ['position'] ='';
  219. $pdetail=$position->getPositionByPid($value['positionId']);
  220. if (!empty($pdetail))
  221. $list [$key] ['position'] =$pdetail['positionName'];
  222. }
  223. return $list;
  224. }
  225. /**
  226. * 根据条件获得查询内容
  227. * @param string $con
  228. * @return string
  229. */
  230. public function getStaffByCondition($con=''){
  231. if ( empty ( $con ))
  232. return array ();
  233. Doo::loadClass ( 'XDeode' );
  234. $XDeode = new XDeode ( 5 );
  235. Doo::loadModel ( 'department' );
  236. $department = new department ();
  237. Doo::loadModel ( 'position' );
  238. $position = new position ();
  239. $list = $this->find ( array (
  240. 'where' => $con,
  241. 'desc' => 'jobNumber',
  242. 'asArray' => TRUE
  243. ) );
  244. foreach ( $list as $key => $value ) {
  245. $list [$key] ['position'] ='';
  246. $pdetail=$position->getPositionByPid($value['positionId']);
  247. if (!empty($pdetail))
  248. $list [$key] ['position'] =$pdetail['positionName'];
  249. $list [$key] ['departmentName'] ='';
  250. if($value['departmentID']!=0){
  251. $list [$key] ['departmentName'] =$department->getDepartmentByDid($value['departmentID']);
  252. }
  253. $list [$key] ['didArray']=array();
  254. if (!empty($value['did']))
  255. $list [$key] ['didArray']=explode(',', $value['did']);
  256. $list [$key] ['cldAccessArray'] = json_decode($value['cldAccess']);
  257. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  258. $list [$key] ['cidKey'] = $XDeode->encode ( $value ['cid'] );
  259. $list [$key] ['didKey'] = '';
  260. if (!empty($value ['departmentID']))
  261. $list [$key] ['didKey'] = $XDeode->encode ( $value ['departmentID'] );
  262. }
  263. return $list;
  264. }
  265. public function getStaffInCid($cid = '') {
  266. if (empty ( $cid ))
  267. return array ();
  268. $list = $this->find ( array (
  269. 'asc' => 'sid',
  270. 'where' => "cid in(" . $cid . ")",
  271. 'asArray' => TRUE
  272. ) );
  273. Doo::loadClass ( 'XDeode' );
  274. $XDeode = new XDeode ( 5 );
  275. foreach ( $list as $key => $value ) {
  276. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  277. }
  278. return $list;
  279. }
  280. /**
  281. * 获得单位下所有的员工
  282. * @param number $pid
  283. */
  284. public function getStaffByPositionId($pid=0){
  285. Doo::loadClass ( 'XDeode' );
  286. $XDeode = new XDeode ( 5 );
  287. if (! is_numeric ( $pid ))
  288. $pid = $XDeode->decode ( $pid );
  289. $list = $this->find ( array (
  290. 'where' => "positionId= '" . $pid . "' and username!='admin'",
  291. 'asArray' => TRUE
  292. ) );
  293. // Doo::loadClass ( 'XDeode' );
  294. // $XDeode = new XDeode ( 5 );
  295. // foreach ( $list as $key => $value ) {
  296. // $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  297. // }
  298. return $list;
  299. }
  300. public function getStaffByCid($cid = 0) {
  301. $list = $this->find ( array (
  302. 'asc' => 'sid',
  303. 'where' => "cid= '" . $cid . "' and nature !=4 ",
  304. 'asArray' => TRUE
  305. ) );
  306. Doo::loadClass ( 'XDeode' );
  307. $XDeode = new XDeode ( 5 );
  308. Doo::loadModel ( 'position' );
  309. $position = new position ();
  310. foreach ( $list as $key => $value ) {
  311. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  312. $list [$key] ['position'] ='';
  313. $pdetail=$position->getPositionByPid($value['positionId']);
  314. if (!empty($pdetail))
  315. $list [$key] ['position'] =$pdetail['positionName'];
  316. }
  317. return $list;
  318. }
  319. public function getStaffByCidAll($cid = 0){
  320. $list = $this->find ( array (
  321. 'asc' => 'sid',
  322. 'where' => "cid= '" . $cid . "' ",
  323. 'asArray' => TRUE
  324. ) );
  325. Doo::loadClass ( 'XDeode' );
  326. $XDeode = new XDeode ( 5 );
  327. Doo::loadModel ( 'position' );
  328. $position = new position ();
  329. foreach ( $list as $key => $value ) {
  330. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  331. $list [$key] ['position'] ='';
  332. $pdetail=$position->getPositionByPid($value['positionId']);
  333. if (!empty($pdetail))
  334. $list [$key] ['position'] =$pdetail['positionName'];
  335. }
  336. return $list;
  337. }
  338. /**
  339. * 获得审批中员工
  340. */
  341. public function getStaffByApplied($sid=0){
  342. $where="(pendStatus= '2' or pendStatus='3' or pendStatus='5' or pendStatus='6' or pendStatus='7') ";
  343. if(!empty($sid)){
  344. $where.=" and (pendingApprovals ='" . $sid . "' or pendingApprovalsLeave='" . $sid . "')";
  345. }
  346. $list = $this->find ( array (
  347. 'asc' => 'sid',
  348. 'where' => $where,
  349. 'asArray' => TRUE
  350. ) );
  351. Doo::loadClass ( 'XDeode' );
  352. $XDeode = new XDeode ( 5 );
  353. Doo::loadModel ( 'position' );
  354. $position = new position ();
  355. foreach ( $list as $key => $value ) {
  356. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  357. $list [$key] ['position'] ='';
  358. $pdetail=$position->getPositionByPid($value['positionId']);
  359. if (!empty($pdetail))
  360. $list [$key] ['position'] =$pdetail['positionName'];
  361. }
  362. return $list;
  363. }
  364. /**
  365. * 进行中
  366. * @param number $sid
  367. */
  368. public function getStaffByProcessing($sid=0){
  369. $where="(pendStatus= '2' or pendStatus='3' or pendStatus='5' or pendStatus='6' or pendStatus='7') ";
  370. if(!empty($sid)){
  371. $where.=" and (pendingApprovals !='" . $sid . "' or pendingApprovalsLeave !='" . $sid . "')";
  372. }
  373. $list = $this->find ( array (
  374. 'asc' => 'sid',
  375. 'where' => $where,
  376. 'asArray' => TRUE
  377. ) );
  378. Doo::loadClass ( 'XDeode' );
  379. $XDeode = new XDeode ( 5 );
  380. Doo::loadModel ( 'position' );
  381. $position = new position ();
  382. foreach ( $list as $key => $value ) {
  383. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  384. $list [$key] ['position'] ='';
  385. $pdetail=$position->getPositionByPid($value['positionId']);
  386. if (!empty($pdetail))
  387. $list [$key] ['position'] =$pdetail['positionName'];
  388. }
  389. return $list;
  390. }
  391. /**
  392. * 获得最近审批通过的员工
  393. * @return string
  394. */
  395. public function getStaffByApprovals(){
  396. $list = $this->find ( array (
  397. 'asc' => 'InductionDate',
  398. 'where' => "username!= 'admin' and pendStatus=0 and InductionDate!=0",
  399. 'limit' => 10,
  400. 'asArray' => TRUE
  401. ) );
  402. Doo::loadClass ( 'XDeode' );
  403. $XDeode = new XDeode ( 5 );
  404. foreach ( $list as $key => $value ) {
  405. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  406. }
  407. return $list;
  408. }
  409. /**
  410. * 获得最近更新的员工
  411. */
  412. public function getStaffByUpdateDate(){
  413. $list = $this->find ( array (
  414. 'asc' => 'updateDate',
  415. 'where' => "username!= 'admin'",
  416. 'limit' => 10,
  417. 'asArray' => TRUE
  418. ) );
  419. Doo::loadClass ( 'XDeode' );
  420. $XDeode = new XDeode ( 5 );
  421. foreach ( $list as $key => $value ) {
  422. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  423. }
  424. return $list;
  425. }
  426. public function getUserById($sid = 0) {
  427. $list =$this->find ( array (
  428. 'asc' => 'sid',
  429. 'where' => "sid= '" . $sid . "'",
  430. 'asArray' => TRUE
  431. ) );
  432. Doo::loadClass ( 'XDeode' );
  433. $XDeode = new XDeode ( 5 );
  434. foreach ( $list as $key => $value ) {
  435. $list [$key] ['sidKey'] = $XDeode->encode ( $value ['sid'] );
  436. }
  437. return $list;
  438. }
  439. public function getUserByIdList($puid) {
  440. Doo::loadClass ( 'XDeode' );
  441. $XDeode = new XDeode ( 5 );
  442. $puid = $XDeode->decode ( $puid );
  443. $list=$this->find ( array (
  444. 'where' => "sid= '" . $puid . "'",
  445. 'asArray' => TRUE
  446. ) );
  447. foreach ($list as $key=>$value){
  448. $list[$key]['sidKey']=$XDeode->encode ( $value ['sid'] );
  449. }
  450. return $list;
  451. }
  452. /**
  453. * 检查信息是否填写完整
  454. * @param unknown $sid
  455. * @return string
  456. */
  457. public function checkStaffInfoIsComplete($sid){
  458. Doo::loadClass ( 'XDeode' );
  459. $XDeode = new XDeode ( 5 );
  460. if (!is_numeric($sid)){
  461. $sid = $XDeode->decode ( $sid );
  462. }
  463. $detail=$this->getOne ( array (//or wecat='' or email='' or coupletNumber=''
  464. 'where' => "sid= '" . $sid . "' and (telephone='' or qq='' or phone='' or birthday='' or marriage='' or living='' or nativePlace='' or emergencyContacts='' or IDcards=''
  465. or IDcardsImgA='' or IDcardsImgB='' or remittanceName='' or bankName='' or bankNumber='' or salaryCard='' or salaryBank='' )",
  466. 'asArray' => TRUE
  467. ) );
  468. return $detail;
  469. }
  470. /**
  471. * 根据参数字段更新相应字段(主键ID必须传)
  472. * @param array $item 相关需要更新的字段信息
  473. * @return number 返回员工ID
  474. */
  475. public function setStaffByCondition($item = array()) {
  476. $lid = 0;
  477. if (is_array ( $item ) && ! empty ( $item )) {
  478. foreach ( $item as $key => $value ) {
  479. $this->$key = $value;
  480. }
  481. $lid = $this->update ();
  482. }
  483. return $lid;
  484. }
  485. /**
  486. *
  487. * @param number $nature
  488. */
  489. public function getStaffJobNumberByNature($nature=1){
  490. $detail=$this->getOne ( array (
  491. 'where' => "nature= '" . $nature . "'",
  492. 'desc' => 'jobNumber',
  493. 'asArray' => TRUE
  494. ) );
  495. return $detail;
  496. }
  497. /**
  498. *
  499. * @param number $nature
  500. */
  501. public function getStaffJobNumberByInformal(){
  502. $detail=$this->getOne ( array (
  503. 'where' => "nature= '2' or nature ='3'",
  504. 'desc' => 'jobNumber',
  505. 'asArray' => TRUE
  506. ) );
  507. return $detail;
  508. }
  509. /**
  510. * 根据用户ID获取相关信息
  511. * @param number $sid 用户ID
  512. */
  513. public function getStaffBySid($sid = 0) {
  514. Doo::loadClass ( 'XDeode' );
  515. $XDeode = new XDeode ( 5 );
  516. if (!is_numeric($sid)&&!empty($sid)){
  517. $sid = $XDeode->decode ( $sid );
  518. }
  519. $detail = array ();
  520. if (! empty ( $sid )){
  521. $detail = $this->getOne ( array (
  522. 'where' => "sid= '" . $sid . "'",
  523. 'asArray' => TRUE
  524. ) );
  525. $detail['sidKey']=$XDeode->encode ( $detail ['sid'] );
  526. Doo::loadModel ( 'department' );
  527. $department = new department ();
  528. $detail ['department'] =$department->getDepartmentByDid($detail['departmentID']);
  529. //获得岗位信息
  530. Doo::loadModel ( 'position' );
  531. $position = new position ();
  532. $positionIdKey=$XDeode->encode ( $detail ['positionId'] );
  533. $detail ['positionIdKey']=$positionIdKey;
  534. $positionDetail=$position->getPositionByPid($detail ['positionId']);
  535. //print_r('/'.$detail ['positionId'].'/');
  536. if(empty($positionDetail)){
  537. $positionDetail['baseWage']=0;
  538. $positionDetail['postWage']=0;
  539. $positionDetail['achievementBonus']=0;
  540. $positionDetail['positionName']='';
  541. }
  542. $detail ['positionDetail'] =$positionDetail;
  543. $d1 = strtotime($detail['hiredate']);//过去的某天,你来设定
  544. $d2 = 1 + ceil((time()-$d1)/60/60/24);
  545. $detail['workforce']=$d2;
  546. $d1 = strtotime($detail['dimissionDate']);//离职到今天
  547. $d2 = 1 + ceil((time()-$d1)/60/60/24);
  548. $detail['workforceDimission']=$d2;
  549. $detail ['cldAccessArray'] =array();
  550. if (!empty($detail['cldAccess']))
  551. $detail ['cldAccessArray'] =json_decode($detail['cldAccess']);
  552. $detail['sidKey']=$XDeode->encode ( $detail ['sid'] );
  553. $webSite=WEB_SITE.'/upload/credentialInfo/';
  554. $detail['webSite']=$webSite;
  555. $detail['certificateArray']=array();
  556. if(!empty($detail['certificate'])){
  557. $certificate=json_decode($detail['certificate']);
  558. if(!empty($certificate)){
  559. foreach ($certificate as $key=>$value){
  560. $certificate[$key]=$value;
  561. }
  562. $detail['certificateArray']=$certificate;
  563. }
  564. }
  565. $detail['diplomaArray']=array();
  566. if(!empty($detail['diploma'])){
  567. $certificate=json_decode($detail['diploma']);
  568. if(!empty($certificate)){
  569. foreach ($certificate as $key=>$value){
  570. $certificate[$key]=$value;
  571. }
  572. $detail['diplomaArray']=$certificate;
  573. }
  574. }
  575. $detail['professionalTitleArray']=array();
  576. if(!empty($detail['professionalTitle'])){
  577. $certificate=json_decode($detail['professionalTitle']);
  578. if(!empty($certificate)){
  579. foreach ($certificate as $key=>$value){
  580. $certificate[$key]=$value;
  581. }
  582. $detail['professionalTitleArray']=$certificate;
  583. }
  584. }
  585. }
  586. return $detail;
  587. }
  588. public function getApprovalData($sid=0){
  589. $list = $this->find ( array (
  590. 'asc' => 'sid',
  591. 'where' => "(pendStatus= '2' or pendStatus='3' or pendStatus='5' or pendStatus='6') and ( pendingApprovalsLeave='" . $sid . "' or pendingApprovals='" . $sid . "') ",
  592. 'asArray' => TRUE
  593. ) );
  594. return $list;
  595. }
  596. public function getStaffByWxid($wxid = '') {
  597. // echo "wxid in ( " . $wxid . ")";
  598. if (empty ( $wxid ))
  599. return array ();
  600. return $this->find ( array (
  601. 'select' => 'sid,wxid',
  602. 'where' => "wxid in ( " . $wxid . ")",
  603. 'asArray' => TRUE
  604. ) );
  605. }
  606. // 建筑获取办事处人员部分信息
  607. public function getStaffByCidOnBuilding($cid = 0) {
  608. $list = $this->find ( array (
  609. 'select' => 'sid,username,cid,departmentID,category,qq,phone,telephone',
  610. 'asc' => 'sid',
  611. 'where' => "cid= '" . $cid . "'",
  612. 'asArray' => TRUE
  613. ) );
  614. return $list;
  615. }
  616. }
  617. ?>