事件增加文化属性
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-10-11 17:03:02 +08:00
parent 971c4dcf9e
commit ed61419a6a
3 changed files with 25 additions and 10 deletions
@@ -50,7 +50,7 @@ public static class DBContext_Ext
}
//添加进记录
eventStoreList.AddRange(trialSiteSurvey.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
eventStoreList.AddRange(GetStoreEvents(trialSiteSurvey.DomainEvents));
}
@@ -86,10 +86,8 @@ public static class DBContext_Ext
subjectVisit.AddDomainEvent(new CheckStateChangedToAuditEvent() { SubjectVisitId = subjectVisit.Id });
}
//添加进记录
eventStoreList.AddRange(subjectVisit.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
eventStoreList.AddRange(GetStoreEvents(subjectVisit.DomainEvents));
}
}
@@ -117,7 +115,7 @@ public static class DBContext_Ext
}
//添加进记录
eventStoreList.AddRange(qCChallengeDialog.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
eventStoreList.AddRange(GetStoreEvents(qCChallengeDialog.DomainEvents));
}
}
@@ -143,7 +141,7 @@ public static class DBContext_Ext
}
//添加进记录
eventStoreList.AddRange(checkChallengeDialog.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
eventStoreList.AddRange(GetStoreEvents(checkChallengeDialog.DomainEvents));
}
}
@@ -180,7 +178,7 @@ public static class DBContext_Ext
taskMedicalReview.AddDomainEvent(new UrgentMedicalReviewAddedEvent() { MedicalReviewId = taskMedicalReview.Id, VisitTaskId = taskMedicalReview.VisitTaskId });
//添加进记录
eventStoreList.AddRange(taskMedicalReview.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
eventStoreList.AddRange(GetStoreEvents(taskMedicalReview.DomainEvents));
}
}
}
@@ -221,7 +219,7 @@ public static class DBContext_Ext
}
//添加进记录
eventStoreList.AddRange(readingMedicalReviewDialog.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
eventStoreList.AddRange(GetStoreEvents(readingMedicalReviewDialog.DomainEvents));
}
}
@@ -259,7 +257,7 @@ public static class DBContext_Ext
visitTask.AddDomainEvent(new UrgentIRApplyedReReading() { VisitTaskId = visitTask.Id });
//添加进记录
eventStoreList.AddRange(visitTask.DomainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }));
eventStoreList.AddRange(GetStoreEvents(visitTask.DomainEvents));
}
}
@@ -270,6 +268,10 @@ public static class DBContext_Ext
dbContext.EventStoreRecord.AddRange(eventStoreList);
}
private static List<EventStoreRecord> GetStoreEvents(IReadOnlyCollection<DomainEvent> domainEvents)
{
return domainEvents.Select(t => new EventStoreRecord() { Id = t.EventId, EventType = t.GetType().AssemblyQualifiedName, EventData = t.ToJsonStr() }).ToList();
}
public class EnrollmentConfirmAndPD
{
public bool IsEnrollmentConfirm { get; set; }