删除表单数据
							parent
							
								
									049c3918a4
								
							
						
					
					
						commit
						e2060a1460
					
				| 
						 | 
				
			
			@ -409,13 +409,34 @@ namespace IRaCIS.Core.Application.Service
 | 
			
		|||
            return ResponseOutput.Ok(true);
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
        /// <summary>
 | 
			
		||||
        /// 获取CRC确认列表
 | 
			
		||||
        /// 删除表单数据
 | 
			
		||||
        /// </summary>
 | 
			
		||||
        /// <param name="inDto"></param>
 | 
			
		||||
        /// <returns></returns>
 | 
			
		||||
        /// <exception cref="BusinessValidationFailedException"></exception>
 | 
			
		||||
        [HttpPost]
 | 
			
		||||
        public async Task<IResponseOutput> DeleteClinicalForm(DeleteClinicalFormInDto inDto)
 | 
			
		||||
        {
 | 
			
		||||
 | 
			
		||||
            if (await _readModuleCriterionFromRepository.AnyAsync(x => x.ClinicalFormId == inDto.ClinicalFormId))
 | 
			
		||||
            {
 | 
			
		||||
				throw new BusinessValidationFailedException("当前表单已确认,无法删除!");
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			await _clinicalFormRepository.BatchDeleteNoTrackingAsync(x => x.Id == inDto.ClinicalFormId);
 | 
			
		||||
			await _clinicalQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
 | 
			
		||||
			await _clinicalAnswerRowInfoRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
 | 
			
		||||
			await _clinicalTableAnswerRepository.BatchDeleteNoTrackingAsync(x => x.ClinicalFormId == inDto.ClinicalFormId);
 | 
			
		||||
			return ResponseOutput.Ok(true);
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/// <summary>
 | 
			
		||||
		/// 获取CRC确认列表
 | 
			
		||||
		/// </summary>
 | 
			
		||||
		/// <param name="inDto"></param>
 | 
			
		||||
		/// <returns></returns>
 | 
			
		||||
		[HttpPost]
 | 
			
		||||
        public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
 | 
			
		||||
        {
 | 
			
		||||
			List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -161,6 +161,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
			
		|||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    public class DeleteClinicalFormInDto
 | 
			
		||||
    {
 | 
			
		||||
		public Guid ClinicalFormId { get; set; }
 | 
			
		||||
	}
 | 
			
		||||
	public class SubmitClinicalFormInDto
 | 
			
		||||
    {
 | 
			
		||||
        /// <summary>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue