|
|
|
@ -408,7 +408,7 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public async Task<Response<PageInfo<List<LasaMediaFile>>>> GetMediaFile(string taskId, string device,
|
|
|
|
|
public async Task<Response<PageInfo<List<LasaMediaFile>>>> GetMediaFile(string taskId, string airId,string device,
|
|
|
|
|
string picname, DateTime? startTime, DateTime? endTime, int page, int limit, string parentKey,int? objectKeyExist)
|
|
|
|
|
{
|
|
|
|
|
RefAsync<int> totalCount = 0;
|
|
|
|
@ -417,15 +417,16 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
Console.WriteLine(startTime.ToString());
|
|
|
|
|
var list = await db.LasaMediaFile.AsQueryable()
|
|
|
|
|
.LeftJoin<LasaTask>((x, b) => x.FlightId == b.FlightId)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(device), x => x.DroneModelKey == device)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(picname), x => x.Name.Contains(picname))
|
|
|
|
|
.WhereIF(objectKeyExist is 0,x=> x.ObjectKey == null)
|
|
|
|
|
.WhereIF(objectKeyExist is 1,x=> x.ObjectKey != null)
|
|
|
|
|
.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)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(parentKey), x => x.ParentKey == parentKey)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(taskId), x => x.TaskId == taskId)
|
|
|
|
|
.OrderBy(x => x.CreateTime, OrderByType.Desc)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(device), (x, b) => x.DroneModelKey == device)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(picname), (x, b) => x.Name.Contains(picname))
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(airId), (x, b) => b.AirLineId == airId)
|
|
|
|
|
.WhereIF(objectKeyExist is 0,(x, b)=> x.ObjectKey == null)
|
|
|
|
|
.WhereIF(objectKeyExist is 1,(x, b)=> x.ObjectKey != null)
|
|
|
|
|
.WhereIF(!"0001/1/1 0:00:00".Equal(startTime.ToString()), (x, b) => x.CreateTime >= startTime)
|
|
|
|
|
.WhereIF(!"0001/1/1 0:00:00".Equal(endTime.ToString()), (x, b) => x.CreateTime <= endTime)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(parentKey), (x, b) => x.ParentKey == parentKey)
|
|
|
|
|
.WhereIF(!string.IsNullOrEmpty(taskId), (x, b) => x.TaskId == taskId)
|
|
|
|
|
.OrderBy((x, b) => x.CreateTime, OrderByType.Desc)
|
|
|
|
|
.Select((x,b) => new LasaMediaFile
|
|
|
|
|
{
|
|
|
|
|
Id = x.Id,
|
|
|
|
|