| | |
| | | |
| | | @classmethod |
| | | def get_current_codes_by_block(cls, block): |
| | | try: |
| | | return cls.__current_reason_codes_dict.get(block) |
| | | except Exception as e: |
| | | logger_debug.info(f"{cls.__current_reason_codes_dict}") |
| | | return set() |
| | | return cls.__current_reason_codes_dict.get(block) |
| | | |
| | | @classmethod |
| | | def get_current_reason_codes_dict(cls): |
| | |
| | | # 获取板块 |
| | | fresults = {} |
| | | blocks = kpl_data_manager.KPLCodeJXBlockManager().get_jx_blocks_cache(code) |
| | | if blocks: |
| | | blocks = blocks[0] |
| | | if not blocks: |
| | | blocks = kpl_data_manager.KPLCodeJXBlockManager().get_jx_blocks_cache(code, True) |
| | | if blocks: |
| | | blocks = blocks[0] |
| | | if blocks is None: |
| | | blocks = [] |
| | | current_blocks = kpl_data_manager.KPLLimitUpDataRecordManager.get_current_blocks(code) |
| | |
| | | "openLimitUpCount": len(temp_records) - current_codes_count, "rank": rank[0] + 1}) |
| | | except Exception as e: |
| | | logger_debug.exception(e) |
| | | logger_debug.error(f"blocks:{blocks}") |
| | | |
| | | # 统计板块的 |
| | | fresults["blockInfos"] = blockInfos |