QC 问题 配置稽查
parent
7aac5cb63c
commit
dcda2d5af6
|
@ -121,7 +121,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前任务存在子问题,删除失败");
|
throw new BusinessValidationFailedException("当前任务存在子问题,删除失败");
|
||||||
}
|
}
|
||||||
var success = await _qcQuestionRepository.BatchDeleteNoTrackingAsync(t => t.Id == qCQuestionConfigureId);
|
var success = await _qcQuestionRepository.DeleteFromQueryAsync(t => t.Id == qCQuestionConfigureId,true);
|
||||||
return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -174,27 +174,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// 项目问题
|
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialQCQuestion)))
|
|
||||||
{
|
|
||||||
var entity = item.Entity as TrialQCQuestion;
|
|
||||||
var paretName = await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
|
||||||
await InsertInspection<TrialQCQuestion>(entity, type, x => new InspectionConvertDTO()
|
|
||||||
{
|
|
||||||
ObjectRelationParentId = x.TrialId
|
|
||||||
}, new
|
|
||||||
{
|
|
||||||
QuestionName = entity.QuestionName,
|
|
||||||
Type = entity.Type,
|
|
||||||
TypeValue = entity.TypeValue,
|
|
||||||
ShowOrder = entity.ShowOrder,
|
|
||||||
IsRequired = entity.IsRequired,
|
|
||||||
ParentName = paretName,
|
|
||||||
ParentTriggerValue = entity.ParentTriggerValue,
|
|
||||||
IsEnable = entity.IsEnable,
|
|
||||||
IsQCQuestionConfirmed = entity.IsConfirm,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -461,6 +440,37 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
#region 已修改
|
#region 已修改
|
||||||
|
|
||||||
|
//系统 Qc 问题
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion)))
|
||||||
|
{
|
||||||
|
var entity = item.Entity as QCQuestion;
|
||||||
|
|
||||||
|
var parentName = await _dbContext.QCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
await InsertInspection<QCQuestion>(entity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
IsDistinctionInterface = false
|
||||||
|
|
||||||
|
}, new { ParentName = parentName }) ;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 项目QC问题
|
||||||
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialQCQuestion)))
|
||||||
|
{
|
||||||
|
var entity = item.Entity as TrialQCQuestion;
|
||||||
|
|
||||||
|
var parentName = await _dbContext.TrialQCQuestionConfigure.Where(x => x.Id == entity.ParentId).Select(x => x.QuestionName).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
await InsertInspection<TrialQCQuestion>(entity, type, x => new InspectionConvertDTO()
|
||||||
|
{
|
||||||
|
ObjectRelationParentId = x.TrialId,
|
||||||
|
IsDistinctionInterface = false
|
||||||
|
}, new
|
||||||
|
{
|
||||||
|
ParentName = parentName
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//系统文件
|
//系统文件
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemDocument)))
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemDocument)))
|
||||||
|
@ -512,11 +522,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Qc 问题
|
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion)))
|
|
||||||
{
|
|
||||||
await InsertInspection<QCQuestion>(item.Entity as QCQuestion, type);
|
|
||||||
}
|
|
||||||
|
|
||||||
// 项目文档
|
// 项目文档
|
||||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialDocument)))
|
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialDocument)))
|
||||||
|
|
Loading…
Reference in New Issue