From fda20e935bea4870544695185ec9427dc66fb168 Mon Sep 17 00:00:00 2001 From: Administrator <admin@example.com> Date: 星期二, 06 八月 2024 16:22:20 +0800 Subject: [PATCH] bug修复/H撤更新/接口修改 --- test/test_block.py | 22 +++++++++++++++++----- 1 files changed, 17 insertions(+), 5 deletions(-) diff --git a/test/test_block.py b/test/test_block.py index 74ff6c7..22128e8 100644 --- a/test/test_block.py +++ b/test/test_block.py @@ -1,21 +1,33 @@ -from third_data import kpl_data_manager, kpl_util -from third_data.kpl_limit_up_data_manager import LatestLimitUpBlockManager +from third_data import kpl_data_manager, kpl_util, block_info +from third_data.kpl_limit_up_data_manager import LatestLimitUpBlockManager, CodeLimitUpSequenceManager from utils import tool def block_run(): current_datas = kpl_data_manager.KPLDataManager.get_data(kpl_util.KPLDataType.LIMIT_UP) - kpl_data_manager.KPLLimitUpDataRecordManager.save_record(tool.get_now_date_str(),current_datas) + kpl_data_manager.KPLLimitUpDataRecordManager.save_record(tool.get_now_date_str(), current_datas) LatestLimitUpBlockManager().set_current_limit_up_data(tool.get_now_date_str(), current_datas) LatestLimitUpBlockManager().statistics_limit_up_block_infos() +def get_code_current_block(): + kpl_data_manager.get_current_limit_up_data_records(10) + current_datas = kpl_data_manager.KPLDataManager.get_data(kpl_util.KPLDataType.LIMIT_UP) + kpl_data_manager.KPLLimitUpDataRecordManager.save_record(tool.get_now_date_str(), current_datas) + CodeLimitUpSequenceManager().set_current_limit_up_datas(current_datas) + code = "301136" + limit_up_sequence = CodeLimitUpSequenceManager.get_current_limit_up_sequence(code) + if limit_up_sequence: + print( + f"{limit_up_sequence[0]}-{limit_up_sequence[1]}({limit_up_sequence[2]}&{limit_up_sequence[2] - limit_up_sequence[3]})") + + if __name__ == "__main__": - block_run() + get_code_current_block() # print(code_plate_key_manager.ForbiddenBlockManager().get_blocks()) # code_plate_key_manager.ForbiddenBlockManager().add("娴嬭瘯2") # code_plate_key_manager.ForbiddenBlockManager().add("娴嬭瘯3") # print(code_plate_key_manager.ForbiddenBlockManager().get_blocks()) # print( code_plate_key_manager.ForbiddenBlockManager().is_in("娴嬭瘯")) # print(code_plate_key_manager.ForbiddenBlockManager().is_in("娴嬭瘯1")) - # RedisUtils.run_loop() \ No newline at end of file + # RedisUtils.run_loop() -- Gitblit v1.8.0