liumiao
2021-01-27 358d1cc141a10092e17c03a2776df35724a9912d
根据学员获取课次
2 files modified
4 ■■■■ changed files
app/Http/Controllers/Api/v1/ClassScheduleController.php 2 ●●● patch | view | raw | blame | history
app/Models/CourseTableModel.php 2 ●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/ClassScheduleController.php
@@ -421,7 +421,7 @@
            }
            $val["teacherName"] = !empty($teacherName[$val["classCode"]]) ? implode(",", array_values(array_unique($teacherName[$val["classCode"]]))) : '';//教师名字
            $val["homeBakers"] = !empty($homeTeacherList[$val["hometeacherId"]]) ? $homeTeacherList[$val["hometeacherId"]] : ''; //家培师名字
            $val["notNum"] = $classStudentsNum ? $classStudentsNum - $signIn : 0; //未签到
            $val["notNum"] = $classStudentsNum ? ($classStudentsNum - $signIn > 0 ? $classStudentsNum - $signIn : 0) : 0; //未签到
            $val["checkedInNum"] = count($recordList);//签到
            $val["numTypes"] = $actualNum . "/" . $leaveNum . "/" . $signIn . "/" . $classStudentsNum;//出勤/请假/人脸/应到
            $val["remind"] = 0;//代办提醒
app/Models/CourseTableModel.php
@@ -32,7 +32,7 @@
    {
        $sql = "
                select  ct.id as courseTableId,ct.staffId,ct.orgId,ct.classNumber,ct.classCode,ct.sectionid,ct.week,ct.hometeacherId,
                  ctt.contentTime,cr.roomname,c.className,left(ct.startTime,10) AS startTime  from anni_coursetable as ct
                  ctt.contentTime,cr.roomname,c.className,left(ct.startTime,10) AS startTime,c.className,c.classHour  from anni_coursetable as ct
                left join anni_coursetabletime as ctt on ct.classCode = ctt.classCode and ct.week = ctt.week
                left join anni_classroom as cr on  ct.orgId = cr.orgId and ct.sectionid = cr.id
                left join anni_class as c on  ct.classCode = c.classCode