快照将不良构成与柏拉图合并为一个选项,完整保留页面容器,黑片和亮片继续并排展示两张分析图;迁移旧快照选项并等待组合图的数据准备完成。 销售订单类型对应表支持下载当前生效版本的完整Excel,订单号按文本写入,保留前导零,沿用管理员角色与来源字段权限。导出开始时固定版本,使用滚动工作簿限制内存。 菜单、页面及快照标题统一改为黑片数据和亮片数据。 验证:11项前端检查、8项后端单元测试通过;157698条实际对应关系与数据库逐条一致,重新导入预览零变更;黑片完整快照和亮片单模块快照均通过视觉检查。
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_USERandMYSQL_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_USERNAMEandQUALITY_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.