修改稽查

Uat_Study
{872297557@qq.com} 2022-12-27 17:13:44 +08:00
parent 7c5e79d39e
commit 1419b4eb3d
2 changed files with 29 additions and 17 deletions

View File

@ -122,15 +122,6 @@ namespace IRaCIS.Core.Domain.Models
/// <summary> 字典表 </summary>
public string ForeignKeyTableName { get; set; } = String.Empty;
@ -153,6 +144,8 @@ namespace IRaCIS.Core.Domain.Models
//未知是否有用
public bool IsConfig { get; set; }
public string DictionaryKey { get; set; }
public bool IsShowByTrialConfig { get; set; }
public string TrialConfigRelyFieldName { get; set; }

View File

@ -413,6 +413,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//配置标准 病灶类型 自动计算标识 "LesionType", "QuestionType"
if (entitys.Any(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)))
{
//系统标准设置 没有翻译的字段
if (_userInfo.RequestUrl == "ReadingQuestion/setCriterionDictionary")
{
var type = AuditOpt.Add;
@ -423,6 +425,11 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var cloneEntity = firstEntity.Clone();
//查询出字典的Value ValueCN Des 保存
var dicIdList = list.Select(t => t.DictionaryId).ToList();
var selectList = await _dbContext.Dictionary.Where(x => dicIdList.Contains(x.Id)).Select(t => new { t.Id, t.Value, t.ValueCN, t.Description, t.ShowOrder }).ToListAsync();
//保证Id 唯一
cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.CriterionId.ToString(), firstEntity.ParentCode.ToString());
@ -433,12 +440,24 @@ namespace IRaCIS.Core.Infra.EFCore.Common
TrialReadingCriterionId = x.IsSystemCriterion == false ? x.CriterionId : null,
},new {DictionaryIdList= list.Select(t=>t.DictionaryId).ToList() });
},
new
{
SelectList = selectList.Join(list, t => t.Id, u => u.DictionaryId, (t, u) =>
new
{
t.Value,
t.ValueCN,
t.Description,
t.ShowOrder,
u.IsBaseLineUse,
u.IsFollowVisitUse
}
).OrderBy(t => t.ShowOrder).ToList()
});
}
}