feat: 质检工单结论、库位批量/筛选与协议样本接收质检摘要
落库并展示质检工单级结论(可编辑/任务派生),库位树支持批量新增子节点与货架格子检索,协议/捐赠列表补充接收与门禁质检摘要,并同步生产物料与工单卡片展示优化。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
f554d77e59
commit
a3af039e74
54 files changed
+42429
-35006
No files matched your search
@@ -117,6 +117,31 @@ def load_facility_map(db: Session, tenant_no: str) -> Dict[str, BizStorageFacili
|
||||
return {r.id: r for r in rows}
|
||||
|
||||
|
||||
def load_facility_ancestor_map(
|
||||
db: Session,
|
||||
tenant_no: str,
|
||||
node_id: str,
|
||||
) -> Dict[str, BizStorageFacility]:
|
||||
"""仅加载某节点到根的祖先链(含自身),供单节点格子列表拼 fullSlotCode。"""
|
||||
result: Dict[str, BizStorageFacility] = {}
|
||||
cur_id = (node_id or "").strip()
|
||||
while cur_id and cur_id != "0" and cur_id not in result:
|
||||
row = (
|
||||
db.query(BizStorageFacility)
|
||||
.filter(
|
||||
BizStorageFacility.id == cur_id,
|
||||
BizStorageFacility.tenant_no == tenant_no,
|
||||
BizStorageFacility.del_flag == 0,
|
||||
)
|
||||
.first()
|
||||
)
|
||||
if not row:
|
||||
break
|
||||
result[row.id] = row
|
||||
cur_id = (row.parent_id or "0").strip()
|
||||
return result
|
||||
|
||||
|
||||
def collect_slot_ids_under_nodes(
|
||||
db: Session,
|
||||
node_ids: List[str],
|
||||
|
||||
Reference in new issue
Block a user