feat: BOM 库存接口支持按版本查询,修复同一编号多版本下拉回显错乱
This commit is contained in:
@ -422,11 +422,11 @@ class BomService:
|
||||
return bom_no
|
||||
|
||||
@staticmethod
|
||||
def get_bom_with_stock_by_bom_no(bom_no):
|
||||
def get_bom_with_stock_by_bom_no(bom_no, version=None):
|
||||
"""
|
||||
根据 bom_no 获取配方详情,并计算(已修复 N+1 性能问题)
|
||||
根据 bom_no (和可选 version) 获取配方详情,并计算(已修复 N+1 性能问题)
|
||||
"""
|
||||
detail = BomService.get_bom_detail(bom_no)
|
||||
detail = BomService.get_bom_detail(bom_no, version=version)
|
||||
if not detail or not detail.get('children'):
|
||||
return detail
|
||||
|
||||
|
||||
Reference in New Issue
Block a user