feat 获取设备上传的时间

This commit is contained in:
2024-10-29 13:55:34 +08:00
parent 7f4950090e
commit 390452f57b
5 changed files with 39 additions and 4 deletions

View File

@@ -75,6 +75,20 @@ public class DeviceUploadLogService : IDeviceUploadLogService
});
}
public async Task<DateTimePeriod> GetDeviceUploadRecordSettingAsync(string deviceNo)
{
var start = await _dbContext.Queryable<DeviceUploadLogEntity>()
.Where(x => x.DeviceUniqueNo == deviceNo)
.Select(x => SqlFunc.AggregateMax(x.RaiseDateTime))
.SingleAsync();
return new DateTimePeriod
{
Start = start,
End = DateTime.Now.AddDays(1)
};
}
public async Task<Pagination<DeviceUploadLogResponse>> GetPageAsync(DeviceUploadLogPageRequest request)
{
DeviceUploadLogTypeEnumType? type = request.Type switch