1
0

gongModel.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. /**
  3. 通知公告的
  4. */
  5. class agent_gongClassModel extends agentModel
  6. {
  7. public function gettotal()
  8. {
  9. $stotal = $this->getwdtotal($this->adminid);
  10. $titles = '';
  11. return array('stotal'=>$stotal,'titles'=> $titles);
  12. }
  13. private function getwdtotal($uid)
  14. {
  15. $ydid = m('log')->getread('infor', $uid);
  16. $where = "id not in($ydid) and `status`=1";
  17. $meswh = m('admin')->getjoinstr('receid', $uid);
  18. $where .= $meswh;
  19. $where.= " and (`zstart` is null or `zstart`<='{$this->rock->date}')";
  20. $where.= " and (`zsend` is null or `zsend`>='{$this->rock->date}')";
  21. $wdate = m('admin')->getmou('workdate', $uid);
  22. if(!isempt($wdate))$where.=" and `indate`>='$wdate'";
  23. $where .= m('admin')->getcompanywhere(1);
  24. $stotal = m('infor')->rows($where);
  25. return $stotal;
  26. }
  27. protected function agenttotals($uid)
  28. {
  29. $a = array(
  30. 'weidu' => $this->getwdtotal($uid)
  31. );
  32. return $a;
  33. }
  34. protected function agentrows($rows, $rowd, $uid){
  35. $typearr = array();
  36. if($this->loadci==1)$typearr = $this->flow->flowwesearchdata(1);
  37. return array(
  38. 'rows' =>$rows,
  39. 'typearr' =>$typearr,
  40. );
  41. }
  42. }
粤ICP备19079148号