修改参与类型
parent
0c228fab1f
commit
01018737fd
|
@ -196,7 +196,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
trial.DeclarationTypes = $"|{string.Join('|', trialAddModel.DeclarationTypeEnumList)}|";
|
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 }));
|
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);
|
_mapper.Map(updateModel, trial);
|
||||||
|
|
||||||
|
trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList)}|";
|
||||||
|
trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList)}|";
|
||||||
|
|
||||||
var success = await _repository.SaveChangesAsync();
|
var success = await _repository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(trial);
|
return ResponseOutput.Ok(trial);
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,8 @@
|
||||||
|
|
||||||
US=1,
|
US=1,
|
||||||
|
|
||||||
USAndCN=2,
|
EU=2,
|
||||||
|
Other=3
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum DeclarationType
|
public enum DeclarationType
|
||||||
|
|
|
@ -153,7 +153,7 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public string DeclarationTypes { get; set; }
|
public string DeclarationTypes { get; set; } = string.Empty;
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public List<DeclarationType> DeclarationTypeEnumList => AttendedReviewerTypes.Split('|', StringSplitOptions.RemoveEmptyEntries)
|
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)
|
public List<AttendedReviewerType> AttendedReviewerTypeEnumList=> AttendedReviewerTypes.Split('|',StringSplitOptions.RemoveEmptyEntries)
|
||||||
.Select(s => Enum.Parse(typeof(AttendedReviewerType), s)).Cast<AttendedReviewerType>().ToList();
|
.Select(s => Enum.Parse(typeof(AttendedReviewerType), s)).Cast<AttendedReviewerType>().ToList();
|
||||||
|
|
||||||
public string AttendedReviewerTypes { get; set; }
|
public string AttendedReviewerTypes { get; set; }=string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue