|
@@ -289,21 +289,21 @@ public class IdentityAppService : IIdentityAppService, IScopeDependency
|
|
|
{
|
|
|
DateTime time = DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd"));
|
|
|
|
|
|
- //&& x.AtWork!.Value != true
|
|
|
- //根据当前时间获取排班信息
|
|
|
- var scheduling = await _schedulingRepository.Queryable()
|
|
|
- .Includes(x => x.SchedulingUser)
|
|
|
- .Where(x => x.SchedulingTime == time &&
|
|
|
- (x.AtWork == true || x.AtWork == null) &&
|
|
|
- x.SchedulingUser.UserId == id)
|
|
|
- .OrderBy(x => x.SendOrderNum).FirstAsync(cancellationToken);
|
|
|
- if (scheduling != null)
|
|
|
- {
|
|
|
- scheduling.AtWork = true;
|
|
|
- //执行登录平均派单
|
|
|
- await _orderDomainService.LogAverageOrder(id, scheduling, cancellationToken);
|
|
|
- }
|
|
|
- }
|
|
|
+ //&& x.AtWork!.Value != true
|
|
|
+ //根据当前时间获取排班信息
|
|
|
+ var scheduling = await _schedulingRepository.Queryable()
|
|
|
+ .Includes(x => x.SchedulingUser)
|
|
|
+ .Where(x => x.SchedulingTime == time &&
|
|
|
+ //(x.AtWork == true || x.AtWork == null) &&
|
|
|
+ x.SchedulingUser.UserId == id)
|
|
|
+ .OrderBy(x => x.SendOrderNum).FirstAsync(cancellationToken);
|
|
|
+ if (scheduling != null && (!scheduling.AtWork.HasValue || scheduling.AtWork == false))
|
|
|
+ {
|
|
|
+ scheduling.AtWork = true;
|
|
|
+ //执行登录平均派单
|
|
|
+ await _orderDomainService.LogAverageOrder(id, scheduling, cancellationToken);
|
|
|
+ }
|
|
|
+ }
|
|
|
catch
|
|
|
{
|
|
|
// ignored
|