From 6ded141b11fa8b7bc59450d5fa61b46b250cbac3 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期五, 22 八月 2025 15:54:30 +0800 Subject: [PATCH] bug修复/委托记录增量更新 --- code_attribute/code_volumn_manager.py | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-) diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py index edfd3c0..afeec39 100644 --- a/code_attribute/code_volumn_manager.py +++ b/code_attribute/code_volumn_manager.py @@ -101,13 +101,13 @@ 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 >= 9e8 and has_limit_up_in_60: + if volume and volume * limit_up_price >= 9e8 and has_limit_up_in_60: return volume return int(self.get_reference_volume_as_money_y(code) * 1e8 / limit_up_price) def get_radical_buy_refer_volume_info(self, code, limit_up_price): """ - TODO 鏇存敼姝g‘ + 鑾峰彇鍙傝�冮噺淇℃伅 鑾峰彇鎵叆鐨勫弬鑰冮噺: 鍙傝�冮灏忎簬3.14浜垮氨鍙�90澶╁弬鑰冮噺 鍚﹀垯灏卞彇鏈�杩�5澶╃殑鍙傝�冮噺 @@ -120,10 +120,11 @@ has_limit_up_in_60 = True if k_format and not k_format[13]: has_limit_up_in_60 = False + # (閲�, 鏃ユ湡) volume_info = self.__max_volume_info_in_5days.get(code, None) if volume_info and volume_info[0] * limit_up_price >= 9e8 and has_limit_up_in_60: return volume_info - return int(self.get_reference_volume_as_money_y(code) * 1e8 / limit_up_price) + return self.get_reference_volume_info(code) def get_volume_rate_refer_in_5days(self, code, total_sell_volume=0): """ @@ -256,6 +257,15 @@ # 榛樿涓�5浜� return 5 + def get_reference_volume_info(self, code): + """ + 鑾峰彇浼犵粺鍙傝�冮噺淇℃伅 + @param code: + @return:(閲�,鏃ユ湡) + """ + max60 = global_util.max60_volumn.get(code) + return max60 + if __name__ == "__main__": print(CodeVolumeManager().get_volume_rate("000059")) -- Gitblit v1.8.0