diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_CertificateController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_CertificateController.cs index 1a500476..b545134c 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_CertificateController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_CertificateController.cs @@ -17,4 +17,19 @@ public class Ghre_CertificateController : BaseController + /// 根据条件查询数据 + /// + /// RuleId + /// 条件 + /// + [HttpPost, Route("QueryByRuleId/{RuleId}")] + public async Task> Query(long RuleId, [FromBody] QueryBody body) + { + return await _service.QueryFilterPage(body, $"CertificateRuleId='{RuleId}'"); + } + + #endregion } \ No newline at end of file diff --git a/Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs b/Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs index cd242039..2e5feed1 100644 --- a/Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs +++ b/Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs @@ -173,5 +173,6 @@ public class Ghre_StudyRecordDto : Ghre_StudyRecord public List Groups { get; set; } = new List(); public long? ExamRecordId { get; set; } + public string StudyFinishedRule { get; set; } } diff --git a/Tiobon.Core.Services/Ghre/Ghre_CertificateRuleServices.cs b/Tiobon.Core.Services/Ghre/Ghre_CertificateRuleServices.cs index 03ae27ec..ac93ce0c 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_CertificateRuleServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_CertificateRuleServices.cs @@ -1,6 +1,4 @@ -using static Tiobon.Core.Model.Consts; - -namespace Tiobon.Core.Services; +namespace Tiobon.Core.Services; /// /// 培训证书规则 (服务) diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index 4ff843db..198bfc26 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -93,8 +93,13 @@ public class Ghre_StudyRecordServices : BaseServices().Where(x => x.CourseSceneId != null && courseSceneIds.Contains(x.CourseSceneId)).ToListAsync(); - entitys.ForEach(entity => + + for (int i = 0; i < entitys.Count; i++) { + var entity = entitys[i]; + entity.StudyStatus = await GetParaLabel("TrainingStudyStatus", entity.StudyStatus); + entity.StudyFinishedRule = await GetParaLabel("TrainStudyFinishedRule", entity.StudyFinishedRule); + entity.CompleteStatus = entity.CompleteStatus == DIC_STUDY_RECORD_STUDY_COMPLETE_STATUS.FINISHED ? "已完成" : "未完成"; if (!string.IsNullOrWhiteSpace(entity.Indate)) entity.Indate = DateTimeHelper.ConvertToDayString(entity.Indate); entity.ExamDate = DateTimeHelper.ConvertToDayString(entity.ExamDate); @@ -119,7 +124,9 @@ public class Ghre_StudyRecordServices : BaseServices(filter.pageNum, total, filter.pageSize, entitys); @@ -998,7 +1005,7 @@ public class Ghre_StudyRecordServices : BaseServices + + + 根据条件查询数据 + + RuleId + 条件 + + Ghre_CertificateDesign(Controller)