From 10d50f3b5a95006634cf287ad89335981d5d6256 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 26 Sep 2023 11:23:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/SiteSurvey/TrialSiteSurveyService.cs | 2 +- IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs | 5 +++-- .../Service/TrialSiteUser/TrialService.cs | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index eeb90d390..0984a186b 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -503,7 +503,7 @@ namespace IRaCIS.Core.Application.Contracts .WhereIf(surveyQueryDTO.UpdateTimeBegin != null, t => t.UpdateTime >= surveyQueryDTO.UpdateTimeBegin) .WhereIf(surveyQueryDTO.UpdateTimeEnd != null, t => t.UpdateTime <= surveyQueryDTO.UpdateTimeEnd) - .ProjectTo(_mapper.ConfigurationProvider); + .ProjectTo(_mapper.ConfigurationProvider,new { isEn_Us =_userInfo.IsEn_Us}); return await trialSiteSurveyQueryable.ToPagedListAsync(surveyQueryDTO.PageIndex, surveyQueryDTO.PageSize, surveyQueryDTO.SortField, surveyQueryDTO.Asc); } diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs index ea2453623..1ad12fa3a 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs @@ -12,6 +12,7 @@ namespace IRaCIS.Core.Application.AutoMapper { public SiteSurveyConfig() { + var isEn_Us = false; //编辑 CreateMap().ReverseMap(); @@ -47,12 +48,12 @@ namespace IRaCIS.Core.Application.AutoMapper CreateMap() .ForMember(d => d.TrialSiteAliasName, u => u.MapFrom(s => s.TrialSite.TrialSiteAliasName)) - .ForMember(d => d.SiteName, u => u.MapFrom(s => s.Site.SiteName)) + .ForMember(d => d.SiteName, u => u.MapFrom(s => isEn_Us? s.Site.SiteName:s.Site.SiteNameCN)) .ForMember(d => d.TrialSiteCode, u => u.MapFrom(s => s.TrialSite.TrialSiteCode)); CreateMap(); - var isEn_Us = false; + CreateMap() .ForMember(d => d.UserType, u => u.MapFrom(s => s.UserTypeRole.UserTypeShortName)) .ForMember(d => d.UserTypeEnum, u => u.MapFrom(s => s.UserTypeRole.UserTypeEnum)); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 636943014..27338466c 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -382,6 +382,8 @@ namespace IRaCIS.Application.Services await _repository.BatchDeleteAsync(t => t.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); + + await _repository.BatchDeleteAsync(t => t.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId);