style: normalize code formatting across the codebase

- Standardize quote style (single to double quotes)
- Improve code formatting consistency
- Apply formatting to utilities, GUI components, and tools
- Update imports and docstrings for consistency

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
Misaka_Company
2026-02-05 14:56:35 +08:00
parent c34a300f0b
commit 2ca53f6a55
27 changed files with 693 additions and 385 deletions

View File

@@ -2,6 +2,7 @@
生产订单号查询组件
从 ProductionID.txt 读取总排号,查询数据库获取生产订单号
"""
from db.connection import get_connection
@@ -15,7 +16,7 @@ def read_production_ids(file_path):
Returns:
总排号列表
"""
with open(file_path, 'r', encoding='utf-8') as f:
with open(file_path, "r", encoding="utf-8") as f:
# 去除空白行和空格
production_ids = [line.strip() for line in f if line.strip()]
return production_ids
@@ -40,8 +41,8 @@ def query_production_order_numbers(production_ids):
# 分批查询
for i in range(0, len(production_ids), BATCH_SIZE):
batch = production_ids[i:i + BATCH_SIZE]
placeholders = ','.join(['?' for _ in batch])
batch = production_ids[i : i + BATCH_SIZE]
placeholders = ",".join(["?" for _ in batch])
query = f"""
SELECT [生产订单号]
@@ -52,7 +53,7 @@ def query_production_order_numbers(production_ids):
with get_connection() as conn:
results = conn.execute_query(query, tuple(batch))
# 提取生产订单号并去除空值
batch_numbers = [row['生产订单号'] for row in results if row['生产订单号']]
batch_numbers = [row["生产订单号"] for row in results if row["生产订单号"]]
all_results.extend(batch_numbers)
return all_results