| | |
| | | |
| | | def __load_before_block(code): |
| | | if code not in __before_block_dict: |
| | | blocks = KPLLimitUpDataRecordManager.get_latest_blocks(code) |
| | | blocks = KPLLimitUpDataRecordManager.get_latest_blocks_set(code) |
| | | if blocks: |
| | | blocks = blocks[0].split(',') |
| | | __before_block_dict[code] = blocks |
| | | |
| | | return __before_block_dict.get(code) |
| | |
| | | code_ = data[0] |
| | | break_codes.add(code_) |
| | | # 统计回封 |
| | | for data in latest_datas: |
| | | if data[5] != target_block: |
| | | continue |
| | | # 回封 |
| | | if data[2] != data[3]: |
| | | re_limit_codes.add(data[0]) |
| | | if latest_datas: |
| | | for data in latest_datas: |
| | | if data[5] != target_block: |
| | | continue |
| | | # 回封 |
| | | if data[2] != data[3]: |
| | | re_limit_codes.add(data[0]) |
| | | |
| | | # 排除自己 |
| | | break_codes.discard(code) |
| | |
| | | def init(): |
| | | # 加载数据到内存中 |
| | | kpl_data_manager.get_current_limit_up_data_records(10) |
| | | # 加载最近数据到内存中 |
| | | limit_up_datas = kpl_data_manager.KPLDataManager().get_data(kpl_util.KPLDataType.LIMIT_UP) |
| | | if limit_up_datas: |
| | | kpl_data_manager.KPLLimitUpDataRecordManager.latest_origin_datas = limit_up_datas |
| | | |
| | | |
| | | def init_code(code): |