fix 老档案数据状态更新

This commit is contained in:
2024-07-15 10:59:55 +08:00
parent ba7821796b
commit 2b14396f66

View File

@@ -242,7 +242,8 @@ public class AssignmentService : IAssignmentService
oldData.ForEach(d =>
{
var task = deviceTasks.FirstOrDefault(x => x.UserNo == d.No && x.DeviceUniqueNo == d.DeviceUniqueNo);
var current = dCodes.First(x => x.Code == d.Code);
var task = deviceTasks.FirstOrDefault(x => x.UserNo == current.No && x.DeviceUniqueNo == current.DeviceUniqueNo);
if (task != null)
{
d.Status = task.Status == DeviceTaskStatusEnumType.Success