Files
quality_analyse/backend
lyun c3354c1f64 新增:查询页面快照并修复筛选选框闪烁
页面快照支持勾选查询条件、指标卡片、趋势、汇总表、不良构成和细分缺陷图,复制PNG或下载;增加取消、分阶段提示和等待超时恢复。

修复公共Select弹层准备帧被opacity覆盖导致的先闪出再展开,并取消查询字段原生label的重复点击转发。

同步已经验收上线的销售订单类型映射、排除筛选及预聚合,以及其线上权限、删除确认配套源码;保留既有公式编辑和名录编码修改。源码范围按发布清单冻结,不纳入本机数据、凭据及未发布工作。

验证:前后端独立源码构建通过;10项前端检查、4项订单分类单元测试通过;实际系统剪贴板粘贴PNG验证通过;线上配置及筛选结果与发布前一致,后端未重启。
2026-11-04 00:15:32 +08:00
..

Quality platform backend

Java 21 / Spring Boot API and ingestion service. The service binds to 127.0.0.1:5281; its production data store is MySQL 8.4 with Flyway migrations. There is no embedded database fallback.

Local configuration

Set the following environment variables before starting the API:

  • MYSQL_URL — JDBC URL for the local MySQL database, including UTF-8 and UTC options.
  • MYSQL_USER and MYSQL_PASSWORD — least-privilege application account.
  • QUALITY_ARCHIVE_ROOT — absolute directory for immutable source revisions and runtime artifacts (defaults to ./runtimedata/archive).
  • QUALITY_ALLOWED_ROOTS — path-separator-delimited directories that the scanner may inspect. Each entry is canonicalized; symlinks escaping the configured root are rejected.
  • QUALITY_BOOTSTRAP_ADMIN_USERNAME and QUALITY_BOOTSTRAP_ADMIN_PASSWORD — optional one-time local administrator bootstrap. Neither value is logged. Omit both to require provisioning through an existing administrative path.

The API does not accept a filesystem path from a browser as a scan target. Callers select source IDs returned by /api/sources. Multipart uploads are stored under the archive root after size and extension checks. Files without a year in their name use QUALITY_DEFAULT_SOURCE_YEAR (default 2026), matching the current workbook title.

Run

From this directory, use the Maven wrapper when present, or Maven 3.9+:

mvn spring-boot:run

Flyway applies src/main/resources/db/migration at startup. The initial account must be explicitly bootstrapped; no public default credentials are created.

API

The front-end contract is served below /api. GET /api/auth/csrf returns a CSRF token and sets XSRF-TOKEN; mutation requests include the same value in X-XSRF-TOKEN. The authenticated session cookie is HttpOnly and SameSite=Strict. Data APIs require a session, and management mutations additionally require role authorization and an idempotency key or expected-version check.