diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_OpenClassController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_OpenClassController.cs index a1cb68b9..e5c566de 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_OpenClassController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_OpenClassController.cs @@ -162,4 +162,16 @@ public class Ghre_OpenClassController : BaseController CancelClose([FromBody] List Ids) => await _service.UpdateStatus(Ids, "Opening"); #endregion + + + + #region 成绩 + /// + /// 查询成绩 + /// + /// 开班ID + /// + [HttpPost, Route("QueryScore/{Id}")] + public async Task>> QueryScore(long Id) => await _service.QueryScore(Id); + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Api/Tiobon.Core.Model.xml b/Tiobon.Core.Api/Tiobon.Core.Model.xml index 87656fed..28e3c53b 100644 --- a/Tiobon.Core.Api/Tiobon.Core.Model.xml +++ b/Tiobon.Core.Api/Tiobon.Core.Model.xml @@ -33782,6 +33782,86 @@ 是否缺考 + + + 工号 + + + + + 姓名 + + + + + 部门 + + + + + 出席状态 + + + + + 缺席原因 + + + + + 打卡时间 + + + + + 线上得分 + + + + + 调整分 + + + + + 考试分数 + + + + + 实操分 + + + + + 卷面合格 + + + + + 卷面合格 + + + + + 最终是否合格 + + + + + 最终是否合格 + + + + + 重考次数 + + + + + 批改评语 + + 员工ID diff --git a/Tiobon.Core.Api/Tiobon.Core.xml b/Tiobon.Core.Api/Tiobon.Core.xml index 6742c4ea..c26d1bb0 100644 --- a/Tiobon.Core.Api/Tiobon.Core.xml +++ b/Tiobon.Core.Api/Tiobon.Core.xml @@ -1148,6 +1148,13 @@ 员工ID列表 + + + 查询成绩 + + 开班ID + + 开班费用(Controller) diff --git a/Tiobon.Core.IServices/Ghre/IGhre_OpenClassServices.cs b/Tiobon.Core.IServices/Ghre/IGhre_OpenClassServices.cs index 3db52dc1..f8978d7b 100644 --- a/Tiobon.Core.IServices/Ghre/IGhre_OpenClassServices.cs +++ b/Tiobon.Core.IServices/Ghre/IGhre_OpenClassServices.cs @@ -25,4 +25,6 @@ public interface IGhre_OpenClassServices : IBaseServices InsertSummary(long Id, InsertGhre_OpenClassInput entity); Task UpdateStatus(List ids, string status, string source = null); + + Task>> QueryScore(long Id); } \ No newline at end of file diff --git a/Tiobon.Core.Model/ViewModels/Extend/Ghre_OpenClassScore.cs b/Tiobon.Core.Model/ViewModels/Extend/Ghre_OpenClassScore.cs new file mode 100644 index 00000000..48f0771a --- /dev/null +++ b/Tiobon.Core.Model/ViewModels/Extend/Ghre_OpenClassScore.cs @@ -0,0 +1,87 @@ +namespace Tiobon.Core.Model; + +public class Ghre_OpenClassScore +{ + + public string Id { get; set; } + + /// + /// 工号 + /// + public string StaffNo { get; set; } + + /// + /// 姓名 + /// + public string StaffName { get; set; } + + /// + /// 部门 + /// + public string DeptName { get; set; } + + /// + /// 出席状态 + /// + public string AttendStatus { get; set; } + + /// + /// 缺席原因 + /// + public string AbsenceReason { get; set; } + + /// + /// 打卡时间 + /// + public string CheckInTime { get; set; } + + /// + /// 线上得分 + /// + public decimal? Score { get; set; } = 0; + + /// + /// 调整分 + /// + public decimal? AdjustScore { get; set; } = 0; + + /// + /// 考试分数 + /// + public decimal? TotalScore { get; set; } = 0; + + /// + /// 实操分 + /// + public decimal? ActualScore { get; set; } = 0; + + /// + /// 卷面合格 + /// + public bool? IsPass { get; set; } + + /// + /// 卷面合格 + /// + public string IsPassLabel { get; set; } + + /// + /// 最终是否合格 + /// + public bool? FinallyIsPass { get; set; } + + /// + /// 最终是否合格 + /// + public string FinallyIsPassLabel { get; set; } + + /// + /// 重考次数 + /// + public int? RetakeTimes { get; set; } = 0; + + /// + /// 批改评语 + /// + public string Comment { get; set; } +} \ No newline at end of file diff --git a/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs b/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs index b262960e..5cf7648a 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_OpenClassServices.cs @@ -340,6 +340,7 @@ public class Ghre_OpenClassServices : BaseServices>> QueryScore(long Id) + { + var sql = @$"SELECT A.Id, + C.StaffNo, + C.StaffName, + D.DeptName, + A.Score, + A.AdjustScore, + A.IsPass, + A.FinallyIsPass, + A.RetakeTimes, + A.Comment +FROM Ghre_ExamRecord A + JOIN Ghre_Exam B ON A.ExamId = B.Id + LEFT JOIN Ghra_Staff C ON A.StaffId = C.StaffID + LEFT JOIN Ghro_Dept D ON C.DeptID = D.DeptID +WHERE B.OpenClassId = '{Id}'"; + var entitys = await Db.Ado.SqlQueryAsync(sql); + + entitys.ForEach(it => + { + it.IsPassLabel = it.IsPass == true ? "合格" : "不合格"; + it.FinallyIsPassLabel = it.FinallyIsPass == true ? "合格" : "不合格"; + }); + + return ServiceResult>.OprateSuccess("查询成功!", entitys); + } + #endregion } \ No newline at end of file diff --git a/Tiobon.Core/Tiobon.Core.Model.xml b/Tiobon.Core/Tiobon.Core.Model.xml index 87656fed..28e3c53b 100644 --- a/Tiobon.Core/Tiobon.Core.Model.xml +++ b/Tiobon.Core/Tiobon.Core.Model.xml @@ -33782,6 +33782,86 @@ 是否缺考 + + + 工号 + + + + + 姓名 + + + + + 部门 + + + + + 出席状态 + + + + + 缺席原因 + + + + + 打卡时间 + + + + + 线上得分 + + + + + 调整分 + + + + + 考试分数 + + + + + 实操分 + + + + + 卷面合格 + + + + + 卷面合格 + + + + + 最终是否合格 + + + + + 最终是否合格 + + + + + 重考次数 + + + + + 批改评语 + + 员工ID diff --git a/Tiobon.Core/Tiobon.Core.xml b/Tiobon.Core/Tiobon.Core.xml index 6742c4ea..c26d1bb0 100644 --- a/Tiobon.Core/Tiobon.Core.xml +++ b/Tiobon.Core/Tiobon.Core.xml @@ -1148,6 +1148,13 @@ 员工ID列表 + + + 查询成绩 + + 开班ID + + 开班费用(Controller)