S-47
							parent
							
								
									b5e4b7db86
								
							
						
					
					
						commit
						98cc35e614
					
				| 
						 | 
					@ -518,6 +518,7 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
                 
 | 
					                 
 | 
				
			||||||
                    SubjectId = x.SubjectId,
 | 
					                    SubjectId = x.SubjectId,
 | 
				
			||||||
                    IsCRCConfirm = x.IsCRCConfirm,
 | 
					                    IsCRCConfirm = x.IsCRCConfirm,
 | 
				
			||||||
 | 
					                    IsCRCApplicationRevoke=x.IsCRCApplicationRevoke,
 | 
				
			||||||
                    VisitBlindName=x.SubjectVisit.BlindName,
 | 
					                    VisitBlindName=x.SubjectVisit.BlindName,
 | 
				
			||||||
                    LatestScanDate = x.SubjectVisit.LatestScanDate,
 | 
					                    LatestScanDate = x.SubjectVisit.LatestScanDate,
 | 
				
			||||||
                    ReadingSetType = x.ReadingSetType,
 | 
					                    ReadingSetType = x.ReadingSetType,
 | 
				
			||||||
| 
						 | 
					@ -818,10 +819,10 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId==x.Id, x => new ReadModule()
 | 
								await _readModuleRepository.UpdatePartialFromQueryAsync(x => presentData.ReadModuleId==x.Id, x => new ReadModule()
 | 
				
			||||||
			{
 | 
								{
 | 
				
			||||||
				IsCRCConfirm = false
 | 
									IsCRCApplicationRevoke = true
 | 
				
			||||||
			});
 | 
								});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId);
 | 
								//await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			await _readModuleCriterionFromRepository.SaveChangesAsync();
 | 
								await _readModuleCriterionFromRepository.SaveChangesAsync();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -840,13 +841,38 @@ namespace IRaCIS.Core.Application.Service
 | 
				
			||||||
            var readModuleData = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
 | 
					            var readModuleData = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync();
 | 
				
			||||||
            if (!readModuleData.IsCRCConfirm)
 | 
					            if (!readModuleData.IsCRCConfirm)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
				throw new BusinessValidationFailedException("CRC还未确认数据,PM无法确认");
 | 
									throw new BusinessValidationFailedException("CRC还未确认数据,PM无法操作");
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			await _readModuleRepository.UpdatePartialFromQueryAsync(x => inDto.ReadModuleId == x.Id, x => new ReadModule()
 | 
					            if (readModuleData.IsCRCApplicationRevoke && inDto.IsConfirm)
 | 
				
			||||||
			{
 | 
					            {
 | 
				
			||||||
				IsPMConfirm = true
 | 
					                throw new BusinessValidationFailedException("CRC正在申请退回,PM无法确认");
 | 
				
			||||||
			});
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (!readModuleData.IsCRCApplicationRevoke && !inDto.IsConfirm)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                throw new BusinessValidationFailedException("CRC未申请退回,PM无法撤销");
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            if (inDto.IsConfirm)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                await _readModuleRepository.UpdatePartialFromQueryAsync(x => inDto.ReadModuleId == x.Id, x => new ReadModule()
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    IsPMConfirm = true
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            else
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					                await _readModuleRepository.UpdatePartialFromQueryAsync(x => inDto.ReadModuleId == x.Id, x => new ReadModule()
 | 
				
			||||||
 | 
					                {
 | 
				
			||||||
 | 
					                    IsCRCConfirm = false,
 | 
				
			||||||
 | 
					                    IsCRCApplicationRevoke=false,
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					                await _readModuleCriterionFromRepository.BatchDeleteNoTrackingAsync(x=>x.ReadModuleId== presentData.ReadModuleId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					              
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			await _readModuleRepository.SaveChangesAsync();
 | 
								await _readModuleRepository.SaveChangesAsync();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -701,6 +701,7 @@ namespace IRaCIS.Application.Services
 | 
				
			||||||
                      ClinicalDataLevel = x.ClinicalDataLevel,
 | 
					                      ClinicalDataLevel = x.ClinicalDataLevel,
 | 
				
			||||||
                      SubjectId = inDto.SubjectId,
 | 
					                      SubjectId = inDto.SubjectId,
 | 
				
			||||||
                      ReadingId = default(Guid),
 | 
					                      ReadingId = default(Guid),
 | 
				
			||||||
 | 
					                      IsCRCApplicationRevoke=readModule.IsCRCApplicationRevoke,
 | 
				
			||||||
                      IsCRCConfirm= readModule.IsCRCConfirm,
 | 
					                      IsCRCConfirm= readModule.IsCRCConfirm,
 | 
				
			||||||
                      IsPMConfirm= readModule.IsPMConfirm,
 | 
					                      IsPMConfirm= readModule.IsPMConfirm,
 | 
				
			||||||
                      ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
 | 
					                      ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
 | 
				
			||||||
| 
						 | 
					@ -857,7 +858,8 @@ namespace IRaCIS.Application.Services
 | 
				
			||||||
					  ClinicalDataLevel = x.ClinicalDataLevel,
 | 
										  ClinicalDataLevel = x.ClinicalDataLevel,
 | 
				
			||||||
					  SubjectId = inDto.SubjectId,
 | 
										  SubjectId = inDto.SubjectId,
 | 
				
			||||||
					  ReadingId = default(Guid),
 | 
										  ReadingId = default(Guid),
 | 
				
			||||||
                      IsCRCConfirm= readModule.IsCRCConfirm,
 | 
					                      IsCRCApplicationRevoke= readModule.IsCRCApplicationRevoke,
 | 
				
			||||||
 | 
					                      IsCRCConfirm = readModule.IsCRCConfirm,
 | 
				
			||||||
                      IsPMConfirm=readModule.IsPMConfirm,
 | 
					                      IsPMConfirm=readModule.IsPMConfirm,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                      ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
 | 
					                      ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -221,7 +221,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
				
			||||||
		public Guid SubjectId { get; set; }
 | 
							public Guid SubjectId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public Guid ReadModuleId { get; set; }
 | 
							public Guid ReadModuleId { get; set; }
 | 
				
			||||||
	}
 | 
					
 | 
				
			||||||
 | 
					        public bool IsConfirm { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	public class CRCClinicalForm
 | 
						public class CRCClinicalForm
 | 
				
			||||||
| 
						 | 
					@ -272,6 +275,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public bool IsCRCConfirm { get; set; } = false;
 | 
							public bool IsCRCConfirm { get; set; } = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// CRC是否正在申请撤回
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public bool IsCRCApplicationRevoke { get; set; } = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public string SubjectCode { get; set; }
 | 
					        public string SubjectCode { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public bool IsHaveTableQuestion
 | 
							public bool IsHaveTableQuestion
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -335,6 +335,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
 | 
				
			||||||
		/// </summary>
 | 
							/// </summary>
 | 
				
			||||||
		public Guid ReadingId { get; set; }
 | 
							public Guid ReadingId { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        /// <summary>
 | 
				
			||||||
 | 
					        /// CRC是否正在申请撤回
 | 
				
			||||||
 | 
					        /// </summary>
 | 
				
			||||||
 | 
					        public bool IsCRCApplicationRevoke { get; set; } = false;
 | 
				
			||||||
        public bool IsCRCConfirm { get; set; } = false;
 | 
					        public bool IsCRCConfirm { get; set; } = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        public bool IsPMConfirm { get; set; } = false;
 | 
					        public bool IsPMConfirm { get; set; } = false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -16,6 +16,7 @@ namespace IRaCIS.Core.Domain.Share
 | 
				
			||||||
        public static readonly string Group = "group";
 | 
					        public static readonly string Group = "group";
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /// <summary>
 | 
					    /// <summary>
 | 
				
			||||||
    /// GetClinicalType
 | 
					    /// GetClinicalType
 | 
				
			||||||
    /// </summary>
 | 
					    /// </summary>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -79,7 +79,12 @@ namespace IRaCIS.Core.Domain.Models
 | 
				
			||||||
		public bool IsCRCConfirm { get; set; } = false;
 | 
							public bool IsCRCConfirm { get; set; } = false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public bool IsPMConfirm { get; set; } = false;
 | 
							public bool IsPMConfirm { get; set; } = false;
 | 
				
			||||||
		public bool IsDeleted { get; set; }
 | 
					
 | 
				
			||||||
 | 
							/// <summary>
 | 
				
			||||||
 | 
							/// CRC是否正在申请撤回
 | 
				
			||||||
 | 
							/// </summary>
 | 
				
			||||||
 | 
							public bool IsCRCApplicationRevoke { get; set; } = false;
 | 
				
			||||||
 | 
					        public bool IsDeleted { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		public DateTime? DeletedTime { get; set; }
 | 
							public DateTime? DeletedTime { get; set; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue