修改比例尺修改答案
parent
60ce8c45b2
commit
0134d6c723
|
|
@ -9438,9 +9438,14 @@
|
|||
融合的CTSeriesId
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddNoneDicomMarkInDto.Proportion">
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ChangePlottingScaleChangeAnswerInDto.MarkId">
|
||||
<summary>
|
||||
比例
|
||||
标记id
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ChangePlottingScaleChangeAnswerInDto.IsRemovePlottingScale">
|
||||
<summary>
|
||||
是否移除比例关系
|
||||
</summary>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.SubmitVisitTaskQuestionsInDto">
|
||||
|
|
@ -13680,10 +13685,17 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ChangePlottingScale(System.Nullable{System.Guid},System.Decimal)">
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ChangePlottingScaleChangeAnswer(IRaCIS.Core.Application.Service.Reading.Dto.ChangePlottingScaleChangeAnswerInDto)">
|
||||
<summary>
|
||||
修改比例修改答案
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ChangePlottingScale(System.Nullable{System.Guid},System.Decimal)">
|
||||
<summary>
|
||||
修改比例修改答案 现在弃用了
|
||||
</summary>
|
||||
<param name="id"></param>
|
||||
<param name="proportion"></param>
|
||||
<returns></returns>
|
||||
|
|
|
|||
|
|
@ -2446,6 +2446,39 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class ChangePlottingScaleChangeAnswerInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 标记id
|
||||
/// </summary>
|
||||
public Guid NoneDicomFileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否移除比例关系
|
||||
/// </summary>
|
||||
public bool IsRemovePlottingScale { get; set; } = false;
|
||||
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public string Path { get; set; }
|
||||
|
||||
public string PicturePath { get; set; } = string.Empty;
|
||||
|
||||
public List<PlottingAnswerInfo> AnswerList { get; set; }
|
||||
}
|
||||
|
||||
public class PlottingAnswerInfo
|
||||
{
|
||||
public Guid? QuestionId { get; set; }
|
||||
public Guid? RowId { get; set; }
|
||||
|
||||
public Guid? TableQuestionId { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetNoneDicomMarkAndBindingInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
|
@ -2479,10 +2512,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public string OrderMarkName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 比例
|
||||
/// </summary>
|
||||
public decimal? Proportion { get; set; }
|
||||
///// <summary>
|
||||
///// 比例
|
||||
///// </summary>
|
||||
//public decimal? Proportion { get; set; }
|
||||
|
||||
public Guid? MarkId { get; set; }
|
||||
public Guid? NoneDicomFileId { get; set; }
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ using IRaCIS.Core.Domain.Share;
|
|||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using System.Linq.Dynamic.Core;
|
||||
|
||||
|
|
@ -160,10 +161,72 @@ namespace IRaCIS.Core.Application.Service
|
|||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 修改比例修改答案
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> ChangePlottingScaleChangeAnswer(ChangePlottingScaleChangeAnswerInDto inDto)
|
||||
{
|
||||
if (inDto.IsRemovePlottingScale)
|
||||
{
|
||||
await _readingNoneDicomMarkBindingRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.ReadingNoneDicomMark.NoneDicomFileId == inDto.NoneDicomFileId);
|
||||
}
|
||||
else
|
||||
{
|
||||
var answerList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
|
||||
|
||||
|
||||
|
||||
var tableAnswerList = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).ToListAsync();
|
||||
|
||||
|
||||
foreach (var item in inDto.AnswerList)
|
||||
{
|
||||
if (item.RowId == null)
|
||||
{
|
||||
var answer= answerList.Where(x => x.ReadingQuestionTrialId == item.QuestionId).FirstOrDefault();
|
||||
if (answer!=null)
|
||||
{
|
||||
await _readingTaskQuestionAnswerRepository.UpdatePartialFromQueryAsync(answer.Id, x => new ReadingTaskQuestionAnswer()
|
||||
{
|
||||
Answer = item.Answer
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var answer = tableAnswerList.Where(x => x.QuestionId == item.QuestionId&&x.RowId==item.RowId&&x.TableQuestionId==item.TableQuestionId).FirstOrDefault();
|
||||
if (answer != null)
|
||||
{
|
||||
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(answer.Id, x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer = item.Answer
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
await _readingNoneDicomMarkRepository.UpdatePartialFromQueryAsync(x=>x.VisitTaskId==inDto.VisitTaskId&&x.Path==inDto.Path, x => new ReadingNoneDicomMark()
|
||||
{
|
||||
PicturePath = inDto.PicturePath
|
||||
});
|
||||
}
|
||||
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改比例修改答案 现在弃用了
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="proportion"></param>
|
||||
/// <returns></returns>
|
||||
|
|
@ -293,10 +356,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
var entity = await _readingNoneDicomMarkRepository.InsertOrUpdateAsync(inDto,true);
|
||||
|
||||
if (inDto.Proportion != null)
|
||||
{
|
||||
await this.ChangePlottingScale(entity.Id, inDto.Proportion.Value);
|
||||
}
|
||||
|
||||
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(entity.Id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue