From 8e1208e80ec798960dd732d680101fbc1d392551 Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 5 Mar 2025 16:26:07 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E8=A1=A5=E5=85=85=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WorkGrids/Controllers/WorkGridsController.cs | 1 + .../Services/Implements/WorkGridScheduleService.cs | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Src/Dlhis.Basic/WorkGrids/Controllers/WorkGridsController.cs b/Src/Dlhis.Basic/WorkGrids/Controllers/WorkGridsController.cs index 772cfd48..71eae8e6 100644 --- a/Src/Dlhis.Basic/WorkGrids/Controllers/WorkGridsController.cs +++ b/Src/Dlhis.Basic/WorkGrids/Controllers/WorkGridsController.cs @@ -183,6 +183,7 @@ public class WorkGridsController : ControllerBase /// /// [HttpPost("user/attendance/upload")] + [Transactional] public async Task ManuallyUploadAsync(List logIds) { await _workGridScheduleService.ManuallyUploadAsync(logIds); diff --git a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs index 16453987..60f700a5 100644 --- a/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs +++ b/Src/Dlhis.Basic/WorkGrids/Services/Implements/WorkGridScheduleService.cs @@ -1,5 +1,4 @@ using Dlhis.Basic.Common.ApiLog.Services; -using Dlhis.Basic.Organization.Services; using Dlhis.Basic.WorkGrids.Request; using Dlhis.Basic.WorkGrids.Response; using Dlhis.Constants; @@ -25,19 +24,16 @@ public class WorkGridScheduleService : IWorkGridScheduleService private readonly IJinkoJipApi _jinkoJipApi; private readonly IOperateLog _operateLog; private readonly ICurrentUser _currentUser; - private readonly IFactorySettingService _factorySettingService; public WorkGridScheduleService(IDbContext dbContext, IJinkoJipApi jinkoJipApi, IOperateLog operateLog, - ICurrentUser currentUser, - IFactorySettingService factorySettingService) + ICurrentUser currentUser) { _dbContext = dbContext; _jinkoJipApi = jinkoJipApi; _operateLog = operateLog; _currentUser = currentUser; - _factorySettingService = factorySettingService; } public async Task SaveAsync(WorkGridScheduleSaveRequest request) @@ -176,7 +172,7 @@ public class WorkGridScheduleService : IWorkGridScheduleService /// public async Task ManuallyUploadAsync(List logIds) { - const string filterString = $"{{\"IsError\":true"; + const string filterString = "{{\"IsError\":true"; var requests = await _dbContext.Queryable() .LeftJoin((x, device) => x.DeviceUniqueNo == device.UniqueNo) @@ -207,5 +203,7 @@ public class WorkGridScheduleService : IWorkGridScheduleService } } } + + await _operateLog.LogAsync(OperateLogType.WorkGrid, $"重提上传考勤:{requests.Select(x => x.Id).Join(",")}"); } } \ No newline at end of file