liumiao
2021-01-29 d4550d24d91a9049e183eac69156f43b8ed27d6a
根据学员获取课次
1 files modified
8 ■■■■ changed files
app/Http/Controllers/Api/v1/ClassScheduleController.php 8 ●●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/ClassScheduleController.php
@@ -447,16 +447,16 @@
                }
            }
            if($val["staffId"] > 0)
            if(!empty($val["staffId"]) && $val["staffId"] > 0)
            {
                $teacherName = !empty($staffUser[$val["staffId"]]) ? $staffUser[$val["staffId"]] : '';
                $tName = !empty($staffUser[$val["staffId"]]) ? $staffUser[$val["staffId"]] : '';
            }
            else
            {
                $teacherName = !empty($teacherName[$val["classCode"] . '-' . $val['classNumber']]) ? implode(",", array_values(array_unique($teacherName[$val["classCode"] . '-' . $val['classNumber']]))) : '';
                $tName = !empty($teacherName[$val["classCode"] . '-' . $val['classNumber']]) ? implode(",", array_values(array_unique($teacherName[$val["classCode"] . '-' . $val['classNumber']]))) : '';
            }
            $val["teacherName"] = $teacherName;//教师名字
            $val["teacherName"] = $tName;//教师名字
            $val["homeBakers"] = !empty($homeTeacherList[$val["hometeacherId"]]) ? $homeTeacherList[$val["hometeacherId"]] : ''; //家培师名字
            $val["notNum"] = $classStudentsNum ? ($classStudentsNum - $signIn > 0 ? $classStudentsNum - $signIn : 0) : 0; //未签到
            $val["checkedInNum"] = count($recordList);//签到