修改设置重传完成 限制
parent
55d3ea2c75
commit
34a5532ee2
|
@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
qcChallenge.ChallengeCode = code + 1;
|
qcChallenge.ChallengeCode = code + 1;
|
||||||
qcChallenge.UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
qcChallenge.UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
||||||
|
|
||||||
qcChallenge= await _repository.AddAsync(qcChallenge,true);
|
qcChallenge = await _repository.AddAsync(qcChallenge, true);
|
||||||
|
|
||||||
return qcChallenge;
|
return qcChallenge;
|
||||||
}
|
}
|
||||||
|
@ -1527,7 +1527,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
|
|
||||||
// 删除序列
|
// 删除序列
|
||||||
List<DataInspection> datas = new List<DataInspection>();
|
List<DataInspection> datas = new List<DataInspection>();
|
||||||
var DicomSeriesdata = await _repository.GetQueryable<DicomSeries>().Where(x => x.SubjectVisitId == subjectVisitId&&x.IsDeleted).Select(x => new {
|
var DicomSeriesdata = await _repository.GetQueryable<DicomSeries>().Where(x => x.SubjectVisitId == subjectVisitId && x.IsDeleted).Select(x => new
|
||||||
|
{
|
||||||
StudyCode = x.DicomStudy.StudyCode,
|
StudyCode = x.DicomStudy.StudyCode,
|
||||||
Modalities = x.DicomStudy.Modalities,
|
Modalities = x.DicomStudy.Modalities,
|
||||||
SeriesNumber = x.SeriesNumber,
|
SeriesNumber = x.SeriesNumber,
|
||||||
|
@ -1724,14 +1725,27 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
return ResponseOutput.NotOk("重传完成 只允许CRC 设置!");
|
return ResponseOutput.NotOk("重传完成 只允许CRC 设置!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var qcChallenge = await _repository.FirstOrDefaultAsync<QCChallenge>(t => t.Id == cRCReuploadFinishedCommand.QCChallengeId);
|
||||||
|
|
||||||
|
if (qcChallenge == null) return Null404NotFound(qcChallenge);
|
||||||
|
|
||||||
|
var subjectVisitId = qcChallenge.SubjectVisitId;
|
||||||
|
|
||||||
|
if (await _subjectVisitRepository.Where(t => t.Id == subjectVisitId).SelectMany(t => t.StudyList)
|
||||||
|
.CountAsync() == 0 &&
|
||||||
|
await _subjectVisitRepository.Where(t => t.Id == subjectVisitId)
|
||||||
|
.SelectMany(t => t.NoneDicomStudyList).SelectMany(u => u.NoneDicomFileList).CountAsync() == 0)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("当前没有影像,不允许设置重传完成");
|
||||||
|
}
|
||||||
|
|
||||||
var trialConfig = await _trialRepository
|
var trialConfig = await _trialRepository
|
||||||
.Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification, t.IsUrgent, t.IsHaveFirstGiveMedicineDate, t.ClinicalInformationTransmissionEnum })
|
.Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification, t.IsUrgent, t.IsHaveFirstGiveMedicineDate, t.ClinicalInformationTransmissionEnum })
|
||||||
.Where(t => t.TrialId == cRCReuploadFinishedCommand.TrialId).FirstOrDefaultAsync();
|
.Where(t => t.TrialId == cRCReuploadFinishedCommand.TrialId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
var qcChallenge = await _repository.FirstOrDefaultAsync<QCChallenge>(t => t.Id == cRCReuploadFinishedCommand.QCChallengeId);
|
|
||||||
|
|
||||||
if (qcChallenge == null) return Null404NotFound(qcChallenge);
|
|
||||||
|
|
||||||
qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.CRCReuploaded;
|
qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.CRCReuploaded;
|
||||||
|
|
||||||
|
@ -1767,8 +1781,6 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
dbSubjectVisit.IsConfirmedClinicalData = true;
|
dbSubjectVisit.IsConfirmedClinicalData = true;
|
||||||
|
|
||||||
var signSuccess = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == cRCReuploadFinishedCommand.SignId, u => new TrialSign() { IsCompleted = true });
|
var signSuccess = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == cRCReuploadFinishedCommand.SignId, u => new TrialSign() { IsCompleted = true });
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var success = await _repository.SaveChangesAsync();
|
var success = await _repository.SaveChangesAsync();
|
||||||
|
|
Loading…
Reference in New Issue