diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 7a48919c1..dabf10d1e 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -68,10 +68,10 @@ namespace IRaCIS.Core.Application IEasyCachingProvider provider, IOrganInfoService iOrganInfoService, IRepository trialCriterionAdditionalAssessmentTypeRepository, - IRepository visitTaskRepository, - IRepository readingTableQuestionTrialRepository, - IRepository readingTableQuestionAnswerRepository, - IRepository readingTableAnswerRowInfoRepository, + IRepository visitTaskRepository, + IRepository readingTableQuestionTrialRepository, + IRepository readingTableQuestionAnswerRepository, + IRepository readingTableAnswerRowInfoRepository, IRepository readingTaskQuestionAnswer ) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 4c140d16f..9886bc91f 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -228,11 +228,15 @@ namespace IRaCIS.Application.Services //维护部位到项目表 var searchList = await _repository.Where(t => t.Parent.Code == "BodyPart" && t.ParentId != null && t.IsEnable).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); - var needAddBodyPartList = searchList.Select(t => new TrialBodyPart() { Code = t.Code, Name = t.Value, NameCN = t.ValueCN }); + var needAddBodyPartList = searchList.Select(t => new TrialBodyPart() { Code = t.Code, Name = t.Value, NameCN = t.ValueCN }).ToList(); - needAddBodyPartList.ForEach(t => t.TrialId = trial.Id); + foreach (var item in needAddBodyPartList) + { + item.TrialId = trial.Id; + } + - await _repository.AddRangeAsync(needAddBodyPartList); + await _repository.AddRangeAsync(needAddBodyPartList,true); _provider.Set(trial.Id.ToString(), StaticData.TrialState.TrialInitializing, TimeSpan.FromDays(7));