liumiao
2021-04-26 24294b2eaea540f0cf85dc1f61a4fd7cc06a8caa
修改增加 减少课时
1 files modified
8 ■■■■ changed files
app/Http/Controllers/Api/v1/AskForLeaveController.php 8 ●●●● patch | view | raw | blame | history
app/Http/Controllers/Api/v1/AskForLeaveController.php
@@ -114,10 +114,10 @@
            ["id", "username", "laohourTotal", "hourTotal", "laoinClassHourTotal", "ClassHourTotal", "laosurplusHourTotal", "surplusHourTotal"]);
        $classStudentInfo = ClassStudentsModel::findRecordOneCondition(["classCode" => $classCode, "username" => $userName, "isDelete" => 0, "status" => 1]);
        $laosurplusHourTotal = 0; // 老的 剩余总课时
        $laoinClassHourTotal = 0; // 老的 已上总课时
        $ClassHourTotal = 0; // 新的 已上总课时
        $surplusHourTotal = 0; // 新的 剩余总课时
        $laosurplusHourTotal = !empty($totalHourInfo["laosurplusHourTotal"]) ? $totalHourInfo["laosurplusHourTotal"] : 0; // 老的 剩余总课时
        $laoinClassHourTotal = !empty($totalHourInfo["laoinClassHourTotal"]) ? $totalHourInfo["laoinClassHourTotal"] : 0; // 老的 已上总课时
        $ClassHourTotal = !empty($totalHourInfo["ClassHourTotal"]) ? $totalHourInfo["ClassHourTotal"] : 0; // 新的 已上总课时
        $surplusHourTotal = !empty($totalHourInfo["surplusHourTotal"]) ? $totalHourInfo["surplusHourTotal"] : 0; // 新的 剩余总课时
        //减少操作
        if(!empty($totalHourInfo) && !empty($classStudentInfo) && $type == 2)
        {