diff --git a/ft-app/app/collector.py b/ft-app/app/collector.py index 85d285e..faf7d4e 100644 --- a/ft-app/app/collector.py +++ b/ft-app/app/collector.py @@ -293,10 +293,14 @@ def fetch_position_rankings(contract_code: str, trade_date: str) -> list[dict]: for _, row in df.iterrows(): try: + inst = str(row["会员简称"]).strip() + rank = int(row["名次"]) + if inst in ("-", ""): + inst = f"-{rank}" results.append({ "data_type": dtype, - "rank": int(row["名次"]), - "institution": str(row["会员简称"]), + "rank": rank, + "institution": inst, "value": int(row.iloc[2]), "change": int(row["比上交易增减"]), }) diff --git a/ft-app/data/ft.db b/ft-app/data/ft.db index 8a8b146..2cbfe49 100644 Binary files a/ft-app/data/ft.db and b/ft-app/data/ft.db differ