| | |
| | | import threading |
| | | import time |
| | | |
| | | from utils import alert_util, data_process, global_util, ths_industry_util, tool, import_util |
| | | from utils import alert_util, data_process, global_util, ths_industry_util, tool, import_util, socket_util |
| | | from code_attribute import code_volumn_manager, code_nature_analyse, global_data_loader, gpcode_manager, \ |
| | | gpcode_first_screen_manager |
| | | import constant |
| | |
| | | import l2.l2_data_util |
| | | |
| | | from output import code_info_output |
| | | from third_data import block_info, kpl_api |
| | | from third_data import block_info, kpl_api |
| | | from third_data.code_plate_key_manager import CodesHisReasonAndBlocksManager |
| | | from third_data.history_k_data_util import HistoryKDatasUtils |
| | | from third_data.kpl_data_manager import KPLCodeLimitUpReasonManager, KPLLimitUpDataRecordManager |
| | |
| | | try: |
| | | # 如果带有头 |
| | | if _str.startswith("##"): |
| | | print("server接受到数据:",_str) |
| | | |
| | | total_length = int(_str[2:10]) |
| | | _str = _str[10:] |
| | | # 防止socket数据发生粘连 |
| | |
| | | # if limit_up_time_manager.get_limit_up_time(d["code"]) is None: |
| | | # limit_up_time_manager.save_limit_up_time(d["code"], d["time"]) |
| | | elif type == 22: |
| | | print("---接受到首板代码") |
| | | try: |
| | | if int(tool.get_now_time_str().replace(":", "")) < int("092500"): |
| | | raise Exception('未到接受时间') |
| | | # 首板代码 |
| | | dataList, is_add = data_process.parseGPCode(_str) |
| | | print("首板代码数量:", len(dataList)) |
| | | limit_up_price_dict = {} |
| | | temp_codes = [] |
| | | codes = [] |
| | |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | finally: |
| | | return_str = json.dumps({"code": 0}) |
| | | print("首板代码处理完毕:") |
| | | return_str = socket_util.load_header(json.dumps({"code": 0})) |
| | | |
| | | elif type == 3: |
| | | # 交易成功信息 |