Browse Source

Merge branch 'release_20250310' of Fengwo/hotline into release

tianshuang 1 month ago
parent
commit
27fdde8488
1 changed files with 15 additions and 15 deletions
  1. 15 15
      src/Hotline.Application/Identity/IdentityAppService.cs

+ 15 - 15
src/Hotline.Application/Identity/IdentityAppService.cs

@@ -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