From 89f860904270b6cdc20b5e7e90a7c12b5b2bf8e3 Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期五, 25 四月 2025 09:53:15 +0800
Subject: [PATCH] bug修复

---
 code_attribute/code_nature_analyse.py |    2 +-
 servers/data_server.py                |   15 +++++++++------
 2 files changed, 10 insertions(+), 7 deletions(-)

diff --git a/code_attribute/code_nature_analyse.py b/code_attribute/code_nature_analyse.py
index bd1cf8b..bedeea1 100644
--- a/code_attribute/code_nature_analyse.py
+++ b/code_attribute/code_nature_analyse.py
@@ -561,7 +561,7 @@
     for item in items:
         limit_up_price = float(gpcode_manager.get_limit_up_price_by_preprice(code, item["pre_close"]))
         limit_down_price = float(gpcode_manager.get_limit_down_price_by_preprice(code, item["pre_close"]))
-        if abs(limit_up_price - item["high"]) < 0.001 or abs(limit_down_price - item["close"]):
+        if abs(limit_up_price - item["high"]) < 0.001 or abs(limit_down_price - item["close"]) < 0.001:
             # 鐐告澘 # 鎴栨定鍋� # 鎴栬�呰穼鍋�
             return True
     return False
diff --git a/servers/data_server.py b/servers/data_server.py
index bf7e00f..b35b161 100644
--- a/servers/data_server.py
+++ b/servers/data_server.py
@@ -808,8 +808,9 @@
                 deals_month = trade_data_manager.AccountMoneyManager().get_deal_count_info(start_date, end_date)
                 cost_month = sum([round(0.1 * x[1], 2) for x in delegates_month])
                 make_month = 0
-                make_month += max(1 * deals_month[0][1] if deals_month[0][1] else 0, deals_month[0][2] * 1.854 / 10000 if deals_month[0][2] else 0) + 1 * deals_month[1][
-                    1] + 0 * deals_month[2][1]
+                make_month += max(1 * deals_month[0][1] if deals_month[0][1] else 0,
+                                  deals_month[0][2] * 1.854 / 10000 if deals_month[0][2] else 0) + 1 * deals_month[1][
+                                  1] + 0 * deals_month[2][1]
                 fdata["month_commission"] = round(make_month - cost_month, 2)
                 # 璁$畻褰撴棩鎵嬬画璐硅鎯�
                 delegates = trade_data_manager.AccountMoneyManager().get_delegated_count_info()
@@ -1046,14 +1047,15 @@
                             continue
                         # 娑ㄥ箙瑕佸ぇ浜�5%
                         rate = d[6] / int(round((tool.get_limit_up_rate(d[0]) - 1) * 10))
-                        if rate/((tool.get_limit_up_rate(d[0])-1)*10) < 5:
+                        if rate / ((tool.get_limit_up_rate(d[0]) - 1) * 10) < 5:
                             continue
                         # 鏍煎紡锛�(浠g爜,娑ㄥ箙)
                         code_info_list.append((d[0], d[6]))
                     if code_info_list:
                         # 灏嗕唬鐮佸姞鍏ユ柊棰樻潗
-                        new_block_processor.process_new_block_by_component_codes(bi[0], set([x[0] for x in code_info_list]), all_new_blocks)
-
+                        new_block_processor.process_new_block_by_component_codes(bi[0],
+                                                                                 set([x[0] for x in code_info_list]),
+                                                                                 all_new_blocks)
 
             try:
                 if result_list_:
@@ -1130,7 +1132,8 @@
                     try:
                         # 鏂伴鏉�
                         new_block_processor.process_limit_up_list({x[0]: x[5] for x in result_list_})
-                        new_block_codes = new_block_processor.screen_new_blocks_with_limit_up_datas([(x[0], x[5]) for x in result_list_])
+                        new_block_codes = new_block_processor.screen_new_blocks_with_limit_up_datas(
+                            [(x[0], x[5]) for x in result_list_])
                         if new_block_codes:
                             # 缁熻鏉垮潡鐨勪唬鐮�
                             records = KPLLimitUpDataRecordManager.total_datas

--
Gitblit v1.8.0