稽查修改
parent
c556061a79
commit
9239cc490b
|
@ -3229,6 +3229,37 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
}
|
||||
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)))
|
||||
{
|
||||
if (_userInfo.RequestUrl == "saveTableQuestionMark/-10")
|
||||
{
|
||||
var type = GetEntityAuditOpt(item);
|
||||
|
||||
var entity = item.Entity as ReadingTableQuestionAnswer;
|
||||
|
||||
var tableQuestionName = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
|
||||
var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
|
||||
var generalId = IdentifierHelper.CreateGuid(entity.VisitTaskId.ToString(), entity.QuestionId.ToString(), entity.RowId.ToString(), entity.TableQuestionId.ToString(), "ReadingTableQuestionAnswer");
|
||||
var rowMark = await _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefaultAsync();
|
||||
|
||||
await InsertInspection<ReadingTableQuestionAnswer>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
VisitTaskId = entity.VisitTaskId,
|
||||
GeneralId = generalId,
|
||||
ObjectRelationParentId = entity.VisitTaskId,
|
||||
|
||||
|
||||
}, new
|
||||
{
|
||||
QuestionName = questionName,
|
||||
RowMark = rowMark,
|
||||
TableQuestionName = tableQuestionName,
|
||||
}, _userInfo.AuditIdentification);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionMark)))
|
||||
{
|
||||
var type = GetEntityAuditOpt(item);
|
||||
|
@ -3283,6 +3314,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
{
|
||||
generalId = entity.Id;
|
||||
}
|
||||
else if(entity.MarkId!=null)
|
||||
{
|
||||
generalId= entity.MarkId.Value;
|
||||
}
|
||||
else
|
||||
{
|
||||
generalId = IdentifierHelper.CreateGuid(entity.VisitTaskId.ToString(), entity.QuestionId.ToString(), entity.RowId.ToString(), entity.TableQuestionId.ToString(), "ReadingTaskQuestionMark");
|
||||
|
|
Loading…
Reference in New Issue