From 746d76e4320913a5b1dcf41b6234fa58b3726de7 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 22 十一月 2024 18:41:48 +0800 Subject: [PATCH] 扫入增加大单撤 --- code_attribute/code_volumn_manager.py | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py index 0411fb8..42d8fc0 100644 --- a/code_attribute/code_volumn_manager.py +++ b/code_attribute/code_volumn_manager.py @@ -79,9 +79,10 @@ def get_max_volume_in_5days(self, code): return self.__max_volume_in_5days.get(code) - def get_volume_rate_refer_in_5days(self, code): + def get_volume_rate_refer_in_5days(self, code, total_sell_volume=0): """ 鑾峰彇浠婃棩閲忎笌5鏃ユ渶澶ч噺鐨勫弬鑰冨�� + @param total_sell_volume: 褰撳墠鎬诲崠閲� @param code: @return: """ @@ -89,7 +90,7 @@ if not max_volume: return 0 today_volume = self.get_today_volumn(code) - return round(today_volume / max_volume, 2) + return round((today_volume + total_sell_volume) / max_volume, 2) # 鑾峰彇鍘嗗彶閲� def get_histry_volumn(self, code): -- Gitblit v1.8.0