feat(javaTest): reconstruct historical business parent tasks

This commit is contained in:
zgw
2026-08-07 14:02:38 +08:00
parent 1fd45f4f69
commit 93ef274b63
13 changed files with 664 additions and 21 deletions

View File

@@ -257,7 +257,7 @@ public final class HistoricalBusinessTaskAssembler {
"dataset, compiled map and channel fronts are required");
}
List<HistoricalQueueRecord> ordered = stableOrder(dataset.getRecords());
Map<BusinessTaskKey, List<HistoricalQueueRecord>> groups = groupBusinessRows(ordered);
Map<String, List<HistoricalQueueRecord>> groups = groupBusinessRows(ordered);
return buildAssembly(dataset.getRecords(), groups, compiled, fronts);
}
@@ -267,7 +267,7 @@ public final class HistoricalBusinessTaskAssembler {
}
```
Use `task_no + cargo_pick_site + cargo_place_site` as the business grouping key, sort groups by earliest `create_date/task_no`, and create IDs as `BUSINESS@<taskNo>#<stableSequence>`. Keep every raw GUID/snapshot row as `HistoricalTaskSnapshotEvidence`. Resolve physical endpoints from `cargo_pick_site/cargo_place_site`, not historical queue `start_site/end_site`.
Use `task_no` as the parent grouping key, sort groups by earliest `create_date/task_no`, and create IDs as `BUSINESS@<taskNo>#<stableSequence>`. Keep every raw GUID/snapshot row as `HistoricalTaskSnapshotEvidence`. Resolve the parent business type, priority, and physical endpoints only from rows whose `default02` is `1/2/7`; `default02=4/8` rows are pickup/floor-transfer evidence and their intermediate endpoints must not overwrite the parent. This distinction is required by fixture task `50089`, whose transfer target differs from its final outbound target.
- [ ] **Step 4: Preserve raw compatibility explicitly**

View File

@@ -132,9 +132,9 @@ frontSiteId
1. 原始行按 `create_date/snapshot_row/guid` 稳定排序;
2. 相同 GUID 的重复扫描只保留状态演进证据,不重复创建任务;
3. `task_type=3` 归类为车辆运行证据,不创建 WMS 业务父任务;
4. `task_type=1/2` 按 `task_no`、`cargo_pick_site`、`cargo_place_site` 合并;
5. 从组内 `default02=1/2/7` 解析唯一业务类型;
6. 组内端点、业务类型或优先级出现互相冲突时,关闭为 `CONFLICTING_HISTORY_SNAPSHOTS`,不得任意选一条;
4. `task_type=1/2` 先按 `task_no` 归并成一个业务父任务候选,组内所有 GUID 和重复扫描都保留为阶段证据;
5. 只从组内 `default02=1/2/7` 的业务快照解析唯一业务类型、`cargo_pick_site`、`cargo_place_site` 和优先级;
6. `default02=4/8` 的取货或换层快照可以携带中转端点,但不得覆盖父任务字段;只有业务快照之间端点、业务类型或优先级互相冲突时,才关闭为 `CONFLICTING_HISTORY_SNAPSHOTS`;
7. 最早 `create_date` 控制业务到达,最晚历史 `finish_date` 只用于耗时比较;
8. 历史 `agv_id/path_info/task_type/default06/default08` 作为阶段对照证据,不强制本次选车和路径。