[项目site code 一致性分析验证]
parent
a094e1a2b7
commit
6471041fad
|
@ -304,6 +304,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
var subjectList = query.ToList();
|
var subjectList = query.ToList();
|
||||||
|
|
||||||
var doctorUserIdQuery = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId).Where(t => t.EnrollReadingCategoryList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(c => c.ReadingCategory == ReadingCategory.Global || c.ReadingCategory == ReadingCategory.Visit))
|
var doctorUserIdQuery = from enroll in _repository.Where<Enroll>(t => t.TrialId == trialId).Where(t => t.EnrollReadingCategoryList.Where(t => t.TrialReadingCriterionId == trialReadingCriterionId).Any(c => c.ReadingCategory == ReadingCategory.Global || c.ReadingCategory == ReadingCategory.Visit))
|
||||||
|
.Where(t => t.EnrollReadingCriteriaList.Any(t => t.TrialReadingCriterionId == trialReadingCriterionId && t.IsJoinAnalysis == true))
|
||||||
join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
join user in _repository.Where<User>() on enroll.DoctorId equals user.DoctorId
|
||||||
select user.Id;
|
select user.Id;
|
||||||
|
|
||||||
|
@ -741,6 +742,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
|
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
|
[UnitOfWork]
|
||||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||||
public async Task<IResponseOutput> UpdateTrialVirtualSiteCode(UpdateTrialSiteCodeCommand inCommand)
|
public async Task<IResponseOutput> UpdateTrialVirtualSiteCode(UpdateTrialSiteCodeCommand inCommand)
|
||||||
{
|
{
|
||||||
|
@ -749,6 +751,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
trial.VitrualSiteCode = inCommand.VirtualSiteCode;
|
trial.VitrualSiteCode = inCommand.VirtualSiteCode;
|
||||||
|
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trial.Id, u => new VisitTask() { BlindTrialSiteCode = inCommand.VirtualSiteCode });
|
||||||
|
|
||||||
|
await _taskConsistentRuleRepository.BatchUpdateNoTrackingAsync(t => t.TrialId == trial.Id, u => new TaskConsistentRule() { BlindTrialSiteCode = inCommand.VirtualSiteCode });
|
||||||
|
|
||||||
|
|
||||||
await _trialVirtualSiteCodeUpdateRepository.AddAsync(new TrialVirtualSiteCodeUpdate() { VirturalSiteCode = inCommand.VirtualSiteCode, TrialId = inCommand.TrialId });
|
await _trialVirtualSiteCodeUpdateRepository.AddAsync(new TrialVirtualSiteCodeUpdate() { VirturalSiteCode = inCommand.VirtualSiteCode, TrialId = inCommand.TrialId });
|
||||||
|
|
||||||
await _trialRepository.SaveChangesAsync();
|
await _trialRepository.SaveChangesAsync();
|
||||||
|
|
|
@ -273,6 +273,11 @@ namespace IRaCIS.Core.Application.Services
|
||||||
//---Code is not allowed to be repeated
|
//---Code is not allowed to be repeated
|
||||||
return ResponseOutput.NotOk(_localizer["TrialSite_CodeDuplicate"]);
|
return ResponseOutput.NotOk(_localizer["TrialSite_CodeDuplicate"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!string.IsNullOrEmpty(editTrialSiteCommand.TrialSiteCode) && await _trialRepository.AnyAsync(t=>t.Id==trialId && t.VitrualSiteCode == editTrialSiteCommand.TrialSiteCode) )
|
||||||
|
{
|
||||||
|
return ResponseOutput.NotOk(_localizer["TrialSite_CodeDuplicate2"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue