记录学习时长新增每个附件必须打开

master
xiaochanghai 5 months ago
parent dde5ab2f3d
commit 7341bd392b
  1. 7
      Tiobon.Core.Api/Controllers/Ghre/Ghre_StudyRecordController.cs
  2. 2
      Tiobon.Core.IServices/Ghre/IGhre_StudyRecordServices.cs
  3. 6
      Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs
  4. 1
      Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs

@ -88,11 +88,12 @@ public class Ghre_StudyRecordController : BaseController<IGhre_StudyRecordServic
/// </summary> /// </summary>
/// <param name="insert"></param> /// <param name="insert"></param>
/// <param name="id"></param> /// <param name="id"></param>
/// <param name="attachmentId"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost, Route("RecordDuration/{id}")] [HttpPost, Route("RecordDuration/{id}/{attachmentId}")]
public async Task<ServiceResult> RecordDuration([FromBody] InsertGhre_StudyRecordInput insert, long id) public async Task<ServiceResult> RecordDuration([FromBody] InsertGhre_StudyRecordInput insert, long id, long attachmentId)
{ {
return await _service.RecordDuration(id, insert.StudyDuration); return await _service.RecordDuration(id, insert.StudyDuration, attachmentId);
} }
#endregion #endregion

@ -23,7 +23,7 @@ public interface IGhre_StudyRecordServices :IBaseServices<Ghre_StudyRecord, Ghre
Task<ServiceResult> Join(long courseId); Task<ServiceResult> Join(long courseId);
Task<ServiceResult> RecordDuration(long studyRecordId, decimal? duration); Task<ServiceResult> RecordDuration(long studyRecordId, decimal? duration, long attachmentId);
Task<ServiceResult<ExcelData>> ExportStaffExcel(QueryExport body); Task<ServiceResult<ExcelData>> ExportStaffExcel(QueryExport body);

@ -1328,7 +1328,7 @@ WHERE A.Id = '{id}'";
#endregion #endregion
#region 记录学习时长 #region 记录学习时长
public async Task<ServiceResult> RecordDuration(long studyRecordId, decimal? duration) public async Task<ServiceResult> RecordDuration(long studyRecordId, decimal? duration, long attachmentId)
{ {
var staffId = GetStaffId(); var staffId = GetStaffId();
var sql = $"UPDATE Ghre_StudyRecord SET StudyDuration = ISNULL(StudyDuration, 0)+{duration} WHERE Id='{studyRecordId}' AND StaffId='{staffId}'"; var sql = $"UPDATE Ghre_StudyRecord SET StudyDuration = ISNULL(StudyDuration, 0)+{duration} WHERE Id='{studyRecordId}' AND StaffId='{staffId}'";
@ -1363,6 +1363,10 @@ WHERE A.Id = '{id}'";
studyProgress = 100; studyProgress = 100;
} }
#region 判断所以附件 是否都被打开
#endregion
var studyStatus = DIC_STUDY_RECORD_STUDY_STATUS.NO_FINISH; var studyStatus = DIC_STUDY_RECORD_STUDY_STATUS.NO_FINISH;
if (studyProgress == 100) if (studyProgress == 100)
studyStatus = DIC_STUDY_RECORD_STUDY_STATUS.HAS_FINISH; studyStatus = DIC_STUDY_RECORD_STUDY_STATUS.HAS_FINISH;

@ -4951,7 +4951,6 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1
dict.Add("PeriodMasterId", null); dict.Add("PeriodMasterId", null);
} }
dict.Add("OvertimeRuleID", null); dict.Add("OvertimeRuleID", null);
dict.Add("TaxID", null);
if (dict.Count > 0) if (dict.Count > 0)

Loading…
Cancel
Save