曾超新 5 years ago
parent c73a8f9408
commit d62311016b
  1. 14
      frontend/controllers/StatisticsController.php
  2. 5
      frontend/views/statistics/work-info.php

@ -506,9 +506,19 @@ class StatisticsController extends BaseController
public function actionWorkInfo() {
$request = Yii::$app->request;
$user_id = $request->get('user_id');
$date_begin = $request->get('date_begin');
$date_end = $request->get('date_end');
$date2_begin = $request->get('date2_begin');
$date2_end = $request->get('date2_end');
$username = $request->get('username');
return $this->render('work-info',[
'user_id' => $user_id
'user_id' => $user_id,
'date_begin' => $date_begin,
'date_end' => $date_end,
'date2_begin' => $date2_begin,
'date2_end' => $date2_end,
'username' => $username
]);
}
public function actionWorkInfoJson()
@ -551,7 +561,7 @@ class StatisticsController extends BaseController
if($date2_end != '') {
$tmp_query = $tmp_query->andWhere('print_date<="'.$date2_end.'"');
}
echo $tmp_query->createCommand()->rawSql."<br>";
// echo $tmp_query->createCommand()->rawSql."<br>";
$items = $tmp_query->all();
foreach($items as $item) {
$total[0]++;

@ -65,6 +65,11 @@ use \common\libs\MyLib;
sidePagination: 'server',
queryParams: function(params) {
o['user_id'] = '<?=$user_id?>';
o['date_begin'] = '<?=$date_begin?>';
o['date_end'] = '<?=$date_end?>';
o['date2_begin'] = '<?=$date2_begin?>';
o['date2_end'] = '<?=$date2_end?>';
o['username'] = '<?=$username?>';
o['offset'] = params['offset'];
o['limit'] = params['limit'];
return o;

Loading…
Cancel
Save