feat 档案人脸分页状态
This commit is contained in:
@@ -46,14 +46,4 @@ public class SummariesController : ControllerBase
|
||||
{
|
||||
return await _summaryService.GetDoorDataAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("faceRecordDetail")]
|
||||
public async Task<object> GetCurrentFactoryFaceDetailAsync()
|
||||
{
|
||||
return await _summaryService.GetCurrentFactoryFaceDetailAsync();
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,4 @@ public interface ISummaryService : IScopeDependency
|
||||
Task<DoorHomeDataResponse> GetDoorHomeDataAsync();
|
||||
|
||||
Task<DoorDataResponse> GetDoorDataAsync();
|
||||
|
||||
Task<object> GetCurrentFactoryFaceDetailAsync();
|
||||
}
|
||||
@@ -13,7 +13,6 @@ namespace Dlhis.Basic.Summary.Services.Implements;
|
||||
public class SummaryService : ISummaryService
|
||||
{
|
||||
private readonly IDbContext _dbContext;
|
||||
private readonly IDbContext _faceDbContext;
|
||||
private readonly IGainfoStore _gainfoStore;
|
||||
private readonly ICurrentUser _currentUser;
|
||||
|
||||
@@ -22,8 +21,6 @@ public class SummaryService : ISummaryService
|
||||
_dbContext = dbContext;
|
||||
_gainfoStore = gainfoStore;
|
||||
_currentUser = currentUser;
|
||||
|
||||
_faceDbContext = dbContext.ChangeDb("face");
|
||||
}
|
||||
|
||||
public async Task<AttendanceSummaryResponse> GetAttendanceSummaryAsync()
|
||||
@@ -152,20 +149,6 @@ public class SummaryService : ISummaryService
|
||||
};
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public async Task<object> GetCurrentFactoryFaceDetailAsync()
|
||||
{
|
||||
var currentTenantId = _currentUser.GetStringTenantId();
|
||||
var userCodes = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Factory == currentTenantId).Select(x => x.Code).ToListAsync();
|
||||
var total = userCodes.Count;
|
||||
var exists = await _faceDbContext.Queryable<GainfoFaceEntity>().Where(x => userCodes.Contains(x.UserCode)).CountAsync();
|
||||
|
||||
return new
|
||||
{
|
||||
total, exists
|
||||
};
|
||||
}
|
||||
|
||||
private static List<TrendDto> FixTrend(IEnumerable<TrendDto> dtos, DateTime start, DateTime end)
|
||||
{
|
||||
var result = dtos.ToList();
|
||||
|
||||
Reference in New Issue
Block a user