修改稽查
parent
d751bca3ea
commit
87f2225a19
|
@ -398,6 +398,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO
|
||||||
public string SubjectVisitName { get; set; }
|
public string SubjectVisitName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UpdateTrialState
|
public class UpdateTrialState
|
||||||
|
|
|
@ -250,15 +250,15 @@ 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 relationParentDataObjList = await GetRelationParentData(item.Id, item.ObjectRelationParentId, item.ObjectRelationParentId2, item.CreateTime, item.BatchId, objectLsit);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var currentDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonDict[nameof(InspectionJsonDetail.CommonData)].ToJsonStr());
|
var currentCommonDataDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(jsonDict[nameof(InspectionJsonDetail.CommonData)].ToJsonStr());
|
||||||
|
|
||||||
foreach (var commonDataObj in commonDataObjList)
|
foreach (var relationParentDataObj in relationParentDataObjList)
|
||||||
{
|
{
|
||||||
var otherDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(commonDataObj.ToJsonStr());
|
var otherDic = JsonConvert.DeserializeObject<IDictionary<string, object>>(relationParentDataObj.ToJsonStr());
|
||||||
|
|
||||||
foreach (var valuePair in otherDic)
|
foreach (var valuePair in otherDic)
|
||||||
{
|
{
|
||||||
|
@ -267,30 +267,30 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
var entityProperName = valuePair.Key.Split("_").ToList().Last();
|
var entityProperName = valuePair.Key.Split("_").ToList().Last();
|
||||||
|
|
||||||
if (!currentDic.ContainsKey(entityProperName))
|
if (!currentCommonDataDic.ContainsKey(entityProperName))
|
||||||
{
|
{
|
||||||
currentDic.Add(entityProperName, valuePair.Value);
|
currentCommonDataDic.Add(entityProperName, valuePair.Value);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!currentDic.ContainsKey(valuePair.Key))
|
if (!currentCommonDataDic.ContainsKey(valuePair.Key))
|
||||||
{
|
{
|
||||||
currentDic.Add(valuePair.Key, valuePair.Value);
|
currentCommonDataDic.Add(valuePair.Key, valuePair.Value);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!currentDic.ContainsKey(valuePair.Key))
|
if (!currentCommonDataDic.ContainsKey(valuePair.Key))
|
||||||
{
|
{
|
||||||
currentDic.Add(valuePair.Key, valuePair.Value);
|
currentCommonDataDic.Add(valuePair.Key, valuePair.Value);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
jsonDict[nameof(InspectionJsonDetail.CommonData)] = currentDic;
|
jsonDict[nameof(InspectionJsonDetail.CommonData)] = currentCommonDataDic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -330,22 +330,26 @@ 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
|
||||||
|
|
||||||
|
|
||||||
|
#region 后续移除 避免前端看到的不统一 因为采用了新的关联方式,之前数据在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());
|
||||||
#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);
|
||||||
|
@ -379,14 +383,17 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
if (relationParentInspection != null)
|
if (relationParentInspection != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
|
Dictionary<string, object> jsonDic = JsonConvert.DeserializeObject<Dictionary<string, object>>(relationParentInspection.JsonDetail);
|
||||||
|
|
||||||
if (jsonDic.ContainsKey(nameof(InspectionJsonDetail.CommonData)))
|
|
||||||
{
|
|
||||||
var commonDataDicObj = jsonDic[nameof(InspectionJsonDetail.CommonData)];
|
|
||||||
|
|
||||||
objectLsit.Add(commonDataDicObj);
|
// //CommonData 仅仅存放关联对象的 Data里面的数据
|
||||||
}
|
//if (jsonDic.ContainsKey(nameof(InspectionJsonDetail.CommonData)))
|
||||||
|
//{
|
||||||
|
// var commonDataDicObj = jsonDic[nameof(InspectionJsonDetail.CommonData)];
|
||||||
|
|
||||||
|
// objectLsit.Add(commonDataDicObj);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
//避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
|
//避免对象信息记录 把 Data里面的信息也取过去 但是加上稽查对象的前缀
|
||||||
|
@ -439,6 +446,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
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)
|
||||||
//{
|
//{
|
||||||
|
|
|
@ -1436,11 +1436,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
TrialId = trialId,
|
TrialId = trialId,
|
||||||
|
|
||||||
ObjectRelationParentId = enrollId
|
ObjectRelationParentId = enrollId,
|
||||||
|
|
||||||
|
IsDistinctionInterface=false
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
|
||||||
//子层级只需要记录自己这边的信息就好了 只有删除 和添加 没有更新(如果是删除,再添加,删除不会走稽查逻辑,业务代码已控制)
|
|
||||||
ReadingCategoryList = addList.Select(t => t.ReadingCategory).ToList(),
|
ReadingCategoryList = addList.Select(t => t.ReadingCategory).ToList(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue