From 24294b2eaea540f0cf85dc1f61a4fd7cc06a8caa Mon Sep 17 00:00:00 2001
From: liumiao <495261512@qq.com>
Date: 星期一, 26 四月 2021 18:02:29 +0800
Subject: [PATCH] 修改增加 减少课时

---
 app/Http/Controllers/Api/v1/AskForLeaveController.php |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/app/Http/Controllers/Api/v1/AskForLeaveController.php b/app/Http/Controllers/Api/v1/AskForLeaveController.php
index 4f23802..401ac49 100644
--- a/app/Http/Controllers/Api/v1/AskForLeaveController.php
+++ b/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)
         {

--
Gitblit v1.8.0