diff --git a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
index cc3666dc3..fe2b293e0 100644
--- a/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
+++ b/IRaCIS.Core.Application/Service/Doctor/DTO/DoctorModel.cs
@@ -744,6 +744,8 @@ namespace IRaCIS.Application.Contracts
public bool IsEnable { get; set; }
+ public string CriterionName { get; set; }
+
///
/// 文件路径
///
diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs
index d8877f22a..77c475c2d 100644
--- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs
+++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteUserSurveyService.cs
@@ -65,7 +65,7 @@ namespace IRaCIS.Core.Application.Contracts
if (addOrEditTrialSiteUserSurvey.IsGenerateAccount )
{
- var trialId= _trialSiteUserSurveyRepository.Where(t=>t.Id == addOrEditTrialSiteUserSurvey.TrialSiteSurveyId).Select(t=>t.TrialSiteSurvey.TrialId).FirstOrDefault();
+ var trialId= _trialSiteUserSurveyRepository.Where(t=>t.TrialSiteSurveyId == addOrEditTrialSiteUserSurvey.TrialSiteSurveyId).Select(t=>t.TrialSiteSurvey.TrialId).FirstOrDefault();
var trialType = _repository.Where(t => t.Id == trialId).Select(t => t.TrialType).FirstOrDefault();
diff --git a/IRaCIS.Core.Application/_MediatR/Handlers/TrialStateCacheHandler.cs b/IRaCIS.Core.Application/_MediatR/Handlers/TrialStateCacheHandler.cs
index 151f78e89..0f011158c 100644
--- a/IRaCIS.Core.Application/_MediatR/Handlers/TrialStateCacheHandler.cs
+++ b/IRaCIS.Core.Application/_MediatR/Handlers/TrialStateCacheHandler.cs
@@ -28,16 +28,16 @@ namespace IRaCIS.Core.Application.MediatR.Handlers
}
- public Task Handle(TrialStateCacheRequest request, CancellationToken cancellationToken)
+ public async Task Handle(TrialStateCacheRequest request, CancellationToken cancellationToken)
{
//项目启动,将项目状态缓存,因为hangfire 加入后台任务,还是向队列添加任务,执行都有延迟,效果不好
- var list = _trialRepository.Select(t => new { TrialId = t.Id, TrialStatusStr = t.TrialStatusStr }).ToList();
+ var list = await _trialRepository.Select(t => new { TrialId = t.Id, TrialStatusStr = t.TrialStatusStr }).ToListAsync();
// 每天都会有任务刷新状态,项目编辑 添加时 都会处理到缓存中
list.ForEach(t => _provider.Set(t.TrialId.ToString(), t.TrialStatusStr, TimeSpan.FromDays(7)));
- return Task.FromResult(true);
+ return true;
}
}
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 23c7ade66..66dcc5a87 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -1557,11 +1557,42 @@ namespace IRaCIS.Core.Infra.EFCore.Common
extraIdentification = "/ConfirmSelect";
}
+ //获取配置的标准名称
+
+ //List trialDics = new List();
+ //var dictionaryIds = new List();
+ //if (entity.TrialDicList == null || entity.TrialDicList.Count == 0)
+ //{
+ // dictionaryIds = await this._dbContext.TrialDictionary.Where(x => x.TrialId == entity.Id && x.KeyName == "Criterion").Select(x => x.DictionaryId).ToListAsync();
+ //}
+ //else
+ //{
+ // dictionaryIds = entity.TrialDicList.Select(x => x.DictionaryId).ToList();
+ //}
+ //trialDics = await this._dbContext.Dictionary.Where(x => dictionaryIds.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync();
+
+ var trialReadingCritiralIdList= new List();
+
+ var criterionNameList = new List();
+
+ if (entity.TrialClinicalDataSetCriteriaList==null || entity.TrialClinicalDataSetCriteriaList.Count() == 0)
+ {
+ criterionNameList = await _dbContext.TrialClinicalDataSetCriterion.Where(t => t.TrialClinicalDataSetId == entity.Id).Select(t => t.TrialReadingCriterion.CriterionName).ToListAsync();
+ }
+ else
+ {
+ var ids = entity.TrialClinicalDataSetCriteriaList.Select(t => t.TrialReadingCriterionId).ToList();
+ criterionNameList = await _dbContext.ReadingQuestionCriterionTrial.Where(t => ids.Contains(t.Id)).Select(t => t.CriterionName).ToListAsync();
+ }
+
await InsertInspection(entity, type, x => new InspectionConvertDTO()
{
IsDistinctionInterface = false,
ObjectRelationParentId = entity.TrialId,
ExtraIndentification = extraIdentification,
+ },new
+ {
+ CriterionNames= criterionNameList?.Count()>0? string.Join(",", criterionNameList):string.Empty
});
}