👇 报错信息如下: 👇
运行子程序(组内排序)失败。解析表达式出错。
内部错误:输入字符串的格式不正确。
原始表达式:
var groupName = string.IsNullOrWhiteSpace({分组}) ? "未分组*" : {分组};
var objList = JsonConvert.DeserializeObject<List<Dictionary<string, string>>>({常用语对象列表Json});
objList.GroupBy( d => d.GetValueOrDefault("Group", "未分组*").ToString() )
.Select( g =>
{
if(g.Key.ToString() != groupName)
return g.ToList();
var dList = g.ToList();
var optionListData = dList.Select( (d, i) =>
{
string optIcon, optTitle, optData;
if(d.ContainsKey("Icon"))
optIcon = "[" + d["Icon"] + "]";
else optIcon = "[fa:Solid_PollH:#FF7997E3]";
optTitle = d.GetValueOrDefault("Heading", "");
if(string.IsNullOrWhiteSpace(optTitle))
optTitle = d["Body"];
optData = i.ToString();
return $"{optIcon}{optTitle}◒◒◒{optData}";
})
.ToList();
var spResult = (List<string>)_context.RunSp("小步骤_用户排序", new { optionList = optionListData})["optionList"];
var indexList = spResult
.Select(x => Regex.Replace(x, @"^.+◒◒◒", "") )
.Select(x => int.Parse(x) ).ToList();
var dListOrdered = indexList.Select(n => dList[n]).ToList();
return dListOrdered;
}).SelectMany( x => x).ToList();
(赋值)
(----常用语(新版)v22:运行子程序----)
===========================================
👇 报错组的内容: 👇