1
0

hrsalarmModel.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. //薪资模版
  3. class flow_hrsalarmClassModel extends flowModel
  4. {
  5. protected $flowcompanyidfieds = 'none'; //不要多单位判断,是共享的
  6. public function initModel()
  7. {
  8. }
  9. protected function flowbillwhere($uid, $lx)
  10. {
  11. return array(
  12. 'order' => '`sort`,`id`'
  13. );
  14. }
  15. //读取字段
  16. public function xinzifields()
  17. {
  18. $mid = m('flow_set')->getmou('id',"`num`='hrsalary'");
  19. $rows = m('flow_element')->getall("`mid`='$mid'",'*','iszb,sort');
  20. $barr = array();
  21. $nofar = explode(',','uname,udeptname,postjt,mones,money,ranking,month,ispay,explain,isturn,status');
  22. foreach($rows as $k=>$rs){
  23. if(in_array($rs['fields'], $nofar))continue;
  24. $barr[] = array(
  25. 'name'=>$rs['name'],
  26. 'value'=>$rs['fields'],
  27. 'subname'=>$rs['fields']
  28. );
  29. }
  30. return $barr;
  31. }
  32. public function flowrsreplace($rs, $lx=0)
  33. {
  34. $month = date('Y-m');
  35. if($rs['status']=='0' || $rs['enddt']<$month || $rs['startdt']>$month)$rs['ishui']=1;
  36. return $rs;
  37. }
  38. }
粤ICP备19079148号