hrkaohemModel.php 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. //考核项目
  3. class flow_hrkaohemClassModel extends flowModel
  4. {
  5. public $pinlva = array();
  6. public function initModel()
  7. {
  8. $this->pinlva['d'] = '每天';
  9. $this->pinlva['w'] = '每周一';
  10. $this->pinlva['m'] = '每月';
  11. $this->pinlva['j'] = '每季度';
  12. $this->pinlva['y'] = '每年';
  13. }
  14. public function flowrsreplace($rs, $lx=0)
  15. {
  16. $pinlv = $rs['pinlv'];
  17. $rs['pinlv'] = arrvalue($this->pinlva, $pinlv);
  18. $sctime = $rs['sctime'];
  19. if($pinlv=='m'){
  20. $rs['sctime'] = $rs['pinlv'].date('d号H:i', strtotime($sctime));
  21. }
  22. if($pinlv=='j'){
  23. $rs['sctime'] = $rs['pinlv'].'首月的'.date('d号H:i', strtotime($sctime));
  24. }
  25. if($pinlv=='y'){
  26. $rs['sctime'] = $rs['pinlv'].date('m月d号H:i', strtotime($sctime));;
  27. }
  28. if($lx==2){
  29. $zbdata = $this->db->getall("select * from `[Q]hrkaohes` where `mid`='".$rs['id']."' order by `sort`");
  30. $str = '';
  31. foreach($zbdata as $k1=>$rs1)$str.=''.$rs1['itemname'].'('.$rs1['weight'].'%);';
  32. $rs['temp_zbcont'] = $str;
  33. $zbdata = $this->db->getall("select * from `[Q]hrkaohen` where `mid`='".$rs['id']."' order by `sort`");
  34. $str = '';
  35. foreach($zbdata as $k1=>$rs1)$str.=''.$rs1['pfname'].'('.$rs1['pfweight'].'%);';
  36. $rs['temp_pfren'] = $str;
  37. }
  38. if($rs['enddt']<$this->rock->date){
  39. $rs['ishui']=1;
  40. $rs['enddt'].='(已截止)';
  41. }
  42. return $rs;
  43. }
  44. }
粤ICP备19079148号