修改
This commit is contained in:
@@ -27,7 +27,34 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class SetTrialJudgyInfoInDto : GetTrialJudgyInfoOutDto
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class GetTrialJudgyInfoOutDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 仲裁阅片
|
||||
/// </summary>
|
||||
public bool? IsArbitrationReading { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 仲裁规则
|
||||
/// </summary>
|
||||
public ArbitrationRule ArbitrationRule { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialJudgyInfoInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class ReadingCriterionPageAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
@@ -200,6 +200,8 @@ namespace IRaCIS.Application.Services
|
||||
IsExistsSubjectClinicalData= await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId&&x.ClinicalDataLevel== ClinicalLevel.Subject && x.IsConfirm),
|
||||
IsExistsVisitClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit && x.IsConfirm),
|
||||
IsExistsReadingClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId && x.ClinicalDataLevel == ClinicalLevel.Read && x.IsConfirm),
|
||||
IsGlobalReading= trialinfo.IsGlobalReading,
|
||||
|
||||
}) ;
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -745,15 +745,31 @@ namespace IRaCIS.Application.Services
|
||||
if (visitTask.IsAnalysisCreate&& visitTask.ConsistentAnalysisOriginalTaskId!=null)
|
||||
{
|
||||
visitTaskids.Add(visitTask.Id);
|
||||
visitTaskids.Add(visitTask.ConsistentAnalysisOriginalTaskId.Value);
|
||||
if (visitTask.ConsistentAnalysisOriginalTaskId != null)
|
||||
{
|
||||
visitTaskids.Add(visitTask.ConsistentAnalysisOriginalTaskId.Value);
|
||||
}
|
||||
|
||||
// 这种情况是新产生的阅片期
|
||||
if (visitTask.SouceReadModuleId != null)
|
||||
{
|
||||
var visitNum = await _readModuleRepository.Where(x => x.Id == visitTask.SouceReadModuleId).Select(x => x.VisitNum).FirstOrDefaultAsync();
|
||||
var lastVisitId = await _visitTaskRepository.Where(x => !x.IsAnalysisCreate && x.SouceReadModuleId == visitTask.SouceReadModuleId && x.ReadModule.VisitNum <= visitNum).OrderByDescending(x => x.ReadModule.VisitNum).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
visitTaskids.Add(lastVisitId);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
visitTaskids = await _visitTaskRepository.Where(x => x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReadingCategory != ReadingCategory.Judge && x.ReReadingApplyState != ReReadingApplyState.Agree && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId && x.SouceReadModuleId == visitTask.SouceReadModuleId).Select(x => x.Id).ToListAsync();
|
||||
}
|
||||
|
||||
var trialInfo = await _trialRepository.Where(x => x.Id == visitTask.TrialId).Select(x=> new {
|
||||
x.IsArbitrationReading,
|
||||
x.ArbitrationRule
|
||||
|
||||
if (visitTaskids.Count == 2)
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
if (visitTaskids.Count == 2&& trialInfo.IsArbitrationReading??false)
|
||||
{
|
||||
var query = from questionAnswet in _readingTaskQuestionAnswerRepository.Where(x => visitTaskids.Contains(x.VisitTaskId))
|
||||
join question in _readingQuestionTrialRepository.Where(x => x.IsJudgeQuestion) on new { ReadingQuestionTrialId = questionAnswet.ReadingQuestionTrialId } equals new { ReadingQuestionTrialId = question.Id }
|
||||
@@ -842,10 +858,15 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
await this.SaveJudgeTask(new SaveJudgeTaskDto()
|
||||
|
||||
if ((visitTask.SourceSubjectVisitId != null && trialInfo.ArbitrationRule == ArbitrationRule.Visit) || (visitTask.SouceReadModuleId != null && trialInfo.ArbitrationRule == ArbitrationRule.Reading))
|
||||
{
|
||||
VisitTaskIds = visitTaskids,
|
||||
});
|
||||
await this.SaveJudgeTask(new SaveJudgeTaskDto()
|
||||
{
|
||||
VisitTaskIds = visitTaskids,
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -873,8 +894,6 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
var trialId = await _visitTaskRepository.Where(x => inDto.VisitTaskIds.Contains(x.Id)).Select(x => x.TrialId).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
|
||||
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
JudgeVisitTaskIdList= inDto.VisitTaskIds,
|
||||
|
||||
@@ -68,6 +68,43 @@ namespace IRaCIS.Application.Services
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 设置项目裁判信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> SetTrialJudgyInfo(SetTrialJudgyInfoInDto inDto)
|
||||
{
|
||||
await _trialRepository.UpdatePartialFromQueryAsync(inDto.TrialId, x => new Trial()
|
||||
{
|
||||
|
||||
ArbitrationRule = inDto.ArbitrationRule,
|
||||
IsArbitrationReading = inDto.IsArbitrationReading,
|
||||
});
|
||||
|
||||
var result = await _trialRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目裁判信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<GetTrialJudgyInfoOutDto> GetTrialJudgyInfo(GetTrialJudgyInfoInDto inDto)
|
||||
{
|
||||
GetTrialJudgyInfoOutDto result = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new GetTrialJudgyInfoOutDto
|
||||
{
|
||||
TrialId = x.Id,
|
||||
ArbitrationRule = x.ArbitrationRule,
|
||||
IsArbitrationReading = x.IsArbitrationReading
|
||||
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改项目标准分页
|
||||
|
||||
@@ -671,7 +671,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
/// <summary>
|
||||
/// 仲裁规则/对象
|
||||
/// </summary>
|
||||
public int ArbitrationRule { get; set; } = 2;
|
||||
public ArbitrationRule ArbitrationRule { get; set; }
|
||||
}
|
||||
|
||||
public class SignConfirmDTO
|
||||
|
||||
Reference in New Issue
Block a user