下载安装包,有进度条,自动安装

This commit is contained in:
owenchen committed 2026-10-26 10:46:38 +08:00
1 parent 181207fc7a
commit d97a8884aa
14 files changed
+665 -220

No files matched your search

@@ -48,6 +48,38 @@ namespace CloudBuilder.Master.Service
}
}
/// <summary>
/// 全系图下发瘦身(人员):只保留卡片渲染所需列(PersonId/Surname/GenealogyName/CommonName/Gender/AvatarUrl),
/// 其余可空列(履历/学历/O/OCR 临时字段等)连同已生成 AvatarUrl 后不再需要的 AvatarFilename 一律置空,
/// 由全局 NullValueHandling.Ignore 丢弃——大谱(数千族员)整谱响应体量得以大幅压缩,避免 H5 请求超时。
/// </summary>
private static void SlimPersonForChart(FamilyPersonDisplayData p)
{
if (p == null) return;
p.Alias = null; p.BindUserId = null; p.BirthDate = null; p.BirthOrder = null; p.BirthText = null;
p.DeathDate = null; p.DeathText = null; p.Duty = null; p.Education = null; p.FatherId = null;
p.GraduationStatus = null; p.Hao = null; p.Introduction = null; p.IsBindUser = null; p.Major = null;
p.MaritalStatus = null; p.MotherName = null; p.Privacy = null; p.School = null; p.Title = null; p.Zi = null;
p.Nation = null; p.Address = null; p.IdNumber = null; p.Issuer = null; p.Validity = null;
p.IdCardFilename = null; p.IdCardUrl = null;
p.AvatarFilename = null; p.IsCanAmend = null;
}
/// <summary>全系图下发瘦身(配偶视图行):图只用双方姓名/序号,婚嫁/离异/备注等列置空丢弃(Gender 是拥有者本人性别,前端不用)</summary>
private static void SlimSpouseMapForChart(FamilyTreeSpouseMapViewEntity s)
{
if (s == null) return;
s.Gender = null; s.MarryDate = null; s.MarryDateText = null;
s.DivorceDate = null; s.DivorceDateText = null; s.MarryType = null; s.IsCurrent = null; s.Remark = null;
}
/// <summary>全系图下发瘦身(亲子视图行):图只用于「父→子」拓扑与子女姓名,拥有者姓名/Gender/配偶 id/备注置空丢弃</summary>
private static void SlimChildMapForChart(FamilyTreeChildrenMapViewEntity c)
{
if (c == null) return;
c.Gender = null; c.CommonName = null; c.GenealogyName = null; c.SpouseId = null; c.Remark = null;
}
[PermissionOperate(name: MasterPermissionPolicy.FamilyTree, operate: Operate.Find)]
public FamilyTreeData FindAllByTreeId(string treeId)
{
@@ -79,6 +111,10 @@ namespace CloudBuilder.Master.Service
data.CurrentPerson.FamilyTreeChildrenMaps = repositoryChildrenMap.GetRepository<IRepository<FamilyTreeChildrenMapViewEntity>>().DetachedEntities.Where(x => x.TreeId == treeId).OrderBy(x => x.Orderby).ToArray();
// 全系图一次性下发整谱两套关系视图,大谱体量惊人:只保留卡片渲染所需列,其余置空丢弃
foreach (var s in data.CurrentPerson.FamilyTreeSpouseMaps) SlimSpouseMapForChart(s);
foreach (var c in data.CurrentPerson.FamilyTreeChildrenMaps) SlimChildMapForChart(c);
List<string> ps = new List<string>();
ps.Add(d.AncestorPersonId);
if (data.CurrentPerson.FamilyTreeSpouseMaps != null && data.CurrentPerson.FamilyTreeSpouseMaps.Length > 0)
@@ -96,6 +132,8 @@ namespace CloudBuilder.Master.Service
{
data.CurrentPerson.FamilyTreePersons = families.Select(x => new FamilyPersonDisplayData(x)).ToArray();
FillAvatarUrl(data.CurrentPerson.FamilyTreePersons);
// 头像 URL 已生成,整谱人员只留卡片渲染所需列,压掉其余可空列(在 FillAvatarUrl 之后做,勿丢 AvatarFilename 依赖)
foreach (var person in data.CurrentPerson.FamilyTreePersons) SlimPersonForChart(person);
}
return data;