From 66071290834b24e2fa3702d5df4ddc89e23ed8eb Mon Sep 17 00:00:00 2001 From: Mrx <18278715334@163.com> Date: Wed, 21 Jan 2026 18:02:31 +0800 Subject: [PATCH] f --- .../processors/qygl/qygl3f8e_processor.go | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/internal/domains/api/services/processors/qygl/qygl3f8e_processor.go b/internal/domains/api/services/processors/qygl/qygl3f8e_processor.go index 512b14a..2eafae7 100644 --- a/internal/domains/api/services/processors/qygl/qygl3f8e_processor.go +++ b/internal/domains/api/services/processors/qygl/qygl3f8e_processor.go @@ -752,6 +752,50 @@ func buildFinalResponse(enrichedCompanies []EnrichedCompanyInfo, allCompanies [] companyMap["stockHolderItem"] = stockHolderItem } + // staffList(仅高管关系时整理) + if hasRel("tm") { + staffList := map[string]interface{}{ + "result": []interface{}{}, + } + // 尝试从原始数据中提取职位信息 + typeJoin := []string{} + // 常见职位字段名 + if v := getVal("position", "post", "positionName", "postName"); v != nil { + if posStr, ok := v.(string); ok && posStr != "" { + typeJoin = append(typeJoin, posStr) + } else if posArr, ok := v.([]interface{}); ok { + for _, p := range posArr { + if pStr, ok := p.(string); ok && pStr != "" { + typeJoin = append(typeJoin, pStr) + } + } + } + } + // 如果 typeJoin 为空,尝试从 typeJoin 字段直接获取 + if len(typeJoin) == 0 { + if v := getVal("typeJoin"); v != nil { + if tjArr, ok := v.([]interface{}); ok { + for _, tj := range tjArr { + if tjStr, ok := tj.(string); ok && tjStr != "" { + typeJoin = append(typeJoin, tjStr) + } + } + } else if tjStr, ok := v.(string); ok && tjStr != "" { + typeJoin = append(typeJoin, tjStr) + } + } + } + // 如果有职位信息,添加到 result + if len(typeJoin) > 0 { + staffList["result"] = []interface{}{ + map[string]interface{}{ + "typeJoin": typeJoin, + }, + } + } + companyMap["staffList"] = staffList + } + // 检查是否是已处理的企业(前3个) if enriched, exists := processedMap[company.Index]; exists { // 已处理的企业,添加详细信息