0.1 模拟造数 |
p_mock_gf_inbound_seed_case |
operatorId
caseCode
caseType: WAIT_CALL / CALLED / UNLOADING / WAIT_TALLY / WAIT_REVIEW
warehouseId
resetBeforeSeed
|
{
"success": true,
"code": "OK",
"message": "模拟数据已生成",
"caseCode": "GF-INB-DEMO-001",
"order": {
"orderId": "ORD-DEMO-001",
"businessType": "GF_EXPORT",
"orderState": "SUBMITTED"
},
"cargoList": [
{
"cargoId": "INB-DEMO-001",
"cargoState": "WAIT_UNLOAD",
"bookingPkgs": 20,
"bookingKgs": 1200,
"bookingCbm": 8.5
}
],
"vehicleWorkUnits": [
{
"vehicleWorkUnitId": "VWU-DEMO-001",
"workUnitState": "ACCEPTED",
"queueNo": "A001",
"licensePlate": "沪A12345"
}
],
"createdCounts": {
"t_business_order": 1,
"t_order_customs_ext": 1,
"t_cargo": 1,
"t_warehouse_job": 1,
"t_warehouse_task": 2,
"t_vehicle_work_unit": 1
}
}
|
- 仅用于后台模拟,所有主键和外部编号带
caseCode 或测试前缀。
- 写入
t_business_order、t_order_customs_ext、t_cargo、t_warehouse_job、t_warehouse_task、t_vehicle_work_unit。
- 按
caseType 预置不同状态,供前端从任意节点启动联调。
|
0.2 模拟清理 |
p_mock_gf_inbound_reset_case |
operatorId
caseCode
dryRun
|
{
"success": true,
"code": "OK",
"message": "模拟数据已清理",
"caseCode": "GF-INB-DEMO-001",
"dryRun": false,
"deletedCounts": {
"t_warehouse_photo": 3,
"t_warehouse_scan_log": 5,
"t_stock_movement": 1,
"t_pile_card": 2,
"t_warehouse_measurement": 2,
"t_warehouse_task_assistant": 1,
"t_warehouse_task": 2,
"t_vehicle_work_unit": 1,
"t_warehouse_job": 1,
"t_cargo": 1,
"t_order_customs_ext": 1,
"t_business_order": 1
},
"warnings": []
}
|
- 仅清理匹配
caseCode 的测试数据。
- 按依赖倒序清理
t_warehouse_photo、t_warehouse_scan_log、t_stock_movement、t_pile_card、t_warehouse_measurement、t_warehouse_task_assistant、t_warehouse_task、t_vehicle_work_unit、t_warehouse_job、t_cargo、t_order_customs_ext、t_business_order。
|
1 仓库受理 |
p_accept_inbound_vehicle |
operatorId
warehouseId
cargoId 或 entryNo
licensePlate
whiteCardNo
arriveTime
idempotencyKey
|
{
"success": true,
"code": "OK",
"message": "车辆已受理",
"serverTime": "2026-07-15 19:10:00",
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "WAIT_UNLOAD",
"warehouseId": "WH01"
},
"vehicleWorkUnit": {
"vehicleWorkUnitId": "VWU202607150001",
"workType": "GF_INBOUND",
"workUnitState": "ACCEPTED",
"queueNo": "A001",
"licensePlate": "沪A12345",
"whiteCardNo": "BK001",
"door": null,
"quotaLockFlag": "0"
},
"task": {
"taskId": "TASK-UNLOAD-001",
"nodeCode": "GF_INB_UNLOAD",
"taskState": "WAIT_UNLOAD"
},
"actionRecordId": "EVT202607150001",
"nextActions": ["CALL_NEXT"],
"blockingReasons": []
}
|
- 读
t_cargo、t_business_order、t_order_customs_ext 校验进仓编号、订单状态和仓库。
- 查
t_vehicle_work_unit 防止同车同票重复受理;必要时创建或激活车辆作业单元。
- 确保存在卸车任务
t_warehouse_task(node_code='GF_INB_UNLOAD')。
- 写
t_warehouse_status_event 记录受理动作。
|
2.1 叫车队列 |
p_mobile_get_inbound_call_queue |
operatorId
warehouseId
roleCode
door 可选
limit
|
{
"success": true,
"serverTime": "2026-07-15 19:12:00",
"stats": {
"waitingCount": 6,
"calledCount": 2,
"unloadingCount": 1,
"exceptionCount": 0
},
"availableDoors": [
{ "door": "D01", "state": "FREE", "currentVehicleWorkUnitId": null },
{ "door": "D02", "state": "BUSY", "currentVehicleWorkUnitId": "VWU202607150009" }
],
"queue": [
{
"rank": 1,
"vehicleWorkUnitId": "VWU202607150001",
"queueNo": "A001",
"arriveTime": "2026-07-15 18:50:00",
"licensePlate": "沪A12345",
"whiteCardNo": "BK001",
"contactName": "张三",
"contactMobile": "13800000000",
"cargoCount": 1,
"cargoList": [
{
"cargoId": "INB202607150001",
"customerCargoNo": "CUST-001",
"cargoName": "拼箱货物",
"bookingPkgs": 20,
"bookingKgs": 1200,
"bookingCbm": 8.5,
"cargoType": "GENERAL",
"isDangerous": "0",
"isBonded": "1"
}
],
"recommendedDoor": "D01",
"workUnitState": "ACCEPTED",
"stateVersion": "20260715191200-1",
"nextActions": ["CONFIRM_CALL"]
}
],
"blockingReasons": []
}
|
- 读
t_vehicle_work_unit,筛选 work_type='GF_INBOUND' 且 work_unit_state='ACCEPTED'。
- 通过
warehouse_job_id 关联 t_warehouse_job,再关联 t_cargo、t_business_order。
- 读取
t_warehouse_task 统计待卸车、卸车中和异常数量。
- 库门占用来自
t_vehicle_work_unit.door 和进行中的 t_warehouse_task.door。
|
2.2 锁定下一车 |
p_mobile_call_next_inbound_vehicle |
operatorId
warehouseId
preferredDoor 可选
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "已锁定下一车,请确认库门后叫车",
"serverTime": "2026-07-15 19:13:00",
"vehicleWorkUnit": {
"vehicleWorkUnitId": "VWU202607150001",
"workUnitState": "CALL_CONFIRMING",
"queueNo": "A001",
"licensePlate": "沪A12345 / 沪B5678",
"businessShape": "GF_EXPORT",
"cargoShape": "托盘 / 散货",
"oversizeFlag": "1",
"vehicleCount": 2,
"cargoCount": 2,
"suggestedDoor": "D03",
"lockExpireAt": "2026-07-15 19:18:00",
"quotaLockFlag": "0"
},
"availableDoors": [
{ "door": "D01", "state": "FREE" },
{ "door": "D03", "state": "FREE", "recommended": true }
],
"actionRecordId": "EVT202607150002",
"stateVersion": "20260715191300-1",
"nextActions": ["CONFIRM_CALL", "CANCEL_CALL", "CHANGE_DOOR"],
"blockingReasons": []
}
|
- 按推荐规则从
t_vehicle_work_unit 锁定 work_unit_state='ACCEPTED' 的下一辆/组车,不让前端手工挑队列。
- 更新
t_vehicle_work_unit.work_unit_state='CALL_CONFIRMING'、lock_time、lock_operator_id、推荐库门字段或临时锁定字段。
- 读取
t_warehouse_task、t_cargo 汇总业务形态、车辆数、票数、货物属性和大件标记。
- 写
t_warehouse_status_event,事件类型为 CALL_LOCKED。
|
2.3 确认叫车 |
p_mobile_confirm_inbound_vehicle_call |
operatorId
warehouseId
vehicleWorkUnitId
door
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "已确认叫车到 3号门",
"serverTime": "2026-07-15 19:14:00",
"vehicleWorkUnit": {
"vehicleWorkUnitId": "VWU202607150001",
"workUnitState": "WORKING",
"door": "D03",
"calledTime": "2026-07-15 19:14:00",
"quotaLockFlag": "1",
"occupiedVehicleCount": 2
},
"activatedTasks": [
{
"taskId": "TASK-UNLOAD-001",
"cargoId": "INB202607150001",
"entryNo": "G20260526001",
"nodeCode": "GF_INB_UNLOAD",
"taskState": "WAIT_UNLOAD",
"door": "D03"
}
],
"actionRecordId": "EVT202607150003",
"stateVersion": "20260715191400-1",
"nextActions": ["SCAN_UNLOAD", "CHANGE_DOOR"],
"blockingReasons": []
}
|
- 锁定并校验
t_vehicle_work_unit.work_unit_state='CALL_CONFIRMING'、未超时、当前操作人匹配或有权限接管。
- 校验库门来自可用主数据或配置视图,且未被其他
t_vehicle_work_unit / t_warehouse_task 占用。
- 更新
t_vehicle_work_unit.door/called_time/quota_lock_flag/work_unit_state,并按实际车辆数占用当前操作账号名额。
- 更新相关
t_warehouse_task.door/task_state='WAIT_UNLOAD',写 t_warehouse_status_event(CALL_CONFIRMED)。
|
2.4 取消叫车 |
p_mobile_cancel_inbound_vehicle_call |
operatorId
warehouseId
vehicleWorkUnitId
cancelReason
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "已取消叫车锁定",
"vehicleWorkUnit": {
"vehicleWorkUnitId": "VWU202607150001",
"workUnitState": "ACCEPTED",
"door": null,
"quotaLockFlag": "0"
},
"actionRecordId": "EVT202607150004",
"stateVersion": "20260715191500-1",
"nextActions": ["CALL_NEXT"],
"blockingReasons": []
}
|
- 仅允许取消
t_vehicle_work_unit.work_unit_state='CALL_CONFIRMING' 的锁定;已确认作业中不能走本接口退回。
- 清空
door/lock_time/lock_operator_id 等锁定字段,状态回到 ACCEPTED。
- 写
t_warehouse_status_event(CALL_CANCELLED);不释放名额,因为确认叫车前未占用名额。
|
2.5 更改库门 |
p_mobile_change_inbound_workunit_door |
operatorId
warehouseId
vehicleWorkUnitId
newDoor
changeReason 可选
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "库门已改为 5号门",
"vehicleWorkUnit": {
"vehicleWorkUnitId": "VWU202607150001",
"workUnitState": "WORKING",
"door": "D05"
},
"affectedTasks": [
{ "taskId": "TASK-UNLOAD-001", "door": "D05", "taskState": "WAIT_UNLOAD" }
],
"actionRecordId": "EVT202607150005",
"stateVersion": "20260715191600-1",
"nextActions": ["SCAN_UNLOAD"],
"blockingReasons": []
}
|
- 校验车辆作业单元为
CALL_CONFIRMING 或 WORKING,且新库门可用。
- 更新
t_vehicle_work_unit.door 和未完成 t_warehouse_task.door。
- 写
t_warehouse_status_event(DOOR_CHANGED);若已推送司机叫号屏,后续由事件通知层刷新。
|
3.0 扫码上下文 |
p_mobile_check_scan_context |
operatorId
warehouseId
entryType: GF_INBOUND
actionType: UNLOAD / TALLY / REVIEW / ASSIST_CONFIRM / OVERSIZE_WATCH / PAUSE_CONFIRM
scanValue
vehicleWorkUnitId 可选
deviceId
|
{
"success": true,
"code": "OK",
"scan": {
"scanValue": "G20260526001",
"scanType": "ENTRY_NO",
"actionType": "UNLOAD",
"matched": true
},
"route": {
"nextPage": "INBOUND_UNLOAD_CONFIRM",
"nextApi": "p_mobile_get_unloading_task"
},
"context": {
"entryNo": "G20260526001",
"cargoId": "INB202607150001",
"vehicleWorkUnitId": "VWU202607150001",
"taskId": "TASK-UNLOAD-001",
"taskState": "WAIT_UNLOAD",
"workUnitState": "WORKING",
"door": "D03"
},
"warnings": [],
"blockingReasons": []
}
|
- 识别
scanValue 是进仓编号、送货通知单码、桩脚牌号、协助 token、大件监护 token 或暂停确认 token。
- 读
t_cargo、t_pile_card、t_warehouse_task、t_vehicle_work_unit、t_warehouse_control_request 定位上下文。
- 按
entryType/actionType 校验是否允许进入当前页面;扫错业务类型或状态不符时返回 blockingReasons。
- 写
t_warehouse_scan_log 记录扫码值、识别结果、业务对象和错误原因。
|
3.1 加载卸车页 |
p_mobile_get_unloading_task |
operatorId
warehouseId
vehicleWorkUnitId 可选
cargoId 或 entryNo
scanValue 可选
deviceId 可选
|
{
"success": true,
"serverTime": "2026-07-15 19:15:00",
"cargo": {
"cargoId": "INB202607150001",
"orderId": "ORD202607150001",
"cargoState": "WAIT_UNLOAD",
"customerCargoNo": "CUST-001",
"cargoName": "拼箱货物",
"packageId": "PKG_CARTON",
"bookingPkgs": 20,
"bookingKgs": 1200,
"bookingCbm": 8.5,
"measuredPkgs": null,
"measuredKgs": null,
"measuredCbm": null
},
"vehicleWorkUnit": {
"vehicleWorkUnitId": "VWU202607150001",
"workUnitState": "WORKING",
"licensePlate": "沪A12345",
"door": "D03",
"calledTime": "2026-07-15 19:14:00"
},
"task": {
"taskId": "TASK-UNLOAD-001",
"nodeCode": "GF_INB_UNLOAD",
"taskState": "WAIT_UNLOAD",
"primaryWorkerId": null,
"actualStartTime": null,
"actualEndTime": null
},
"photoRequirements": [
{ "ruleId": "PHOTO_UNLOAD_FULL", "photoType": "UNLOAD_FULL_VIEW", "required": true, "minCount": 1, "uploadedCount": 0 }
],
"assistants": [],
"scanCheck": {
"scanValue": "INB202607150001",
"matched": true,
"plateMatched": true
},
"nextActions": ["START_UNLOAD"],
"blockingReasons": [],
"stateVersion": "20260715191500-1"
}
|
- 读
t_cargo、t_business_order、t_order_customs_ext、t_vehicle_work_unit、t_warehouse_task。
- 读
m_node_photo_rule 与 t_warehouse_photo 生成照片要求。
- 读
t_warehouse_task_assistant 返回协助人员。
- 如果来自扫码,写
t_warehouse_scan_log 记录成功或失败。
|
3.2 开始卸车 |
p_mobile_start_inbound_unloading |
operatorId
warehouseId
vehicleWorkUnitId
cargoId
confirmedPlateNo
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "卸车已开始",
"serverTime": "2026-07-15 19:16:00",
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "UNLOADING"
},
"task": {
"taskId": "TASK-UNLOAD-001",
"taskState": "UNLOADING",
"actualStartTime": "2026-07-15 19:16:00",
"primaryWorkerId": "U001",
"primaryWorkerName": "王装卸"
},
"vehicleWorkUnit": {
"vehicleWorkUnitId": "VWU202607150001",
"workUnitState": "WORKING",
"workStartTime": "2026-07-15 19:16:00",
"door": "D01"
},
"actionRecordId": "EVT202607150003",
"nextActions": ["FINISH_UNLOAD", "ASSIST_REQUEST", "PAUSE_REQUEST"],
"blockingReasons": [],
"stateVersion": "20260715191600-1"
}
|
- 校验
t_vehicle_work_unit.work_unit_state='WORKING',库门匹配。
- 校验
t_warehouse_task.task_state='WAIT_UNLOAD'。
- 更新
t_warehouse_task.task_state/actual_start_time/primary_worker_id/primary_worker_name。
- 更新
t_vehicle_work_unit.work_unit_state/work_start_time。
- 更新
t_cargo.cargo_state='UNLOADING',写 t_warehouse_status_event。
|
3.3 协助信息 |
p_mobile_get_unloading_assist_info |
operatorId
taskId
cargoId
vehicleWorkUnitId
|
{
"success": true,
"task": {
"taskId": "TASK-UNLOAD-001",
"taskState": "UNLOADING"
},
"assistQr": {
"assistQrToken": "AST-VWU202607150001-001",
"expireAt": "2026-07-15 19:26:00",
"qrPayload": "g1sipgl://assist?token=AST-VWU202607150001-001"
},
"assistants": [
{ "taskAssistantId": "AST001", "assistantWorkerId": "U008", "assistantWorkerName": "李协助" }
],
"nextActions": ["ASSIST_CONFIRM", "FINISH_UNLOAD"],
"blockingReasons": []
}
|
- 读
t_warehouse_task 确认卸车中。
- 读
t_warehouse_task_assistant 返回已登记人员。
- token 可以由过程返回并由前端展示;若需要落库,建议后续补临时动作表或复用状态事件记录。
|
3.4 请求协助 |
p_mobile_request_unloading_assist |
operatorId
taskId
cargoId
vehicleWorkUnitId
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "协助二维码已生成",
"assistQr": {
"assistQrToken": "AST-VWU202607150001-002",
"qrType": "UNLOAD_ASSIST",
"expireAt": "2026-07-15 19:26:00",
"qrPayload": "g1sipgl://assist?token=AST-VWU202607150001-002"
},
"task": {
"taskId": "TASK-UNLOAD-001",
"taskState": "UNLOADING"
},
"actionRecordId": "EVT202607150004",
"nextActions": ["ASSIST_CONFIRM", "FINISH_UNLOAD"],
"blockingReasons": []
}
|
- 校验
t_warehouse_task.task_state='UNLOADING',并确认请求人是当前任务已登记人员。
- 生成或刷新协助 token;若没有专用 token 表,先写入
t_warehouse_status_event 的扩展 JSON 并设置有效期。
- 返回二维码内容给前端展示;确认扫码仍由
p_mobile_check_scan_context 与确认接口校验。
|
3.5 确认协助 |
p_mobile_confirm_unloading_assistant |
assistantOperatorId
assistQrToken
deviceId
idempotencyKey
|
{
"success": true,
"code": "OK",
"message": "协助人员已登记",
"taskAssistant": {
"taskAssistantId": "AST002",
"taskId": "TASK-UNLOAD-001",
"assistantWorkerId": "U009",
"assistantWorkerName": "赵协助"
},
"assistants": [
{ "taskAssistantId": "AST001", "assistantWorkerName": "李协助" },
{ "taskAssistantId": "AST002", "assistantWorkerName": "赵协助" }
],
"actionRecordId": "EVT202607150005",
"blockingReasons": []
}
|
- 从 token 解析
task_id,校验 t_warehouse_task.task_state='UNLOADING'。
- 插入
t_warehouse_task_assistant,重复扫码按人员去重。
- 写
t_warehouse_status_event 记录协助登记。
|
3.6 申请大件监护 |
p_mobile_request_oversize_watch |
operatorId
taskId
cargoId
vehicleWorkUnitId
reason 可选
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "大件监护二维码已生成",
"watchRequest": {
"requestId": "CTRL-WATCH-001",
"requestType": "OVERSIZE_WATCH",
"requestState": "WAIT_CONFIRM",
"entryNo": "G20260526001"
},
"watchQr": {
"watchQrToken": "SUP-VWU202607150001-001",
"qrType": "OVERSIZE_WATCH",
"expireAt": "2026-07-15 19:28:00"
},
"actionRecordId": "EVT202607150006",
"nextActions": ["OVERSIZE_WATCH_CONFIRM", "FINISH_UNLOAD"],
"blockingReasons": []
}
|
- 校验
t_cargo.oversize_flag 或货物属性满足大件监护条件,任务仍在 UNLOADING。
- 插入
t_warehouse_control_request(request_type='OVERSIZE_WATCH'),对象挂到 t_warehouse_task 和 t_cargo。
- 写
t_warehouse_status_event(OVERSIZE_WATCH_REQUESTED),返回主管扫码 token。
|
3.7 确认大件监护 |
p_mobile_confirm_oversize_watch |
supervisorOperatorId
watchQrToken
deviceId
idempotencyKey
|
{
"success": true,
"code": "OK",
"message": "大件监护已确认",
"watchRequest": {
"requestId": "CTRL-WATCH-001",
"requestState": "CONFIRMED",
"confirmedBy": "U099",
"confirmedTime": "2026-07-15 19:24:00"
},
"actionRecordId": "EVT202607150007",
"blockingReasons": []
}
|
- 通过 token 定位
t_warehouse_control_request,校验 request_type='OVERSIZE_WATCH'、未过期、未结束。
- 校验主管/管理权限,更新
t_warehouse_control_request.request_state='CONFIRMED'。
- 写
t_warehouse_status_event(OVERSIZE_WATCH_CONFIRMED),二维码确认后失效。
|
3.8 申请暂停 |
p_mobile_request_pause |
operatorId
objectType: WAREHOUSE_TASK / VEHICLE_WORK_UNIT
objectId
nodeCode
pauseReason
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "暂停确认二维码已生成",
"pauseRequest": {
"requestId": "CTRL-PAUSE-001",
"requestType": "PAUSE",
"requestState": "WAIT_CONFIRM",
"objectType": "WAREHOUSE_TASK",
"objectId": "TASK-UNLOAD-001",
"entryNo": "G20260526001",
"nodeCode": "GF_INB_UNLOAD"
},
"pauseQr": {
"pauseQrToken": "PAU-TASK-UNLOAD-001-001",
"qrType": "PAUSE_CONFIRM",
"expireAt": "2026-07-15 19:30:00"
},
"actionRecordId": "EVT202607150008",
"nextActions": ["PAUSE_CONFIRM"],
"blockingReasons": []
}
|
- 校验挂接对象存在且处于可暂停状态,
pauseReason 必填。
- 插入
t_warehouse_control_request(request_type='PAUSE'),先不改变主流程状态,等待主管确认。
- 写
t_warehouse_status_event(PAUSE_REQUESTED),返回主管扫码 token。
|
3.9 确认暂停 |
p_mobile_confirm_pause |
supervisorOperatorId
pauseQrToken
confirmReason
deviceId
idempotencyKey
|
{
"success": true,
"code": "OK",
"message": "作业已暂停",
"pauseRequest": {
"requestId": "CTRL-PAUSE-001",
"requestState": "CONFIRMED"
},
"objectState": {
"objectType": "WAREHOUSE_TASK",
"objectId": "TASK-UNLOAD-001",
"taskState": "PAUSED",
"controlState": "PAUSED"
},
"actionRecordId": "EVT202607150009",
"nextActions": ["CONTACT_SUPERVISOR"],
"blockingReasons": [
{ "code": "TASK_PAUSED", "message": "作业已暂停,不能继续普通作业" }
]
}
|
- 通过 token 定位
t_warehouse_control_request,校验类型为 PAUSE、未过期、主管权限有效。
- 更新挂接的
t_warehouse_task.control_state/task_state 或 t_vehicle_work_unit.work_unit_state 为暂停。
- 写
t_warehouse_status_event(PAUSE_CONFIRMED);暂停不释放叫车名额。
|
3.10 完成卸车 |
p_mobile_finish_inbound_unloading |
operatorId
warehouseId
vehicleWorkUnitId
cargoId
photoPathsJson
hydraulicTruckUsed
remark
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "卸车已完成",
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "WAIT_TALLY"
},
"task": {
"taskId": "TASK-UNLOAD-001",
"taskState": "FINISHED",
"actualEndTime": "2026-07-15 19:40:00",
"actualPkgs": 20
},
"vehicleWorkUnit": {
"vehicleWorkUnitId": "VWU202607150001",
"workUnitState": "RELEASED",
"releaseTime": "2026-07-15 19:40:00",
"quotaLockFlag": "0"
},
"photoRequirementStatus": {
"passed": true,
"missing": []
},
"workUnitReleased": true,
"releaseReason": "ALL_UNLOAD_TASKS_FINISHED",
"actionRecordId": "EVT202607150005",
"nextActions": ["START_TALLY"],
"blockingReasons": []
}
|
- 读
m_node_photo_rule、t_warehouse_photo 校验卸车必拍照片。
- 插入或更新
t_warehouse_photo 保存 photoPathsJson 中的照片。
- 更新
t_warehouse_task.task_state='FINISHED'、actual_end_time、remark。
- 更新
t_cargo.cargo_state='WAIT_TALLY'。
- 检查同一
t_vehicle_work_unit 下全部应卸车 t_warehouse_task 是否完成;满足则更新 t_vehicle_work_unit.release_time/quota_lock_flag/work_unit_state。
- 写
t_warehouse_status_event。
|
4.1 理货开始信息 |
p_mobile_get_tally_start_info |
operatorId
warehouseId
cargoId 或 entryNo
|
{
"success": true,
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "WAIT_TALLY",
"bookingPkgs": 20,
"bookingKgs": 1200,
"bookingCbm": 8.5,
"cargoName": "拼箱货物",
"marks": "MARKS-001"
},
"tallyTask": {
"taskId": "TASK-TALLY-001",
"nodeCode": "GF_INB_TALLY",
"taskState": "WAIT_TALLY",
"tallyUser": null,
"tallyTime": null
},
"canStart": true,
"lockedTallyUser": null,
"nextActions": ["START_TALLY"],
"blockingReasons": [],
"stateVersion": "20260715194500-1"
}
|
- 读
t_cargo 和 t_warehouse_task(node_code='GF_INB_TALLY')。
- 校验卸车任务
t_warehouse_task(node_code='GF_INB_UNLOAD') 已完成。
- 检查
t_warehouse_task.tally_user 是否已锁定。
|
4.2 开始理货 |
p_mobile_start_inbound_tally |
operatorId
warehouseId
cargoId
idempotencyKey
stateVersion
|
{
"success": true,
"message": "理货已开始",
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "TALLYING"
},
"tallyTask": {
"taskId": "TASK-TALLY-001",
"taskState": "TALLYING",
"tallyUser": "U010",
"tallyTime": "2026-07-15 19:46:00"
},
"nextActions": [
"SAVE_MEASUREMENT",
"SAVE_CUSTOMS_SPLIT",
"SAVE_LOCATION",
"SAVE_EXCEPTION_PHOTO_SERVICE",
"PRINT_PILE_CARD"
],
"actionRecordId": "EVT202607150006",
"blockingReasons": []
}
|
- 更新
t_warehouse_task.task_state='TALLYING'、tally_user、tally_time。
- 更新
t_cargo.cargo_state='TALLYING'。
- 写
t_warehouse_status_event。
- 若已有
tally_user 且非当前人,返回阻断。
|
4.3 测量信息 |
p_mobile_get_measurement_info |
operatorId
cargoId
taskId 可选
|
{
"success": true,
"cargo": {
"cargoId": "INB202607150001",
"bookingPkgs": 20,
"bookingKgs": 1200,
"bookingCbm": 8.5,
"cargoType": "GENERAL"
},
"measurements": [
{
"measurementId": "MEAS001",
"specSeq": 1,
"measurementType": "ACTUAL",
"packageId": "PKG_CARTON",
"unitType": "SINGLE",
"length": 1.2,
"width": 0.8,
"height": 0.6,
"pkgs": 10,
"kgs": 600,
"cbm": 5.76,
"marks": "MARKS-001"
}
],
"validationRules": {
"maxWidth": 2.4,
"maxHeight": 2.7,
"maxNonOversizeSum": 12,
"maxNonOversizeSingleCbm": 4,
"totalPkgsMustNotExceedBooking": true
},
"nextActions": ["SAVE_MEASUREMENT"],
"blockingReasons": []
}
|
- 读
t_cargo、t_warehouse_task、t_warehouse_measurement。
- 返回当前草稿和校验规则,前端按规则做即时提示,最终以后端校验为准。
|
4.4 保存测量 |
p_mobile_save_measurement |
operatorId
cargoId
taskId
measurementsJson
confirmWarnings
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK_WITH_WARNINGS",
"message": "测量数据已保存,体积差异请复核",
"measurementStatus": "SAVED",
"summary": {
"totalPkgs": 20,
"totalKgs": 1210,
"totalCbm": 9.2,
"bookingCbm": 8.5,
"diffCbm": 0.7,
"diffPercent": 8.24
},
"measurements": [
{
"measurementId": "MEAS001",
"specSeq": 1,
"pkgs": 10,
"kgs": 600,
"cbm": 5.76
},
{
"measurementId": "MEAS002",
"specSeq": 2,
"pkgs": 10,
"kgs": 610,
"cbm": 3.44
}
],
"warnings": [
{ "code": "CBM_DIFF", "message": "实测体积与委托体积差异超过提示阈值" }
],
"blockingReasons": [],
"objectVersion": "20260715195200-1",
"nextActions": ["SAVE_CUSTOMS_SPLIT", "SAVE_LOCATION", "PRINT_PILE_CARD"]
}
|
- 校验
t_warehouse_task.task_state='TALLYING'。
- 删除或关闭当前任务旧草稿,插入/更新
t_warehouse_measurement。
- 汇总回写
t_cargo.measured_pkgs/measured_kgs/measured_cbm。
- 尺寸、重复规格、件数超委托为阻断;体积差异为提示,可由
confirmWarnings 确认。
- 写
t_warehouse_status_event。
|
4.5 做关信息 |
p_mobile_get_customs_split_info |
operatorId
cargoId |
{
"success": true,
"cargo": {
"cargoId": "INB202607150001",
"measuredPkgs": 20,
"isBonded": "1"
},
"required": true,
"customsSplits": [
{ "declarationNo": "BGD001", "pkgs": 10 },
{ "declarationNo": "BGD002", "pkgs": 10 }
],
"maxPkgs": 20,
"nextActions": ["SAVE_CUSTOMS_SPLIT"],
"blockingReasons": []
}
|
- 读
t_cargo、t_order_customs_ext。
- 现设计没有独立做关拆分表时,建议先以 JSON/备注或后续补表承接;本接口仍返回页面需要的结构。
- 保存接口必须能追溯到
cargo_id 和操作人。
|
4.6 保存做关 |
p_mobile_save_customs_split |
operatorId
cargoId
customsSplitsJson
idempotencyKey
stateVersion
|
{
"success": true,
"customsSplitStatus": "SAVED",
"cargoId": "INB202607150001",
"splitCount": 2,
"totalPkgs": 20,
"objectVersion": "20260715195500-1",
"nextActions": ["SAVE_LOCATION", "PRINT_PILE_CARD"],
"blockingReasons": []
}
|
- 校验合计件数不超过
t_cargo.measured_pkgs 或实收件数。
- 当前表结构下优先更新
t_order_customs_ext.declaration_no/remark 或后续专表;同时写 t_warehouse_status_event。
- 不直接改变
t_cargo.cargo_state。
|
4.7 库位建议 |
p_mobile_get_location_suggest |
operatorId
warehouseId
cargoId
keyword 可选
|
{
"success": true,
"warehouseId": "WH01",
"cargo": {
"cargoId": "INB202607150001",
"entryNo": "G20260526001",
"receivedPkgs": 10,
"assignedPkgs": 6,
"unassignedPkgs": 4
},
"currentAssignments": [
{
"assignmentId": "LOC-ASG-001",
"locationId": "L-A-01",
"locationName": "A01",
"sublocationId": "L-A-01-11",
"sublocationLabel": "11",
"pkgs": 6,
"locked": false
}
],
"locations": [
{
"locationId": "L-A-01",
"locationName": "A01",
"areaName": "A区",
"available": true,
"recommended": true,
"occupiedPkgs": 30,
"selectedPkgs": 6,
"capacityHint": "可继续堆放"
},
{
"locationId": "L-B-02",
"locationName": "B区02",
"areaName": "B区",
"available": true,
"occupiedPkgs": 12,
"capacityHint": "空余较多"
}
],
"nextActions": ["GET_SUBLOCATION_OCCUPANCY", "SAVE_TALLY_LOCATION", "CONFIRM_TALLY_LOCATION"],
"blockingReasons": []
}
|
- 设计表中库位字段落在
t_pile_card.location_id、t_stock_movement.to_location_id、t_warehouse_job.to_location_id。
- 本阶段库位主数据如来自既有
m_warehouse_location 或视图,应在配置时固定;接口返回前端统一 DTO。
- 读取已分配库位可先来自当前理货任务的临时分配,建议落
t_warehouse_tally_location;打印后落到 t_pile_card.location_id。
|
4.8 小库位占用 |
p_mobile_get_sublocation_occupancy |
operatorId
warehouseId
locationId
cargoId 可选
|
{
"success": true,
"location": {
"locationId": "L-A-01",
"locationName": "A区01"
},
"layout": {
"rows": [
{ "rowNo": 1, "labels": ["11", "12", "13", "14", "15", "16", "17", "18", "19"] },
{ "rowNo": 2, "labels": ["21", "22", "23", "24", "25", "26", "27", "28", "29"] }
]
},
"sublocations": [
{ "sublocationId": "L-A-01-11", "label": "11", "state": "SELECTED", "selectedPkgs": 6, "occupiedPkgs": 0 },
{ "sublocationId": "L-A-01-12", "label": "12", "state": "OCCUPIED", "selectedPkgs": 0, "occupiedPkgs": 20 },
{ "sublocationId": "L-A-01-13", "label": "13", "state": "LOCKED", "selectedPkgs": 0, "occupiedPkgs": 0 },
{ "sublocationId": "L-A-01-14", "label": "14", "state": "FREE", "selectedPkgs": 0, "occupiedPkgs": 0 }
],
"currentAssignments": [
{
"assignmentId": "LOC-ASG-001",
"locationId": "L-A-01",
"sublocationId": "L-A-01-11",
"sublocationLabel": "11",
"pkgs": 6
}
],
"nextActions": ["SAVE_TALLY_LOCATION"],
"blockingReasons": []
}
|
- 读取库位占用来源于
t_pile_card.location_id、t_stock_movement.balance_pkgs 和未打印前的 t_warehouse_tally_location。
- 若小库位尚无物理表,本阶段以库位扩展编码或
t_warehouse_tally_location.sublocation_code 承接;接口 DTO 先稳定。
|
4.9 保存库位 |
p_mobile_save_tally_location |
operatorId
warehouseId
cargoId
operation: UPSERT / DELETE
assignmentId 删除/编辑时传
assignmentsJson
idempotencyKey
stateVersion
|
{
"success": true,
"locationStatus": "SAVED",
"cargoId": "INB202607150001",
"summary": {
"receivedPkgs": 10,
"assignedPkgs": 10,
"unassignedPkgs": 0,
"canConfirm": true
},
"assignments": [
{
"assignmentId": "LOC-ASG-001",
"locationId": "L-A-01",
"locationName": "A01",
"sublocationId": "L-A-01-11",
"sublocationLabel": "11",
"pkgs": 6
},
{
"assignmentId": "LOC-ASG-002",
"locationId": "L-A-01",
"locationName": "A01",
"sublocationId": "L-A-01-12",
"sublocationLabel": "12",
"pkgs": 4
}
],
"objectVersion": "20260715200000-1",
"nextActions": ["CONFIRM_TALLY_LOCATION", "SAVE_EXCEPTION_PHOTO_SERVICE", "PRINT_PILE_CARD"],
"blockingReasons": []
}
|
- 校验
t_warehouse_task.task_state='TALLYING' 和 t_cargo.warehouse_id。
- 当前设计中最终库位在打印桩脚牌时写
t_pile_card.location_id,入库流水写 t_stock_movement.to_location_id。
- 保存阶段建议写
t_warehouse_tally_location,字段至少包含 cargo_id/task_id/location_id/sublocation_code/pkgs/confirm_flag;必须能被 p_mobile_get_pile_card_print_info 读取。
- 写
t_warehouse_status_event。
|
4.10 确认库位分布 |
p_mobile_confirm_tally_location |
operatorId
warehouseId
cargoId
taskId
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "库位分布已确认",
"locationStatus": "CONFIRMED",
"summary": {
"receivedPkgs": 10,
"assignedPkgs": 10,
"unassignedPkgs": 0
},
"assignments": [
{ "assignmentId": "LOC-ASG-001", "locationName": "A01", "sublocationLabel": "11", "pkgs": 6 },
{ "assignmentId": "LOC-ASG-002", "locationName": "A01", "sublocationLabel": "12", "pkgs": 4 }
],
"actionRecordId": "EVT202607150018",
"objectVersion": "20260715200200-1",
"nextActions": ["PRINT_PILE_CARD"],
"blockingReasons": []
}
|
- 校验
t_warehouse_task.task_state='TALLYING',已分配件数等于实收件数且无锁定/占用冲突。
- 更新
t_warehouse_tally_location.confirm_flag='1'、confirmed_by、confirmed_time。
- 写
t_warehouse_status_event(TALLY_LOCATION_CONFIRMED);打印桩脚牌时读取已确认分布。
|
4.11 照片上传 |
/openApi/upload.do G1 文件接口 |
Query: domain=g1_sipgl、fileName
Form: file
|
{
"storagePath": "open/20260715/INB202607150001_damage_01.jpg"
}
|
- 这是 G1 开放文件接口,不是业务存储过程。
- 业务过程只接收
storagePath 或已落库的 photoId。
- 保存业务照片时写
t_warehouse_photo.file_url/file_name/file_id。
|
4.12 残损照片服务页 |
p_mobile_get_tally_task_info |
operatorId
cargoId
taskId 可选 |
{
"success": true,
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "TALLYING"
},
"damageRecords": [
{ "damageType": "BROKEN_PACKAGE", "pkgs": 1, "remark": "外包装破损" }
],
"photoRequirements": [
{ "ruleId": "PHOTO_TALLY_FULL", "photoType": "TALLY_FULL_VIEW", "required": true, "minCount": 1, "uploadedCount": 1 },
{ "ruleId": "PHOTO_DAMAGE", "photoType": "DAMAGE", "required": false, "minCount": 0, "uploadedCount": 1 }
],
"photos": [
{ "photoId": "PHOTO001", "photoType": "TALLY_FULL_VIEW", "fileUrl": "open/20260715/tally_01.jpg", "uploadState": "UPLOADED" }
],
"serviceOptions": [
{ "serviceItemId": "SVC_HYDRAULIC", "serviceName": "液力车", "unit": "次" },
{ "serviceItemId": "SVC_PALLET", "serviceName": "打托", "unit": "托" },
{ "serviceItemId": "SVC_OWNER_LABEL", "serviceName": "货主标签", "unit": "张" }
],
"selectedServices": [
{ "serviceItemId": "SVC_PALLET", "quantity": 2, "unit": "托" }
],
"nextActions": ["SAVE_EXCEPTION_PHOTO_SERVICE", "PRINT_PILE_CARD"],
"blockingReasons": []
}
|
- 读
t_cargo、t_warehouse_task。
- 照片规则来自
m_node_photo_rule,已传照片来自 t_warehouse_photo。
- 服务请求可从
t_cargo_service_request 和 t_task_service 读取。
- 残损记录当前设计可落
t_warehouse_exception 或控制申请,页面 DTO 先稳定。
|
4.13 保存残损照片服务 |
p_mobile_save_tally_exception_photo_service |
operatorId
cargoId
taskId
damageJson
photoPathsJson
servicesJson
idempotencyKey
stateVersion
|
{
"success": true,
"damageStatus": "SAVED",
"photoRequirementStatus": {
"passed": true,
"missing": []
},
"serviceStatus": {
"saved": true,
"services": [
{ "serviceId": "TSVC001", "serviceItemId": "SVC_PALLET", "serviceName": "打托", "quantity": 2, "unit": "托" }
]
},
"photos": [
{ "photoId": "PHOTO001", "photoType": "TALLY_FULL_VIEW", "fileUrl": "open/20260715/tally_01.jpg" }
],
"controlRequestId": null,
"warnings": [],
"nextActions": ["PRINT_PILE_CARD"],
"blockingReasons": []
}
|
- 写
t_warehouse_photo 保存照片引用。
- 写
t_task_service 保存现场服务,后续费用生成引用。
- 严重残损可写
t_warehouse_control_request,并可能更新 t_warehouse_task.control_state 或 t_cargo.hold_reason。
- 写
t_warehouse_status_event。
|
5.1 打印前检查 |
p_mobile_get_pile_card_print_info |
operatorId
cargoId |
{
"success": true,
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "TALLYING",
"measuredPkgs": 20,
"measuredKgs": 1210,
"measuredCbm": 9.2
},
"precheck": {
"passed": true,
"measurementReady": true,
"customsSplitReady": true,
"locationReady": true,
"photoReady": true,
"serviceReady": true
},
"pileCardsPreview": [
{
"unitSeq": 1,
"pileUnitType": "LOCATION",
"unitQty": 20,
"qtyUnit": "PKG",
"warehouseId": "WH01",
"locationId": "L-A-01",
"locationName": "A区01"
}
],
"printerOptions": [
{ "printerId": "PRN-WH01-01", "printerName": "仓库打印点01", "online": true }
],
"nextActions": ["PRINT_PILE_CARD"],
"blockingReasons": []
}
|
- 读
t_cargo、t_warehouse_measurement、t_warehouse_photo、t_task_service。
- 读取理货库位分配,生成桩脚牌预览;最终落到
t_pile_card。
- 阻断原因包括缺测量、缺库位、缺必拍照片、任务状态不允许。
|
5.2 打印并入库 |
p_mobile_print_pile_card |
operatorId
cargoId
printerId
printCopies
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "桩脚牌已生成,单票入库完成",
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "IN_STOCK",
"inTime": "2026-07-15 20:20:00",
"lastMoveTime": "2026-07-15 20:20:00"
},
"tallyTask": {
"taskId": "TASK-TALLY-001",
"taskState": "FINISHED",
"actualEndTime": "2026-07-15 20:20:00"
},
"pileCards": [
{
"pileCardId": "PC202607150001",
"cargoId": "INB202607150001",
"pileCardState": "VALID_IN_STOCK",
"unitSeq": 1,
"unitQty": 20,
"qtyUnit": "PKG",
"warehouseId": "WH01",
"locationId": "L-A-01",
"printCount": 1,
"lastPrintTime": "2026-07-15 20:20:00"
}
],
"stockMovement": {
"movementId": "MOV202607150001",
"movementType": "INBOUND",
"toWarehouseId": "WH01",
"toLocationId": "L-A-01",
"pkgs": 20,
"kgs": 1210,
"cbm": 9.2,
"balancePkgs": 20
},
"printJob": {
"printJobId": "PRJ202607150001",
"printerId": "PRN-WH01-01",
"printState": "CREATED"
},
"regulatoryMessageDraft": {
"messageId": "MSG202607150001",
"messageType": "INBOUND_SHELF",
"messageState": "DRAFT",
"precheckState": "WAIT_PRECHECK"
},
"actionRecordId": "EVT202607150010",
"nextActions": ["START_INBOUND_REVIEW"],
"blockingReasons": []
}
|
- 校验打印前检查全部通过。
- 插入
t_pile_card,更新 print_count/last_print_time/bound_time/pile_card_state/location_id。
- 插入
t_stock_movement(movement_type='INBOUND')。
- 更新
t_cargo.cargo_state='IN_STOCK'、in_time、last_move_time。
- 更新
t_warehouse_task(node_code='GF_INB_TALLY') 为完成。
- 按需要插入
t_regulatory_message 入库上架报文草稿。
- 写
t_warehouse_status_event。
|
6.1 复核开始信息 |
p_mobile_get_inbound_review_start_info |
operatorId
cargoId 或 entryNo |
{
"success": true,
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "IN_STOCK",
"customerCargoNo": "CUST-001"
},
"reviewTask": {
"taskId": "TASK-REVIEW-001",
"nodeCode": "GF_INB_REVIEW",
"taskState": "WAIT_REVIEW"
},
"pileCards": [
{ "pileCardId": "PC202607150001", "pileCardState": "VALID_IN_STOCK", "unitQty": 20, "locationId": "L-A-01" }
],
"photoRequirements": [
{ "ruleId": "PHOTO_REVIEW", "photoType": "INBOUND_REVIEW", "required": true, "minCount": 1, "uploadedCount": 0 }
],
"canStart": true,
"nextActions": ["START_INBOUND_REVIEW"],
"blockingReasons": []
}
|
- 读
t_cargo、t_pile_card、t_warehouse_task(node_code='GF_INB_REVIEW')。
- 读
m_node_photo_rule、t_warehouse_photo 生成复核照片要求。
- 进口分拨不进入本复核;关封进仓按客户标签/配置判断是否启用。
|
6.2 开始复核 |
p_mobile_start_inbound_review |
operatorId
cargoId
idempotencyKey
stateVersion
|
{
"success": true,
"message": "入库复核已开始",
"reviewTask": {
"taskId": "TASK-REVIEW-001",
"taskState": "REVIEWING",
"confirmUser": "U020",
"confirmTime": "2026-07-15 20:30:00"
},
"reviewProgress": {
"requiredCount": 1,
"scannedCount": 0,
"passedCount": 0
},
"actionRecordId": "EVT202607150011",
"nextActions": ["SCAN_REVIEW_LABEL", "FINISH_INBOUND_REVIEW"],
"blockingReasons": []
}
|
- 校验
t_warehouse_task.task_state='WAIT_REVIEW'。
- 更新
t_warehouse_task.task_state='REVIEWING'、confirm_user、confirm_time。
- 写
t_warehouse_status_event。
|
6.3 复核详情 |
p_mobile_get_inbound_review_info |
operatorId
cargoId
reviewTaskId 可选 |
{
"success": true,
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "IN_STOCK"
},
"reviewTask": {
"taskId": "TASK-REVIEW-001",
"taskState": "REVIEWING"
},
"pileCards": [
{
"pileCardId": "PC202607150001",
"barcode": "PC202607150001",
"expected": true,
"scanned": false,
"scanResult": null,
"locationId": "L-A-01",
"unitQty": 20
}
],
"scanResults": [],
"reviewProgress": {
"requiredCount": 1,
"scannedCount": 0,
"passedCount": 0,
"canFinish": false
},
"photoRequirements": [
{ "photoType": "INBOUND_REVIEW", "required": true, "minCount": 1, "uploadedCount": 0 }
],
"nextActions": ["SCAN_REVIEW_LABEL"],
"blockingReasons": []
}
|
- 读
t_pile_card 得到应复核列表。
- 读
t_warehouse_scan_log(scan_context='INBOUND_REVIEW') 得到已扫结果。
- 读
t_warehouse_photo 得到复核照片上传状态。
|
6.4 复核扫码 |
p_mobile_scan_inbound_review_label |
operatorId
cargoId
reviewTaskId
scanValue
deviceId
idempotencyKey
stateVersion
|
{
"success": true,
"scanResult": "PASS",
"scanLog": {
"scanId": "SCAN202607150001",
"scanContext": "INBOUND_REVIEW",
"scanCode": "PC202607150001",
"matchedObjectType": "PILE_CARD",
"matchedObjectId": "PC202607150001"
},
"pileCard": {
"pileCardId": "PC202607150001",
"cargoId": "INB202607150001",
"pileCardState": "VALID_IN_STOCK"
},
"reviewProgress": {
"requiredCount": 1,
"scannedCount": 1,
"passedCount": 1,
"canFinish": true
},
"freezeTriggered": false,
"nextActions": ["FINISH_INBOUND_REVIEW"],
"blockingReasons": []
}
|
- 按
scanValue 匹配 t_pile_card.pile_card_id 或条码规则。
- 校验桩脚牌属于当前
cargoId 且 pile_card_state='VALID_IN_STOCK'。
- 写
t_warehouse_scan_log,重复扫码返回已扫结果但不重复计数。
- 扫错时可返回
freezeTriggered=true,或直接调用冻结过程。
|
6.5 扫码异常冻结 |
p_mobile_freeze_inbound_review_by_scan_error |
operatorId
cargoId
reviewTaskId
scanValue
reason
deviceId
idempotencyKey
stateVersion
|
{
"success": true,
"code": "REVIEW_FROZEN",
"message": "扫到非当前进仓编号桩脚牌,入库复核已冻结",
"reviewTask": {
"taskId": "TASK-REVIEW-001",
"taskState": "FROZEN",
"controlState": "FROZEN"
},
"scanLog": {
"scanId": "SCAN202607150002",
"scanCode": "PC-OTHER-001",
"scanResult": "ERROR",
"errorMessage": "桩脚牌不属于当前进仓编号"
},
"controlRequest": {
"requestId": "CTRL202607150001",
"requestType": "INBOUND_REVIEW_SCAN_ERROR",
"requestState": "OPEN",
"objectType": "WAREHOUSE_TASK",
"objectId": "TASK-REVIEW-001"
},
"nextActions": ["CONTACT_SUPERVISOR"],
"blockingReasons": [
{ "code": "TASK_FROZEN", "message": "入库复核已冻结,不能继续扫码或完成复核" }
]
}
|
- 写
t_warehouse_scan_log 记录错误扫码。
- 更新
t_warehouse_task.task_state/control_state 为冻结。
- 插入
t_warehouse_control_request。
- 写
t_warehouse_status_event。
|
6.6 完成复核 |
p_mobile_finish_inbound_review |
operatorId
cargoId
reviewTaskId
photoPathsJson
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "入库复核已完成",
"reviewTask": {
"taskId": "TASK-REVIEW-001",
"taskState": "FINISHED",
"actualEndTime": "2026-07-15 20:45:00",
"confirmUser": "U020"
},
"cargo": {
"cargoId": "INB202607150001",
"cargoState": "IN_STOCK"
},
"reviewProgress": {
"requiredCount": 1,
"scannedCount": 1,
"passedCount": 1,
"canFinish": true
},
"photoRequirementStatus": {
"passed": true,
"missing": []
},
"workUnitReleased": false,
"releaseReason": "REVIEW_DOES_NOT_RELEASE_WORK_UNIT",
"actionRecordId": "EVT202607150014",
"nextActions": ["BACK_TO_INBOUND_WORKBENCH"],
"blockingReasons": []
}
|
- 校验
t_warehouse_task.task_state='REVIEWING'。
- 校验
t_pile_card 应复核清单均在 t_warehouse_scan_log 有通过记录。
- 保存复核照片到
t_warehouse_photo。
- 更新
t_warehouse_task.task_state='FINISHED'、actual_end_time。
- 不写
t_stock_movement,不改变 t_cargo.cargo_state='IN_STOCK',不释放车辆作业单元。
- 写
t_warehouse_status_event。
|
7.1 进仓异常列表 |
p_mobile_get_inbound_exception_list |
operatorId
warehouseId
statusFilter 可选: PAUSE_PENDING / FROZEN / PHOTO_MISSING
keyword 可选
pageNo
pageSize
|
{
"success": true,
"total": 3,
"items": [
{
"exceptionId": "CTRL-PAUSE-001",
"entryNo": "G20260526001",
"licensePlate": "沪D90876",
"door": "D05",
"businessShape": "本港配中转",
"nodeName": "入库复核",
"exceptionState": "PAUSE_PENDING",
"displayState": "暂停待确认",
"requestTime": "2026-05-26 10:21",
"requestUserName": "WHS-041"
},
{
"exceptionId": "CTRL-FREEZE-001",
"entryNo": "G20260526002",
"licensePlate": "沪K60128",
"door": "D03",
"businessShape": "关封出口",
"nodeName": "入库复核",
"exceptionState": "FROZEN",
"displayState": "冻结"
}
],
"nextActions": ["VIEW_ONLY"],
"blockingReasons": []
}
|
- 只读查询
t_warehouse_control_request 中进仓相关暂停、冻结、待补照片记录。
- 关联
t_warehouse_task、t_vehicle_work_unit、t_cargo 返回进仓编号、车辆、库门、业务形态和节点。
- 本页面不处理异常;处理动作走现场管理的监护、暂停确认和解冻接口。
|
7.2 解冻对象列表 |
p_mobile_get_unlock_object_list |
operatorId
warehouseId
entryNo 可选
containerNo 可选
pageNo
pageSize
|
{
"success": true,
"total": 2,
"items": [
{
"unlockObjectId": "CTRL-FREEZE-001",
"objectType": "WAREHOUSE_TASK",
"objectId": "TASK-REVIEW-001",
"objectNo": "G20260526001",
"pauseNode": "入库复核",
"pauseReason": "桩脚牌不属于本进仓编号",
"pauseTime": "2026-05-26 10:21",
"requestUserName": "WHS-041",
"currentState": "FROZEN"
}
],
"nextActions": ["VIEW_UNLOCK_DETAIL"],
"blockingReasons": []
}
|
- 查询
t_warehouse_control_request 中 request_state 为可解冻/可恢复的记录。
- 按进仓编号或箱号关联
t_cargo、t_vehicle_work_unit、t_warehouse_task 筛选。
- 仅主管/管理角色可见,权限校验来自操作人上下文或 G1 角色配置。
|
7.3 解冻详情 |
p_mobile_get_unlock_object_detail |
operatorId
warehouseId
unlockObjectId
|
{
"success": true,
"unlockObject": {
"unlockObjectId": "CTRL-FREEZE-001",
"objectType": "WAREHOUSE_TASK",
"objectId": "TASK-REVIEW-001",
"objectNo": "G20260526001",
"pauseNode": "入库复核",
"pauseReason": "桩脚牌不属于本进仓编号",
"pauseTime": "2026-05-26 10:21",
"requestUserName": "WHS-041",
"currentState": "FROZEN",
"resumeTargetState": "REVIEWING"
},
"nextActions": ["CONFIRM_UNLOCK"],
"blockingReasons": []
}
|
- 读取
t_warehouse_control_request 详情和挂接对象当前状态。
- 关联
t_warehouse_task、t_vehicle_work_unit、t_cargo 回显现场需要的信息。
- 后端计算
resumeTargetState,前端不得自行决定恢复到哪个节点。
|
7.4 确认解冻 |
p_mobile_confirm_unlock_object |
operatorId
warehouseId
unlockObjectId
unlockReason
idempotencyKey
stateVersion
|
{
"success": true,
"code": "OK",
"message": "已解除冻结",
"unlockObject": {
"unlockObjectId": "CTRL-FREEZE-001",
"requestState": "CLOSED",
"unlockReason": "主管现场复核桩脚牌与货物一致,允许恢复入库复核。"
},
"objectState": {
"objectType": "WAREHOUSE_TASK",
"objectId": "TASK-REVIEW-001",
"taskState": "REVIEWING",
"controlState": "NORMAL"
},
"actionRecordId": "EVT202607150021",
"nextActions": ["BACK_TO_MANAGEMENT"],
"blockingReasons": []
}
|
- 校验主管权限、
unlockReason 必填、t_warehouse_control_request 仍处于可解冻状态。
- 更新
t_warehouse_control_request.request_state='CLOSED'、处理人、处理时间和处理原因。
- 按后端计算结果更新
t_warehouse_task.control_state/task_state 或 t_vehicle_work_unit.work_unit_state。
- 写
t_warehouse_status_event(UNLOCK_CONFIRMED)。
|