add .
This commit is contained in:
@@ -34,7 +34,7 @@ public class SapBusinessTripService : ISapBusinessTripService
|
||||
/// <inheritdoc />
|
||||
public async Task HandlerBusinessTripsByFactoryAsync(string factory)
|
||||
{
|
||||
var today = DateTime.Today;
|
||||
var today =DateTime.Today;
|
||||
var yesterday = today.AddDays(-1);
|
||||
|
||||
try
|
||||
@@ -64,6 +64,7 @@ public class SapBusinessTripService : ISapBusinessTripService
|
||||
var tripInfos = await _dbContext.Queryable<BusinessTripEntity>()
|
||||
.Where(x => SqlFunc.DateIsSame(x.BeginDate, today) || SqlFunc.DateIsSame(x.BeginDate, yesterday))
|
||||
.Where(x => !SqlFunc.IsNullOrEmpty(x.Destination))
|
||||
.Where(x => !SqlFunc.IsNullOrEmpty(x.BeginDateTime) && !SqlFunc.IsNullOrEmpty(x.EndDateTime))
|
||||
.Where(x => x.Destination == factory)
|
||||
.ToListAsync();
|
||||
|
||||
@@ -72,9 +73,14 @@ public class SapBusinessTripService : ISapBusinessTripService
|
||||
.Where(x => x.Type == DeviceTypeEnumType.Door)
|
||||
.Where(x => x.TenantId == factory)
|
||||
.Where(x => x.IsBusinessTrip)
|
||||
.Where(x => x.IsDeleted == false)
|
||||
.SingleAsync();
|
||||
|
||||
var deviceCodes = await _dbContext.Queryable<DeviceGroupRelationshipEntity>().Where(x => x.GroupCode == tripGroup.Code).Select(x => x.DeviceCode).ToListAsync();
|
||||
var deviceCodes = await _dbContext.Queryable<DeviceGroupRelationshipEntity>()
|
||||
.Where(x => x.GroupCode == tripGroup.Code)
|
||||
.Where(x => x.IsDeleted == false)
|
||||
.Select(x => x.DeviceCode)
|
||||
.ToListAsync();
|
||||
|
||||
if (deviceCodes.Any())
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user