zhaoqingang
2025-02-08 02f9af857c72559323ada1edd27a0af6be3c038b
测试 场景分析 bug
1个文件已修改
9 ■■■■■ 已修改文件
models/locationAnalysis.go 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/locationAnalysis.go
@@ -189,7 +189,6 @@
        document_number_list = []string{}
        for _, i := range labelFilter {
            document_number_list = append(document_number_list, i.Id)
            document_number_list = append(document_number_list, i.Id)
        }
    }
    if len(m.KeyTypes) > 0 {
@@ -449,17 +448,17 @@
        if orgBuckets, ok := aggs["orgs"].(map[string]interface{})["buckets"].([]interface{}); ok {
            for _, orgBucket := range orgBuckets {
                orgId := orgBucket.(map[string]interface{})["key"].(string)
                logger.Debugf("orgId--------------------------------------- %s", orgId)
                // 解析按communityId的聚合结果
                if communityBuckets, ok := orgBucket.(map[string]interface{})["community"].(map[string]interface{})["buckets"].([]interface{}); ok {
                    for _, communityBucket := range communityBuckets {
                        communityId := communityBucket.(map[string]interface{})["key"].(string)
                        logger.Debugf("communityId--------------------------------------- %s", communityId)
                        // 解析按building的聚合结果
                        if locationBuckets, ok := communityBucket.(map[string]interface{})["location"].(map[string]interface{})["buckets"].([]interface{}); ok {
                            for _, locationBucket := range locationBuckets {
                                building := locationBucket.(map[string]interface{})["key"].(string)
                                logger.Debugf("building--------------------------------------- %s", building)
                                // 解析按floor的聚合结果
                                if floorBuckets, ok := locationBucket.(map[string]interface{})["floor"].(map[string]interface{})["buckets"].([]interface{}); ok {
                                    for _, floorBucket := range floorBuckets {
@@ -472,6 +471,8 @@
                                                persons = append(persons, docNumBucket.(map[string]interface{})["key"].(string))
                                            }
                                        }
                                        logger.Debugf("floor--------------------------------------- %s-- %s --", floor, appearCount)
                                        record := &LocationRecord{
                                            //PicDate:        timestamp,
                                            DocumentNumbers: persons,