修改
This commit is contained in:
@@ -118,31 +118,14 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.NotOk("This subject has executed a visit with uploading study images,and couldn't be deleted.");
|
||||
}
|
||||
|
||||
var isSuccess = await _subjectRepository.BatchDeleteNoTrackingAsync(u => u.Id == id);
|
||||
var isSuccess = await _subjectRepository.DeleteFromQueryAsync(u => u.Id == id);
|
||||
await _subjectVisitRepository.DeleteFromQueryAsync(u => u.SubjectId == id);
|
||||
|
||||
|
||||
var subvisit = await _subjectVisitRepository.Where(x => x.SubjectId == id).ToListAsync();
|
||||
|
||||
List<DataInspection> datas = new List<DataInspection>();
|
||||
|
||||
foreach (var item in subvisit)
|
||||
{
|
||||
datas.Add(new DataInspection()
|
||||
{
|
||||
SiteId = item.SiteId,
|
||||
SubjectId = item.SubjectId,
|
||||
TrialId = item.TrialId,
|
||||
SubjectVisitId = item.Id,
|
||||
Identification = "Delete|Visit|Data|Visit-Image Upload",
|
||||
JsonDetail = JsonConvert.SerializeObject(item)
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
||||
return ResponseOutput.Result(isSuccess);
|
||||
|
||||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
/// <summary> 分页获取受试者列表[New] </summary>
|
||||
|
||||
Reference in New Issue
Block a user