|
@@ -39,6 +39,7 @@ Class Cron
|
|
|
$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'=>$dbranch['group_id'],'end'=>$end,'status'=>2));
|
|
|
$admin = explode(',',$dbranch['group']);
|
|
@@ -57,10 +58,15 @@ Class Cron
|
|
|
$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 ('.$dbranch['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>='.$start.' 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']);
|
|
|
+ if ($v1['zdate']) {
|
|
|
+ $data['app'][$k1]['zhipai'] = date('Y-m-d H:i:s',$v1['zdate']);
|
|
|
+ } else {
|
|
|
+ $data['app'][$k1]['zhipai'] = '';
|
|
|
+ }
|
|
|
+
|
|
|
$data['app'][$k1]['chu'] = date('Y-m-d H:i:s',$v1['chdate']);
|
|
|
$cate = Dever::db('work/q_cate')->find($v1['cate_id']);
|
|
|
$data['app'][$k1]['cate_name'] = $cate['name'];
|