增加班级录入查询结果合并
This commit is contained in:
1 parent
c4cd4fd665
commit
95d1835a73
8 files changed
+108
-70
No files matched your search
@@ -272,28 +272,6 @@ class Index extends AdminBase
|
||||
}
|
||||
|
||||
|
||||
// // 查询管理员
|
||||
// public function adminList()
|
||||
// {
|
||||
// $src = request()->only([
|
||||
// 'searchval'
|
||||
// ],'POST');
|
||||
|
||||
// $ad = new AD;
|
||||
// $list = $ad->search($src);
|
||||
// $cnt = $list->count();
|
||||
// $data = array();
|
||||
// foreach ($list as $key => $value) {
|
||||
// $data[] = [
|
||||
// 'xingming' => $value->adSchool->jiancheng . ' -- ' .$value->xingming
|
||||
// ,'id' => $value->id
|
||||
// ];
|
||||
// }
|
||||
|
||||
// return json($data);
|
||||
// }
|
||||
|
||||
|
||||
// 批量添加
|
||||
public function createAll()
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ class SearchCanyu extends BaseModel
|
||||
->order(['paixu' => 'asc']);
|
||||
}
|
||||
])
|
||||
->group('school_id')
|
||||
->distinct(true)
|
||||
->field('school_id')
|
||||
->select();
|
||||
|
||||
@@ -46,10 +46,10 @@ class SearchCanyu extends BaseModel
|
||||
];
|
||||
}
|
||||
|
||||
if(count($data) > 0)
|
||||
{
|
||||
$data = \app\facade\Tools::sortArrByManyField($data, 'paixu', SORT_ASC);
|
||||
}
|
||||
// if(count($data) > 0)
|
||||
// {
|
||||
// $data = \app\facade\Tools::sortArrByManyField($data, 'paixu', SORT_ASC);
|
||||
// }
|
||||
|
||||
return $data;
|
||||
}
|
||||
@@ -76,6 +76,17 @@ class SearchCanyu extends BaseModel
|
||||
$src['banji_id'] = strToarray($src['banji_id']);
|
||||
$src['ruxuenian'] = strToarray($src['ruxuenian']);
|
||||
|
||||
$lrfg = new \app\kaoshi\model\LuruFengong;
|
||||
$lrList = $lrfg->srcMyLuruBanji($src);
|
||||
|
||||
if($lrList['count'] > 0)
|
||||
{
|
||||
$src['banji_id'] = array_unique($lrList['list']->column('banji_id'));
|
||||
|
||||
count($src['banji_id']) == 0 ? [0] : $src['banji_id'];
|
||||
}
|
||||
|
||||
|
||||
// 通过给定参数,从考号表中获取参加考试的班级
|
||||
$kh = new kh;
|
||||
$bjids = $kh
|
||||
|
||||
@@ -56,10 +56,10 @@ class KsCanYu extends AdminBase
|
||||
,'limit' => 100
|
||||
], 'POST');
|
||||
$khSrc = new \app\kaohao\model\SearchCanYu;
|
||||
$myself = config('shangma.lurufanwei');
|
||||
// $myself = config('shangma.lurufanwei');
|
||||
$category = session('onlineCategory');
|
||||
if($category == 'teacher' && $myself == true)
|
||||
{
|
||||
|
||||
|
||||
$teacher_id = session('user_id');
|
||||
$s = \think\facade\Session::all();
|
||||
|
||||
@@ -76,7 +76,7 @@ class KsCanYu extends AdminBase
|
||||
array_push($src['banji_id'], $value->glBanji->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$bj = $khSrc->class($src);
|
||||
$bj = reSetArray($bj, $src);
|
||||
|
||||
@@ -84,6 +84,7 @@ class KsCanYu extends AdminBase
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 根据考试ID和年级获取参加考试班级
|
||||
public function tjClass()
|
||||
{
|
||||
@@ -126,4 +127,27 @@ class KsCanYu extends AdminBase
|
||||
return json($sbj);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// // 根据教师ID获取可以录入成绩的班级
|
||||
// public function lrclass()
|
||||
// {
|
||||
// $lrfg = new \app\kaoshi\model\LuruFengong;
|
||||
|
||||
// // 获取参数
|
||||
// $src = $this->request
|
||||
// ->only([
|
||||
// 'kaoshi_id' => ''
|
||||
// ], 'POST');
|
||||
|
||||
// $lrfgCnt = $lrfg->srcMyLuruBanji($src);
|
||||
// }
|
||||
|
||||
|
||||
// 根据教师ID获取可以录入成绩的班级
|
||||
public function lrsubject()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Loaded 3 of 8 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user