@@ -135,12 +135,16 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
};
|
||||
|
||||
var fixedFields = new List<string>() { "IsRoutineMRIPDEE", "MRIPDFFScanTime", "MRIPDFFLeadTime", "MRIPDFFOther", "IsAuthorizeRadiologistsParticipate", "AssignFixedTechnologists", "ISStrictManualBurnFlag", "NotStrictManualBurnFlagReason" };
|
||||
|
||||
//已有配置处理
|
||||
var list = _trialRepository.Where(t => t.TrialExtraConfigJsonStr != "").Select(t => new { t.Id, t.TrialExtraConfigJsonStr }).ToList();
|
||||
|
||||
foreach (var item in list)
|
||||
{
|
||||
var extralConfig = JsonConvert.DeserializeObject<TrialExtraConfig>(item.TrialExtraConfigJsonStr);
|
||||
|
||||
//额外配置的中心调研,
|
||||
if (extralConfig.ModifyFiledList.Count > 0)
|
||||
{
|
||||
extralConfig.EquipmentControlFieldList = trialExtalConfig.EquipmentControlFieldList.Where(t => t.ShowOrder != 2).ToList();
|
||||
@@ -152,14 +156,32 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}
|
||||
|
||||
if (extralConfig.NotShowFieldList.Count == 0)
|
||||
{
|
||||
extralConfig.NotShowFieldList.AddRange(fixedFields);
|
||||
extralConfig.NotShowFieldList = extralConfig.NotShowFieldList.Distinct().ToList();
|
||||
}
|
||||
else
|
||||
{
|
||||
//判断固定数组中是否有任意一个元素存在于 NotShowFieldList 中
|
||||
if (!fixedFields.Any(t => extralConfig.NotShowFieldList.Any(c => c == t)))
|
||||
{
|
||||
extralConfig.NotShowFieldList.AddRange(fixedFields);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
var jsonInfo = extralConfig.ToJsonStr();
|
||||
|
||||
|
||||
|
||||
|
||||
await _trialRepository.BatchUpdateNoTrackingAsync(t => t.Id == item.Id, u => new Trial() { TrialExtraConfigJsonStr = jsonInfo });
|
||||
}
|
||||
|
||||
|
||||
//默认配置更新
|
||||
var info = trialExtalConfig.ToJsonStr();
|
||||
|
||||
var idQuery = _trialRepository.Where(t => t.TrialExtraConfigJsonStr == "").Select(t => t.Id);
|
||||
|
||||
Reference in New Issue
Block a user