hrkaohemModel.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. return $rs;
  39. }
  40. }
粤ICP备19079148号