public static List <Info_1> Analysis(List <SqlCodeGenDto> list, Dictionary <string, string> languages) { List <Info_1> result = new List <Info_1>(); var tplTypes = list.Select(q => q.TplType).Distinct().ToList(); foreach (var tplType in tplTypes) { Info_1 info = new Info_1(); info.TplTypeId = tplType; if (info.TplTypeId == 1) { info.TplTypeName = "表模板"; } else if (info.TplTypeId == 2) { info.TplTypeName = "存储过程模板"; } result.Add(info); var tempList = list.Where(q => q.TplType == tplType).ToList(); info.Items = Info_2.Analysis(tempList, languages); } return(result); }