修改一版代码
This commit is contained in:
@@ -266,6 +266,26 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var isSuccess = await _subjectRepository.DeleteFromQueryAsync(u => u.Id == id);
|
||||
await _repository.DeleteFromQueryAsync<SubjectVisit>(u => u.SubjectId == id);
|
||||
var subvisit = await _repository.GetQueryable<SubjectVisit>().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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user