修改临床数据

This commit is contained in:
2022-08-26 18:11:21 +08:00
parent 346c0e1d76
commit 4640600df1
2 changed files with 98 additions and 70 deletions
+19 -7
View File
@@ -22,6 +22,7 @@ namespace IRaCIS.Application.Services
//_cache = cache;
}
[UnitOfWork]
public async Task<string> Get()
{
@@ -51,12 +52,23 @@ namespace IRaCIS.Application.Services
//var needAddVisitList = await _repository.Where<VisitTask>(t => t.TrialId == Guid.Empty).DistinctBy(t => t.VisitTaskNum).ToListAsync();
await _repository.BatchUpdateAsync<VisitTask>(t => t.Id == Guid.Empty, u => new VisitTask()
{
SuggesteFinishedTime = u.IsUrgent ? DateTime.Now.AddDays(2) : DateTime.Now.AddDays(7),
//await _repository.BatchUpdateAsync<VisitTask>(t => t.Id == Guid.Empty, u => new VisitTask()
//{
// SuggesteFinishedTime = u.IsUrgent ? DateTime.Now.AddDays(2) : DateTime.Now.AddDays(7),
Code = u.Code + 1
});
// Code = u.Code + 1
//});
var list = await _repository.Where<ClinicalDataTrialSet>(t => t.TrialId == Guid.Parse("40400000-3e2c-0016-239b-08da581f0e74")).ToListAsync();
//await _repository.BatchDeleteAsync<ClinicalDataTrialSet>(t => t.TrialId == Guid.Parse("40400000-3e2c-0016-239b-08da581f0e74"));
await _repository.AddRangeAsync(list, true);
await _repository.SaveChangesAsync();
await _repository.BatchUpdateAsync<DataInspection>(t => t.TrialId == Guid.Parse("40400000-3e2c-0016-239b-08da581f0e74") && t.EntityName== "ClinicalDataTrialSet", t => new DataInspection() { CreateTime= DateTime.Now.AddMonths(-2) } );
return _userInfo.LocalIp;
}
@@ -80,7 +92,7 @@ namespace IRaCIS.Application.Services
return findStr;
}
[HttpPost]
public async Task<IActionResult> Get(TestModel testModel)
public async Task<IActionResult> Get(TestModel testModel)
{
// Load a document.
@@ -101,7 +113,7 @@ namespace IRaCIS.Application.Services
// }
//}
return await NpoiWordHelper.TemplateExportWordAsync(Path.Combine(_hostEnvironment.ContentRootPath, "ReplaceText.docx"), new {test="xiugai",ZZZZ="ModiffyZZZZ"},null,_hostEnvironment);
return await NpoiWordHelper.TemplateExportWordAsync(Path.Combine(_hostEnvironment.ContentRootPath, "ReplaceText.docx"), new { test = "xiugai", ZZZZ = "ModiffyZZZZ" }, null, _hostEnvironment);
//_cache.SetString("test" , "cacheStr");