Merge branch 'Test_IRC_Net10' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_IRC_Net10
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
commit
4841a9ac1e
|
|
@ -1546,6 +1546,20 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public QuestionClassify? QuestionClassify { get; set; }
|
||||
}
|
||||
|
||||
public class GetFilterTableQuestionInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题分类
|
||||
/// </summary>
|
||||
public QuestionClassify? QuestionClassify { get; set; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
public class GetHistoryGlobalInfoOutDto
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1401,6 +1401,38 @@ namespace IRaCIS.Core.Application.Service
|
|||
}); ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单个表格问题及答案 过滤问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> GetFilterTableQuestion(GetFilterTableQuestionInDto inDto)
|
||||
{
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var tableAnswers = await _readingTableQuestionAnswerRepository
|
||||
.ProjectTo<ReadingTableQuestionAnswerInfo>(_mapper.ConfigurationProvider)
|
||||
.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var organIds = tableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
|
||||
var questionPage = await GetReadingTableQuestion(
|
||||
new GetReadingTableQuestionOrAnswerInDto()
|
||||
{
|
||||
TrialReadingCriterionId = taskinfo.TrialReadingCriterionId,
|
||||
TaskId = inDto.VisitTaskId,
|
||||
TableAnswers = tableAnswers,
|
||||
TableAnsweRowInfos = tableAnsweRowInfos,
|
||||
OrganInfos = organList,
|
||||
QuestionClassify = inDto.QuestionClassify,
|
||||
});
|
||||
|
||||
|
||||
var result = questionPage.SinglePage.SelectMany(x => x.Childrens).Where(x => x.Id == inDto.QuestionId).FirstOrDefault();
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取自定义问题以及答案
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -518,6 +518,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
};
|
||||
|
||||
|
||||
Dictionary<string, string> yesOrNo = new Dictionary<string, string>()
|
||||
{
|
||||
{ "是","1"},
|
||||
{ "否","0"},
|
||||
{ "Yes","1"},
|
||||
{ "No","0"},
|
||||
};
|
||||
|
||||
List<IVUSMeasuredValue> measuredValueList = new List<IVUSMeasuredValue>();
|
||||
var errorRow = new List<int> { };
|
||||
|
||||
|
|
@ -526,6 +534,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
IVUSMeasuredValue iVUSMeasuredValue = new IVUSMeasuredValue() { };
|
||||
try
|
||||
{
|
||||
// 手动抛出异常进入catch
|
||||
if (!yesOrNo.ContainsKey(dataTable.Rows[i]["D"].ToString()))
|
||||
{
|
||||
throw new InvalidOperationException("NullError");
|
||||
}
|
||||
|
||||
iVUSMeasuredValue = new IVUSMeasuredValue()
|
||||
{
|
||||
//PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
|
|
@ -651,7 +665,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
// 斑块破裂
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.PlaqueRupture.ToString()],
|
||||
Answer = yesOrNo[item.PlaqueRupture.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
|
|
|
|||
|
|
@ -336,6 +336,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
List<OCTFCTUploadData> measuredValueList = new List<OCTFCTUploadData>();
|
||||
var errorRow = new List<int> { };
|
||||
|
||||
Dictionary<string, string> yesOrNo = new Dictionary<string, string>()
|
||||
{
|
||||
{ "是","1"},
|
||||
{ "否","0"},
|
||||
{ "Yes","1"},
|
||||
{ "No","0"},
|
||||
};
|
||||
|
||||
|
||||
string getNone(string value)
|
||||
{
|
||||
if (value == string.Empty || value == null)
|
||||
|
|
@ -351,6 +360,13 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
try
|
||||
{
|
||||
|
||||
// 手动抛出异常进入catch
|
||||
if (!yesOrNo.ContainsKey(dataTable.Rows[i]["K"].ToString())|| !yesOrNo.ContainsKey(dataTable.Rows[i]["L"].ToString()))
|
||||
{
|
||||
throw new InvalidOperationException("NullError");
|
||||
}
|
||||
|
||||
measuredValueList.Add(new OCTFCTUploadData()
|
||||
{
|
||||
//PlaqueNum = int.Parse(dataTable.Rows[i]["A"].ToString()),
|
||||
|
|
@ -604,7 +620,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
// 斑块破裂
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.PlaqueRupture.ToString()],
|
||||
Answer = yesOrNo[item.PlaqueRupture.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
|
|
@ -616,7 +632,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
// 斑块愈合
|
||||
tableAnswers.Add(new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = isPresent[item.PlaqueHealing.ToString()],
|
||||
Answer = yesOrNo[item.PlaqueHealing.ToString()],
|
||||
QuestionId = questionInfo.Id,
|
||||
TrialId = taskinfo.TrialId,
|
||||
VisitTaskId = taskinfo.Id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue