diff --git a/集波/SHOPEE_010_出库集波V1.2_WaveRuleMatchService_流程图.md b/集波/SHOPEE_010_出库集波V1.2_WaveRuleMatchService_流程图.md index 7a79215..f400294 100644 --- a/集波/SHOPEE_010_出库集波V1.2_WaveRuleMatchService_流程图.md +++ b/集波/SHOPEE_010_出库集波V1.2_WaveRuleMatchService_流程图.md @@ -100,7 +100,8 @@ assignSingleShipmentWaves(warehouseCode, shipmentType, workstationId, rules) │ ├─ occupySingleShipmentSortingWallCell │ ├─ 若不是 RT 且 shipment_header_ext1.shopeeWave 为空 │ │ ├─ acquireUnusedShopeeWave -│ │ └─ requestWaveBind / bindOrderPickShipmentWave +│ │ ├─ RT 或已有 shopeeWaveCode 时创建 shopee_wave +│ │ └─ Shopee picking task 同步完成后 bindOrderPickShipmentWave 本地回写 │ ├─ createInternalWave │ ├─ addShipmentsToInternalWave │ └─ 记录成功日志 @@ -183,9 +184,8 @@ assignToCell(warehouseCode, rule, cell, shipmentIds, shopeeWaveCode, ticketType, │ ├─ 已有同 wave 同 rule 的 USED 格口 → 直接复用 │ └─ 否则走 occupySortingWallCell ├─ bindBatchShipmentWave -│ ├─ requestWaveBind -│ ├─ 失败 → markKickOut -│ └─ 成功 → updateLocalShopeeWaveBinding +│ ├─ isWaveAvailable +│ └─ updateLocalShopeeWaveBinding ├─ createInternalWave ├─ addShipmentsToInternalWave │ ├─ shipmentHeaderService.addMultipleToWave @@ -197,6 +197,8 @@ assignToCell(warehouseCode, rule, cell, shipmentIds, shopeeWaveCode, ticketType, ```text bindOrderPickShipmentWave(...) [快速拣选] +└─ updateLocalShopeeWaveBinding + bindTaskTicketShipmentWave(...) [Sales/MTO 任务单] bindBatchShipmentWave(...) [普通批量订单] ├─ 校验参数和调用方传入的 ticketType @@ -204,14 +206,9 @@ bindBatchShipmentWave(...) [普通批量订单] ├─ 获取 Shopee 波次绑定锁 ├─ isWaveAvailable │ └─ 方法内直接查询并确认 shopee_wave 状态可用 -├─ requestWaveBind -│ └─ 计划分配阶段只校验本地绑定必需上下文 -├─ 若绑定检查失败 -│ ├─ markKickOut -│ └─ 返回 error ├─ 若成功 │ └─ updateLocalShopeeWaveBinding -│ └─ 统一回写格口、内部 wave、shipment_header_ext1 和 shopee_wave +│ └─ 统一回写格口、内部 wave 和 shopee_wave └─ finally 解锁 ``` @@ -219,7 +216,6 @@ bindBatchShipmentWave(...) [普通批量订单] - 快速拣选、Sales/MTO 任务单、普通批量订单分别使用独立绑定方法,不复用通用绑定入口。 - 调用方直接传入当前分支已确定的 `ticketType`,绑定方法不再重复查询单据类型。 -- `requestWaveBind` 在计划分配阶段只校验本地绑定上下文,不调用上游三段式接口。 - 真实的 3.1.6/3.4.6 绑定接口在工作站绑箱时同步调用。 ### 4.3 createInternalWave / addShipmentsToInternalWave @@ -275,10 +271,9 @@ addShipmentsToInternalWave(shipmentIds, waveId) | `assignEmptyCells` | 空格口首次分配 | 3.3 | | `assignCellNumbers` | 规则驱动的格口分配 | 3.3 | | `assignToCell` | 单个格口承接一批单据 | 4.1 | -| `bindOrderPickShipmentWave` | 快速拣选 Shopee 波次绑定 | 4.2 | +| `bindOrderPickShipmentWave` | 快速拣选同步完成后的本地波次回写 | 4.2 | | `bindTaskTicketShipmentWave` | Sales/MTO 任务单 Shopee 波次绑定 | 4.2 | | `bindBatchShipmentWave` | 普通批量订单 Shopee 波次绑定 | 4.2 | -| `requestWaveBind` | 计划分配阶段本地绑定上下文校验 | 4.2 | | `createInternalWave` | 创建内部波次 | 4.3 | | `addShipmentsToInternalWave` | 订单入波次并运行 | 4.3 | | `cancelInternalWave` | 运行失败回滚 | 4.4 | diff --git a/集波/SHOPEE_010_出库集波V1.2_WaveRuleMatchService_流程文档.md b/集波/SHOPEE_010_出库集波V1.2_WaveRuleMatchService_流程文档.md index 0209015..15b0f8b 100644 --- a/集波/SHOPEE_010_出库集波V1.2_WaveRuleMatchService_流程文档.md +++ b/集波/SHOPEE_010_出库集波V1.2_WaveRuleMatchService_流程文档.md @@ -432,12 +432,12 @@ acquireUnusedShopeeWave(warehouseCode, waveType) ### 8.2 Shopee 波次绑定 ``` -快速拣选: bindOrderPickShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ticketType, workstation) +快速拣选: bindOrderPickShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, workstation) 任务单: bindTaskTicketShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ruleCode, ticketType, workstation) 批量订单: bindBatchShipmentWave(warehouseCode, shipmentIds, shopeeWaveCode, cell, waveId, ruleCode, ticketType, workstation) ``` -三种业务类型分别使用独立绑定方法,不再复用通用绑定入口。每个方法自行完成参数校验、波次锁、可用性检查、绑定检查、失败踢单、本地绑定回写和解锁;调用方直接传入已确定的 `ticketType`。 +三种业务类型分别使用独立绑定方法,不再复用通用绑定入口。快速拣选在调用前已完成取号、`shopee_wave` 准备、格口抢占、内部 wave 创建和 Shopee picking task 同步,因此绑定方法只执行 `updateLocalShopeeWaveBinding`;任务单和批量订单仍各自完成参数校验、波次锁、可用性检查、本地绑定回写和解锁。 **流程:** @@ -448,29 +448,14 @@ acquireUnusedShopeeWave(warehouseCode, waveType) 2. isWaveAvailable → 获取锁后在方法内直接查询并检查 shopee_wave 是否仍可用,无内部转发层。 -3. requestWaveBind - → 计划分配阶段只校验本地绑定必需上下文,不调用上游三段式接口。 - → 当前口径只有整批成功或整批失败,不处理部分成功。 +3. 状态校验通过 → updateLocalShopeeWaveBinding + → 统一回写格口、内部 wave 和 shopee_wave 的绑定字段 -4. 失败单据 → markKickOut(shipmentIds, shopeeWaveCode, ruleCode, ticketType, workstation) - → UPDATE shipment_header_ext1 SET kickOutWave = CONCAT(已有的, ',', 新波次号) - → 逗号分隔,同波次号去重 - -5. 成功单据 → updateLocalShopeeWaveBinding - → 统一回写格口、内部 wave、shipment_header_ext1 和 shopee_wave 的绑定字段 - -6. finally 解锁并返回 ResponseMessage +4. finally 解锁并返回 ResponseMessage ``` ### 8.3 接口对接状态 -`requestWaveBind` 当前是计划分配阶段的本地绑定上下文校验位置: - -``` -接口成功 → 本批出库单全部成功绑定 shopeeWave -接口失败 → 本批出库单全部写入 kickOutWave -``` - 真实的 3.1.6/3.4.6 绑定接口在工作站绑箱时同步调用;计划分配阶段不调用上游三段式接口。 标准要求补充:销售 `create_picking_task`、RTS-MTO 下发/变更等上游链路需要带入或校验 Shopee 波次号;当前服务侧保留统一合波校验入口,真实 create_picking_task / RTS-MTO 接口契约仍待接入验证。 @@ -790,9 +775,8 @@ assignShopeeWaveToAcceptedWorkStations(TtxSession, String, String) [计 │ ├─ calcNeedQty │ ├─ ensureCellReadyForWave → occupySortingWallCell │ ├─ bindBatchShipmentWave - │ │ ├─ requestWaveBind - │ │ ├─ markKickOut (整批失败) - │ │ └─ updateLocalShopeeWaveBinding (整批成功) + │ │ ├─ isWaveAvailable + │ │ └─ updateLocalShopeeWaveBinding │ ├─ addShipmentsToInternalWave → run │ └─ 成功后消费当前候选池 └─ (回滚) @@ -912,7 +896,6 @@ fillShortage | 标准需求点 | 当前实现状态 | 后续落点 | |------------|--------------|----------| -| Shopee 计划分配绑定校验 | `requestWaveBind` 只校验本地绑定上下文,当前只保留整批成功/失败契约 | 真实绑定接口在工作站绑箱时同步调用 | | create_picking_task / RTS-MTO 上游校验 | 标准要求与 Shopee 波次获取、合波校验衔接;当前仅有服务侧统一预留入口 | 真实接口契约确认后接入 | | 库存不足踢单通知上游撤单 | 当前由回池链路清空 `shopeeWave/waveRule`,上游撤单接口仍待接入 | `wms-wave` 回池链路 | | 计划任务轮询补单 | 原 `pollReplenishment/pollReplenishmentOnce` 已删除;当前补缺口在首次集波入口 `fillShortage` 执行 | 如需后台轮询,需恢复独立计划任务入口 | @@ -929,5 +912,4 @@ fillShortage | `acquireUnusedShopeeWave` 前注释 | Shopee 波次号段申请接口 & 用完续号 | P1 | | `requestFlowPickSealBox` Javadoc | Flow Pick 封箱接口正式对接 | P1 | | `requestFlowPickChangeBox` Javadoc | Flow Pick 换箱接口正式对接 | P1 | -| `requestWaveBind` Javadoc | 明确计划分配只做本地校验、真实绑定在工作站绑箱阶段执行 | **P0** | | `handleFlowPickChangeWaveFailure` Javadoc | 换波失败完整回滚(订单池恢复/取消任务/AGV 回库) | P1 |