This commit is contained in:
巴掌 committed 2020-07-18 09:27:40 +08:00
commit 9e286997a0
5 files changed
+121 -36

No files matched your search

+3
View File
@@ -17,3 +17,6 @@ default_lang = zh-cn
[SESSION]
EXPIRE = 1200
[SHANGMA]
CLASSMAX = 30
+4 -1
View File
@@ -135,7 +135,7 @@
$arr = $tools->array_cover($cover, $covered);
return $arr;
}
/**
* 获取参加考试的学科
@@ -191,3 +191,6 @@
$data = $tools->reSetArray($arr, $srcfrom);
return $data;
}
+12 -7
View File
@@ -115,13 +115,18 @@ class Banji extends BaseController
$paixumax = bjmod::where('school_id', $list['school_id'])
->where('ruxuenian', $list['ruxuenian'])
->max('paixu');
// if($paixumax + $list['bjsum'] > 25) # 如果增加班级数超过2个,则少加班级
// {
// $list['bjsum'] = 25 - $paixumax;
// if($list['bjsum'] == 0){
// return json(['msg' => '已经超过同年级班级数的上线啦。', 'val' => 0]);
// }
// }
$cnfMax = config('shangma.classmax');
if($cnfMax > 0)
{
if($paixumax + $list['bjsum'] > $cnfMax) # 如果增加班级数超过2个,则少加班级
{
$list['bjsum'] = $cnfMax - $paixumax;
if($list['bjsum'] == 0){
return json(['msg' => '已经超过同年级班级数的上线啦。', 'val' => 0]);
}
}
}
$i = 1;
while($i <= $list['bjsum'])
{
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff. Show more