From bf0511e87699a5c7b4b7317d8da19645b3c62443 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期四, 07 十二月 2023 17:50:33 +0800 Subject: [PATCH] 添加部分日志/bug修复 --- code_attribute/code_volumn_manager.py | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/code_attribute/code_volumn_manager.py b/code_attribute/code_volumn_manager.py index 3f578b1..6b6912e 100644 --- a/code_attribute/code_volumn_manager.py +++ b/code_attribute/code_volumn_manager.py @@ -97,6 +97,17 @@ return rate, (today, max(int(max60[0]), int(yesterday))) +# 鑾峰彇閲忓弬鑰冩棩鏈� +def get_volume_refer_date(code): + max60, yesterday = get_histry_volumn(code) + if max60 is None or yesterday is None: + raise Exception("鑾峰彇澶辫触") + if max60[0] >= yesterday[0]: + return max60[1] + else: + return yesterday[1] + + # 鑾峰彇閲忔瘮绱㈠紩 def get_volume_rate_index(volume_rate): rates = [0.2, 0.4, 0.6, 0.8, 1, 1.2, 1.4, 1.6] -- Gitblit v1.8.0