From f31a6408ac7d8078fde88a5f5db9891cf9449672 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 6 Sep 2023 11:06:49 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B7=B2=E9=98=85=E7=89=87?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.API/Controllers/ExtraController.cs | 6 ------ .../Service/Allocation/DTO/VisitTaskViewModel.cs | 6 ++++++ .../Service/Allocation/VisitTaskService.cs | 7 ++++--- IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs | 4 +++- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs index e7566a39d..d5d0d43b1 100644 --- a/IRaCIS.Core.API/Controllers/ExtraController.cs +++ b/IRaCIS.Core.API/Controllers/ExtraController.cs @@ -38,12 +38,6 @@ namespace IRaCIS.Api.Controllers - - - - - - /// 系统用户登录接口[New] [HttpPost, Route("user/login")] [AllowAnonymous] diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 74f089551..d94c9f5ad 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -273,6 +273,12 @@ namespace IRaCIS.Core.Application.ViewModel public ReReadingApplyState ReReadingApplyState { get; set; } public DateTime? SuggesteFinishedTime { get; set; } + + + public string UserName { get; set; } + public string FullName { get; set; } + + } public class IRUnReadSubjectView diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index b2c80894a..0c11cc06d 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -783,11 +783,12 @@ namespace IRaCIS.Core.Application.Service.Allocation [HttpPost] public async Task> GetIRHaveReadTaskList(VisitTaskQuery queryVisitTask) { - + var curentUserSiteIdList=_trialRepository.Where(t=>t.Id==queryVisitTask.TrialId).SelectMany(t=>t.TrialSiteUserList).Where(t=>t.UserId==_userInfo.Id).Select(t=>t.SiteId).ToList(); var visitTaskQueryable = _visitTaskRepository.Where(t => t.TrialId == queryVisitTask.TrialId) - .Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据 - + .Where(t =>/* t.DoctorUserId == _userInfo.Id &&*/ t.ReadingTaskState == ReadingTaskState.HaveSigned)//该医生 已经签名的数据 + .WhereIf(_userInfo.UserTypeEnumInt==(int)UserTypeEnum.PI,t=>t.DoctorUser.UserTypeEnum==UserTypeEnum.PI) + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR, t => t.DoctorUser.UserTypeEnum == UserTypeEnum.SR && curentUserSiteIdList.Contains(t.Subject.SiteId)) .WhereIf(queryVisitTask.SiteId != null, t => t.Subject.SiteId == queryVisitTask.SiteId) .WhereIf(queryVisitTask.SubjectId != null, t => t.SubjectId == queryVisitTask.SubjectId) diff --git a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs index 7e60cc7ac..dc05bd84b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Allocation/_MapConfig.cs @@ -110,7 +110,9 @@ namespace IRaCIS.Core.Application.Service CreateMap().IncludeBase() .ForMember(o => o.SiteId, t => t.MapFrom(u => u.Subject.SiteId)) .ForMember(o => o.TrialSiteCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindTrialSiteCode : u.Subject.TrialSite.TrialSiteCode)) - .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code)); + .ForMember(o => o.SubjectCode, t => t.MapFrom(u => u.IsAnalysisCreate == true ? u.BlindSubjectCode : u.Subject.Code)) + .ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName)) + .ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName));