|
@@ -12,7 +12,7 @@ Class Cron
|
|
|
$group_id = explode(',',$v['group']);
|
|
|
$admin = Dever::db('manage/admin')->find($group_id[1]);
|
|
|
$content = $this->email_api($v);
|
|
|
- $this->send($admin['email'], $admin['username'], $title, $content);
|
|
|
+ $this->send($admin['email'], $admin['username'], $title, $content);
|
|
|
}
|
|
|
// $content = $this->email_api();
|
|
|
// foreach($admin as $key => $val){
|
|
@@ -45,10 +45,15 @@ Class Cron
|
|
|
$people = $admin[1];
|
|
|
}
|
|
|
$data['info']['yi'] = Dever::db('work/info')->getCount(array('fpeople'=>$people,'end'=>$end,'status'=>'3,4'));
|
|
|
+ // echo Dever::sql();die;
|
|
|
// $data['info']['wei'] = Dever::db('work/info')->getCount(array('group'=>$data['branch']['group_id'],'start'=>$start,'end'=>$end,'status'=>4));
|
|
|
|
|
|
$data['question'] = Dever::db('work/question')->getAll(array('branch_id'=>$data['branch']['group_id']));
|
|
|
- $data['app'] = Dever::db('work/info')->getAll(array('group'=>$data['branch']['group_id'],'start'=>$start,'end'=>$end));
|
|
|
+ $question = implode(',',$question);
|
|
|
+ // print_R($question);die;
|
|
|
+ $data['app'] = Dever::db('work/info')->fetchAll('select * from churen_work_info where (`group` in ('.$data['branch']['group_id'].') or fpeople in ('.$people.') or question in ('.$question.')) and cdate <='.$end.' and state = 1');
|
|
|
+ // getAll(array('group'=>$data['branch']['group_id'],'end'=>$end));
|
|
|
+ // print_R($data);die;
|
|
|
foreach ($data['app'] as $k1 => $v1) {
|
|
|
$data['app'][$k1]['cdate'] = date('Y-m-d H:i:s',$v1['cdate']);
|
|
|
$data['app'][$k1]['zhipai'] = date('Y-m-d H:i:s',$v1['zdate']);
|