临时解决不统一的方案
parent
e67b5e0134
commit
37455f539d
|
@ -4179,11 +4179,6 @@
|
||||||
病灶类型
|
病灶类型
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.ViewModel.OrganInfoQuery.LesionType">
|
|
||||||
<summary>
|
|
||||||
病灶类型
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="T:IRaCIS.Core.Application.ViewModel.OrganInfoAddOrEdit">
|
<member name="T:IRaCIS.Core.Application.ViewModel.OrganInfoAddOrEdit">
|
||||||
<summary> OrganInfoAddOrEdit 列表查询参数模型</summary>
|
<summary> OrganInfoAddOrEdit 列表查询参数模型</summary>
|
||||||
</member>
|
</member>
|
||||||
|
|
|
@ -195,7 +195,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var currentInspection = await _dataInspectionRepository.Where(t => t.Id == id).Select(t => new { t.GeneralId, t.ObjectRelationParentId, t.CreateTime }).FirstOrDefaultAsync();
|
var currentInspection = await _dataInspectionRepository.Where(t => t.Id == id).Select(t => new { t.GeneralId, t.ObjectRelationParentId, t.CreateTime }).FirstOrDefaultAsync();
|
||||||
|
|
||||||
var beforeId = await _dataInspectionRepository.Where(x => x.GeneralId == currentInspection.GeneralId /*&& x.ObjectRelationParentId == currentInspection.ObjectRelationParentId*/ && x.CreateTime <= currentInspection.CreateTime && x.Id != id).OrderByDescending(x => x.CreateTime).Select(t => t.Id)
|
var beforeId = await _dataInspectionRepository.Where(x => x.GeneralId == currentInspection.GeneralId && x.CreateTime <= currentInspection.CreateTime && x.Id != id).OrderByDescending(x => x.CreateTime).Select(t => t.Id)
|
||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
|
|
||||||
List<Guid> searchGuidList = new List<Guid>() { id };
|
List<Guid> searchGuidList = new List<Guid>() { id };
|
||||||
|
@ -250,7 +250,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var objectLsit = new List<object>();
|
var objectLsit = new List<object>();
|
||||||
|
|
||||||
var commonDataObjList = await GetRelationParentData( item.Id,item.ObjectRelationParentId, item.ObjectRelationParentId2, item.CreateTime, item.BatchId, objectLsit);
|
var commonDataObjList = await GetRelationParentData(item.Id, item.ObjectRelationParentId, item.ObjectRelationParentId2, item.CreateTime, item.BatchId, objectLsit);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -330,9 +330,24 @@ namespace IRaCIS.Core.Application.Service
|
||||||
str2 = await SetEnum(dto.TrialId, listIdentification, str2);
|
str2 = await SetEnum(dto.TrialId, listIdentification, str2);
|
||||||
str2 = await SetDataInspectionDateType(listIdentification, str2);
|
str2 = await SetDataInspectionDateType(listIdentification, str2);
|
||||||
|
|
||||||
jsonDict[nameof(InspectionJsonDetail.CommonData)] = JsonConvert.DeserializeObject<object>(str2);
|
//jsonDict[nameof(InspectionJsonDetail.CommonData)] = JsonConvert.DeserializeObject<object>(str2);
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
//后续移除 避免前端看到的不统一 因为采用了新的关联方式,之前数据在Data里面取 现在配置在CommonData 里取
|
||||||
|
|
||||||
|
var dataDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(str);
|
||||||
|
var commonDic= JsonConvert.DeserializeObject<IDictionary<string, object>>(str2);
|
||||||
|
foreach (var valuePair in dataDic)
|
||||||
|
{
|
||||||
|
if (!commonDic.ContainsKey(valuePair.Key))
|
||||||
|
{
|
||||||
|
commonDic.Add(valuePair.Key, valuePair.Value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
jsonDict[nameof(InspectionJsonDetail.CommonData)] = JsonConvert.DeserializeObject<object>(commonDic.ToJsonStr());
|
||||||
|
|
||||||
|
|
||||||
item.JsonStr = JsonConvert.SerializeObject(jsonDict);
|
item.JsonStr = JsonConvert.SerializeObject(jsonDict);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -359,7 +374,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
if (objectRelationParentId != null)
|
if (objectRelationParentId != null)
|
||||||
{
|
{
|
||||||
//父子层级的数据可能在同一个批次 进行更新 但是后插入的是父层级的数据 找父层级的稽查应该优先同一批次的
|
//父子层级的数据可能在同一个批次 进行更新 但是后插入的是父层级的数据 找父层级的稽查应该优先同一批次的
|
||||||
var relationParentInspection = await _dataInspectionRepository.Where(t => t.GeneralId == objectRelationParentId && (t.CreateTime <= createTime || t.BatchId == batchId) && t.Id !=id).OrderByDescending(x => x.CreateTime).Select(t => new { t.ObjectRelationParentId, t.CreateTime, t.JsonDetail, t.BatchId, t.ObjectRelationParentId2, t.EntityName ,t.Id}).FirstOrDefaultAsync();
|
var relationParentInspection = await _dataInspectionRepository.Where(t => t.GeneralId == objectRelationParentId && (t.CreateTime <= createTime || t.BatchId == batchId) && t.Id != id).OrderByDescending(x => x.CreateTime).Select(t => new { t.ObjectRelationParentId, t.CreateTime, t.JsonDetail, t.BatchId, t.ObjectRelationParentId2, t.EntityName, t.Id }).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
if (relationParentInspection != null)
|
if (relationParentInspection != null)
|
||||||
|
@ -407,7 +422,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
var userObj = await _repository.Where<User>(t => t.Id == objectRelationParentId).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync();
|
var userObj = await _repository.Where<User>(t => t.Id == objectRelationParentId).Select(t => new { UserRealName = t.FullName, t.Phone, t.UserName, UserType = t.UserTypeRole.UserTypeShortName, t.EMail, t.OrganizationName }).FirstOrDefaultAsync();
|
||||||
|
|
||||||
if(userObj != null)
|
if (userObj != null)
|
||||||
{
|
{
|
||||||
objectLsit.Add(userObj);
|
objectLsit.Add(userObj);
|
||||||
|
|
||||||
|
@ -419,10 +434,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private async Task<List<object>> GetRelationParentData(Guid id,Guid? objectRelationParentId, Guid? objectRelationParentId2, DateTime createTime, Guid batchId, List<object> objectLsit)
|
private async Task<List<object>> GetRelationParentData(Guid id, Guid? objectRelationParentId, Guid? objectRelationParentId2, DateTime createTime, Guid batchId, List<object> objectLsit)
|
||||||
{
|
{
|
||||||
await AddJsonObjectToDic(id,objectRelationParentId, createTime, batchId, objectLsit);
|
await AddJsonObjectToDic(id, objectRelationParentId, createTime, batchId, objectLsit);
|
||||||
await AddJsonObjectToDic(id,objectRelationParentId2, createTime, batchId, objectLsit);
|
await AddJsonObjectToDic(id, objectRelationParentId2, createTime, batchId, objectLsit);
|
||||||
|
|
||||||
#region 废弃
|
#region 废弃
|
||||||
//if (objectRelationParentId != null)
|
//if (objectRelationParentId != null)
|
||||||
|
|
|
@ -826,22 +826,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
{
|
{
|
||||||
var entity = item.Entity as ReadingClinicalData;
|
var entity = item.Entity as ReadingClinicalData;
|
||||||
|
|
||||||
if (entity.ClinicalDataTrialSet == null && entity.ClinicalDataTrialSetId != Guid.Empty)
|
|
||||||
{
|
|
||||||
entity.ClinicalDataTrialSet = await _dbContext.ClinicalDataTrialSet.FindAsync(entity.ClinicalDataTrialSetId);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
await InsertInspection<ReadingClinicalData>(item.Entity as ReadingClinicalData, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingClinicalData>(item.Entity as ReadingClinicalData, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
SubjectVisitId = x.IsVisit ? x.ReadingId : null,
|
SubjectVisitId = x.IsVisit ? x.ReadingId : null,
|
||||||
|
|
||||||
ObjectRelationParentId = entity.ClinicalDataTrialSetId,
|
ObjectRelationParentId = entity.ClinicalDataTrialSetId,
|
||||||
}, new
|
|
||||||
{
|
|
||||||
entity.ClinicalDataTrialSet.ClinicalUploadType,
|
|
||||||
entity.ClinicalDataTrialSet.ClinicalDataSetName,
|
|
||||||
entity.ClinicalDataTrialSet.ClinicalDataLevel,
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue