修改默认值
continuous-integration/drone/push Build is running Details

Test_IRC_Net8
hang 2026-05-28 13:48:56 +08:00
parent 8b9580abc8
commit 385c40c895
1 changed files with 6 additions and 2 deletions

View File

@ -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 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);