修改默认值
continuous-integration/drone/push Build is running
Details
continuous-integration/drone/push Build is running
Details
parent
8b9580abc8
commit
385c40c895
|
|
@ -1569,10 +1569,14 @@ namespace IRaCIS.Core.Application
|
||||||
var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialDataStoreType, t.IsExternalViewTrialChart, t.TrialObjectNameList, t.CollectImagesEnum, t.IsIQCAutoNextTask, t.IsImageQualityControl }).FirstOrDefault();
|
var extralObj = _trialRepository.Where(t => t.Id == trialId).Select(t => new { t.TrialExtraConfigJsonStr, t.TrialDataStoreType, t.IsExternalViewTrialChart, t.TrialObjectNameList, t.CollectImagesEnum, t.IsIQCAutoNextTask, t.IsImageQualityControl }).FirstOrDefault();
|
||||||
|
|
||||||
var extralConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(extralObj?.TrialExtraConfigJsonStr) ?? new TrialExtraConfig();
|
var extralConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(extralObj?.TrialExtraConfigJsonStr) ?? new TrialExtraConfig();
|
||||||
|
// 定义固定数组
|
||||||
|
var fixedFields = new List<string>() { "IsRoutineMRIPDEE", "MRIPDFFScanTime", "MRIPDFFLeadTime", "MRIPDFFOther", "IsAuthorizeRadiologistsParticipate", "AssignFixedTechnologists", "ISStrictManualBurnFlag", "NotStrictManualBurnFlagReason" };
|
||||||
|
|
||||||
if (extralConfig.NotShowFieldList.Count() == 0)
|
// 判断 NotShowFieldList 是否缺少固定数组中的任何字段
|
||||||
|
if (!extralConfig.NotShowFieldList.Intersect(fixedFields).Any())
|
||||||
{
|
{
|
||||||
extralConfig.NotShowFieldList = new List<string>() { "IsRoutineMRIPDEE", "MRIPDFFScanTime", "MRIPDFFLeadTime", "MRIPDFFOther", "IsAuthorizeRadiologistsParticipate", "AssignFixedTechnologists", "ISStrictManualBurnFlag", "NotStrictManualBurnFlagReason" };
|
// 如果没有交集(即没有任何一个字段存在),则添加固定数组的字段
|
||||||
|
extralConfig.NotShowFieldList.AddRange(fixedFields);
|
||||||
}
|
}
|
||||||
|
|
||||||
var trialConfig = _mapper.Map<TrialConfigInfo>(extralConfig);
|
var trialConfig = _mapper.Map<TrialConfigInfo>(extralConfig);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue