修改一致性分析规则和稽查
This commit is contained in:
@@ -225,6 +225,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
Identification = x.Identification,
|
||||
ObjectRelationParentId = x.ObjectRelationParentId,
|
||||
ObjectRelationParentId2 = x.ObjectRelationParentId2,
|
||||
ObjectRelationParentId3 = x.ObjectRelationParentId3,
|
||||
CreateTime = x.CreateTime,
|
||||
BatchId = x.BatchId,
|
||||
|
||||
@@ -250,7 +251,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var objectLsit = new List<object>();
|
||||
|
||||
var relationParentDataObjList = await GetRelationParentData(item.Id, item.ObjectRelationParentId, item.ObjectRelationParentId2, item.CreateTime, item.BatchId, objectLsit);
|
||||
var relationParentDataObjList = await GetRelationParentData(item.Id, item.ObjectRelationParentId, item.ObjectRelationParentId2, item.ObjectRelationParentId3 ,item.CreateTime, item.BatchId, objectLsit);
|
||||
|
||||
|
||||
|
||||
@@ -349,9 +350,6 @@ namespace IRaCIS.Core.Application.Service
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
item.JsonStr = JsonConvert.SerializeObject(jsonDict);
|
||||
}
|
||||
|
||||
@@ -378,7 +376,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
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.ObjectRelationParentId3, t.EntityName, t.Id }).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
if (relationParentInspection != null)
|
||||
@@ -420,6 +418,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
await AddJsonObjectToDic(relationParentInspection.Id, relationParentInspection.ObjectRelationParentId, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit);
|
||||
await AddJsonObjectToDic(relationParentInspection.Id, relationParentInspection.ObjectRelationParentId2, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit);
|
||||
await AddJsonObjectToDic(relationParentInspection.Id, relationParentInspection.ObjectRelationParentId3, relationParentInspection.CreateTime, relationParentInspection.BatchId, objectLsit);
|
||||
}
|
||||
|
||||
else
|
||||
@@ -441,11 +440,13 @@ 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, Guid? objectRelationParentId3, DateTime createTime, Guid batchId, List<object> objectLsit)
|
||||
{
|
||||
await AddJsonObjectToDic(id, objectRelationParentId, createTime, batchId, objectLsit);
|
||||
await AddJsonObjectToDic(id, objectRelationParentId2, createTime, batchId, objectLsit);
|
||||
|
||||
await AddJsonObjectToDic(id, objectRelationParentId3, createTime, batchId, objectLsit);
|
||||
|
||||
|
||||
|
||||
#region 废弃
|
||||
|
||||
Reference in New Issue
Block a user