Browse Source

app2.0 手机端学生课表

临城职教中职
ndbs 2 years ago
parent
commit
ffb8ed9a8e
1 changed files with 16 additions and 6 deletions
  1. +16
    -6
      Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs

+ 16
- 6
Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs View File

@@ -192,15 +192,25 @@ namespace Learun.Application.WebApi.Modules
var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd");
var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd");

//获取学年,学期
// 获取学年,学期
var semesterAndYear = Common.GetSemesterAndYear(startDate);
var strAcademicYear = semesterAndYear.AcademicYearLong;
var strSemester = semesterAndYear.Semester;

var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(semesterAndYear.AcademicYearShort, semesterAndYear.Semester);
var StartTime = entity.StartTime.Value;


if (param.StartDate.IsEmpty() && param.EndDate.IsEmpty())
{
// 校历
var entity = schoolCalendarIbll.GetSchoolCalendarEntityByNo(semesterAndYear.AcademicYearShort, semesterAndYear.Semester);
var StartTime = entity.StartTime.Value;
startDate = Common.CalculateFirstDateOfWeek(StartTime.AddDays(3)).ToString("yyyy-MM-dd");//StartTime.AddDays(((curWeek - 1) * 14)).ToString("yyyy-MM-dd");
if (Convert.ToDateTime(startDate) < StartTime)
{
startDate = StartTime.ToString("yyyy-MM-dd");
}
endDate = Common.CalculateFirstDateOfWeek(StartTime).AddDays(12).ToString("yyyy-MM-dd");
param.StartDate = startDate;
param.EndDate = endDate;
}
var Data = arrangeLessonTermIBLL.GetTimeTableInEducation("", "", "", "", "");
if (param.Description == "学生")
{
@@ -253,7 +263,7 @@ namespace Learun.Application.WebApi.Modules
}
;
var result = new
{ schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", weekList = formatData };
{ schoolName = "课程表", semester = $"{strAcademicYear}学年度 第{strSemester}学期", startDate = startDate, endDate = endDate, weekList = formatData };
return Success(result);

}


Loading…
Cancel
Save