|
|
@@ -147,14 +147,14 @@ namespace DataVAPI.ServerDB.MongoDB |
|
|
|
{ |
|
|
|
if (datastop >= datesta && datastop > DateTime.Parse("2011-10-11 00:00:00")) |
|
|
|
{ |
|
|
|
if (string.IsNullOrEmpty(deviceId)) |
|
|
|
{ |
|
|
|
//if (string.IsNullOrEmpty(deviceId)) |
|
|
|
//{ |
|
|
|
return collection.Find(a => a.ClientId == clientId && a.CreateTime >= datesta && a.CreateTime <= datastop)?.ToList().OrderByDescending(a => a.CreateTime).ToList(); |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|
return collection.Find(a => a.ClientId == clientId && a.DeviceId == deviceId && a.CreateTime >= datesta && a.CreateTime <= datastop)?.ToList().OrderByDescending(a => a.CreateTime).ToList(); |
|
|
|
} |
|
|
|
//} |
|
|
|
//else |
|
|
|
//{ |
|
|
|
// return collection.Find(a => a.ClientId == clientId && a.DeviceId == deviceId && a.CreateTime >= datesta && a.CreateTime <= datastop)?.ToList().OrderByDescending(a => a.CreateTime).ToList(); |
|
|
|
//} |
|
|
|
} |
|
|
|
else |
|
|
|
{ |
|
|
|