From d58395c25e76f1b1869f6e1ce0b5a58fca63f7cc Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 13 Jun 2025 11:38:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9A=8F=E6=9C=BA=E9=98=85=E7=89=87=E5=BA=8F?= =?UTF-8?q?=E5=8F=B72?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index e22899d6a..d6db539f5 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -763,6 +763,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, .WhereIf(inQuery.BeginSignTime != null, t => t.SignTime > inQuery.BeginSignTime) .WhereIf(inQuery.EndSignTime != null, t => t.SignTime < inQuery.EndSignTime) .WhereIf(inQuery.RandomOrder != null, t => t.RandomOrder == inQuery.RandomOrder) + .WhereIf(inQuery.IsRandomOrderList == true, t => t.ReadingTaskState==ReadingTaskState.WaitReading && t.TaskAllocationState==TaskAllocationState.Allocated) .ProjectTo(_mapper.ConfigurationProvider); var defalutSortArray = new string[] { nameof(ReadingTaskView.IsUrgent) + " desc", nameof(ReadingTaskView.SubjectCode), nameof(ReadingTaskView.VisitTaskNum) }; @@ -2977,7 +2978,7 @@ public class VisitTaskService(IRepository _visitTaskRepository, var order = 11 + 5 * (randomIndex - 1); - await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, t => new VisitTask() { RandomOrder = randomIndex }); + await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.Id == id, t => new VisitTask() { RandomOrder = order }); availableNumbers.RemoveAt(randomIndex); }