|
@@ -36,16 +36,16 @@ Class Cron
|
|
|
$start=mktime(0,0,0,date('m'),date('d'),date('Y'))-86400;
|
|
|
$end = $start+86400-1;
|
|
|
$config = Dever::db('work/info')->config['config_status'];
|
|
|
- $data['branch'] = $v;
|
|
|
- $question = Dever::db('work/question')->state(array('branch_id'=>$data['branch']['id']));
|
|
|
+ $dbranch = $v;
|
|
|
+ $question = Dever::db('work/question')->state(array('branch_id'=>$dbranch['id']));
|
|
|
$question = array_keys($question);
|
|
|
$data['info']['app'] = Dever::db('work/info')->getCount(array('question'=>$question,'end'=>$end));
|
|
|
- $data['info']['xu'] = Dever::db('work/info')->getCount(array('group'=>$data['branch']['group_id'],'end'=>$end,'status'=>2));
|
|
|
- $admin = explode(',',$data['branch']['group']);
|
|
|
- if ($data['branch']['coor']) {
|
|
|
- $coor = explode(',',$data['branch']['coor']);
|
|
|
+ $data['info']['xu'] = Dever::db('work/info')->getCount(array('group'=>$dbranch['group_id'],'end'=>$end,'status'=>2));
|
|
|
+ $admin = explode(',',$dbranch['group']);
|
|
|
+ if ($dbranch['coor']) {
|
|
|
+ $coor = explode(',',$dbranch['coor']);
|
|
|
if (isset($coor) && $coor[0] && $coor[0] >0) {
|
|
|
- $people = $data['branch']['coor'].','.$admin[1];
|
|
|
+ $people = $dbranch['coor'].','.$admin[1];
|
|
|
} else {
|
|
|
$people = $admin[1];
|
|
|
}
|
|
@@ -54,10 +54,10 @@ Class Cron
|
|
|
}
|
|
|
$data['info']['yi'] = Dever::db('work/info')->getCount(array('fpeople'=>$people,'end'=>$end,'status'=>'3,4'));
|
|
|
|
|
|
- $data['question'] = Dever::db('work/question')->getAll(array('branch_id'=>$data['branch']['id']));
|
|
|
+ $data['question'] = Dever::db('work/question')->getAll(array('branch_id'=>$dbranch['id']));
|
|
|
$question = implode(',',$question);
|
|
|
if ($question) {
|
|
|
- $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');
|
|
|
+ $data['app'] = Dever::db('work/info')->fetchAll('select * from churen_work_info where (`group` in ('.$dbranch['group_id'].') or fpeople in ('.$people.') or question in ('.$question.')) and cdate <='.$end.' and state = 1');
|
|
|
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']);
|