作者 李宇航

合并分支 'lyh-server' 到 'master'

变更数据



查看合并请求 !2941
@@ -77,7 +77,7 @@ class GeoQuestionResController extends BaseController @@ -77,7 +77,7 @@ class GeoQuestionResController extends BaseController
77 } 77 }
78 78
79 /** 79 /**
80 - * @remark : 80 + * @remark :获取详情
81 * @name :getInfo 81 * @name :getInfo
82 * @author :lyh 82 * @author :lyh
83 * @method :post 83 * @method :post
@@ -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