From 8c0571ca45921370f7ccff6d1192190d41080a25 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期二, 17 六月 2025 14:55:14 +0800
Subject: [PATCH] ‘功能完善

---
 server/data_server.py            |    4 +++-
 strategy/time_series_backtest.py |    2 +-
 server/local_data_server.py      |    3 ++-
 api/outside_api_callback.py      |    2 ++
 strategy/env_info.py             |    3 ++-
 5 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/api/outside_api_callback.py b/api/outside_api_callback.py
index be5a8fe..309b376 100644
--- a/api/outside_api_callback.py
+++ b/api/outside_api_callback.py
@@ -1,5 +1,6 @@
 import json
 import logging
+import os
 import threading
 
 from api.outside_api_command_manager import ActionCallback
@@ -71,6 +72,7 @@
         fdata["real_time_data"] = RealTimeEnvInfo().to_dict()
         # 鍘嗗彶鏁版嵁
         fdata["history_data"] = {}
+        print("鑾峰彇鐜", os.getpid())
         if need_hsitory_data:
             if tool.get_now_time_str() < '16:00:00':
                 # 濡傛灉鍦�16:00涔嬪墠閲囩敤褰撳墠鏃ユ湡
diff --git a/server/data_server.py b/server/data_server.py
index 966f7f1..c651651 100644
--- a/server/data_server.py
+++ b/server/data_server.py
@@ -1,6 +1,7 @@
 import http
 import json
 import logging
+import os
 import socketserver
 from http.server import BaseHTTPRequestHandler
 
@@ -45,13 +46,14 @@
                 strategy_manager.low_suction_strtegy.add_big_orders(params)
                 # logger_debug.info("upload_big_order_datas:{}", f"{params}")
                 RealTimeEnvInfo().big_order_update_time = tool.get_now_time_str()
+                print("鑾峰彇鍒板ぇ鍗�", os.getpid())
                 result_str = json.dumps({"code": 0})
             elif url.path == "/upload_block_in_datas":
                 # 鎺ユ敹鏉垮潡娴佸叆鏁版嵁
                 params = self.__parse_request()
                 strategy_manager.low_suction_strtegy.add_block_in(params)
                 # logger_debug.info("upload_block_in_datas:{}", f"{params}")
-                RealTimeEnvInfo().block_in=(tool.get_now_time_str(), len(params))
+                RealTimeEnvInfo().block_in = (tool.get_now_time_str(), len(params))
                 result_str = json.dumps({"code": 0})
             elif url.path == "/upload_limit_up_list":
                 params = self.__parse_request()
diff --git a/server/local_data_server.py b/server/local_data_server.py
index 9e5ebd9..2bad72d 100644
--- a/server/local_data_server.py
+++ b/server/local_data_server.py
@@ -142,8 +142,9 @@
         elif url.path == "/get_codes_by_jx_plates":
             # 鏍规嵁绮鹃�夋澘鍧楄幏鍙栦唬鐮�
             plates = ps_dict.get("plates")
+            date = ps_dict.get("date")
             plates = set(json.loads(plates))
-            sql = " select code, jx_blocks  from kpl_code_blocks where  " + " and ".join(
+            sql = f" select code, jx_blocks  from kpl_code_blocks where  day = '{date}' and " + " and ".join(
                 [f"jx_blocks like '%{p}%'" for p in plates])
             datas = Mysqldb().select_all(sql)
             fdatas = [(x[0], "銆�".join([ f"<red>{dd}</red>" if dd in plates else dd for dd in json.loads(x[1])])) for x in datas if len(set(json.loads(x[1])) & plates) == len(plates)]
diff --git a/strategy/env_info.py b/strategy/env_info.py
index 439a7ea..b6127ed 100644
--- a/strategy/env_info.py
+++ b/strategy/env_info.py
@@ -70,4 +70,5 @@
 
 
 if __name__ == "__main__":
-    print(get_history_k_bars("2025-06-04"))
+    RealTimeEnvInfo().kpl_current_limit_up = tool.get_now_time_str()
+    print(RealTimeEnvInfo().to_dict())
diff --git a/strategy/time_series_backtest.py b/strategy/time_series_backtest.py
index b5128c2..6234c92 100644
--- a/strategy/time_series_backtest.py
+++ b/strategy/time_series_backtest.py
@@ -803,7 +803,7 @@
     days = ["2025-05-12", "2025-05-13", "2025-05-14", "2025-05-15", "2025-05-16", "2025-05-19", "2025-05-20",
             "2025-05-21", "2025-05-22", "2025-05-23", "2025-05-26", "2025-05-27", "2025-05-28", "2025-05-29",
             "2025-05-30", "2025-06-03", "2025-06-04", "2025-06-05", "2025-06-06", "2025-06-09", "2025-06-10",
-            "2025-06-11", "2025-06-12", "2025-06-13", "2025-06-16"]
+            "2025-06-11", "2025-06-12", "2025-06-13", "2025-06-16", "2025-06-17"]
 
     # days = ["2025-06-13"]
 

--
Gitblit v1.8.0