Merge branch 'Test.IRC' of http://192.168.3.69:3000/XCKJ/irc-netcore-api into Test.IRC

IRC_NewDev
hang 2023-09-27 13:57:25 +08:00
commit f1b5a457df
3 changed files with 32 additions and 22 deletions

View File

@ -464,6 +464,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public Guid VisitTaskId { get; set; }
public bool UpdateMark { get; set; } = false;
public List<ChangeDicomReadingQuestionAnswerDto> Answers { get; set; }

View File

@ -1474,6 +1474,7 @@ namespace IRaCIS.Application.Services
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto)
{
inDto.UpdateMark = true;
return await ChangeDicomReadingQuestionAnswer(inDto);
}
@ -1549,24 +1550,28 @@ namespace IRaCIS.Application.Services
}).ToList();
await _readingTaskQuestionAnswerRepository.AddRangeAsync(needAddAnswer);
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new
if (inDto.UpdateMark)
{
x.QuestionId,
x.FirstAddTaskId,
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new
{
x.QuestionId,
x.FirstAddTaskId,
}).ToListAsync();
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId);
var datetime = DateTime.Now;
}).ToListAsync();
await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId);
var datetime = DateTime.Now;
var markList = _mapper.Map<List<QuestionMarkInfo>, List<ReadingTaskQuestionMark>>(inDto.QuestionMarkInfoList);
markList.ForEach(x => {
x.Id = NewId.NextGuid();
x.VisitTaskId = inDto.VisitTaskId;
x.CreateTime = datetime;
x.FirstAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId;
});
await _readingTaskQuestionMarkRepository.AddRangeAsync(markList);
var markList = _mapper.Map<List<QuestionMarkInfo>, List<ReadingTaskQuestionMark>>(inDto.QuestionMarkInfoList);
markList.ForEach(x => {
x.Id = NewId.NextGuid();
x.VisitTaskId = inDto.VisitTaskId;
x.CreateTime = datetime;
x.FirstAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId;
});
await _readingTaskQuestionMarkRepository.AddRangeAsync(markList);
}
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
return ResponseOutput.Ok(true);
}
@ -2035,7 +2040,7 @@ namespace IRaCIS.Application.Services
rowInfo.Id = inDto.RowId == null ? NewId.NextGuid() : inDto.RowId.Value;
result.RowId = rowInfo.Id;
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
rowInfo.FristAddTaskId = inDto.RowId == null ? rowInfo.Id : rowInfo.FristAddTaskId;
if (inDto.RowId == null)
{

View File

@ -436,9 +436,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// <returns></returns>
public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto)
{
var calculateDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
return new GetReportVerifyOutDto()
{
TumorEvaluate = await this.GetReportTumor(inDto.VisitTaskId),
TumorEvaluate = calculateDto.QuestionInfo.Where(x=>x.QuestionType==QuestionType.ImgOncology).Select(x=>x.Answer).FirstOrDefault(),
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
};
@ -883,11 +884,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
});
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>()
List<QuestionMark?> needCopyMarks = new List<QuestionMark?>()
{
QuestionMark.MajorAxis,
QuestionMark.ShortAxis,
QuestionMark.State,
QuestionMark.LowPPDLDi,
QuestionMark.LowPPDSDi,
QuestionMark.NadirPPD,
QuestionMark.LowPPDVisit,
};
@ -934,7 +936,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var tableAnswers = copyTableAnswers.Select(x => new ReadingTableQuestionAnswer
{
Id = NewId.NextGuid(),
Answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer,
Answer = needCopyMarks.Contains(x.QuestionMark) ? x.Answer : string.Empty,
QuestionId = x.QuestionId,
RowIndex = x.RowIndex,
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),