|
...
|
...
|
@@ -156,7 +156,7 @@ class GeoQuestionResLogic extends BaseLogic |
|
|
|
$data = [];
|
|
|
|
$platformModel = new GeoPlatform();
|
|
|
|
$list = $platformModel->list(['status'=>1],'id',['name','en_name']);
|
|
|
|
$questionResModel = new GeoQuestionLog();
|
|
|
|
$questionResModel = new GeoQuestionResult();
|
|
|
|
foreach ($list as $item){
|
|
|
|
if($this->user['project_id'] == 4533){
|
|
|
|
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'is_match'=>1,'hit'=>['!=',0],'platform'=>$item['en_name']]);
|
|
...
|
...
|
@@ -164,6 +164,11 @@ class GeoQuestionResLogic extends BaseLogic |
|
|
|
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0],'platform'=>$item['en_name']]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
$data['question_count'] = $questionResModel->where('project_id', $this->user['project_id'])
|
|
|
|
->select(DB::raw('COUNT(DISTINCT question) as total'))
|
|
|
|
->value('total');
|
|
|
|
//问题达标数据
|
|
|
|
$data['question_qualify_count'] = $questionResModel->where('project_id', $this->user['project_id'])->where('hit','!=',0)->count();
|
|
|
|
return $this->success($data);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|