| | |
| | | __history_code_data_dict = {} |
| | | history_limit_up_datas = [] |
| | | current_limit_up_datas = [] |
| | | __current_limit_up_block_codes = {} |
| | | |
| | | @classmethod |
| | | def set_current_limit_up_datas(cls, current_limit_up_datas): |
| | | cls.current_limit_up_datas = current_limit_up_datas |
| | | # 统计板块当前涨停数量 |
| | | block_codes = {} |
| | | for d in current_limit_up_datas: |
| | | code = d[0] |
| | | blocks = LimitUpCodesBlockRecordManager().get_radical_buy_blocks(code) |
| | | if blocks: |
| | | for b in blocks: |
| | | if b not in block_codes: |
| | | block_codes[b] = set() |
| | | block_codes[b].add(code) |
| | | cls.__current_limit_up_block_codes = block_codes |
| | | |
| | | |
| | | |
| | | |
| | | @classmethod |
| | | def set_history_limit_up_datas(cls, history_limit_up_datas_): |
| | |
| | | return int(cls.__history_code_data_dict[code][5]) |
| | | return None |
| | | |
| | | @classmethod |
| | | def get_current_limit_up_block_codes(cls, block): |
| | | return cls.__current_limit_up_block_codes.get(block) |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | ContainsLimitupCodesBlocksManager() |