daibanModel.php 932 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. class flow_daibanClassModel extends flowModel
  3. {
  4. /**
  5. * 每天流程待办提醒
  6. */
  7. public function tododay()
  8. {
  9. $arr = array();
  10. $rows = $this->getrows('`status` not in(1,2) and `isturn`=1 and `isdel`=0 and `nowcheckid` is not null','`nowcheckid`,`modename`');
  11. foreach($rows as $k=>$rs){
  12. $dista = explode(',', $rs['nowcheckid']);
  13. foreach($dista as $distid){
  14. if(!isset($arr[$distid]))$arr[$distid] = array();
  15. if(!isset($arr[$distid][$rs['modename']]))$arr[$distid][$rs['modename']] = 0;
  16. $arr[$distid][$rs['modename']]++;
  17. }
  18. }
  19. foreach($arr as $uid => $strarr){
  20. $this->flowweixinarr['url'] = $this->getwxurl();//设置微信提醒的详情链接
  21. $str = '';
  22. $k = 0;
  23. foreach($strarr as $mod=>$sl){
  24. $k++;
  25. if($k>1)$str.="\n";
  26. $str.="".$k.".$mod(".$sl."条);";
  27. }
  28. if($str != '')$this->push($uid, '', $str, '流程待办处理');
  29. }
  30. }
  31. }
粤ICP备19079148号