From 22d65574cca588c5a510285ac3b6cbdef5bafdc6 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 29 Jun 2022 16:11:24 +0800 Subject: [PATCH] =?UTF-8?q?IR=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/DTO/VisitTaskViewModel.cs | 5 +++++ .../Service/Allocation/VisitTaskService.cs | 4 ++-- .../Service/Allocation/_MapConfig.cs | 19 +++++++++++++++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 67fd2ebc1..c1383104d 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -97,6 +97,11 @@ namespace IRaCIS.Core.Application.ViewModel } + public class IRReReadingTaskView: ReReadingTaskView + { + + } + public class ReReadingTaskView : VisitTaskView { public ReReadingApplyState ReReadingApplyState { get; set; } diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index dbb3ee1d8..ac36de10b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -276,7 +276,7 @@ namespace IRaCIS.Core.Application.Service /// /// [HttpPost] - public async Task> GetReReadingTaskList(VisitTaskQuery queryVisitTask) + public async Task> GetReReadingTaskList(VisitTaskQuery queryVisitTask) { @@ -295,7 +295,7 @@ namespace IRaCIS.Core.Application.Service .WhereIf(!string.IsNullOrEmpty(queryVisitTask.SubjectCode), t => t.NewReReadingTask.Subject.Code.Contains(queryVisitTask.SubjectCode)) .WhereIf(queryVisitTask.BeginAllocateDate != null, t => t.NewReReadingTask.AllocateTime > queryVisitTask.BeginAllocateDate) .WhereIf(queryVisitTask.EndAllocateDate != null, t => t.NewReReadingTask.AllocateTime < queryVisitTask.EndAllocateDate.Value.AddDays(1)) - .ProjectTo(_mapper.ConfigurationProvider); + .ProjectTo(_mapper.ConfigurationProvider); var defalutSortArray = new string[] { nameof(VisitTask.IsUrgent) + " desc", nameof(VisitTask.SubjectId) }; diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 27611a1d1..b0dcb35a3 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -107,6 +107,25 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName)) .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName)); + + + CreateMap().IncludeMembers(t => t.OriginalReReadingTask) + .ForMember(o => o.ReReadingOriginalTaskCode, t => t.MapFrom(u => u.OriginalReReadingTask.TaskCode)) + .ForMember(o => o.Id, t => t.MapFrom(u => u.Id)) + + .ForMember(o => o.SiteId, t => t.MapFrom(u => u.OriginalReReadingTask.Subject.SiteId)) + .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.OriginalReReadingTask.Subject.TrialSite.TrialSiteCode)) + .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.OriginalReReadingTask.Subject.Code)) + .ForMember(o => o.UserCode, t => t.MapFrom(u => u.OriginalReReadingTask.DoctorUser.UserCode)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.OriginalReReadingTask.DoctorUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.OriginalReReadingTask.DoctorUser.FullName)) + .ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.OriginalReReadingTask.DoctorUser.UserTypeRole.UserTypeShortName)); + + CreateMap() + .ForMember(o => o.Id, t => t.Ignore()); + + + CreateMap().IncludeMembers(t => t.NewReReadingTask) .ForMember(o => o.ReReadingOriginalTaskCode, t => t.MapFrom(u => u.OriginalReReadingTask.TaskCode)) .ForMember(o => o.Id, t => t.MapFrom(u => u.Id))