培训记录查询表待新增筛选条件以及新增列

证书规则新增查询发放记录
master
xiaochanghai 4 weeks ago
parent ba5a64d9a8
commit da22d8d58d
  1. 15
      Tiobon.Core.Api/Controllers/Ghre/Ghre_CertificateController.cs
  2. 1
      Tiobon.Core.Model/View/Ghre/Ghre_StudyRecord.Dto.View.cs
  3. 4
      Tiobon.Core.Services/Ghre/Ghre_CertificateRuleServices.cs
  4. 13
      Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
  5. 8
      Tiobon.Core/Tiobon.Core.xml

@ -17,4 +17,19 @@ public class Ghre_CertificateController : BaseController<IGhre_CertificateServic
{
return _service.QueryControl();
}
#region 根据条件查询数据
/// <summary>
/// 根据条件查询数据
/// </summary>
/// <param name="RuleId">RuleId</param>
/// <param name="body">条件</param>
/// <returns></returns>
[HttpPost, Route("QueryByRuleId/{RuleId}")]
public async Task<ServicePageResult<Ghre_CertificateDto>> Query(long RuleId, [FromBody] QueryBody body)
{
return await _service.QueryFilterPage(body, $"CertificateRuleId='{RuleId}'");
}
#endregion
}

@ -173,5 +173,6 @@ public class Ghre_StudyRecordDto : Ghre_StudyRecord
public List<ExamGroup> Groups { get; set; } = new List<ExamGroup>();
public long? ExamRecordId { get; set; }
public string StudyFinishedRule { get; set; }
}

@ -1,6 +1,4 @@
using static Tiobon.Core.Model.Consts;
namespace Tiobon.Core.Services;
namespace Tiobon.Core.Services;
/// <summary>
/// 培训证书规则 (服务)

@ -93,8 +93,13 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud
var courses = await Db.Queryable<Ghre_Course>().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<Ghre_StudyRecord, Ghre_Stud
if (entity.ValidBeginTime != null && entity.ValidEndTime != null)
entity.ResultValidPeriod = DateTimeHelper.ConvertToDayString(entity.ValidBeginTime) + "~" + DateTimeHelper.ConvertToDayString(entity.ValidEndTime);
else entity.ResultValidPeriod = "长期";
});
entitys[i] = entity;
}
return new ServicePageResult<Ghre_StudyRecordDto>(filter.pageNum, total, filter.pageSize, entitys);
@ -998,7 +1005,7 @@ public class Ghre_StudyRecordServices : BaseServices<Ghre_StudyRecord, Ghre_Stud
conditions += $" AND {name} LIKE '%{jsonParam.columnValue}%'";
continue;
}
}
if (name == "CourseStatus")
{

@ -749,6 +749,14 @@
培训记录(Controller)
</summary>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghre_CertificateController.Query(System.Int64,Tiobon.Core.Common.QueryBody)">
<summary>
根据条件查询数据
</summary>
<param name="RuleId">RuleId</param>
<param name="body">条件</param>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_CertificateDesignController">
<summary>
Ghre_CertificateDesign(Controller)

Loading…
Cancel
Save