Commit f22c36be authored by 黄奎's avatar 黄奎

页面修改

parent cca4b30b
......@@ -60,8 +60,12 @@ WHERE 1=1
/// <returns></returns>
public int GetClassMinutesRepository(int classId)
{
var BasicMinutes = classRepository.GetEntity(classId)?.ClassHourMinute ?? 45;
return BasicMinutes;
var classMinutes= classRepository.GetEntity(classId)?.ClassHourMinute ?? 0;
if (classMinutes <= 0)
{
classMinutes = 45;
}
return classMinutes;
}
}
}
......@@ -800,12 +800,13 @@ namespace Edu.WebApi.Controllers.Course
});
}
}
var classMinutes = classModule.GetClassMinutesModule(classId);
return ApiResult.Success(data: new
{
data.TeacherName,
data.RoomName,
TotalHour = Convert.ToDecimal(totalMinutes / 60.0),
ClassNum = Convert.ToInt32(totalMinutes / classModule.GetClassMinutesModule(classId)),
ClassNum = Convert.ToInt32(totalMinutes / classMinutes),
DefaultMinutes = totalMinutes,
ClassDate = data.ClassDate.ToString("yyyy-MM-dd"),
GuestList = guestList
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment