1
0

hrkaohemModel.php 1.3 KB

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