hrAction.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. class hrClassAction extends runtAction
  3. {
  4. /*
  5. * 员工合同到期提醒/人事每天调动运行
  6. */
  7. public function httodoAction()
  8. {
  9. m('hr')->hrrun(); //人事每天调动/离职等运行
  10. //员工合同到期提醒
  11. /*
  12. $flow = m('flow')->initflow('userract');
  13. $flow->updatestate();
  14. $dtobj = c('date');
  15. $dt = $this->rock->date;
  16. $dt30 = $dtobj->adddate($dt,'d',35);
  17. $rows = m('userract')->getall("state=1 and `enddt`<='$dt30'",'id,enddt,httype,name,uname');
  18. $str = '';
  19. foreach($rows as $k=>$rs){
  20. $jg = $dtobj->datediff('d', $dt, $rs['enddt']);
  21. if($jg==30 || $jg<=7){
  22. $str.='人员['.$rs['uname'].']的【'.$rs['httype'].'.'.$rs['name'].'】将在'.$jg.'天后的'.$rs['enddt'].'到期;';
  23. }
  24. }
  25. if($str != ''){
  26. $this->todoarr = array(
  27. 'modenum' => 'userract',
  28. 'agentname' => '员工合同',
  29. 'title' => '员工合同到期提醒',
  30. 'cont' => $str,
  31. );
  32. }
  33. */
  34. //生日提醒
  35. m('flow')->initflow('userinfo')->birthdaytodo();
  36. //自动从考核项目中添加
  37. m('flow')->initflow('hrcheck')->hrkaohemrun();
  38. //个人资料完善提醒
  39. return 'success';
  40. }
  41. }
粤ICP备19079148号