自定义阅片显示评估结果
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
5d0dca121f
commit
ed72ed9a5e
|
@ -26,6 +26,7 @@ using IRaCIS.Application.Services.BackGroundJob;
|
|||
using Magicodes.ExporterAndImporter.Core.Extension;
|
||||
using Hangfire;
|
||||
using MassTransit;
|
||||
using static IRaCIS.Core.Domain.Models.ReadingQuestionTrial;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Allocation
|
||||
{
|
||||
|
@ -226,6 +227,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
public async Task<IResponseOutput<PageOutput<PIReaingTaskView>>> GetPIReadingAuditList(VisitTaskQuery queryVisitTask)
|
||||
{
|
||||
|
||||
CriterionType? criterionType = _trialReadingCriterionRepository.Where(t => t.Id == queryVisitTask.TrialReadingCriterionId).Select(t=>t.CriterionType).FirstOrDefault();
|
||||
|
||||
var visitTaskQueryable = GetReadingTaskQueryable(queryVisitTask)
|
||||
.ProjectTo<PIReaingTaskView>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
@ -236,7 +239,9 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
|||
var trialTaskConfig = _trialRepository.Where(t => t.Id == queryVisitTask.TrialId).ProjectTo<TrialUrgentConfig>(_mapper.ConfigurationProvider).FirstOrDefault();
|
||||
|
||||
var questionList = _readingQuestionTrialRepository.Where(t => t.TrialId == queryVisitTask.TrialId && t.ReadingQuestionCriterionTrialId == queryVisitTask.TrialReadingCriterionId)
|
||||
.Where(t => t.IsJudgeQuestion == true)
|
||||
//.Where(t => t.IsJudgeQuestion == true)
|
||||
.WhereIf(criterionType!=null&& criterionType!=CriterionType.SelfDefine,t=>t.IsJudgeQuestion==true)
|
||||
.WhereIf(criterionType != null && criterionType == CriterionType.SelfDefine, t => t.AssessmentResultEnum == AssessmentResultType.AssessmentResult)
|
||||
.Select(t => new { QuestionId = t.Id, QuestionName = _userInfo.IsEn_Us ? t.QuestionEnName : t.QuestionName ,t.DictionaryCode}).ToList();
|
||||
|
||||
trialTaskConfig!.OtherObj = questionList;
|
||||
|
|
|
@ -4,6 +4,7 @@ using IRaCIS.Core.Application.Contracts;
|
|||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using static IRaCIS.Core.Domain.Models.ReadingQuestionTrial;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
@ -83,7 +84,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<VisitTask, ReadingTaskView>().IncludeBase<VisitTask, VisitTaskView>()
|
||||
.ForMember(t=>t.PIReadingResultList,u=>u.MapFrom(c=>c.ReadingTaskQuestionAnswerList
|
||||
.Where(t=>t.ReadingQuestionTrial.IsJudgeQuestion==true ).Select(d=>new PIReadingResult() { QuestionId= d.ReadingQuestionTrialId,Answer=d.Answer})));
|
||||
.Where(t=> t.ReadingQuestionCriterionTrial.CriterionType==CriterionType.SelfDefine? t.ReadingQuestionTrial.AssessmentResultEnum == AssessmentResultType.AssessmentResult: t.ReadingQuestionTrial.IsJudgeQuestion==true)
|
||||
.Select(d=>new PIReadingResult() { QuestionId= d.ReadingQuestionTrialId,Answer=d.Answer})));
|
||||
|
||||
CreateMap<VisitTask, PIReaingTaskView>().IncludeBase<VisitTask, ReadingTaskView>()
|
||||
.ForMember(o => o.FirstAuditUserName, t => t.MapFrom(u => u.FirstAuditUser.UserName))
|
||||
|
|
|
@ -74,7 +74,9 @@ namespace IRaCIS.Core.Domain.Models
|
|||
public ReadingQuestionTrial ReadingQuestionTrial { get; set; }
|
||||
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ReadingQuestionCriterionTrialId")]
|
||||
public ReadingQuestionCriterionTrial ReadingQuestionCriterionTrial { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue