|
@@ -156,7 +156,7 @@ class GeoQuestionResLogic extends BaseLogic |
|
@@ -156,7 +156,7 @@ class GeoQuestionResLogic extends BaseLogic |
|
156
|
$data = [];
|
156
|
$data = [];
|
|
157
|
$platformModel = new GeoPlatform();
|
157
|
$platformModel = new GeoPlatform();
|
|
158
|
$list = $platformModel->list(['status'=>1],'id',['name','en_name']);
|
158
|
$list = $platformModel->list(['status'=>1],'id',['name','en_name']);
|
|
159
|
- $questionResModel = new GeoQuestionLog();
|
159
|
+ $questionResModel = new GeoQuestionResult();
|
|
160
|
foreach ($list as $item){
|
160
|
foreach ($list as $item){
|
|
161
|
if($this->user['project_id'] == 4533){
|
161
|
if($this->user['project_id'] == 4533){
|
|
162
|
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'is_match'=>1,'hit'=>['!=',0],'platform'=>$item['en_name']]);
|
162
|
$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 |
|
@@ -164,6 +164,11 @@ class GeoQuestionResLogic extends BaseLogic |
|
164
|
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0],'platform'=>$item['en_name']]);
|
164
|
$data[$item['name']] = $questionResModel->counts(['project_id'=>$this->user['project_id'],'hit'=>['!=',0],'platform'=>$item['en_name']]);
|
|
165
|
}
|
165
|
}
|
|
166
|
}
|
166
|
}
|
|
|
|
167
|
+ $data['question_count'] = $questionResModel->where('project_id', $this->user['project_id'])
|
|
|
|
168
|
+ ->select(DB::raw('COUNT(DISTINCT question) as total'))
|
|
|
|
169
|
+ ->value('total');
|
|
|
|
170
|
+ //问题达标数据
|
|
|
|
171
|
+ $data['question_qualify_count'] = $questionResModel->where('project_id', $this->user['project_id'])->where('hit','!=',0)->count();
|
|
167
|
return $this->success($data);
|
172
|
return $this->success($data);
|
|
168
|
}
|
173
|
}
|
|
169
|
|
174
|
|