diff --git a/backend/app/services/future_service.py b/backend/app/services/future_service.py
index 4079e68..7028dd1 100644
--- a/backend/app/services/future_service.py
+++ b/backend/app/services/future_service.py
@@ -180,7 +180,11 @@ class FutureService:
return
for idx, row in df.iterrows():
- trade_date = idx if isinstance(idx, date) else parse_date(str(idx))
+ kline_time = row.get("kline_time")
+ if kline_time is None:
+ continue
+
+ trade_date = kline_time.date() if hasattr(kline_time, 'date') else parse_date(str(kline_time)[:10])
existing = self.db.query(FutureKlineDaily).filter(
and_(
@@ -223,7 +227,11 @@ class FutureService:
from datetime import datetime
for idx, row in df.iterrows():
- trade_datetime = idx if isinstance(idx, datetime) else datetime.fromisoformat(str(idx))
+ kline_time = row.get("kline_time")
+ if kline_time is None:
+ continue
+
+ trade_datetime = kline_time if isinstance(kline_time, datetime) else datetime.fromisoformat(str(kline_time))
existing = self.db.query(FutureKlineMin).filter(
and_(
diff --git a/frontend/src/api/future.ts b/frontend/src/api/future.ts
index 079748d..dc098fa 100644
--- a/frontend/src/api/future.ts
+++ b/frontend/src/api/future.ts
@@ -19,3 +19,12 @@ export const getFutureKlineChart = (
) => {
return request.get(`/future/kline/${code}/chart`, { params })
}
+
+export const batchGetFutureKline = (data: {
+ codes: string[]
+ start_date: string
+ end_date: string
+ period?: string
+}) => {
+ return request.post('/future/kline/batch', data)
+}
diff --git a/frontend/src/views/DataQuery/FutureBatchQuery.vue b/frontend/src/views/DataQuery/FutureBatchQuery.vue
new file mode 100644
index 0000000..9483b7c
--- /dev/null
+++ b/frontend/src/views/DataQuery/FutureBatchQuery.vue
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+ 导出
+
+
+
+
+
+
+
+ 查询结果
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/DataQuery/FutureKlineQuery.vue b/frontend/src/views/DataQuery/FutureKlineQuery.vue
new file mode 100644
index 0000000..d948b93
--- /dev/null
+++ b/frontend/src/views/DataQuery/FutureKlineQuery.vue
@@ -0,0 +1,267 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+ 期货K线图 - {{ queryForm.code }}
+
+
+
+
+
+
+ 数据列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/DataQuery/StockBatchQuery.vue b/frontend/src/views/DataQuery/StockBatchQuery.vue
new file mode 100644
index 0000000..71b4e79
--- /dev/null
+++ b/frontend/src/views/DataQuery/StockBatchQuery.vue
@@ -0,0 +1,176 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+ 导出
+
+
+
+
+
+
+
+ 查询结果
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/DataQuery/StockKlineQuery.vue b/frontend/src/views/DataQuery/StockKlineQuery.vue
new file mode 100644
index 0000000..3249231
--- /dev/null
+++ b/frontend/src/views/DataQuery/StockKlineQuery.vue
@@ -0,0 +1,270 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+ 股票K线图 - {{ queryForm.code }}
+
+
+
+
+
+
+ 数据列表
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/frontend/src/views/DataQuery/index.vue b/frontend/src/views/DataQuery/index.vue
index cbb1a07..17ac01a 100644
--- a/frontend/src/views/DataQuery/index.vue
+++ b/frontend/src/views/DataQuery/index.vue
@@ -1,11 +1,25 @@
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
@@ -13,14 +27,18 @@
+
\ No newline at end of file