[16591]更新分类型波次绑定流程文档

This commit is contained in:
曾志威
2026-07-29 15:49:32 +08:00
parent 45375d516c
commit f694d25bc7
2 changed files with 19 additions and 12 deletions
@@ -94,7 +94,7 @@ assignSingleShipmentWaves(warehouseCode, shipmentType, workstationId, rules)
│ ├─ occupySingleShipmentSortingWallCell
│ ├─ 若不是 RT 且 shipment_header_ext1.shopeeWave 为空
│ │ ├─ acquireUnusedShopeeWave
│ │ └─ requestWaveBind / bindShipmentWave
│ │ └─ requestWaveBind / bindOrderPickShipmentWave
│ ├─ createInternalWave
│ ├─ addShipmentsToInternalWave
│ └─ 记录成功日志
@@ -176,7 +176,7 @@ assignToCell(warehouseCode, rule, cell, shipmentIds, shopeeWaveCode, ticketType,
├─ ensureCellReadyForWave
│ ├─ 已有同 wave 同 rule 的 USED 格口 → 直接复用
│ └─ 否则走 occupySortingWallCell
├─ bindShipmentWave
├─ bindBatchShipmentWave
│ ├─ requestWaveBind
│ ├─ 失败 → markKickOut
│ └─ 成功 → updateLocalShopeeWaveBinding
@@ -187,11 +187,13 @@ assignToCell(warehouseCode, rule, cell, shipmentIds, shopeeWaveCode, ticketType,
└─ 清空当前候选池,返回 success
```
### 4.2 bindShipmentWave
### 4.2 分类型 Shopee 波次绑定
```text
bindShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ruleCode, workstation)
├─ 校验参数并解析 ticketType
bindOrderPickShipmentWave(...) [快速拣选]
bindTaskTicketShipmentWave(...) [Sales/MTO 任务单]
bindBatchShipmentWave(...) [普通批量订单]
├─ 校验参数和调用方传入的 ticketType
├─ waveBindLockKey
├─ 获取 Shopee 波次绑定锁
├─ isWaveAvailable
@@ -209,7 +211,8 @@ bindShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ruleC
重要说明:
- `bindShipmentWave` 是 Shopee 波次绑定的唯一入口,无中间转发层
- 快速拣选、Sales/MTO 任务单、普通批量订单分别使用独立绑定方法,不复用通用绑定入口
- 调用方直接传入当前分支已确定的 `ticketType`,绑定方法不再重复查询单据类型。
- `requestWaveBind` 在计划分配阶段只校验本地绑定上下文,不调用上游三段式接口。
- 真实的 3.1.6/3.4.6 绑定接口在工作站绑箱时同步调用。
@@ -260,7 +263,9 @@ addShipmentsToInternalWave(shipmentIds, waveId)
| `assignEmptyCells` | 空格口首次分配 | 3.3 |
| `assignCellNumbers` | 规则驱动的格口分配 | 3.3 |
| `assignToCell` | 单个格口承接一批单据 | 4.1 |
| `bindShipmentWave` | Shopee 波次唯一绑定入口 | 4.2 |
| `bindOrderPickShipmentWave` | 快速拣选 Shopee 波次绑定 | 4.2 |
| `bindTaskTicketShipmentWave` | Sales/MTO 任务单 Shopee 波次绑定 | 4.2 |
| `bindBatchShipmentWave` | 普通批量订单 Shopee 波次绑定 | 4.2 |
| `requestWaveBind` | 计划分配阶段本地绑定上下文校验 | 4.2 |
| `createInternalWave` | 创建内部波次 | 4.3 |
| `addShipmentsToInternalWave` | 订单入波次并运行 | 4.3 |
@@ -303,7 +303,7 @@ assignCellNumbers(warehouseCode, shipmentType, workstationId, rule, cells):
├─ assignToCell:
│ ├─ pickCellShipmentIds → 按格口缺口截断(单品单件=maxShipments, 其他=差额)
│ ├─ ensureCellReadyForWave → 先抢占格口 USED
│ ├─ bindShipmentWave → 唯一绑定入口;成功整批写 shopeeWave,失败整批写 kickOutWave
│ ├─ bindBatchShipmentWave → 批量订单绑定;成功整批写 shopeeWave,失败整批写 kickOutWave
│ ├─ addShipmentsToInternalWave → 加入波次 + 运行
│ └─ 成功后消费当前候选池
@@ -429,10 +429,12 @@ acquireUnusedShopeeWave(warehouseCode, waveType)
### 8.2 Shopee 波次绑定
```
bindShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ruleCode, workstation)
快速拣选: bindOrderPickShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ticketType, workstation)
任务单: bindTaskTicketShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ruleCode, ticketType, workstation)
批量订单: bindBatchShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ruleCode, ticketType, workstation)
```
`bindShipmentWave` 是 Shopee 波次绑定的唯一入口,参数校验、波次锁、可用性检查、绑定检查、失败踢单、本地绑定回写和解锁均在该方法内完成,无中间转发层
三种业务类型分别使用独立绑定方法,不再复用通用绑定入口。每个方法自行完成参数校验、波次锁、可用性检查、绑定检查、失败踢单、本地绑定回写和解锁;调用方直接传入已确定的 `ticketType`
**流程:**
@@ -582,7 +584,7 @@ fillShortage(warehouseCode, workstation):
│ │ └─ 只补同一 groupKey 单据
│ └─ assignToCell
│ ├─ ensureCellReadyForWave → 先抢占格口
│ ├─ bindShipmentWave → Shopee 波次唯一绑定入口
│ ├─ bindBatchShipmentWave → 普通批量订单绑定入口
│ ├─ createInternalWave
│ └─ addShipmentsToInternalWave → WaveService#run
@@ -784,7 +786,7 @@ assignShopeeWaveToAcceptedWorkStations(TtxSession, String, String) [计
│ ├─ pickCellShipmentIds
│ ├─ calcNeedQty
│ ├─ ensureCellReadyForWave → occupySortingWallCell
│ ├─ bindShipmentWave
│ ├─ bindBatchShipmentWave
│ │ ├─ requestWaveBind
│ │ ├─ markKickOut (整批失败)
│ │ └─ updateLocalShopeeWaveBinding (整批成功)