|
|
|
@ -189,7 +189,7 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
RefAsync<int> totalCount = 0;
|
|
|
|
|
using (var db = UnitWork.CreateContext())
|
|
|
|
|
{
|
|
|
|
|
var list = await db.LasaGateway.AsQueryable()
|
|
|
|
|
var list = await db.LasaGateway.AsQueryable()
|
|
|
|
|
.ToPageListAsync(page, limit, totalCount);
|
|
|
|
|
return new Response<PageInfo<List<LasaGateway>>>
|
|
|
|
|
{
|
|
|
|
@ -366,11 +366,11 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="info"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
public bool AddLog(LasaLog info)
|
|
|
|
|
public async Task<bool> AddLog(LasaLog info)
|
|
|
|
|
{
|
|
|
|
|
using (var db = UnitWork.CreateContext())
|
|
|
|
|
{
|
|
|
|
|
var flag = db.LasaLog.Insert(info);
|
|
|
|
|
var flag = await db.LasaLog.InsertAsync(info);
|
|
|
|
|
if (db.Commit())
|
|
|
|
|
return true;
|
|
|
|
|
else
|
|
|
|
@ -408,8 +408,8 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
public async Task<Response<PageInfo<List<LasaMediaFile>>>> GetMediaFile(string taskId, string airId,string device,
|
|
|
|
|
int? type, string picname, DateTime? startTime, DateTime? endTime, int page, int limit, string parentKey,int? objectKeyExist)
|
|
|
|
|
public async Task<Response<PageInfo<List<LasaMediaFile>>>> GetMediaFile(string taskId, string airId, string device,
|
|
|
|
|
int? type, string picname, DateTime? startTime, DateTime? endTime, int page, int limit, string parentKey, int? objectKeyExist)
|
|
|
|
|
{
|
|
|
|
|
RefAsync<int> totalCount = 0;
|
|
|
|
|
using (var db = UnitWork.CreateContext())
|
|
|
|
@ -420,15 +420,15 @@ namespace OpenAuth.App.ServiceApp
|
|
|
|
|
.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(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)
|
|
|
|
|
.WhereIF(type != null, (x, b) => x.Type == type)
|
|
|
|
|
.OrderBy((x, b) => x.CreateTime, OrderByType.Desc)
|
|
|
|
|
.Select((x,b) => new LasaMediaFile
|
|
|
|
|
.Select((x, b) => new LasaMediaFile
|
|
|
|
|
{
|
|
|
|
|
Id = x.Id,
|
|
|
|
|
Name = x.Name,
|
|
|
|
|