修改一版
parent
8836377ce0
commit
db15a3fb7b
|
@ -1841,7 +1841,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
if (command.SubjectFirstGiveMedicineTime != null)
|
if (command.SubjectFirstGiveMedicineTime != null)
|
||||||
{
|
{
|
||||||
await _subjectRepository.UpdatePartialFromQueryAsync(command.SubjectId, u => new Subject() { FirstGiveMedicineTime = command.SubjectFirstGiveMedicineTime, });
|
await _subjectRepository.UpdatePartialFromQueryAsync(command.SubjectId, u => new Subject() { FirstGiveMedicineTime = command.SubjectFirstGiveMedicineTime, },true);
|
||||||
}
|
}
|
||||||
|
|
||||||
await _subjectVisitRepository.SaveChangesAsync();
|
await _subjectVisitRepository.SaveChangesAsync();
|
||||||
|
|
|
@ -849,6 +849,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
entityTypeName = "New/" + entityTypeName;
|
entityTypeName = "New/" + entityTypeName;
|
||||||
}
|
}
|
||||||
inspection.Identification = $"{_userInfo.RequestUrl}/{ entityTypeName}/{type}";
|
inspection.Identification = $"{_userInfo.RequestUrl}/{ entityTypeName}/{type}";
|
||||||
|
|
||||||
|
#region 注释
|
||||||
//if (data != null)
|
//if (data != null)
|
||||||
//{
|
//{
|
||||||
// var originaldata = data.OriginalValues.ToObject();
|
// var originaldata = data.OriginalValues.ToObject();
|
||||||
|
@ -857,7 +859,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
// inspection.LastJsonDetail = originaldata.ToJcJson();
|
// inspection.LastJsonDetail = originaldata.ToJcJson();
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
await AddInspectionRecordAsync(inspection, entityobj, otherItem);
|
await AddInspectionRecordAsync(inspection, entityobj, otherItem);
|
||||||
}
|
}
|
||||||
|
@ -918,31 +920,21 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
MapData(add, generalData);
|
MapData(add, generalData);
|
||||||
await SetInspectionNameValue(generalData);
|
await SetInspectionNameValue(generalData);
|
||||||
#region 处理标识
|
#region 处理标识
|
||||||
try
|
|
||||||
{
|
|
||||||
var from = await _dbContext.FrontAuditConfig.FirstOrDefaultAsync(x => x.Identification == add.Identification);
|
var from = await _dbContext.FrontAuditConfig.FirstOrDefaultAsync(x => x.Identification == add.Identification);
|
||||||
add.ObjectType = from?.ObjectTypeId;
|
add.ObjectType = from?.ObjectTypeId;
|
||||||
add.OptType = from?.OptTypeId;
|
add.OptType = from?.OptTypeId;
|
||||||
add.ChildrenType = from?.ChildrenTypeId;
|
add.ChildrenType = from?.ChildrenTypeId;
|
||||||
add.ModuleType = from?.ModuleTypeId;
|
add.ModuleType = from?.ModuleTypeId;
|
||||||
}
|
|
||||||
catch (Exception)
|
|
||||||
{
|
|
||||||
|
|
||||||
throw new BusinessValidationFailedException("操作标识异常");
|
|
||||||
}
|
|
||||||
#endregion
|
#endregion
|
||||||
if (add.ParentId == null)
|
if (add.ParentId == null)
|
||||||
{
|
{
|
||||||
add.ParentId = (await _dbContext.DataInspection.AsQueryable().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.VisitStageId == add.VisitStageId && x.GeneralId == add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
|
add.ParentId = (await _dbContext.DataInspection.AsQueryable().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.VisitStageId == add.VisitStageId && x.GeneralId == add.GeneralId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id;
|
||||||
|
|
||||||
}
|
}
|
||||||
add.CreateUserId = _userInfo.Id;
|
add.CreateUserId = _userInfo.Id;
|
||||||
add.IP = _userInfo.IP;
|
add.IP = _userInfo.IP;
|
||||||
if (add.CreateTime == default(DateTime))
|
add.CreateTime = add.CreateTime == default(DateTime) ? DateTime.Now : add.CreateTime;
|
||||||
{
|
|
||||||
add.CreateTime = DateTime.Now;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (_userInfo.SignId != null)
|
if (_userInfo.SignId != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue