修改稽查
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
8431ece7f9
commit
088143fb70
|
@ -3368,12 +3368,14 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
// 这里本来就批量展示问题的 现在又需要单个展示
|
// 这里本来就批量展示问题的 现在又需要单个展示
|
||||||
var thisQuestinonAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)).Select(x => x.Entity as ReadingTaskQuestionAnswer).FirstOrDefault();
|
var thisQuestinonAnswer = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)).Select(x => x.Entity as ReadingTaskQuestionAnswer).FirstOrDefault();
|
||||||
|
|
||||||
|
var question = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == thisQuestinonAnswer.ReadingQuestionTrialId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
string questionName = string.Empty;
|
string questionName = string.Empty;
|
||||||
string questionAnswer = string.Empty;
|
string questionAnswer = string.Empty;
|
||||||
if (thisQuestinonAnswer != null)
|
if (thisQuestinonAnswer != null)
|
||||||
{
|
{
|
||||||
questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == thisQuestinonAnswer.ReadingQuestionTrialId).Select(x => _userInfo.IsEn_Us ? x.QuestionEnName : x.QuestionName).FirstOrDefaultAsync();
|
questionName = _userInfo.IsEn_Us ? question.QuestionEnName : question.QuestionName;
|
||||||
questionAnswer = thisQuestinonAnswer.Answer;
|
questionAnswer = Translationunit(question.Type, question.Unit, question.CustomUnit, unitDataList, thisQuestinonAnswer.Answer) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
await InsertInspection<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
|
||||||
|
@ -3429,7 +3431,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
var entity = item.Entity as ReadingTableQuestionAnswer;
|
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 tableQuestion = await _dbContext.ReadingTableQuestionTrial.Where(x => x.Id == entity.TableQuestionId).FirstOrDefaultAsync();
|
||||||
var questionName = await _dbContext.ReadingQuestionTrial.Where(x => x.Id == entity.QuestionId).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 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();
|
var rowMark = await _dbContext.ReadingTableAnswerRowInfo.Where(x => x.Id == entity.RowId).Select(x => x.RowMark).FirstOrDefaultAsync();
|
||||||
|
@ -3444,7 +3446,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
{
|
{
|
||||||
markName = mark.OrderMarkName;
|
markName = mark.OrderMarkName;
|
||||||
}
|
}
|
||||||
|
List<UnitData> unitDataList = (await _dbContext.Dictionary.Where(x => x.Parent.Code == "ValueUnit").Where(x => x.Code != "0").ToListAsync()).Select(x => new UnitData()
|
||||||
|
{
|
||||||
|
|
||||||
|
Unit = (ValueUnit)int.Parse(x.Code),
|
||||||
|
UnitName = x.Value.ToString(),
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
await InsertInspection<ReadingTableQuestionAnswer>(entity, type, x => new InspectionConvertDTO()
|
await InsertInspection<ReadingTableQuestionAnswer>(entity, type, x => new InspectionConvertDTO()
|
||||||
{
|
{
|
||||||
|
@ -3455,11 +3462,12 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
|
|
||||||
}, new
|
}, new
|
||||||
{
|
{
|
||||||
|
Answer= Translationunit(tableQuestion.Type, tableQuestion.Unit, tableQuestion.CustomUnit, unitDataList, entity.Answer),
|
||||||
MarkName = markName,
|
MarkName = markName,
|
||||||
PicturePath = mark != null ? mark.PicturePath : string.Empty,
|
PicturePath = mark != null ? mark.PicturePath : string.Empty,
|
||||||
QuestionName = questionName,
|
QuestionName = questionName,
|
||||||
RowMark = rowMark,
|
RowMark = rowMark,
|
||||||
TableQuestionName = tableQuestionName,
|
TableQuestionName = _userInfo.IsEn_Us ? tableQuestion.QuestionEnName : tableQuestion.QuestionName,
|
||||||
}, _userInfo.AuditIdentification);
|
}, _userInfo.AuditIdentification);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue