修改查询列表
This commit is contained in:
+6
-59
@@ -2067,62 +2067,7 @@ namespace IRaCIS.Application.Services
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SubmitDicomVisitTask(SubmitDicomVisitTaskInDto inDto)
|
||||
{
|
||||
|
||||
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
||||
//// 修改编号
|
||||
//var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
|
||||
//// 获取标准表格外层问题
|
||||
//var questionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.LesionType != null && x.ReadingTableQuestionTrialList.Any(x => x.QuestionMark == QuestionMark.AutoId))
|
||||
// .SelectMany(x => x.ReadingTableQuestionTrialList).Where(x => x.QuestionMark == QuestionMark.AutoId).Select(x => new
|
||||
// {
|
||||
// x.ReadingQuestionId,
|
||||
// TableQuestionId = x.Id,
|
||||
|
||||
// }).ToListAsync();
|
||||
|
||||
//var questionIds = questionList.Select(x => x.ReadingQuestionId).ToList();
|
||||
|
||||
//var questionMarkList = await _readingQuestionTrialRepository.Where(x => questionIds.Contains(x.Id)).Select(x => new
|
||||
//{
|
||||
// QuestionId = x.Id,
|
||||
// x.OrderMark,
|
||||
|
||||
//}).ToListAsync();
|
||||
|
||||
//var rowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && questionIds.Contains(x.QuestionId)).ToListAsync();
|
||||
//List<ReadingTableQuestionAnswer> questionAnswerList = new List<ReadingTableQuestionAnswer>();
|
||||
//foreach (var item in questionList)
|
||||
//{
|
||||
// await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.QuestionId == item.ReadingQuestionId
|
||||
// && x.TableQuestionId == item.TableQuestionId && x.VisitTaskId == inDto.VisitTaskId);
|
||||
|
||||
// var orderMark = questionMarkList.Where(x => x.QuestionId == item.ReadingQuestionId).Select(x => x.OrderMark).FirstOrDefault();
|
||||
|
||||
// foreach (var row in rowInfo.Where(x => x.QuestionId == item.ReadingQuestionId))
|
||||
// {
|
||||
// questionAnswerList.Add(new ReadingTableQuestionAnswer()
|
||||
// {
|
||||
// Answer = orderMark + row.RowIndex.GetLesionMark(),
|
||||
// Id = NewId.NextGuid(),
|
||||
// QuestionId = item.ReadingQuestionId,
|
||||
// RowId = row.Id,
|
||||
// RowIndex = row.RowIndex,
|
||||
// TableQuestionId = item.TableQuestionId,
|
||||
// TrialId = taskInfo.TrialId,
|
||||
// VisitTaskId = taskInfo.Id,
|
||||
|
||||
// });
|
||||
// }
|
||||
//}
|
||||
//await _readingTableQuestionAnswerRepository.AddRangeAsync(questionAnswerList);
|
||||
//await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
await this.SubmitTaskChangeState(inDto.VisitTaskId);
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
@@ -2340,7 +2285,7 @@ namespace IRaCIS.Application.Services
|
||||
if (task != null)
|
||||
{
|
||||
// 有序 自动领取该Subject
|
||||
await ClaimOrCancelSubjectAsync(new ClaimSubjectDto() { IsClaim = true, SubejctId = task.SubjectId, IsInOrder = true });
|
||||
await ClaimOrCancelSubjectAsync(new ClaimSubjectDto() { IsClaim = true, SubejctId = task.SubjectId, VisitTaskId=task.VisitTaskId, IsInOrder = true });
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -2365,7 +2310,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (task != null)
|
||||
{
|
||||
// 有序 自动领取该Subject
|
||||
// 无序 自动领取该Subject
|
||||
await ClaimOrCancelSubjectAsync(new ClaimSubjectDto() { IsClaim = true, VisitTaskId = task.VisitTaskId, IsInOrder = false });
|
||||
}
|
||||
}
|
||||
@@ -2518,8 +2463,9 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
await _subjectRepository.UpdatePartialFromQueryAsync(t => t.Id == claimSubjectDto.SubejctId, u => new Subject() { ClaimUserId = _userInfo.Id }, true);
|
||||
|
||||
}
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(t => t.Id == claimSubjectDto.VisitTaskId, u => new VisitTask() { DoctorUserId = _userInfo.Id });
|
||||
|
||||
}
|
||||
|
||||
//定时任务24h取消
|
||||
|
||||
@@ -2589,6 +2535,7 @@ namespace IRaCIS.Application.Services
|
||||
await VerifyTaskIsSign(visitTaskId);
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(visitTaskId, x => new VisitTask()
|
||||
{
|
||||
DoctorUserId=_userInfo.Id,
|
||||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||
SignTime = DateTime.Now,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user