6 Commits

Author SHA1 Message Date
Misaka
3b7c00377f style: format all Python files with Black
Apply Black formatter to the entire codebase for consistent code style.

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
2026-02-26 22:44:03 +08:00
Misaka
7819570ef3 feat: support both productionID and order number input formats
- Add identify_input_type() function to detect input format:
  - production_id: 2-digit + 1-letter + serial (e.g., 25A1, 25A12345)
  - order_number: SC + 14 digits (e.g., SC70202602120120)

- Refactor MaterialStatusValidator to intelligently handle both input
  types in validate_from_database() and validate_from_database_enhanced()

- Update log messages to reflect the new dual-input capability

Co-Authored-By: Claude (glm-5) <noreply@anthropic.com>
2026-02-25 22:29:51 +08:00
Misaka
85be5e166b fix: support MySQL in production order query by using dynamic placeholders
- Use conn.get_placeholder() instead of hardcoded '?'
- Adapt table and column names for both MySQL and SQL Server
- Load database type from config to handle dialect differences
- Fix ProgrammingError when running with MySQL database

Co-Authored-By: Gemini 2.0 Flash <gemini-cli@google.com>
2026-02-13 18:19:13 +08:00
Misaka_Company
2ca53f6a55 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>
2026-02-05 14:56:35 +08:00
Misaka_Company
c9e68a2bf0 fix: handle large dataset queries and type conversion
- Add batch processing to production order query to handle SQL Server's 2100 parameter limit
- Fix material name column index from Q to R column
- Add string type conversion to prevent TypeError in material matching

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-05 11:28:33 +08:00
Misaka_Company
902ff9b831 refactor: use database for production order queries
- Add db/production_order_query.py component for querying production orders
- Replace file-based orderID.txt with database-driven approach
- Read ProductionID.txt (总排号) and query [26年压力表合同数据] table
- Update both extraction and cleaning scripts to use new component
- Change parameter: order_id_file → production_id_file

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-23 16:06:40 +08:00