稽查修改提交
parent
946b5ab961
commit
f7348b5d28
|
@ -166,10 +166,18 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
var entity = item.Entity as ReadingQuestionCriterionTrial;
|
var entity = item.Entity as ReadingQuestionCriterionTrial;
|
||||||
|
|
||||||
|
var isDistinctionInterface = false;
|
||||||
|
|
||||||
|
//设置项目配置 肿瘤学配置 和阅片标准配置
|
||||||
|
if (_userInfo.RequestUrl == "TrialConfig/setOncologySet" || _userInfo.RequestUrl == "TrialConfig/setTrialReadingCriterion")
|
||||||
|
{
|
||||||
|
isDistinctionInterface = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
await InsertInspection<ReadingQuestionCriterionTrial>(entity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingQuestionCriterionTrial>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
IsDistinctionInterface = type == AuditOpt.Update ? true : false,
|
IsDistinctionInterface = isDistinctionInterface,
|
||||||
|
|
||||||
ObjectRelationParentId = x.TrialId
|
ObjectRelationParentId = x.TrialId
|
||||||
|
|
||||||
|
@ -212,6 +220,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
var entity = item.Entity as ReadingQuestionTrial;
|
var entity = item.Entity as ReadingQuestionTrial;
|
||||||
|
|
||||||
|
|
||||||
|
var isDistinctionInterface = false;
|
||||||
|
//重置仲裁规则
|
||||||
|
if (_userInfo.RequestUrl == "ReadingImageTask/setTrialCriterionJudgeQuestionAnswerGroup")
|
||||||
|
{
|
||||||
|
isDistinctionInterface = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int? parentQuestionShowOrder = null;
|
int? parentQuestionShowOrder = null;
|
||||||
|
@ -231,7 +245,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
await InsertInspection<ReadingQuestionTrial>(entity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingQuestionTrial>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
IsDistinctionInterface = false,
|
IsDistinctionInterface = isDistinctionInterface,
|
||||||
|
|
||||||
ObjectRelationParentId = x.TrialId
|
ObjectRelationParentId = x.TrialId
|
||||||
|
|
||||||
|
@ -562,6 +576,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
var obj = new object() { };
|
var obj = new object() { };
|
||||||
|
|
||||||
|
//访视任务
|
||||||
|
|
||||||
|
if (_userInfo.RequestUrl == "ReadingImageTask/SubmitVisitTaskQuestions" && entity.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||||
|
{
|
||||||
|
//提交访视任务的时候 会多次更新同一个记录 只记录最后一次
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
//裁判任务
|
//裁判任务
|
||||||
if (entity.JudgeResultTaskId != null && (_userInfo.RequestUrl == "ReadingImageTask/saveJudgeVisitTaskResult" || _userInfo.RequestUrl == "ReadingImageTask/saveJudgeVisitTaskResult"))
|
if (entity.JudgeResultTaskId != null && (_userInfo.RequestUrl == "ReadingImageTask/saveJudgeVisitTaskResult" || _userInfo.RequestUrl == "ReadingImageTask/saveJudgeVisitTaskResult"))
|
||||||
{
|
{
|
||||||
|
@ -1103,7 +1125,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
ParentQuestionName = parentQuestionName,
|
ParentQuestionName = parentQuestionName,
|
||||||
ParentQuestionOrder= parentQuestionOrder
|
ParentQuestionOrder = parentQuestionOrder
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1441,7 +1463,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
ObjectRelationParentId = enrollId,
|
ObjectRelationParentId = enrollId,
|
||||||
|
|
||||||
IsDistinctionInterface=false
|
IsDistinctionInterface = false
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
ReadingCategoryList = addList.Select(t => t.ReadingCategory).ToList(),
|
ReadingCategoryList = addList.Select(t => t.ReadingCategory).ToList(),
|
||||||
|
@ -1919,6 +1941,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
var basicData = entityObj as SystemBasicData;
|
var basicData = entityObj as SystemBasicData;
|
||||||
type = type + (basicData.ParentId == null ? "/parent" : string.Empty);
|
type = type + (basicData.ParentId == null ? "/parent" : string.Empty);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case nameof(Trial):
|
case nameof(Trial):
|
||||||
var trial = entityObj as Trial;
|
var trial = entityObj as Trial;
|
||||||
Guid id = trial.Id;
|
Guid id = trial.Id;
|
||||||
|
@ -1937,6 +1960,24 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case nameof(ReadingQuestionTrial):
|
||||||
|
|
||||||
|
var trialReadingQuestion = entityObj as ReadingQuestionTrial;
|
||||||
|
|
||||||
|
switch (_userInfo.RequestUrl)
|
||||||
|
{
|
||||||
|
case "ReadingImageTask/setTrialCriterionJudgeQuestionAnswerGroup":
|
||||||
|
|
||||||
|
if (trialReadingQuestion.JudgeType == JudgeTypeEnum.None)
|
||||||
|
{
|
||||||
|
type = type + "/" + "Reset";
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
#region 访视相关
|
||||||
|
|
||||||
// 对话消息区分用户类型
|
// 对话消息区分用户类型
|
||||||
case nameof(CheckChallengeDialog):
|
case nameof(CheckChallengeDialog):
|
||||||
|
@ -2025,6 +2066,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 阅片任务相关
|
||||||
|
|
||||||
//任务表
|
//任务表
|
||||||
case nameof(VisitTask):
|
case nameof(VisitTask):
|
||||||
|
@ -2147,6 +2192,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -474,25 +474,24 @@ namespace IRaCIS.Core.Infra.EFCore
|
||||||
|
|
||||||
public async Task AddAudit()
|
public async Task AddAudit()
|
||||||
{
|
{
|
||||||
//try
|
|
||||||
//{
|
|
||||||
//触发器里面提交事务 业务方法里面提交事务 会记录两次
|
|
||||||
var inspectionGeneralIdList = ChangeTracker.Entries().Where(t => typeof(DataInspection).IsAssignableFrom(t.Entity.GetType())).Select(t => ((DataInspection)t.Entity).GeneralId).ToList();
|
|
||||||
|
|
||||||
var entities = ChangeTracker.Entries().Where(u => (u.State == EntityState.Modified || u.State == EntityState.Deleted || u.State == EntityState.Added))
|
//触发器里面提交事务 业务方法里面提交事务 会记录两次
|
||||||
.Where(t => !typeof(DataInspection).IsAssignableFrom(t.Entity.GetType()) && !inspectionGeneralIdList.Contains(((Entity)t.Entity).Id))
|
var inspectionGeneralIdList = ChangeTracker.Entries().Where(t => typeof(DataInspection).IsAssignableFrom(t.Entity.GetType())).Select(t => ((DataInspection)t.Entity).GeneralId).ToList();
|
||||||
.ToList();
|
|
||||||
AuditingData auditingData = new AuditingData(this, _userInfo);
|
var entities = ChangeTracker.Entries().Where(u => (u.State == EntityState.Modified || u.State == EntityState.Deleted || u.State == EntityState.Added))
|
||||||
|
.Where(t => !typeof(DataInspection).IsAssignableFrom(t.Entity.GetType()) && !inspectionGeneralIdList.Contains(((Entity)t.Entity).Id))
|
||||||
|
.ToList();
|
||||||
|
AuditingData auditingData = new AuditingData(this, _userInfo);
|
||||||
|
|
||||||
//await auditingData.IncomingEntitys(entities);
|
//await auditingData.IncomingEntitys(entities);
|
||||||
|
|
||||||
await auditingData.InsertAddEntitys(entities);
|
|
||||||
//}
|
|
||||||
//catch (Exception)
|
|
||||||
//{
|
|
||||||
|
|
||||||
|
if (entities.Count > 0)
|
||||||
|
{
|
||||||
|
await auditingData.InsertAddEntitys(entities);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue