xiaochanghai 2 weeks ago
parent 1f6b160ead
commit 8453823150
  1. 6689
      Model/Tiobon.Web.pdm
  2. 12
      Tiobon.Core.Api/Controllers/Ghre/Ghre_StudyRecordController.cs
  3. 13
      Tiobon.Core.Services/Ghre/Ghre_ExamRecordServices.cs
  4. 2
      Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
  5. 6
      Tiobon.Core/Tiobon.Core.Api.xml

File diff suppressed because it is too large Load Diff

@ -115,4 +115,16 @@ public class Ghre_StudyRecordController : BaseController<IGhre_StudyRecordServic
return await _service.QueryTeacherClassAnalysis(body);
}
#endregion
#region 积分发放
/// <summary>
/// 积分发放
/// </summary>
/// <returns></returns>
[HttpPost, Route("IssueCredit")]
public async Task<ServiceResult> IssueCredit()
{
return await _service.IssueCredit();
}
#endregion
}

@ -28,8 +28,12 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
//_ghre_ExamPaperServices = ghre_ExamPaperServices;
_logger = logger;
}
public override async Task<ServicePageResult<Ghre_ExamRecordDto>> QueryFilterPage(QueryBody filter, string condition, bool? IsEnable = true)
{
return await QueryFilterPage1(filter, condition, IsEnable, false);
}
public async Task<ServicePageResult<Ghre_ExamRecordDto>> QueryFilterPage1(QueryBody filter, string condition, bool? IsEnable = true, bool? IsSingle = true)
{
if (string.IsNullOrWhiteSpace(filter.orderBy))
filter.orderBy = "CreateTime1 DESC";
@ -42,6 +46,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
FROM Ghre_ExamRecord_V A";
string conditions = " WHERE IsEnable = 1";
if (IsSingle == false)
conditions += $" AND dbo.FUserDataBelongPriv ({App.User.ID}, A.DataBelongID, NULL) = 1";
if (!string.IsNullOrEmpty(condition)) conditions += " AND " + condition;
@ -151,7 +156,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
public async Task<ServicePageResult<Ghre_ExamRecordDto>> Query(string examId, QueryBody body)
{
return await QueryFilterPage(body, $"ExamId='{examId}'");
return await QueryFilterPage1(body, $"ExamId='{examId}'");
}
public async Task<ServiceResult> ModifyAdjustScore(string examRecordId, EditGhre_ExamRecordInput edit)
@ -427,7 +432,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
var body = new QueryBody();
body.pageNum = 1;
body.pageSize = 10000;
var records = await QueryFilterPage(body, $"ExamId='{record.ExamId}'");
var records = await QueryFilterPage1(body, $"ExamId='{record.ExamId}'");
var records1 = records.result.DT_TableDataT1;
int index = records1.FindIndex(x => x.Id == examRecordId);
@ -605,7 +610,7 @@ public class Ghre_ExamRecordServices : BaseServices<Ghre_ExamRecord, Ghre_ExamRe
if (examRecordId == 0) examRecordId = id;
var records = await QueryFilterPage(body, $"Id='{examRecordId}' AND StaffId='{staffId}'");
var records = await QueryFilterPage1(body, $"Id='{examRecordId}' AND StaffId='{staffId}'");
if (!records.result.DT_TableDataT1.Any())
return ServiceResult<QueryExam>.OprateFailed("无效的考试链接!");

@ -2349,6 +2349,8 @@ ORDER BY {filter.orderBy}";
creditPoints.Add(creditPoint);
}
}
//record.cre
}
await Db.Insertable(creditPoints).ExecuteReturnSnowflakeIdListAsync();

@ -1532,6 +1532,12 @@
<param name="body"></param>
<returns></returns>
</member>
<member name="M:Tiobon.Core.Api.Controllers.Ghre_StudyRecordController.IssueCredit">
<summary>
积分发放
</summary>
<returns></returns>
</member>
<member name="T:Tiobon.Core.Api.Controllers.Ghre_StudyRecordDetailController">
<summary>
培训记录明细(Controller)

Loading…
Cancel
Save