fix 补充日志

This commit is contained in:
2025-03-05 16:26:07 +08:00
parent 74cd78e030
commit 8e1208e80e
2 changed files with 5 additions and 6 deletions

View File

@@ -183,6 +183,7 @@ public class WorkGridsController : ControllerBase
/// </summary>
/// <param name="logIds"></param>
[HttpPost("user/attendance/upload")]
[Transactional]
public async Task ManuallyUploadAsync(List<long> logIds)
{
await _workGridScheduleService.ManuallyUploadAsync(logIds);

View File

@@ -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
/// <inheritdoc />
public async Task ManuallyUploadAsync(List<long> logIds)
{
const string filterString = $"{{\"IsError\":true";
const string filterString = "{{\"IsError\":true";
var requests = await _dbContext.Queryable<DeviceUploadLogEntity>()
.LeftJoin<DeviceEntity>((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(",")}");
}
}