feat: MOM 扫码入库对接 Track 产品身份证自动填充
- 半成品/成品入库弹窗顶部新增'扫码入库'按钮,打开扫码面板(扫码枪/摄像头) - 扫码 Track 身份证后自动填充物料信息与序列号,不再二次搜索 - 后端新增 track_query_service(httpx 调 Track lookup)、track-lookup 接口 - 入库成功后 notify_track 通知 Track 闭环
This commit is contained in:
@ -13,6 +13,7 @@ import json
|
||||
import numpy as np
|
||||
from app.utils.ai_vision import extract_and_embed
|
||||
from app.services.image_embedding_service import ImageEmbeddingService
|
||||
from app.services.track_webhook_service import notify_track, get_current_operator
|
||||
|
||||
|
||||
class SemiInboundService:
|
||||
@ -249,6 +250,16 @@ class SemiInboundService:
|
||||
new_stock.id,
|
||||
arrival_list
|
||||
)
|
||||
|
||||
# 真实扫码入库成功,异步通知 Track 系统(Webhook)
|
||||
notify_track({
|
||||
'event': 'inbound.created',
|
||||
'source_table': 'stock_semi',
|
||||
'sku': material.spec_model or material.name,
|
||||
'serial_number': new_stock.serial_number,
|
||||
'quantity': float(new_stock.in_quantity or 0),
|
||||
'operator': get_current_operator(),
|
||||
})
|
||||
return new_stock
|
||||
except Exception as e:
|
||||
db.session.rollback()
|
||||
|
||||
Reference in New Issue
Block a user