仓储更新

This commit is contained in:
2022-04-25 17:50:56 +08:00
parent 5d0c8a2cba
commit 4487235a97
4 changed files with 98 additions and 19 deletions
@@ -93,16 +93,21 @@ namespace IRaCIS.Core.Application.Services
}
var subject = (await _subjectRepository.FirstOrDefaultAsync(t => t.Id == svCommand.SubjectId)).IfNullThrowException();
//更新受试者 首次给药日期 是否入组确认
if (svCommand.SubjectFirstGiveMedicineTime != null && svCommand.IsBaseLine)
{
//await _subjectRepository.UpdatePartialSearchFirstAsync(svCommand.SubjectId,
// u => new Subject() { FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime });
var subject = (await _subjectRepository.FirstOrDefaultAsync(t => t.Id == svCommand.SubjectId)).IfNullThrowException();
// 更新受试者
subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime;
List<DataInspection> datas = new List<DataInspection>();
datas.Add(new DataInspection()
+7 -4
View File
@@ -13,7 +13,7 @@ namespace IRaCIS.Application.Services
private readonly IRepository<Dictionary> _dicRepository;
private readonly IRepository<SubjectVisit> _trialRepository;
public TestService(IRepository<Dictionary> dicRepository,IRepository<SubjectVisit> trialRepository)
public TestService(IRepository<Dictionary> dicRepository, IRepository<SubjectVisit> trialRepository)
{
_dicRepository = dicRepository;
_trialRepository = trialRepository;
@@ -23,9 +23,12 @@ namespace IRaCIS.Application.Services
public string Get(testModel testModel)
{
var d = _repository.Where<User>(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();
var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
CultureInfo culture = CultureInfo.CurrentUICulture;
var tt= _dicRepository.UpdatePartialSearchFirstAsync(Guid.Parse("e2b97a6c-35a6-4aa3-7f27-08da13ab33ff"), t => new Dictionary() { Description = "xxxxx" }, true).Result;
//var d = _repository.Where<User>(t => t.FullName.Contains("cc")).Select(t => t.FullName).FirstOrDefault();
//var c = _dicRepository.Where(t => t.ParentId != null).Select(t => t.MappedValue).First();
//CultureInfo culture = CultureInfo.CurrentUICulture;
//var dd = _dicRepository.UpdatePartialFields(Guid.Parse("8a90c96e-0776-4f7b-82a6-18933d339584"),
// u => new Dictionary() { ParentId = null, Code = "test" }, true);