稽查修改
parent
71a4b241fd
commit
f8f0b5661a
|
@ -674,6 +674,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public CriterionType CriterionType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class MarkAuditInfo
|
||||
{
|
||||
public string Param { get; set; }
|
||||
|
||||
public bool IsGeneralMark { get; set; }
|
||||
}
|
||||
public class ChangeDicomReadingQuestionAnswerInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
|
|
@ -1997,28 +1997,75 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
inDto.param= param;
|
||||
|
||||
List<MarkAuditInfo> markAuditInfos = new List<MarkAuditInfo>() {
|
||||
|
||||
// 自定义
|
||||
new MarkAuditInfo (){Param="-10",IsGeneralMark=true },
|
||||
|
||||
// 保存脾尖
|
||||
new MarkAuditInfo (){Param="4",IsGeneralMark=true },
|
||||
|
||||
// 保存脾底
|
||||
new MarkAuditInfo (){Param="5",IsGeneralMark=true },
|
||||
|
||||
// 测量纵膈血池
|
||||
new MarkAuditInfo (){Param="3",IsGeneralMark=false },
|
||||
|
||||
// 测量肝脏血池
|
||||
new MarkAuditInfo (){Param="2",IsGeneralMark=false }
|
||||
};
|
||||
|
||||
|
||||
var markInfo= markAuditInfos.Where(x => x.Param == param).FirstOrDefault();
|
||||
|
||||
// 当 param == -10 时,为自定义标准 需要区分 绑定 更改 标记
|
||||
if (param == "-10")
|
||||
if (markInfo!=null)
|
||||
{
|
||||
// 自定义这边 移除标记 还是会传过来 不过 MeasureData 为空字符串
|
||||
inDto.QuestionMarkInfoList = inDto.QuestionMarkInfoList.Where(x => x.MeasureData.IsNotNullOrEmpty()).ToList();
|
||||
|
||||
|
||||
var questionMarkList = inDto.QuestionMarkInfoList.Select(x => x.QuestionId).ToList();
|
||||
|
||||
var existsMark = await _readingTaskQuestionMarkRepository.AnyAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.MeasureData != string.Empty && questionMarkList.Contains(x.QuestionId));
|
||||
if (!existsMark && inDto.QuestionMarkInfoList.Count(x=>x.MeasureData.IsNotNullOrEmpty()) > 0)
|
||||
if (markInfo.IsGeneralMark)
|
||||
{
|
||||
_userInfo.AuditIdentification = "AddMark";
|
||||
}
|
||||
else if (existsMark && inDto.QuestionMarkInfoList.Count(x => x.MeasureData.IsNotNullOrEmpty()) > 0)
|
||||
{
|
||||
_userInfo.AuditIdentification = "UpdateMark";
|
||||
// 自定义这边 移除标记 还是会传过来 不过 MeasureData 为空字符串
|
||||
inDto.QuestionMarkInfoList = inDto.QuestionMarkInfoList.Where(x => x.MeasureData.IsNotNullOrEmpty()).ToList();
|
||||
|
||||
|
||||
var questionMarkList = inDto.QuestionMarkInfoList.Select(x => x.QuestionId).ToList();
|
||||
|
||||
var existsMark = await _readingTaskQuestionMarkRepository.AnyAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.MeasureData != string.Empty && questionMarkList.Contains(x.QuestionId));
|
||||
if (!existsMark && inDto.QuestionMarkInfoList.Count(x => x.MeasureData.IsNotNullOrEmpty()) > 0)
|
||||
{
|
||||
_userInfo.AuditIdentification = "AddMark";
|
||||
}
|
||||
else if (existsMark && inDto.QuestionMarkInfoList.Count(x => x.MeasureData.IsNotNullOrEmpty()) > 0)
|
||||
{
|
||||
_userInfo.AuditIdentification = "UpdateMark";
|
||||
}
|
||||
else
|
||||
{
|
||||
_userInfo.AuditIdentification = "DeleteMark";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
_userInfo.AuditIdentification = "DeleteMark";
|
||||
inDto.QuestionMarkInfoList = inDto.QuestionMarkInfoList.Where(x => x.OtherMeasureData.IsNotNullOrEmpty()).ToList();
|
||||
|
||||
|
||||
var questionMarkList = inDto.QuestionMarkInfoList.Select(x => x.QuestionId).ToList();
|
||||
|
||||
var existsMark = await _readingTaskQuestionMarkRepository.AnyAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.OtherMeasureData != string.Empty && questionMarkList.Contains(x.QuestionId));
|
||||
if (!existsMark && inDto.QuestionMarkInfoList.Count(x => x.OtherMeasureData.IsNotNullOrEmpty()) > 0)
|
||||
{
|
||||
_userInfo.AuditIdentification = "AddMark";
|
||||
}
|
||||
else if (existsMark && inDto.QuestionMarkInfoList.Count(x => x.OtherMeasureData.IsNotNullOrEmpty()) > 0)
|
||||
{
|
||||
_userInfo.AuditIdentification = "UpdateMark";
|
||||
}
|
||||
else
|
||||
{
|
||||
_userInfo.AuditIdentification = "DeleteMark";
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
|
Loading…
Reference in New Issue