kqerrModel.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. class flow_kqerrClassModel extends flowModel
  3. {
  4. //审核完成了添加到打卡记录
  5. protected function flowcheckfinsh($zt)
  6. {
  7. m('kqdkjl')->insert(array(
  8. 'uid' => $this->uid,
  9. 'optdt' => $this->rock->now,
  10. 'dkdt' => $this->rs['dt'].' '.$this->rs['ytime'],
  11. 'type' => '4',
  12. 'explain' => '['.$this->rs['errtype'].']'.$this->rs['explain'].'',
  13. ));
  14. }
  15. protected function flowbillwhere($uid, $lx)
  16. {
  17. $month = $this->rock->post('month');
  18. $where = '';
  19. if($month!=''){
  20. $where.=" and a.`dt` like '$month%'";
  21. }
  22. return array(
  23. 'where' => $where
  24. );
  25. }
  26. protected function flowbillwhere33($uid, $lx)
  27. {
  28. $dt = $this->rock->date;
  29. $key = $this->rock->post('key');
  30. $month = $this->rock->post('month');
  31. $where = "a.`uid`=$uid";
  32. if($lx=='all'){
  33. $where = '1=1';
  34. }
  35. if($key!='')$where.= m('admin')->getkeywhere($key, 'b.');
  36. if($month !='')$where.=" and a.`dt` like '$month%'";
  37. return array(
  38. 'where' => 'and '.$where,
  39. 'fields'=> 'a.*,b.name,b.deptname,b.ranking',
  40. 'table' => '`[Q]'.$this->mtable.'` a left join `[Q]admin` b on a.`uid`=b.`id`',
  41. 'order' => 'a.`id` desc'
  42. );
  43. }
  44. }
粤ICP备19079148号