Compare commits
No commits in common. "eff5920568c12a2cd5b1ea88c42a5604509c824d" and "c9387463babc2eb642e94af0f5d4efbe27c10be5" have entirely different histories.
eff5920568
...
c9387463ba
|
|
@ -72,35 +72,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 翻译单位
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="answerType">答案类型</param>
|
|
||||||
/// <param name="unit">单位</param>
|
|
||||||
/// <param name="customUnit">自定义单位</param>
|
|
||||||
/// <param name="unitDataList">单位字典</param>
|
|
||||||
/// <param name="answer">答案</param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public string Translationunit(string answerType, ValueUnit? unit, string customUnit, List<UnitData> unitDataList, string? answer)
|
|
||||||
{
|
|
||||||
if (answer == null || answer == string.Empty)
|
|
||||||
{
|
|
||||||
return string.Empty;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (answerType == "upload")
|
|
||||||
{
|
|
||||||
return "❄❅❆❇❈❉❊" + answer;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (unit == ValueUnit.Custom)
|
|
||||||
{
|
|
||||||
return answer + string.Empty + customUnit;
|
|
||||||
}
|
|
||||||
|
|
||||||
return answer + string.Empty + unitDataList.Where(y => y.Unit == unit).Select(x => x.UnitName).FirstIsNullReturnEmpty();
|
|
||||||
}
|
|
||||||
|
|
||||||
// 修改为删除
|
// 修改为删除
|
||||||
private List<Type> UpdateIsDelete
|
private List<Type> UpdateIsDelete
|
||||||
{
|
{
|
||||||
|
|
@ -279,7 +250,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
ClinicalDataSetNames = string.Join(",", clinicalDataSetNameList.Union(memoryClinicalDataSetNameList).Distinct().OrderBy(t => t)),
|
ClinicalDataSetNames = string.Join(",", clinicalDataSetNameList.Union(memoryClinicalDataSetNameList).Distinct().OrderBy(t => t)),
|
||||||
|
|
||||||
|
|
||||||
});
|
}); ;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 已修改
|
#region 已修改
|
||||||
|
|
@ -2837,7 +2808,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
QuestionId = t.Id,
|
QuestionId = t.Id,
|
||||||
t.DictionaryCode,
|
t.DictionaryCode,
|
||||||
t.Unit,
|
t.Unit,
|
||||||
t.CustomUnit,
|
|
||||||
t.ShowOrder,
|
t.ShowOrder,
|
||||||
AnswerType = t.Type,
|
AnswerType = t.Type,
|
||||||
}).OrderBy(t => t.ShowOrder).ToListAsync();
|
}).OrderBy(t => t.ShowOrder).ToListAsync();
|
||||||
|
|
@ -2885,8 +2855,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
//如果问题类型是附件 特殊处理 方便前端解析
|
//如果问题类型是附件 特殊处理 方便前端解析
|
||||||
Answer = Translationunit(u.AnswerType, u.Unit, u.CustomUnit, unitDataList, t.Answer),
|
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer,
|
||||||
|
|
||||||
u.QuestionName,
|
u.QuestionName,
|
||||||
u.QuestionEnName,
|
u.QuestionEnName,
|
||||||
u.DictionaryCode,
|
u.DictionaryCode,
|
||||||
|
|
@ -2917,7 +2886,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
(t, u) =>
|
(t, u) =>
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
Answer = Translationunit(u.AnswerType, u.Unit, u.CustomUnit, unitDataList, t.Answer),
|
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer + unitDataList.Where(y => y.Unit == u.Unit).Select(x => x.UnitName).FirstIsNullReturnEmpty()
|
||||||
|
,
|
||||||
u.DictionaryCode,
|
u.DictionaryCode,
|
||||||
u.QuestionName,
|
u.QuestionName,
|
||||||
u.QuestionEnName,
|
u.QuestionEnName,
|
||||||
|
|
@ -3020,7 +2990,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
new
|
new
|
||||||
{
|
{
|
||||||
//如果问题类型是附件 特殊处理 方便前端解析
|
//如果问题类型是附件 特殊处理 方便前端解析
|
||||||
Answer = Translationunit(u.AnswerType, u.Unit, u.CustomUnit, unitDataList, t.Answer),
|
Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer + unitDataList.Where(y => y.Unit == u.Unit).Select(x => x.UnitName).FirstIsNullReturnEmpty(),
|
||||||
//t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/,
|
//t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/,
|
||||||
u.QuestionName,
|
u.QuestionName,
|
||||||
u.QuestionEnName,
|
u.QuestionEnName,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue