- main_router: add run_automation_test that runs each site's download
flows in a cross sequence (expected/actual) plus a pass/fail report
with timings; expose it as menu [8]
- Site download functions now return False on their exception paths so
the test harness can record failures (baishi also flags config-read
failure)
- Replace overblown log/comment phrasing across all modules with plain
statements; trim docstrings
Co-Authored-By: Claude <noreply@anthropic.com>
- Add paths.py: BASE_DIR/DOWNLOAD_DIR/CONFIG_PATH anchored on __file__
so paths resolve regardless of the launch cwd
- Route main_router and all site modules through DOWNLOAD_DIR/CONFIG_PATH,
replacing os.getcwd()-based download dirs and the "config.yaml" literal
- main_router compare engine: read Excel as str with keep_default_na,
strip/normalize 运单号, drop blanks, and isin against a set so
int/float-vs-str mismatches no longer produce false "undelivered"
- Shunxin: give downloaded files unique microsecond temp names and read
Excel as str to preserve long-waybill precision
- Normalize bare except: to except Exception: across affected files
Co-Authored-By: Claude <noreply@anthropic.com>
- Add yunda_login: probe the login page, fill credentials from
config.yaml (yunda.username/password), submit; no-op if already
logged in
- main_router: register per-site READY_SELECTORS and replace the
blocking input() with a ready-guard poll loop; invoke Yunda
auto-login up front; simplify site-init cleanup
- site_yunda: drop the custom frame probes in favor of native
frame_locator("section iframe")
- Skip handover rows already marked 已绑定; abort the export harvest
when no tasks were submitted
- Fix NameError from undefined username/password fallback
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement yunda_actual_download via the 报表管理 -> 扫描记录查询
menu: set date range, switch scan type to 到件, then reuse the
shared poll/download/merge engine
- Add a three-stage query buffer (yield, wait for the Bootstrap Table
loading mask, settle) before the data/empty verdict to avoid stale
DOM reads in the expected-arrival flow
- Trim the offline-export retry state machine's verbose logs
- Fix a typo (研编 -> 研判) and drop the 待开发 tag on menu [7]
Co-Authored-By: Claude <noreply@anthropic.com>
- Add site_yunda.py: Yunda expected-arrival download (进站交接单查询)
with Layui date-range setup, row double-click export, a retry state
machine for the offline-export dialog, and a shared poll/download/
merge engine; actual-arrival is a placeholder
- Wire Yunda into main_router: site URL, login detection, menu items,
and read yunda.query_days from config.yaml
- Rework the hub menu: drop the standalone Shunxin local-compare entry,
renumber modules (百世 3, 中通 4/5, 韵达 6/7), keep global compare [9]
- Streamline site-init cleanup and log wording
Co-Authored-By: Claude <noreply@anthropic.com>
- Implement zto_actual_download via the 到件扫描监控 menu with 子单
number-type filter, reusing the common download flow
- Extract the export-task poll/verify/download/merge steps into
_zto_poll_and_download_tasks so both ZTO flows share it
- Tighten task time-match window from 120s to 60s and add a
refresh-and-recheck loop when expected tasks are missing or pending
- Drop unused _ensure_menu_expanded helper
- Update menu [6] label since actual-arrival is now implemented
Co-Authored-By: Claude <noreply@anthropic.com>
- Add site_zto.py: ZTO expected-arrival data download with menu
navigation, export polling, and Excel merge
- Wire ZTO into main_router: site URL, login detection, menu items
[5]/[6], and a global offline Left Anti-Join compare entry [9]
- Read config.yaml debug flags to launch only the target site for
focused debugging; guard each site init and route handler behind
site-loaded checks via is_site_ready()
- Expand config.example.yaml with documented debug, baishi, and zto
config keys
Co-Authored-By: Claude <noreply@anthropic.com>
- Loop up to 5 rounds to dismiss 阅读完毕 / 配置检查 / 通知提示 / 广告 popups until the page is clean
- Revert undelivered-data docstring to dynamic-prefix wording
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace Baishi placeholders with full download flow (scan-rate query, export modal, password auth via config.yaml)
- Reorganize router menu into 顺心 / 百世 modules; move undelivered-data compare into 顺心 flow
- Add config.example.yaml and ignore config.yaml to keep credentials out of VCS
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- task_process_undelivered_data now accepts site_name (default 顺心)
and reads/writes {site}-{应到/实到/应到未到}货物数据.xlsx
- Menu option 5 prompts for site name before running reconciliation
- Update 顺心 site outputs to 顺心-应到/实到货物数据.xlsx naming
- Remove redundant inline comments in site_shunxin.py
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Introduce main_router.py as multi-site controller with interactive menu
- Extract 顺心 site logic into site_shunxin.py (expected & actual download)
- Add site_baishi.py stub for upcoming 百世 integration
- Add global 应到未到 data reconciliation via Left Anti-Join on 运单号
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>