From 2f2516749615da866e96d8d24e499b7ecbb63a3e Mon Sep 17 00:00:00 2001
From: Administrator <admin@example.com>
Date: 星期一, 23 六月 2025 12:28:52 +0800
Subject: [PATCH] 默认交易模式变更/真实下单位置计算位置修改

---
 code_attribute/code_volumn_manager.py |   28 ++++++++++++++++++++++++++--
 1 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py
index 42d8fc0..d5164f0 100644
--- a/code_attribute/code_volumn_manager.py
+++ b/code_attribute/code_volumn_manager.py
@@ -7,7 +7,7 @@
 # yesterday 鏄ㄥぉ鐨勯噺
 import json
 
-from code_attribute import gpcode_manager
+from code_attribute import gpcode_manager, code_nature_analyse
 from db.redis_manager_delegate import RedisUtils
 from log_module import async_log_util
 from utils import global_util, tool
@@ -77,14 +77,38 @@
                                auto_free=False)
 
     def get_max_volume_in_5days(self, code):
+        """
+        5鏃ユ渶澶ч噺
+        @param code:
+        @return:
+        """
         return self.__max_volume_in_5days.get(code)
+
+    def get_radical_buy_refer_volume(self, code, limit_up_price):
+        """
+        鑾峰彇鎵叆鐨勫弬鑰冮噺:
+        鍙傝�冮灏忎簬3.14浜垮氨鍙�90澶╁弬鑰冮噺
+        鍚﹀垯灏卞彇鏈�杩�5澶╃殑鍙傝�冮噺
+        @param code:
+        @param limit_up_price:
+        @return:
+        """
+        # 60涓氦鏄撴棩鏈定鍋滃彇
+        k_format = code_nature_analyse.CodeNatureRecordManager().get_k_format_cache(code)
+        has_limit_up_in_60 = True
+        if k_format and not k_format[13]:
+            has_limit_up_in_60 = False
+        volume = self.get_max_volume_in_5days(code)
+        if volume * limit_up_price >= 3.14e8 and has_limit_up_in_60:
+            return volume
+        return int(self.get_reference_volume_as_money_y(code) * 1e8 / limit_up_price)
 
     def get_volume_rate_refer_in_5days(self, code, total_sell_volume=0):
         """
         鑾峰彇浠婃棩閲忎笌5鏃ユ渶澶ч噺鐨勫弬鑰冨��
         @param total_sell_volume: 褰撳墠鎬诲崠閲�
         @param code:
-        @return:
+        @return: 5鏃ラ噺姣�
         """
         max_volume = self.get_max_volume_in_5days(code)
         if not max_volume:

--
Gitblit v1.8.0