修改添加qc模板
This commit is contained in:
@@ -47,7 +47,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
public bool IsEnable { get; set; }
|
||||
public string Type { get; set; } = String.Empty;
|
||||
|
||||
public string ParentTriggerValue { get; set; }
|
||||
public string ParentTriggerValue { get; set; } = String.Empty;
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -51,6 +51,19 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
}
|
||||
|
||||
|
||||
private void VerifyIsCanQC(SubjectVisit? subjectVisit, Guid? sujectVisitId = null)
|
||||
{
|
||||
if (sujectVisitId != null)
|
||||
{
|
||||
subjectVisit = _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId).Result.IfNullThrowException();
|
||||
}
|
||||
|
||||
if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
|
||||
{
|
||||
throw new BusinessValidationFailedException("您不是该质控任务当前领取人,没有操作权限!");
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("{subjectVisitId:guid}")]
|
||||
public async Task<List<NoneDicomStudyView>> GetNoneDicomStudyList(Guid subjectVisitId)
|
||||
{
|
||||
@@ -61,18 +74,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
return await noneDicomStudyQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
public void VerifyIsCanQC(SubjectVisit? subjectVisit, Guid? sujectVisitId = null)
|
||||
{
|
||||
if (sujectVisitId != null)
|
||||
{
|
||||
subjectVisit = _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId).Result.IfNullThrowException();
|
||||
}
|
||||
|
||||
if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
|
||||
{
|
||||
throw new BusinessValidationFailedException("您不是该质控任务当前领取人,没有操作权限!");
|
||||
}
|
||||
}
|
||||
|
||||
[UnitOfWork]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
@@ -165,23 +166,6 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
return await _repository.Where<NoneDicomStudyFile>(t => t.NoneDicomStudy.SubjectVisitId == subjectVisitId).ProjectTo<NoneDicomStudyFileView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken }).ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上传非Dicom 文件 支持压缩包
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> NewUploadNoneDicomFile([FromForm] UploadNoneDicomFileDto fileDto)
|
||||
{
|
||||
var file = this._httpContext.HttpContext?.Request.Form;
|
||||
var result = await UploadNoneDicomFile(file, fileDto.subjectVisitId, fileDto.noneDicomStudyId);
|
||||
if (result.IsSuccess)
|
||||
{
|
||||
var data = JsonConvert.DeserializeObject<DataInspectionAddDTO>(fileDto.AuditInfo);
|
||||
data.GeneralId = fileDto.noneDicomStudyId;
|
||||
await _inspectionService.AddInspectionRecordAsync(data);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -301,5 +285,26 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
await _noneDicomStudyFileRepository.AddAsync(new NoneDicomStudyFile() { FileName = fileName, Path = relativePath, NoneDicomStudyId = noneDicomStudyId });
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传非Dicom 文件 支持压缩包
|
||||
/// </summary>
|
||||
[HttpPost]
|
||||
[Obsolete]
|
||||
public async Task<IResponseOutput> NewUploadNoneDicomFile([FromForm] UploadNoneDicomFileDto fileDto)
|
||||
{
|
||||
var file = this._httpContext.HttpContext?.Request.Form;
|
||||
var result = await UploadNoneDicomFile(file, fileDto.subjectVisitId, fileDto.noneDicomStudyId);
|
||||
if (result.IsSuccess)
|
||||
{
|
||||
var data = JsonConvert.DeserializeObject<DataInspectionAddDTO>(fileDto.AuditInfo);
|
||||
data.GeneralId = fileDto.noneDicomStudyId;
|
||||
await _inspectionService.AddInspectionRecordAsync(data);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -765,10 +765,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
await VerifyIsCanQCAsync(null, subjectVisitId);
|
||||
|
||||
|
||||
var series = await _repository.Where<DicomSeries>(t => t.Id == seriesId, true).IgnoreQueryFilters().FirstOrDefaultAsync();
|
||||
|
||||
if (series == null) return Null404NotFound(series);
|
||||
var series = (await _repository.Where<DicomSeries>(t => t.Id == seriesId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
|
||||
if (state == 1)
|
||||
{
|
||||
series.IsReading = false;
|
||||
@@ -781,8 +780,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
series.IsDeleted = true;
|
||||
|
||||
var study = await _repository.Where<DicomStudy>(t => t.Id == studyId, true).IgnoreQueryFilters().FirstOrDefaultAsync();
|
||||
if (study == null) return Null404NotFound(study);
|
||||
var study = (await _repository.Where<DicomStudy>(t => t.Id == studyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
var instanceIdList = await _repository.Where<DicomInstance>(t => t.SeriesId == seriesId).Select(t => t.Id).ToListAsync();
|
||||
|
||||
@@ -807,9 +805,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
series.IsDeleted = false;
|
||||
|
||||
var study = await _repository.Where<DicomStudy>(t => t.Id == studyId, true).IgnoreQueryFilters().FirstOrDefaultAsync();
|
||||
var study = (await _repository.Where<DicomStudy>(t => t.Id == studyId, true).IgnoreQueryFilters().FirstOrDefaultAsync()).IfNullThrowException();
|
||||
|
||||
if (study == null) return Null404NotFound(study);
|
||||
|
||||
var instanceIdList = await _repository.Where<DicomInstance>(t => t.SeriesId == seriesId).Select(t => t.Id).ToListAsync();
|
||||
|
||||
@@ -985,7 +982,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
subjectVisit = (await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == sujectVisitId)).IfNullThrowException();
|
||||
}
|
||||
|
||||
|
||||
if (subjectVisit!.CurrentActionUserId != _userInfo.Id)
|
||||
{
|
||||
throw new BusinessValidationFailedException("您不是该质控任务当前领取人,没有操作权限!");
|
||||
|
||||
Reference in New Issue
Block a user