From 9e4b60c0d69198ef374b82af840750e0804e5d15 Mon Sep 17 00:00:00 2001
From: zhaoqingang <zhaoqg0118@163.com>
Date: 星期一, 10 二月 2025 11:53:22 +0800
Subject: [PATCH] 测试 场景分析 bug

---
 models/locationAnalysis.go |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/models/locationAnalysis.go b/models/locationAnalysis.go
index 338dcba..6827c58 100644
--- a/models/locationAnalysis.go
+++ b/models/locationAnalysis.go
@@ -394,16 +394,17 @@
 													},
 												},
 											},
-											"pic_date": map[string]interface{}{ // 鏂板鎸� documentNumber 鑱氬悎
-												"terms": map[string]interface{}{
-													"field": "picDate",
-													"size":  10000,
-												},
-											},
 											"document_numbers": map[string]interface{}{ // 鏂板鎸� documentNumber 鑱氬悎
 												"terms": map[string]interface{}{
 													"field": "documentNumber",
 													"size":  10000,
+												},
+											},
+											"picDate": map[string]interface{}{ // 鏂板鎸� picDate 鑱氬悎
+												"date_histogram": map[string]interface{}{
+													"field":     "picDate",
+													"interval":  "1d",     // 鎸夊ぉ鑱氬悎
+													"time_zone": "+08:00", // 璁剧疆鏃跺尯
 												},
 											},
 										},
@@ -477,7 +478,7 @@
 											}
 										}
 										var PicDate string
-										if docNumBuckets, ok := floorBucket.(map[string]interface{})["pic_data"].(map[string]interface{})["buckets"].([]interface{}); ok {
+										if docNumBuckets, ok := floorBucket.(map[string]interface{})["picDate"].(map[string]interface{})["buckets"].([]interface{}); ok {
 											for _, docNumBucket := range docNumBuckets {
 												PicDate = docNumBucket.(map[string]interface{})["key"].(string)
 											}

--
Gitblit v1.8.0