diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs index ca5cda657..6f5ef8232 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs @@ -8,7 +8,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO public class VisitQACommand { - public QCChallengeCommand QARecord { get; set; }=new QCChallengeCommand(); + public QCChallengeCommand QARecord { get; set; } = new QCChallengeCommand(); public List QATrialTemplateItemList { get; set; } = new List(); } @@ -150,6 +150,10 @@ namespace IRaCIS.Core.Application.Contracts.DTO public class QCChallengeWithUser : QCChallengeCommand { + public Guid? CurrentActionUserId { get; set; } + + public string CurrentActionUserName { get; set; } = String.Empty; + public Guid SubjectId { get; set; } public UserTypeEnum UserTypeEnum { get; set; } public Guid CreateUserId { get; set; } @@ -431,7 +435,7 @@ namespace IRaCIS.Core.Application.Contracts.DTO /// public class CloseCheckChallengeDto { - public Guid subjectVisitId { get; set; } + public Guid subjectVisitId { get; set; } public string CloseCheckChallenge { get; set; } } diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index 58405aef5..2dccbac52 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1270,7 +1270,7 @@ namespace IRaCIS.Core.Application.Image.QA { var sv = dbSubjectVisitList[0]; - var existObj = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.SubmitState != SubmitStateEnum.Submitted && t.VisitNum < sv.VisitNum); + var existObj = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.SubjectId==sv.SubjectId && t.SubmitState != SubmitStateEnum.Submitted && t.VisitNum < sv.VisitNum); if (sv.PDState == PDStateEnum.PDProgress) { diff --git a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs index 6c2627e68..f394078b8 100644 --- a/IRaCIS.Core.Application/Service/QC/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/QC/_MapConfig.cs @@ -195,7 +195,9 @@ namespace IRaCIS.Core.Application.Service CreateMap() .ForMember(d => d.LatestReplyUserName, u => u.MapFrom(t => t.LatestReplyUser.UserName)) .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.CreateUser.UserName)) - + .ForMember(d => d.CurrentActionUserId, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUserId)) + .ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.SubjectVisit.CurrentActionUser.UserName)) + .ForMember(d => d.SubjectId, u => u.MapFrom(t => t.SubjectVisit.SubjectId )) .ForMember(d => d.ChallengeCode, u => u.MapFrom(s => "Q" + s.ChallengeCode.ToString("D5")));