diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs index 840057b60..f46997b84 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QCListViewModel.cs @@ -304,7 +304,7 @@ namespace IRaCIS.Core.Application.Contracts public Guid? ForwardUserId { get; set; } - public string ForwardUser { get; set; } = String.Empty; + public string ForwardUserName { get; set; } = String.Empty; public DateTime? ForwardTime { get; set; } diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index c1ed6db40..3c77275e8 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -290,7 +290,6 @@ namespace IRaCIS.Core.Application.Image.QA { var qaReply = _mapper.Map(checkDialogCommand); - qaReply.CreateUser = _userInfo.RealName; qaReply.UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt; diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index bb323af28..44cf91e5f 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -150,6 +150,7 @@ namespace IRaCIS.Core.Application.Service CreateMap() + .ForMember(d => d.ForwardUserName, u => u.MapFrom(s => s.ForwardUser.UserName)) .ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code)) .ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode)); @@ -179,7 +180,9 @@ namespace IRaCIS.Core.Application.Service .ForMember(d => d.FullFilePath, u => u.MapFrom(s => s.Path + "?access_token=" + token)); //一致性核查 质疑对话 - CreateMap(); + CreateMap() + .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName)) + .ForMember(d => d.CreateUserFullName, u => u.MapFrom(t => t.CreateUser.FullName)); //QC 质疑对话 var currentUserId = Guid.Empty; diff --git a/IRaCIS.Core.Domain/QC/CheckChallengeDialog.cs b/IRaCIS.Core.Domain/QC/CheckChallengeDialog.cs index 657388d58..a2be79cef 100644 --- a/IRaCIS.Core.Domain/QC/CheckChallengeDialog.cs +++ b/IRaCIS.Core.Domain/QC/CheckChallengeDialog.cs @@ -7,14 +7,14 @@ using System.Text; namespace IRaCIS.Core.Domain.Models { - public class CheckChallengeDialog : Entity, IAuditAddWithUserName + public class CheckChallengeDialog : Entity, IAuditAdd { public string TalkContent { get; set; } = string.Empty; - + public SubjectVisit SubjectVisit { get; set; } public Guid SubjectVisitId { get; set; } - public string CreateUser { get; set; } + public User CreateUser { get; set; } public DateTime CreateTime { get; set; } = DateTime.Now; public Guid CreateUserId { get; set; } = Guid.Empty; diff --git a/IRaCIS.Core.Domain/QC/QCChallengeDialog.cs b/IRaCIS.Core.Domain/QC/QCChallengeDialog.cs index ebce89325..96311bbaf 100644 --- a/IRaCIS.Core.Domain/QC/QCChallengeDialog.cs +++ b/IRaCIS.Core.Domain/QC/QCChallengeDialog.cs @@ -1,5 +1,6 @@ using IRaCIS.Core.Domain.Share; using System; +using System.ComponentModel.DataAnnotations.Schema; namespace IRaCIS.Core.Domain.Models { @@ -11,14 +12,10 @@ namespace IRaCIS.Core.Domain.Models public Guid QCChallengeId { get; set; } public Guid SubjectVisitId { get; set; } - - - [foren] + [ForeignKey("CreateUserId")] public User CreateUser { get; set; } - - public DateTime CreateTime { get; set; } = DateTime.Now; public Guid CreateUserId { get; set; } = Guid.Empty; diff --git a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs index c579f7ad0..f634c3f73 100644 --- a/IRaCIS.Core.Domain/Visit/SubjectVisit.cs +++ b/IRaCIS.Core.Domain/Visit/SubjectVisit.cs @@ -106,6 +106,8 @@ namespace IRaCIS.Core.Domain.Models [ForeignKey("ClinicalDataSignUserId")] public User ClinicalDataSignUser { get; set; } + [ForeignKey("ForwardUserId")] + public User ForwardUser { get; set; } [ForeignKey("PreliminaryAuditUserId")]