diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
index 3b20af763..193b772cd 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Learun.Application.WebApi.csproj
@@ -209,6 +209,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuScoreApi.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuScoreApi.cs
new file mode 100644
index 000000000..e4a560b61
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/StuScoreApi.cs
@@ -0,0 +1,112 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using Learun.Application.TwoDevelopment.EducationalAdministration;
+using Learun.Util;
+using Nancy;
+using Newtonsoft.Json;
+
+namespace Learun.Application.WebApi.Modules
+{
+ public class StuScoreApi : BaseNoLoginApi
+ {
+ public StuScoreApi()
+ : base("/Learun/adms/EducationalAdministration/StuScore")
+ {
+ Get["/scoreListByStuInfo"] = GetScoreListByStuInfo;
+
+ }
+
+ private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL();
+ private StuScoreIBLL stuScoreIBLL = new StuScoreBLL();
+ private CdMajorIBLL cdMajorIBLL = new CdMajorBLL();
+ private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL();
+
+ ///
+ /// 获取成绩列表
+ ///
+ ///
+ ///
+ private Response GetScoreListByStuInfo(dynamic _)
+ {
+ var param = this.GetReq();
+
+ ScoreListByStuInfo result = new ScoreListByStuInfo();
+
+ var stuInfoBasicEntity = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(param.StuNo);
+ if (stuInfoBasicEntity != null)
+ {
+ result.StuNo = stuInfoBasicEntity.StuNo;
+ result.StuName = stuInfoBasicEntity.StuName;
+ result.MajorNo = stuInfoBasicEntity.MajorNo;
+ result.ClassNo = stuInfoBasicEntity.ClassNo;
+ if (!string.IsNullOrEmpty(stuInfoBasicEntity.MajorNo))
+ {
+ result.MajorName = cdMajorIBLL.GetCdMajorEntityByMajorNo(stuInfoBasicEntity.MajorNo)?.MajorName;
+ }
+ if (!string.IsNullOrEmpty(stuInfoBasicEntity.ClassNo))
+ {
+ result.ClassName = classInfoIBLL.GetClassInfoEntityByClassNo(stuInfoBasicEntity.ClassNo)?.ClassName;
+ }
+ }
+ var queryJson = JsonConvert.SerializeObject(param);
+
+ var data = stuScoreIBLL.GetScoreListByStuInfo(queryJson);
+ var dataTemp = data.GroupBy(x => new { x.AcademicYearNo, x.Semester }).Select(x => new ScoreList()
+ {
+ AcademicYearNo = x.Key.AcademicYearNo,
+ Semester = x.Key.Semester,
+ StuScoreEntityList = x.Select(y => new StuScoreEntity()
+ {
+ AcademicYearNo = y.AcademicYearNo,
+ Semester = y.Semester,
+ LessonSortNo = y.LessonSortNo,
+ LessonSortName = y.LessonSortName,
+ LessonNo = y.LessonNo,
+ LessonName = y.LessonName,
+ StudyScore = y.StudyScore,
+ Score = y.Score,
+ ScoreOfNotPass = y.ScoreOfNotPass,
+ ScoreOfNotPassTwo = y.ScoreOfNotPassTwo
+ }).OrderBy(a=>a.LessonSortNo).ThenBy(a=>a.LessonNo).ToList()
+ }).ToList().OrderByDescending(x=>x.AcademicYearNo).ThenByDescending(x=>x.Semester);
+ result.ScoreList = dataTemp.ToList();
+
+ return Success(result);
+
+ }
+
+ public class Model
+ {
+ ///
+ /// 学年(18-19)
+ ///
+ public string AcademicYearNo { get; set; }
+ ///
+ /// 学期(1)
+ ///
+ public string Semester { get; set; }
+ ///
+ /// 学号
+ ///
+ public string StuNo { get; set; }
+
+ }
+ public class ScoreListByStuInfo {
+ public string StuNo { get; set; }
+ public string StuName { get; set; }
+ public string MajorNo { get; set; }
+ public string MajorName { get; set; }
+ public string ClassNo { get; set; }
+ public string ClassName { get; set; }
+ public List ScoreList { get; set; }
+ }
+ public class ScoreList {
+ public string AcademicYearNo { get; set; }
+ public string Semester { get; set; }
+ public List StuScoreEntityList { get; set; }
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs
index 78a047024..22104a168 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs
@@ -13,7 +13,7 @@ using Nancy;
namespace Learun.Application.WebApi.Modules
{
- public class TimeTable : BaseApi
+ public class TimeTable : BaseNoLoginApi
{
public TimeTable()
: base("/learun/adms/timetable")
@@ -21,6 +21,7 @@ namespace Learun.Application.WebApi.Modules
Get["/list"] = GetList;
Get["/StuList"] = GetStuInfo;
Get["/StuLessonInfo"] = GetStuLessonInfo;
+ Get["/timeTableData"] = GetTimeTableData;
}
private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL();
private ArrangeLessonTermOfElectiveIBLL arrangeLessonTermOfElectiveIBLL = new ArrangeLessonTermOfElectiveBLL();
@@ -112,6 +113,68 @@ namespace Learun.Application.WebApi.Modules
}
+
+ ///
+ /// 全院课程表【按班级分组】
+ ///
+ ///
+ ///
+ private Response GetTimeTableData(dynamic _)
+ {
+ var param = this.GetReq();
+
+ TimeTableData result = new TimeTableData();
+
+ //开始时间
+ var startdate = string.IsNullOrEmpty(param.StartDate) ? DateTime.Today : Convert.ToDateTime(param.StartDate);
+ var startDate = Common.CalculateFirstDateOfWeek(startdate).ToString("yyyy-MM-dd");
+ var endDate = Common.CalculateLastDateOfWeek(startdate).ToString("yyyy-MM-dd");
+ result.StartDate = startDate;
+ result.EndDate = endDate;
+
+ var semesterAndYear = Common.GetSemesterAndYear(startDate);
+ result.AcademicYearNo = semesterAndYear.AcademicYearLong;
+ result.Semester = semesterAndYear.Semester;
+
+ //课程表数据
+ var timeTableList = new List();
+ //必修课课程表
+ var data = arrangeLessonTermIBLL.GetTimeTableInEducation(startDate, endDate, param.ClassNo, param.EmpNo, "");
+ timeTableList.AddRange(data);
+ //选修课课程表
+ var dataOfElective = arrangeLessonTermOfElectiveIBLL.GetTimeTableInEducation(startDate, endDate, param.ClassNo, param.EmpNo, "");
+ timeTableList.AddRange(dataOfElective);
+ var dataTemp = timeTableList.GroupBy(x => new { x.TeachClassNo, x.ClassName, x.LessonSortNo }).Select(x => new ClassDataList()
+ {
+ ClassNo = x.Key.TeachClassNo,
+ ClassName = x.Key.ClassName,
+ LessonSortNo = x.Key.LessonSortNo,
+ TimeTableList = x.Select(y => new TwoDevelopment.EducationalAdministration.TimeTable()
+ {
+ AcademicYear = y.AcademicYear,
+ Semester = y.Semester,
+ DeptNo = y.DeptNo,
+ MajorNo = y.MajorNo,
+ F_SchoolId = y.F_SchoolId,
+ LessonNo = y.LessonNo,
+ LessonName = y.LessonName,
+ LessonDate = y.LessonDate,
+ LessonTime = y.LessonTime,
+ EmpNo = y.EmpNo,
+ EmpName = y.EmpName,
+ TeachClassNo = y.TeachClassNo,
+ ClassName = y.ClassName,
+ ClassRoomNo = y.ClassRoomNo,
+ ClassroomName = y.ClassroomName,
+ LessonSortNo = y.LessonSortNo
+ }).OrderBy(a => a.LessonTime.Substring(0, 1)).ThenBy(a => a.LessonTime.Substring(1)).ToList()
+ }).OrderBy(x => x.LessonSortNo).ThenBy(x => x.ClassNo).ToList();
+
+ result.ClassDataList = dataTemp;
+
+ return Success(result);
+
+ }
///
/// 数字转中文
@@ -167,6 +230,30 @@ namespace Learun.Application.WebApi.Modules
{
public string StartDate { get; set; }
public string EndDate { get; set; }
+ ///
+ /// 班级编号
+ ///
+ public string ClassNo { get; set; }
+ ///
+ /// 教师编号
+ ///
+ public string EmpNo { get; set; }
}
+ public class TimeTableData
+ {
+ public string AcademicYearNo { get; set; }
+ public string Semester { get; set; }
+ public string StartDate { get; set; }
+ public string EndDate { get; set; }
+ public List ClassDataList { get; set; }
+ }
+ public class ClassDataList
+ {
+ public string ClassNo { get; set; }
+ public string ClassName { get; set; }
+ public string LessonSortNo { get; set; }
+ public List TimeTableList { get; set; }
+ }
+
}
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs
index 9fc249220..f311eb7a9 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs
@@ -677,6 +677,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
+ ///
+ /// 根据学号/姓名获取学生成绩列表
+ ///
+ ///
+ ///
+ public IEnumerable GetScoreListByStuInfo(string queryJson)
+ {
+ try
+ {
+ return stuScoreService.GetScoreListByStuInfo(queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
public List