修改参与类型

Uat_Study
hang 2023-06-06 11:54:20 +08:00
parent 0c228fab1f
commit 01018737fd
3 changed files with 8 additions and 4 deletions

View File

@ -196,7 +196,7 @@ namespace IRaCIS.Application.Services
trial.DeclarationTypes = $"|{string.Join('|', trialAddModel.DeclarationTypeEnumList)}|";
trial.AttendedReviewerTypes = $"|{string.Join('|', trialAddModel.AttendedReviewerTypes)}|";
trial.AttendedReviewerTypes = $"|{string.Join('|', trialAddModel.AttendedReviewerTypeEnumList)}|";
//多选信息
trialAddModel.ModalityIds.ForEach(modalityId => trial.TrialDicList.Add(new TrialDictionary() { DictionaryId = modalityId, KeyName = StaticData.Modality, TrialId = trial.Id }));
@ -269,6 +269,9 @@ namespace IRaCIS.Application.Services
}
_mapper.Map(updateModel, trial);
trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList)}|";
trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList)}|";
var success = await _repository.SaveChangesAsync();
return ResponseOutput.Ok(trial);

View File

@ -33,7 +33,8 @@
US=1,
USAndCN=2,
EU=2,
Other=3
}
public enum DeclarationType

View File

@ -153,7 +153,7 @@ namespace IRaCIS.Core.Domain.Models
public string DeclarationTypes { get; set; }
public string DeclarationTypes { get; set; } = string.Empty;
[NotMapped]
public List<DeclarationType> DeclarationTypeEnumList => AttendedReviewerTypes.Split('|', StringSplitOptions.RemoveEmptyEntries)
@ -163,7 +163,7 @@ namespace IRaCIS.Core.Domain.Models
public List<AttendedReviewerType> AttendedReviewerTypeEnumList=> AttendedReviewerTypes.Split('|',StringSplitOptions.RemoveEmptyEntries)
.Select(s => Enum.Parse(typeof(AttendedReviewerType), s)).Cast<AttendedReviewerType>().ToList();
public string AttendedReviewerTypes { get; set; }
public string AttendedReviewerTypes { get; set; }=string.Empty;