'增加any_value'
This commit is contained in:
1 parent
a30ed5b256
commit
a874c0975b
3 files changed
+14
-3
No files matched your search
@@ -33,8 +33,6 @@ class Bjtongji extends BaseController
|
||||
$list['dataurl'] = '/chengji/bjtj/data';
|
||||
|
||||
|
||||
|
||||
|
||||
// 模板赋值
|
||||
$this->view->assign('list',$list);
|
||||
|
||||
|
||||
@@ -366,11 +366,17 @@ class Kaohao extends Base
|
||||
}
|
||||
])
|
||||
// ->cache(true)
|
||||
->field('banji
|
||||
,any_value(id) as id
|
||||
,any_value(nianji) as nianji
|
||||
,any_value(paixu) as paixu
|
||||
,any_value(school) as school')
|
||||
->group('banji')
|
||||
->field('id,banji,nianji,paixu,school')
|
||||
->append(['banjiTitle','banTitle'])
|
||||
->select();
|
||||
|
||||
$bj = new \app\teach\model\Banji;
|
||||
|
||||
$data = array();
|
||||
foreach ($bjids as $key => $value) {
|
||||
$data[] = [
|
||||
|
||||
@@ -72,6 +72,10 @@ class KaoshiSet extends Base
|
||||
$query->where('nianji',$nianji);
|
||||
})
|
||||
->group('subject_id')
|
||||
->field("subject_id
|
||||
,any_value(manfen) as manfen
|
||||
,any_value(youxiu) as youxiu
|
||||
,any_value(jige) as jige")
|
||||
->with([
|
||||
'subjectName'=>function($query){
|
||||
$query->field('id,title,jiancheng,paixu,lieming');
|
||||
@@ -98,6 +102,7 @@ class KaoshiSet extends Base
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
// 按条件排序
|
||||
if(count($data)>0){
|
||||
$data = sortArrByManyField($data,'paixu',SORT_ASC);
|
||||
@@ -115,6 +120,8 @@ class KaoshiSet extends Base
|
||||
{
|
||||
$njList = $this->where('kaoshi_id',$kaoshi)
|
||||
->group('nianji')
|
||||
->field("nianji
|
||||
,any_value(nianjiname) as nianjiname")
|
||||
// ->cache(true)
|
||||
->select();
|
||||
|
||||
|
||||
Reference in new issue
Block a user