From 7341bd392b42ce7c7e1ab9cd9c1a6523be093314 Mon Sep 17 00:00:00 2001 From: xiaochanghai Date: Fri, 17 Jan 2025 10:16:58 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=B0=E5=BD=95=E5=AD=A6=E4=B9=A0=E6=97=B6?= =?UTF-8?q?=E9=95=BF=E6=96=B0=E5=A2=9E=E6=AF=8F=E4=B8=AA=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E5=BF=85=E9=A1=BB=E6=89=93=E5=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/Ghre/Ghre_StudyRecordController.cs | 7 ++++--- Tiobon.Core.IServices/Ghre/IGhre_StudyRecordServices.cs | 2 +- Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs | 6 +++++- Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs | 1 - 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/Tiobon.Core.Api/Controllers/Ghre/Ghre_StudyRecordController.cs b/Tiobon.Core.Api/Controllers/Ghre/Ghre_StudyRecordController.cs index 6742362e..a59d483b 100644 --- a/Tiobon.Core.Api/Controllers/Ghre/Ghre_StudyRecordController.cs +++ b/Tiobon.Core.Api/Controllers/Ghre/Ghre_StudyRecordController.cs @@ -88,11 +88,12 @@ public class Ghre_StudyRecordController : BaseController /// /// + /// /// - [HttpPost, Route("RecordDuration/{id}")] - public async Task RecordDuration([FromBody] InsertGhre_StudyRecordInput insert, long id) + [HttpPost, Route("RecordDuration/{id}/{attachmentId}")] + public async Task 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 diff --git a/Tiobon.Core.IServices/Ghre/IGhre_StudyRecordServices.cs b/Tiobon.Core.IServices/Ghre/IGhre_StudyRecordServices.cs index 2c53d4d7..1361709a 100644 --- a/Tiobon.Core.IServices/Ghre/IGhre_StudyRecordServices.cs +++ b/Tiobon.Core.IServices/Ghre/IGhre_StudyRecordServices.cs @@ -23,7 +23,7 @@ public interface IGhre_StudyRecordServices :IBaseServices Join(long courseId); - Task RecordDuration(long studyRecordId, decimal? duration); + Task RecordDuration(long studyRecordId, decimal? duration, long attachmentId); Task> ExportStaffExcel(QueryExport body); diff --git a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs index 9be30a02..868f1603 100644 --- a/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs +++ b/Tiobon.Core.Services/Ghre/Ghre_StudyRecordServices.cs @@ -1328,7 +1328,7 @@ WHERE A.Id = '{id}'"; #endregion #region 记录学习时长 - public async Task RecordDuration(long studyRecordId, decimal? duration) + public async Task RecordDuration(long studyRecordId, decimal? duration, long attachmentId) { var staffId = GetStaffId(); 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; } + #region 判断所以附件 是否都被打开 + + #endregion + var studyStatus = DIC_STUDY_RECORD_STUDY_STATUS.NO_FINISH; if (studyProgress == 100) studyStatus = DIC_STUDY_RECORD_STUDY_STATUS.HAS_FINISH; diff --git a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs index a5a20f0f..1531ff49 100644 --- a/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs +++ b/Tiobon.Core.Services/Ghrh/Ghrh_ResumeServices.cs @@ -4951,7 +4951,6 @@ WHERE A.IsEnable = 1 AND C.IsEnable = 1 dict.Add("PeriodMasterId", null); } dict.Add("OvertimeRuleID", null); - dict.Add("TaxID", null); if (dict.Count > 0)