|
@@ -138,9 +138,11 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
|
|
|
try
|
|
|
{
|
|
|
DateTime time = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
|
|
|
- //根据当前时间获取排班信息
|
|
|
- var scheduling = await _schedulingRepository.Queryable().Includes(x => x.SchedulingUser)
|
|
|
- .Where(x => x.SchedulingTime == time && x.WorkingTime <= DateTime.Now.TimeOfDay && x.OffDutyTime >= DateTime.Now.TimeOfDay && x.AtWork!.Value != true && x.SchedulingUser.UserId == id)
|
|
|
+
|
|
|
+ //&& x.AtWork!.Value != true
|
|
|
+ //根据当前时间获取排班信息
|
|
|
+ var scheduling = await _schedulingRepository.Queryable().Includes(x => x.SchedulingUser)
|
|
|
+ .Where(x => x.SchedulingTime == time && x.WorkingTime <= DateTime.Now.TimeOfDay && x.OffDutyTime >= DateTime.Now.TimeOfDay && ( x.AtWork == true || x.AtWork == null) && x.SchedulingUser.UserId == id)
|
|
|
.OrderBy(x => x.SendOrderNum).FirstAsync(cancellationToken);
|
|
|
if (scheduling != null)
|
|
|
{
|