|
|
|
@ -14,6 +14,8 @@ using DocumentFormat.OpenXml.EMMA;
|
|
|
|
|
using NPOI.SS.Formula.Functions;
|
|
|
|
|
using Infrastructure.Extensions;
|
|
|
|
|
using DocumentFormat.OpenXml.Math;
|
|
|
|
|
using DocumentFormat.OpenXml.Spreadsheet;
|
|
|
|
|
using Org.BouncyCastle.Ocsp;
|
|
|
|
|
|
|
|
|
|
namespace OpenAuth.App.ServiceApp
|
|
|
|
|
{
|
|
|
|
@ -323,5 +325,28 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
public async Task<Response<PageInfo<List<LasaMediaFile>>>> GetMediaFile(string device, string picname, DateTime? startTime, DateTime? endTime, int page, int limit)
|
|
|
|
|
{
|
|
|
|
|
RefAsync<int> totalCount = 0;
|
|
|
|
|
using (var db = UnitWork.CreateContext())
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine(startTime.ToString());
|
|
|
|
|
var list = await db.LasaMediaFile.AsQueryable()
|
|
|
|
|
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(device),x => x.DroneModelKey == device)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(picname), x => x.Name.Contains(picname))
|
|
|
|
|
.WhereIF("0001/1/1 0:00:00".Equal(startTime.ToString() ), x => x.CreateTime >= startTime)
|
|
|
|
|
.WhereIF("0001/1/1 0:00:00".Equal(endTime.ToString()), x => x.CreateTime <= endTime)
|
|
|
|
|
.OrderBy(x => x.CreateTime, OrderByType.Asc)
|
|
|
|
|
.ToPageListAsync(page, limit, totalCount);
|
|
|
|
|
return new Response<PageInfo<List<LasaMediaFile>>>
|
|
|
|
|
{
|
|
|
|
|
Result = new PageInfo<List<LasaMediaFile>> { Items = list, Total = totalCount }
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|