修改设置重传完成 限制
							parent
							
								
									55d3ea2c75
								
							
						
					
					
						commit
						34a5532ee2
					
				| 
						 | 
				
			
			@ -56,7 +56,7 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
            _dicomStudyRepository = dicomStudyRepository;
 | 
			
		||||
            this._dictionaryrepository = dictionaryrepository;
 | 
			
		||||
            _mediator = mediator;
 | 
			
		||||
           _trialRepository = trialRepository;
 | 
			
		||||
            _trialRepository = trialRepository;
 | 
			
		||||
            _inspectionService = inspectionService;
 | 
			
		||||
            this._dictionaryService = dictionaryService;
 | 
			
		||||
        }
 | 
			
		||||
| 
						 | 
				
			
			@ -108,7 +108,7 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
 | 
			
		||||
                using (await _mutex.LockAsync())
 | 
			
		||||
                {
 | 
			
		||||
                  var  qcChallenge = _mapper.Map<QCChallenge>(qaQuestionCommand);
 | 
			
		||||
                    var qcChallenge = _mapper.Map<QCChallenge>(qaQuestionCommand);
 | 
			
		||||
 | 
			
		||||
                    qcChallenge.QCProcessEnum = trialConfig.QCProcessEnum;
 | 
			
		||||
                    qcChallenge.CurrentQCEnum = currentQCType;
 | 
			
		||||
| 
						 | 
				
			
			@ -117,7 +117,7 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
                    qcChallenge.ChallengeCode = code + 1;
 | 
			
		||||
                    qcChallenge.UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
 | 
			
		||||
 | 
			
		||||
                    qcChallenge= await _repository.AddAsync(qcChallenge,true);
 | 
			
		||||
                    qcChallenge = await _repository.AddAsync(qcChallenge, true);
 | 
			
		||||
 | 
			
		||||
                    return qcChallenge;
 | 
			
		||||
                }
 | 
			
		||||
| 
						 | 
				
			
			@ -1527,7 +1527,8 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
 | 
			
		||||
            // 删除序列
 | 
			
		||||
            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,
 | 
			
		||||
                Modalities = x.DicomStudy.Modalities,
 | 
			
		||||
                SeriesNumber = x.SeriesNumber,
 | 
			
		||||
| 
						 | 
				
			
			@ -1724,15 +1725,28 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
                return ResponseOutput.NotOk("重传完成 只允许CRC 设置!");
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            var trialConfig = await _trialRepository
 | 
			
		||||
               .Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification, t.IsUrgent, t.IsHaveFirstGiveMedicineDate, t.ClinicalInformationTransmissionEnum })
 | 
			
		||||
               .Where(t => t.TrialId == cRCReuploadFinishedCommand.TrialId).FirstOrDefaultAsync();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            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
 | 
			
		||||
           .Select(t => new { TrialId = t.Id, t.QCProcessEnum, t.IsImageConsistencyVerification, t.IsUrgent, t.IsHaveFirstGiveMedicineDate, t.ClinicalInformationTransmissionEnum })
 | 
			
		||||
           .Where(t => t.TrialId == cRCReuploadFinishedCommand.TrialId).FirstOrDefaultAsync();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            qcChallenge.ReuploadEnum = QCChanllengeReuploadEnum.CRCReuploaded;
 | 
			
		||||
 | 
			
		||||
            qcChallenge.ReUploadedTime = DateTime.Now;
 | 
			
		||||
| 
						 | 
				
			
			@ -1767,8 +1781,6 @@ namespace IRaCIS.Core.Application.Image.QA
 | 
			
		|||
                dbSubjectVisit.IsConfirmedClinicalData = true;
 | 
			
		||||
 | 
			
		||||
                var signSuccess = await _repository.BatchUpdateAsync<TrialSign>(t => t.Id == cRCReuploadFinishedCommand.SignId, u => new TrialSign() { IsCompleted = true });
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            var success = await _repository.SaveChangesAsync();
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue