This commit is contained in:
zlwu committed 2026-05-27 05:23:28 +08:00
1 parent ad8f8d696f
commit 41aa90aa05
115 files changed
+29626 -10210

No files matched your search

+1 -1
View File
@@ -1 +1 @@
91471
53718
+143 -53
View File
@@ -1,13 +1,20 @@
"""出库放行审核 API"""
from typing import Optional
from fastapi import APIRouter, Depends, Query
from pydantic import BaseModel
from sqlalchemy.orm import Session
from app.core.database import get_db
from app.core.menu_guard import require_admin_or_super_admin
from app.core.menu_guard import require_admin_or_super_admin, require_menu_code
from app.core.response import error_response, success_response
from app.crud import outbound_release_review as svc
from app.models.models import SysUser
from app.schemas.outbound_release_review import (
OutboundBatchReviewBody,
OutboundReviewSubmitBody,
)
from app.schemas.outbound_release_material import OutboundReleaseMaterialSaveBody
from app.crud import outbound_release_material as orm_svc
router = APIRouter(prefix="/web/admin", tags=["出库放行审核"])
@@ -22,86 +29,169 @@ def _get_tenant_no(db: Session, user: dict) -> str:
return sys_user.tenant_no
class CreateBody(BaseModel):
scheduleId: str
def _get_current_user_id(user: dict) -> str:
user_id = user.get("user_id")
if not user_id:
raise PermissionError("用户身份信息缺失")
return str(user_id)
class UpdateBody(BaseModel):
id: str
reviewConclusion: str
reviewRemark: str = ""
class IdBody(BaseModel):
id: str
@router.post("/pilot-release-review/create")
async def create_review(
body: CreateBody,
user: dict = Depends(require_admin_or_super_admin),
@router.get("/pilot-release-reviews")
async def list_pilot_release_reviews(
page: int = Query(1, ge=1),
pageSize: int = Query(10, ge=1, le=100),
keyword: Optional[str] = None,
reviewConclusion: Optional[str] = None,
scheduleStatus: Optional[str] = None,
qcStatus: Optional[str] = None,
db: Session = Depends(get_db),
user: dict = Depends(require_menu_code("biz:outboundReleaseReview:list")),
):
try:
tenant_no = _get_tenant_no(db, user)
result = svc.create_release_review(
result = svc.list_reviews_paginated(
db,
schedule_id=body.scheduleId,
tenant_no=tenant_no,
user_id=user.get("user_id"),
create_dept_id=user.get("region_id", ""),
keyword=keyword,
review_conclusion=reviewConclusion,
schedule_status=scheduleStatus,
qc_status=qcStatus,
page=page,
page_size=pageSize,
user_info=user,
)
db.commit()
return success_response(result, message="创建成功")
except ValueError as e:
return success_response(result)
except PermissionError as e:
return error_response(403, str(e))
except Exception as e:
return error_response(400, str(e))
@router.get("/pilot-release-review/list")
async def list_reviews(
scheduleId: str = Query(...),
user: dict = Depends(require_admin_or_super_admin),
db: Session = Depends(get_db),
):
tenant_no = _get_tenant_no(db, user)
result = svc.list_reviews_by_schedule(
db, schedule_id=scheduleId, tenant_no=tenant_no
)
return success_response(result)
@router.put("/pilot-release-review/update")
async def update_review(
body: UpdateBody,
user: dict = Depends(require_admin_or_super_admin),
@router.get("/pilot-release-reviews/{schedule_id}/detail")
async def get_pilot_release_review_detail(
schedule_id: str,
db: Session = Depends(get_db),
user: dict = Depends(require_menu_code("biz:outboundReleaseReview:list")),
):
try:
tenant_no = _get_tenant_no(db, user)
result = svc.update_review_conclusion(
detail = svc.get_schedule_detail(db, schedule_id, tenant_no)
if not detail:
return error_response(404, "输注计划不存在")
return success_response(detail)
except PermissionError as e:
return error_response(403, str(e))
except Exception as e:
return error_response(400, str(e))
@router.put("/pilot-release-reviews/{schedule_id}/review")
async def submit_single_review(
schedule_id: str,
body: OutboundReviewSubmitBody,
db: Session = Depends(get_db),
user: dict = Depends(require_admin_or_super_admin),
):
try:
tenant_no = _get_tenant_no(db, user)
user_id = _get_current_user_id(user)
result = svc.review_schedule(
db,
review_id=body.id,
schedule_id,
conclusion=body.reviewConclusion,
remark=body.reviewRemark,
attachments=body.reviewAttachments,
tenant_no=tenant_no,
user_id=user.get("user_id"),
user_id=user_id,
)
return success_response(result, message="更新成功")
db.commit()
return success_response(result)
except PermissionError as e:
return error_response(403, str(e))
except ValueError as e:
return error_response(400, str(e))
except Exception as e:
return error_response(400, str(e))
@router.delete("/pilot-release-review/delete")
async def delete_review(
body: IdBody,
user: dict = Depends(require_admin_or_super_admin),
@router.put("/pilot-release-reviews/batch-review")
async def batch_review(
body: OutboundBatchReviewBody,
db: Session = Depends(get_db),
user: dict = Depends(require_admin_or_super_admin),
):
try:
tenant_no = _get_tenant_no(db, user)
svc.delete_release_review(
db, review_id=body.id, tenant_no=tenant_no, user_id=user.get("user_id")
user_id = _get_current_user_id(user)
result = svc.batch_review(
db,
body.scheduleIds,
conclusion=body.reviewConclusion,
remark=body.reviewRemark,
attachments=body.reviewAttachments,
tenant_no=tenant_no,
user_id=user_id,
)
return success_response(None, message="删除成功")
db.commit()
return success_response(result)
except PermissionError as e:
return error_response(403, str(e))
except ValueError as e:
return error_response(400, str(e))
except Exception as e:
return error_response(400, str(e))
@router.get("/pilot-release-reviews/{schedule_id}/outbound-materials")
async def get_outbound_release_materials(
schedule_id: str,
db: Session = Depends(get_db),
user: dict = Depends(require_menu_code("biz:outboundReleaseReview:list")),
):
try:
tenant_no = _get_tenant_no(db, user)
result = orm_svc.get_outbound_material(db, schedule_id, tenant_no)
return success_response(result)
except PermissionError as e:
return error_response(403, str(e))
except Exception as e:
if hasattr(e, "status_code") and getattr(e, "status_code") == 404:
return error_response(404, str(getattr(e, "detail", e)))
return error_response(400, str(getattr(e, "detail", e)))
@router.put("/pilot-release-reviews/{schedule_id}/outbound-materials")
async def save_outbound_release_materials(
schedule_id: str,
body: OutboundReleaseMaterialSaveBody,
db: Session = Depends(get_db),
user: dict = Depends(require_admin_or_super_admin),
):
try:
tenant_no = _get_tenant_no(db, user)
user_id = _get_current_user_id(user)
sys_user = db.query(SysUser).filter(SysUser.id == user_id).first()
dept_id = (sys_user.dept_id or "") if sys_user else ""
result = orm_svc.save_outbound_material(
db,
schedule_id,
paper_attachments=body.paperAttachments,
paper_materials=[p.model_dump(by_alias=True) for p in body.paperMaterials],
remark=body.remark,
cells=[c.model_dump(by_alias=True) for c in body.cells],
qc_materials=[m.model_dump(by_alias=True) for m in body.qcMaterials],
tenant_no=tenant_no,
user_id=user_id,
create_dept_id=dept_id,
)
db.commit()
return success_response(result)
except PermissionError as e:
return error_response(403, str(e))
except Exception as e:
db.rollback()
if hasattr(e, "status_code"):
code = int(getattr(e, "status_code", 400))
detail = getattr(e, "detail", str(e))
return error_response(code, detail if isinstance(detail, str) else str(detail))
return error_response(400, str(getattr(e, "detail", e)))
+2 -3
View File
@@ -733,9 +733,8 @@ async def api_create_outbound_production(
user_id=user.get("user_id"),
create_dept_id=user.get("dept_id", ""),
)
pilot_application.mark_schedule_complete(
db, schedule_id=body.scheduleId, tenant_no=tenant_no, user_id=user.get("user_id")
)
db.commit()
db.refresh(wo)
return success_response(pwo_svc._wo_to_dict(wo), message="创建出库生产工单成功")
except ValueError as e:
return error_response(400, str(e))
@@ -9,7 +9,9 @@ from app.core.database import get_db
from app.core.menu_guard import require_admin_or_super_admin
from app.core.response import error_response, success_response
from app.crud import pilot_infusion_schedule_mgmt as crud
from app.crud import outbound_handover as handover_crud
from app.models.models import SysUser
from app.schemas.outbound_handover import OutboundHandoverSaveBody
router = APIRouter(prefix="/web/admin", tags=["中试输注计划管理"])
@@ -200,3 +202,62 @@ async def api_update(
return success_response(result, message="更新成功")
except ValueError as e:
return error_response(400, str(e))
@router.get("/pilot-infusion-schedule-mgmt/{schedule_id}/outbound-handover")
async def api_get_outbound_handover(
schedule_id: str,
user: dict = Depends(require_admin_or_super_admin),
db: Session = Depends(get_db),
):
try:
tenant_no = _get_tenant_no(db, user)
result = handover_crud.get_outbound_handover(db, schedule_id, tenant_no)
return success_response(result)
except PermissionError as e:
return error_response(403, str(e))
except Exception as e:
if hasattr(e, "status_code") and getattr(e, "status_code") == 404:
return error_response(404, str(getattr(e, "detail", e)))
return error_response(400, str(getattr(e, "detail", e)))
@router.put("/pilot-infusion-schedule-mgmt/{schedule_id}/outbound-handover")
async def api_save_outbound_handover(
schedule_id: str,
body: OutboundHandoverSaveBody,
user: dict = Depends(require_admin_or_super_admin),
db: Session = Depends(get_db),
):
try:
tenant_no = _get_tenant_no(db, user)
user_id = user.get("user_id") or ""
sys_user = db.query(SysUser).filter(SysUser.id == user_id).first()
dept_id = (sys_user.dept_id or "") if sys_user else ""
om = body.outboundMaterial
result = handover_crud.save_outbound_handover(
db,
schedule_id,
outbound_material={
"remark": om.remark,
"cells": [c.model_dump(by_alias=True) for c in om.cells],
"qcMaterials": [m.model_dump(by_alias=True) for m in om.qcMaterials],
"paperMaterials": [p.model_dump(by_alias=True) for p in om.paperMaterials],
},
handover=body.handover.model_dump(by_alias=True),
tenant_no=tenant_no,
user_id=user_id,
create_dept_id=dept_id,
)
db.commit()
return success_response(result, message="出库交接已保存")
except PermissionError as e:
db.rollback()
return error_response(403, str(e))
except Exception as e:
db.rollback()
if hasattr(e, "status_code"):
code = int(getattr(e, "status_code", 400))
detail = getattr(e, "detail", str(e))
return error_response(code, detail if isinstance(detail, str) else str(detail))
return error_response(400, str(getattr(e, "detail", e)))
+245
View File
@@ -0,0 +1,245 @@
"""输注计划管理 · 出库交接 CRUD"""
from __future__ import annotations
from datetime import datetime
from typing import Any, Dict, List, Optional
from fastapi import HTTPException
from sqlalchemy.orm import Session
from app.core.utils import generate_uuid
from app.crud import outbound_release_material as orm_material_svc
from app.crud import outbound_handover_inventory as handover_inv_svc
from app.crud import pilot_infusion_schedule_mgmt as schedule_mgmt_svc
from app.models.models import BizOutboundHandover, SysUser
def _fmt_dt(t: Optional[datetime]) -> str:
return t.strftime("%Y-%m-%d %H:%M:%S") if t else ""
def _parse_handover_time(value: str) -> datetime:
raw = (value or "").strip()
if not raw:
raise HTTPException(status_code=400, detail="交接时间不能为空")
for fmt in ("%Y-%m-%d %H:%M:%S", "%Y-%m-%d %H:%M"):
try:
return datetime.strptime(raw, fmt)
except ValueError:
continue
raise HTTPException(status_code=400, detail="交接时间格式无效")
def _handover_row_to_dict(row: Optional[BizOutboundHandover]) -> Dict[str, Any]:
if not row:
return {
"handoverUserId": "",
"handoverPerson": "",
"handoverTime": "",
"handoverLocation": "",
"receiverPerson": "",
"remark": "",
}
return {
"handoverUserId": row.handover_user_id or "",
"handoverPerson": row.handover_person or "",
"handoverTime": _fmt_dt(row.handover_time),
"handoverLocation": row.handover_location or "",
"receiverPerson": row.receiver_person or "",
"remark": row.remark or "",
}
def _handover_view_dict(row: Optional[BizOutboundHandover]) -> Dict[str, Any]:
if not row:
return {
"handoverPerson": "",
"handoverTime": "",
"handoverLocation": "",
"receiverPerson": "",
"remark": "",
}
return {
"handoverPerson": row.handover_person or "",
"handoverTime": _fmt_dt(row.handover_time),
"handoverLocation": row.handover_location or "",
"receiverPerson": row.receiver_person or "",
"remark": row.remark or "",
}
def get_handover_by_schedule(
db: Session,
schedule_id: str,
tenant_no: str,
) -> Optional[BizOutboundHandover]:
sid = (schedule_id or "").strip()
if not sid:
return None
return (
db.query(BizOutboundHandover)
.filter(
BizOutboundHandover.infusion_schedule_id == sid,
BizOutboundHandover.tenant_no == tenant_no,
BizOutboundHandover.del_flag == 0,
)
.first()
)
def get_outbound_handover_view(
db: Session,
schedule_id: str,
tenant_no: str,
) -> Dict[str, Any]:
"""供输注计划 detail 聚合的交接只读信息。"""
row = get_handover_by_schedule(db, schedule_id, tenant_no)
return _handover_view_dict(row)
def get_outbound_handover(
db: Session,
schedule_id: str,
tenant_no: str,
) -> Dict[str, Any]:
"""获取出库交接编辑数据(物料 + 交接信息 + 摘要)。"""
detail = schedule_mgmt_svc.get_infusion_schedule_detail(db, schedule_id, tenant_no)
if not detail:
raise HTTPException(status_code=404, detail="输注计划不存在")
outbound_material = orm_material_svc.get_outbound_material(db, schedule_id, tenant_no)
handover_row = get_handover_by_schedule(db, schedule_id, tenant_no)
return {
"scheduleSummary": {
"applicationNo": detail.get("applicationNo") or "",
"patientName": detail.get("patientName") or "",
"infusionTime": detail.get("infusionTime") or "",
},
"outboundMaterial": {
"remark": outbound_material.get("remark") or "",
"cells": outbound_material.get("cells") or [],
"qcMaterials": outbound_material.get("qcMaterials") or [],
"paperMaterials": outbound_material.get("paperMaterials") or [],
},
"handover": _handover_row_to_dict(handover_row),
}
def save_outbound_handover(
db: Session,
schedule_id: str,
*,
outbound_material: Dict[str, Any],
handover: Dict[str, Any],
tenant_no: str,
user_id: str,
create_dept_id: str = "",
) -> Dict[str, Any]:
"""保存出库物料台账 + 出库交接(单事务,调用方 commit)。"""
detail = schedule_mgmt_svc.get_infusion_schedule_detail(db, schedule_id, tenant_no)
if not detail:
raise HTTPException(status_code=404, detail="输注计划不存在")
handover_user_id = (handover.get("handoverUserId") or handover.get("handover_user_id") or "").strip()
receiver_person = (handover.get("receiverPerson") or handover.get("receiver_person") or "").strip()
handover_location = (handover.get("handoverLocation") or handover.get("handover_location") or "").strip()
handover_remark = (handover.get("remark") or "").strip()
handover_time_raw = handover.get("handoverTime") or handover.get("handover_time") or ""
if not handover_user_id:
raise HTTPException(status_code=400, detail="交接人不能为空")
if not receiver_person:
raise HTTPException(status_code=400, detail="接收人不能为空")
sys_user = (
db.query(SysUser)
.filter(
SysUser.id == handover_user_id,
SysUser.del_flag == 0,
)
.first()
)
if not sys_user:
raise HTTPException(status_code=400, detail="交接人用户不存在或已删除")
handover_time = _parse_handover_time(str(handover_time_raw))
handover_person = (sys_user.nick_name or sys_user.user_no or "").strip()
if not handover_person:
handover_person = handover_user_id
om = outbound_material or {}
cells = om.get("cells") or []
qc_materials = om.get("qcMaterials") or om.get("qc_materials") or []
paper_materials = om.get("paperMaterials") or om.get("paper_materials") or []
material_remark = om.get("remark")
# 读取保存前台账,用于回滚上次出库交接的库存/状态变更
previous_material = orm_material_svc.get_outbound_material(db, schedule_id, tenant_no)
previous_cell_ids = [
(c.get("cellProductId") or c.get("cell_product_id") or "").strip()
for c in (previous_material.get("cells") or [])
]
had_previous_handover = get_handover_by_schedule(db, schedule_id, tenant_no) is not None
handover_inv_svc.revert_handover_inventory(
db,
schedule_id,
cell_product_ids=previous_cell_ids if had_previous_handover else [],
tenant_no=tenant_no,
user_id=user_id,
)
orm_material_svc.save_outbound_material(
db,
schedule_id,
paper_attachments=None,
paper_materials=paper_materials,
remark=material_remark,
cells=cells,
qc_materials=qc_materials,
tenant_no=tenant_no,
user_id=user_id,
create_dept_id=create_dept_id,
)
handover_inv_svc.apply_handover_inventory(
db,
schedule_id,
cells=cells,
qc_materials=qc_materials,
tenant_no=tenant_no,
user_id=user_id,
create_dept_id=create_dept_id,
receiver_person=receiver_person,
)
now = datetime.now()
row = get_handover_by_schedule(db, schedule_id, tenant_no)
if not row:
row = BizOutboundHandover(
id=generate_uuid(),
infusion_schedule_id=schedule_id,
tenant_no=tenant_no,
order_num=0,
create_by=user_id,
create_dept_id=create_dept_id or "",
create_time=now,
del_flag=0,
)
db.add(row)
db.flush()
else:
row.update_by = user_id
row.update_time = now
row.handover_user_id = handover_user_id
row.handover_person = handover_person
row.handover_time = handover_time
row.handover_location = handover_location or None
row.receiver_person = receiver_person
row.remark = handover_remark or None
db.add(row)
db.flush()
return get_outbound_handover(db, schedule_id, tenant_no)
@@ -0,0 +1,307 @@
"""输注计划出库交接 — 细胞产品状态与质检物料库存联动。"""
from __future__ import annotations
from datetime import datetime
from decimal import Decimal
from typing import Any, Dict, Iterable, List, Optional, Set
from fastapi import HTTPException
from sqlalchemy.orm import Session
from app.core.utils import generate_uuid
from app.crud import storage_occupancy as occupancy_svc
from app.models.models import BizCellProduct, BizStorageSlotOccupancy
from app.models.qc_material import BizQcMaterial, BizQcMaterialUsage
# 出库交接后细胞产品目标状态(已售卖/已出库)
HANDOVER_CELL_OUT_STATUS = "sold"
HANDOVER_QC_SOURCE_TYPE = "outbound_handover"
def _handover_usage_remark(schedule_id: str) -> str:
return f"输注计划出库交接;scheduleId={schedule_id}"
def _handover_usage_remark_prefix(schedule_id: str) -> str:
return f"scheduleId={schedule_id}"
def _remove_cell_occupancy_no_commit(
db: Session,
item_id: str,
*,
user_id: Optional[str] = None,
) -> None:
"""按细胞产品 ID 释放库位占用(不 commit)。"""
obj = (
db.query(BizStorageSlotOccupancy)
.filter(
BizStorageSlotOccupancy.item_type == "cell_product",
BizStorageSlotOccupancy.item_id == item_id,
BizStorageSlotOccupancy.occupancy_status == "stored",
BizStorageSlotOccupancy.del_flag == 0,
)
.first()
)
if not obj:
return
now = datetime.now()
obj.occupancy_status = "removed"
obj.removed_at = now
obj.update_by = user_id
obj.update_time = now
db.add(obj)
db.flush()
occupancy_svc._refresh_slot_cache(db, obj.slot_id)
def _restore_cell_occupancy_no_commit(
db: Session,
product: BizCellProduct,
*,
tenant_no: str,
user_id: Optional[str] = None,
) -> None:
"""出库交接回滚时恢复库位占用(不 commit)。"""
slot_id = (product.storage_slot_id or "").strip()
if not slot_id:
return
existing = (
db.query(BizStorageSlotOccupancy)
.filter(
BizStorageSlotOccupancy.item_type == "cell_product",
BizStorageSlotOccupancy.item_id == product.id,
BizStorageSlotOccupancy.occupancy_status == "stored",
BizStorageSlotOccupancy.del_flag == 0,
)
.first()
)
if existing:
return
now = datetime.now()
db.add(
BizStorageSlotOccupancy(
id=generate_uuid(),
slot_id=slot_id,
item_type="cell_product",
item_id=product.id,
item_code=(product.product_code or "").strip() or None,
item_name=(product.product_name or "").strip() or None,
item_source="outbound_handover_revert",
stored_at=now,
removed_at=None,
occupancy_status="stored",
tenant_no=tenant_no,
order_num=0,
remark="出库交接回滚恢复占用",
create_by=user_id,
create_dept_id=product.create_dept_id or "",
create_time=now,
update_by=user_id,
update_time=now,
del_flag=0,
)
)
db.flush()
occupancy_svc._refresh_slot_cache(db, slot_id)
def _get_cell_product_locked(
db: Session, cell_product_id: str, tenant_no: str
) -> BizCellProduct:
product = (
db.query(BizCellProduct)
.with_for_update()
.filter(
BizCellProduct.id == cell_product_id,
BizCellProduct.tenant_no == tenant_no,
BizCellProduct.del_flag == 0,
)
.first()
)
if not product:
raise HTTPException(
status_code=400,
detail=f"细胞产品不存在或已删除(ID: {cell_product_id})",
)
return product
def revert_handover_inventory(
db: Session,
schedule_id: str,
*,
cell_product_ids: Iterable[str],
tenant_no: str,
user_id: Optional[str] = None,
) -> None:
"""回滚本输注计划上次出库交接产生的库存/状态变更(不 commit)。"""
sid = (schedule_id or "").strip()
if not sid:
return
remark_prefix = _handover_usage_remark_prefix(sid)
usage_rows = (
db.query(BizQcMaterialUsage)
.filter(
BizQcMaterialUsage.tenant_no == tenant_no,
BizQcMaterialUsage.del_flag == 0,
BizQcMaterialUsage.source_type == HANDOVER_QC_SOURCE_TYPE,
BizQcMaterialUsage.change_type == "use",
BizQcMaterialUsage.remark.like(f"%{remark_prefix}%"),
)
.all()
)
now = datetime.now()
for usage in usage_rows:
restore_qty = abs(usage.change_qty) if usage.change_qty is not None else Decimal("0")
if restore_qty > 0:
material = (
db.query(BizQcMaterial)
.with_for_update()
.filter(
BizQcMaterial.id == usage.material_id,
BizQcMaterial.tenant_no == tenant_no,
BizQcMaterial.del_flag == 0,
)
.first()
)
if material:
material.stock_qty = (material.stock_qty or Decimal("0")) + restore_qty
material.update_by = user_id
material.update_time = now
db.add(material)
usage.del_flag = 1
usage.update_by = user_id
usage.update_time = now
db.add(usage)
seen: Set[str] = set()
for raw_id in cell_product_ids:
cp_id = (raw_id or "").strip()
if not cp_id or cp_id in seen:
continue
seen.add(cp_id)
product = _get_cell_product_locked(db, cp_id, tenant_no)
current = (product.product_status or "frozen").strip()
if current != HANDOVER_CELL_OUT_STATUS:
continue
product.product_status = "frozen"
product.update_by = user_id
product.update_time = now
db.add(product)
_restore_cell_occupancy_no_commit(
db, product, tenant_no=tenant_no, user_id=user_id
)
db.flush()
def apply_handover_inventory(
db: Session,
schedule_id: str,
*,
cells: List[Dict[str, Any]],
qc_materials: List[Dict[str, Any]],
tenant_no: str,
user_id: Optional[str] = None,
create_dept_id: str = "",
receiver_person: str = "",
) -> None:
"""应用出库交接:细胞产品出库 + 质检物料扣减(不 commit)。"""
sid = (schedule_id or "").strip()
usage_remark = _handover_usage_remark(sid)
receiver = (receiver_person or "").strip() or None
now = datetime.now()
for item in cells or []:
cp_id = (item.get("cellProductId") or item.get("cell_product_id") or "").strip()
if not cp_id:
continue
product = _get_cell_product_locked(db, cp_id, tenant_no)
current = (product.product_status or "frozen").strip()
if current != "frozen":
label = product.product_code or product.product_name or cp_id
raise HTTPException(
status_code=400,
detail=(
f"细胞产品「{label}」当前状态不可出库交接"
f"(仅「已冻存」可出库,当前为 {current or '未知'})"
),
)
product.product_status = HANDOVER_CELL_OUT_STATUS
product.update_by = user_id
product.update_time = now
db.add(product)
_remove_cell_occupancy_no_commit(db, cp_id, user_id=user_id)
for item in qc_materials or []:
mid = (item.get("materialId") or item.get("material_id") or "").strip()
qty_raw = item.get("qty")
if not mid:
raise HTTPException(status_code=400, detail="质检物料ID不能为空")
try:
qty_dec = Decimal(str(qty_raw))
except Exception:
raise HTTPException(status_code=400, detail="物料用量格式无效")
if qty_dec <= 0:
raise HTTPException(status_code=400, detail="物料用量必须大于0")
material = (
db.query(BizQcMaterial)
.with_for_update()
.filter(
BizQcMaterial.id == mid,
BizQcMaterial.tenant_no == tenant_no,
BizQcMaterial.del_flag == 0,
BizQcMaterial.status == "1",
)
.first()
)
if not material:
raise HTTPException(
status_code=400,
detail=f"质检物料不存在或已停用(ID: {mid})",
)
stock_before = material.stock_qty if material.stock_qty is not None else Decimal("0")
if stock_before < qty_dec:
raise HTTPException(
status_code=400,
detail=(
f"物料「{material.material_name}」库存不足,"
f"当前库存 {stock_before},需出库 {qty_dec}"
),
)
stock_after = stock_before - qty_dec
material.stock_qty = stock_after
material.update_by = user_id
material.update_time = now
db.add(material)
line_remark = (item.get("remark") or "").strip()
db.add(
BizQcMaterialUsage(
id=generate_uuid(),
material_id=mid,
material_code=material.material_code,
material_name=material.material_name,
change_type="use",
change_qty=-qty_dec,
stock_after=stock_after,
source_type=HANDOVER_QC_SOURCE_TYPE,
tenant_no=tenant_no,
receiver=receiver,
purpose="输注计划出库交接",
remark=usage_remark if not line_remark else f"{usage_remark};{line_remark}",
create_by=user_id,
create_dept_id=create_dept_id or "",
create_time=now,
update_by=user_id,
update_time=now,
del_flag=0,
)
)
db.flush()
@@ -0,0 +1,431 @@
"""出库放行审核 · 出库物料准备(台账 CRUD)"""
from __future__ import annotations
from datetime import datetime
from decimal import Decimal
from typing import Any, Dict, List, Optional
from fastapi import HTTPException
from sqlalchemy.orm import Session
from app.core.utils import generate_uuid
from app.crud import cell_product as cell_product_svc
from app.models.models import (
BizCellProduct,
BizOutboundReleaseCell,
BizOutboundReleaseMaterial,
BizOutboundReleasePaper,
BizOutboundReleaseQcMaterial,
BizPilotInfusionSchedule,
)
from app.models.qc_material import BizQcMaterial
def _fmt_dt(t: Optional[datetime]) -> str:
return t.strftime("%Y-%m-%d %H:%M:%S") if t else ""
def _cell_row_to_dict(row: BizOutboundReleaseCell) -> Dict[str, Any]:
return {
"id": row.id,
"materialId": row.material_id or "",
"infusionScheduleId": row.infusion_schedule_id or "",
"cellProductId": row.cell_product_id or "",
"productCode": row.product_code or "",
"productName": row.product_name or "",
"productTypeName": row.product_type_name or "",
"specName": row.spec_name or "",
"passage": row.passage or "",
"batchNo": row.batch_no or "",
"storageSlotName": row.storage_slot_name or "",
"productStatus": row.product_status or "",
"remark": row.remark or "",
"orderNum": row.order_num if row.order_num is not None else 0,
}
def _qc_material_row_to_dict(row: BizOutboundReleaseQcMaterial) -> Dict[str, Any]:
return {
"id": row.id,
"materialId": row.material_id or "",
"infusionScheduleId": row.infusion_schedule_id or "",
"qcMaterialId": row.qc_material_id or "",
"qty": float(row.qty) if row.qty is not None else 0,
"materialCode": row.material_code or "",
"materialName": row.material_name or "",
"specModel": row.spec_model or "",
"unit": row.unit or "",
"remark": row.remark or "",
"orderNum": row.order_num if row.order_num is not None else 0,
}
def _paper_row_to_dict(row: BizOutboundReleasePaper) -> Dict[str, Any]:
return {
"id": row.id,
"materialId": row.material_id or "",
"infusionScheduleId": row.infusion_schedule_id or "",
"paperName": row.paper_name or "",
"copies": row.copies if row.copies is not None else 1,
"attachmentUrl": row.attachment_url or "",
"remark": row.remark or "",
"orderNum": row.order_num if row.order_num is not None else 0,
}
def _legacy_paper_rows_from_attachments(paper_attachments: Optional[str]) -> List[Dict[str, Any]]:
urls = (paper_attachments or "").strip()
if not urls:
return []
rows: List[Dict[str, Any]] = []
for idx, file_url in enumerate([u.strip() for u in urls.split(",") if u.strip()]):
file_name = file_url.split("/").pop() or "附件"
rows.append(
{
"id": "",
"materialId": "",
"infusionScheduleId": "",
"paperName": file_name,
"copies": 1,
"attachmentUrl": file_url,
"remark": "",
"orderNum": idx + 1,
}
)
return rows
def _material_header_to_dict(
header: Optional[BizOutboundReleaseMaterial],
cells: List[Dict[str, Any]],
qc_materials: List[Dict[str, Any]],
paper_materials: List[Dict[str, Any]],
) -> Dict[str, Any]:
if not header:
return {
"id": "",
"infusionScheduleId": "",
"paperAttachments": "",
"paperMaterials": paper_materials,
"remark": "",
"cells": cells,
"qcMaterials": qc_materials,
"createTime": "",
"updateTime": "",
}
return {
"id": header.id,
"infusionScheduleId": header.infusion_schedule_id or "",
"paperAttachments": header.paper_attachments or "",
"paperMaterials": paper_materials,
"remark": header.remark or "",
"cells": cells,
"qcMaterials": qc_materials,
"createTime": _fmt_dt(header.create_time),
"updateTime": _fmt_dt(header.update_time),
}
def _get_schedule(db: Session, schedule_id: str, tenant_no: str) -> Optional[BizPilotInfusionSchedule]:
sid = (schedule_id or "").strip()
if not sid:
return None
return (
db.query(BizPilotInfusionSchedule)
.filter(
BizPilotInfusionSchedule.id == sid,
BizPilotInfusionSchedule.tenant_no == tenant_no,
BizPilotInfusionSchedule.del_flag == 0,
)
.first()
)
def get_outbound_material(
db: Session,
schedule_id: str,
tenant_no: str,
) -> Dict[str, Any]:
"""获取输注计划的出库物料准备(台账)。"""
schedule = _get_schedule(db, schedule_id, tenant_no)
if not schedule:
raise HTTPException(status_code=404, detail="输注计划不存在")
header = (
db.query(BizOutboundReleaseMaterial)
.filter(
BizOutboundReleaseMaterial.infusion_schedule_id == schedule_id,
BizOutboundReleaseMaterial.tenant_no == tenant_no,
BizOutboundReleaseMaterial.del_flag == 0,
)
.first()
)
cell_rows = (
db.query(BizOutboundReleaseCell)
.filter(
BizOutboundReleaseCell.infusion_schedule_id == schedule_id,
BizOutboundReleaseCell.tenant_no == tenant_no,
BizOutboundReleaseCell.del_flag == 0,
)
.order_by(
BizOutboundReleaseCell.order_num.asc(),
BizOutboundReleaseCell.create_time.asc(),
)
.all()
)
qc_rows = (
db.query(BizOutboundReleaseQcMaterial)
.filter(
BizOutboundReleaseQcMaterial.infusion_schedule_id == schedule_id,
BizOutboundReleaseQcMaterial.tenant_no == tenant_no,
BizOutboundReleaseQcMaterial.del_flag == 0,
)
.order_by(
BizOutboundReleaseQcMaterial.order_num.asc(),
BizOutboundReleaseQcMaterial.create_time.asc(),
)
.all()
)
paper_rows = (
db.query(BizOutboundReleasePaper)
.filter(
BizOutboundReleasePaper.infusion_schedule_id == schedule_id,
BizOutboundReleasePaper.tenant_no == tenant_no,
BizOutboundReleasePaper.del_flag == 0,
)
.order_by(
BizOutboundReleasePaper.order_num.asc(),
BizOutboundReleasePaper.create_time.asc(),
)
.all()
)
paper_materials = [_paper_row_to_dict(r) for r in paper_rows]
if not paper_materials and header and (header.paper_attachments or "").strip():
paper_materials = _legacy_paper_rows_from_attachments(header.paper_attachments)
return _material_header_to_dict(
header,
[_cell_row_to_dict(r) for r in cell_rows],
[_qc_material_row_to_dict(r) for r in qc_rows],
paper_materials,
)
def save_outbound_material(
db: Session,
schedule_id: str,
*,
paper_attachments: Optional[str],
paper_materials: List[Dict[str, Any]],
remark: Optional[str],
cells: List[Dict[str, Any]],
qc_materials: List[Dict[str, Any]],
tenant_no: str,
user_id: str,
create_dept_id: str = "",
) -> Dict[str, Any]:
"""全量保存出库物料准备(台账,不联动库存)。"""
schedule = _get_schedule(db, schedule_id, tenant_no)
if not schedule:
raise HTTPException(status_code=404, detail="输注计划不存在")
cell_ids = [
(it.get("cellProductId") or it.get("cell_product_id") or "").strip()
for it in (cells or [])
]
qc_ids = [
(it.get("materialId") or it.get("material_id") or "").strip()
for it in (qc_materials or [])
]
if len([x for x in cell_ids if x]) != len(set(x for x in cell_ids if x)):
raise HTTPException(status_code=400, detail="同一输注计划中不能重复添加相同细胞产品")
if len([x for x in qc_ids if x]) != len(set(x for x in qc_ids if x)):
raise HTTPException(status_code=400, detail="同一输注计划中不能重复添加相同质检物料")
now = datetime.now()
header = (
db.query(BizOutboundReleaseMaterial)
.filter(
BizOutboundReleaseMaterial.infusion_schedule_id == schedule_id,
BizOutboundReleaseMaterial.tenant_no == tenant_no,
BizOutboundReleaseMaterial.del_flag == 0,
)
.first()
)
if not header:
header = BizOutboundReleaseMaterial(
id=generate_uuid(),
infusion_schedule_id=schedule_id,
tenant_no=tenant_no,
order_num=0,
create_by=user_id,
create_dept_id=create_dept_id or "",
create_time=now,
del_flag=0,
)
db.add(header)
db.flush()
else:
header.update_by = user_id
header.update_time = now
header.paper_attachments = None
header.remark = (remark or "").strip() or None
db.add(header)
db.query(BizOutboundReleaseCell).filter(
BizOutboundReleaseCell.infusion_schedule_id == schedule_id,
BizOutboundReleaseCell.tenant_no == tenant_no,
BizOutboundReleaseCell.del_flag == 0,
).update({"del_flag": 1, "update_by": user_id, "update_time": now}, synchronize_session=False)
db.query(BizOutboundReleaseQcMaterial).filter(
BizOutboundReleaseQcMaterial.infusion_schedule_id == schedule_id,
BizOutboundReleaseQcMaterial.tenant_no == tenant_no,
BizOutboundReleaseQcMaterial.del_flag == 0,
).update({"del_flag": 1, "update_by": user_id, "update_time": now}, synchronize_session=False)
db.query(BizOutboundReleasePaper).filter(
BizOutboundReleasePaper.infusion_schedule_id == schedule_id,
BizOutboundReleasePaper.tenant_no == tenant_no,
BizOutboundReleasePaper.del_flag == 0,
).update({"del_flag": 1, "update_by": user_id, "update_time": now}, synchronize_session=False)
db.flush()
for idx, item in enumerate(cells or []):
cp_id = (item.get("cellProductId") or item.get("cell_product_id") or "").strip()
if not cp_id:
raise HTTPException(status_code=400, detail="细胞产品ID不能为空")
product = (
db.query(BizCellProduct)
.filter(
BizCellProduct.id == cp_id,
BizCellProduct.tenant_no == tenant_no,
BizCellProduct.del_flag == 0,
)
.first()
)
if not product:
raise HTTPException(status_code=400, detail=f"细胞产品不存在或已删除(ID: {cp_id})")
enriched = cell_product_svc._enrich_product_dicts(
db,
tenant_no,
[cell_product_svc._row_to_dict(product)],
)[0]
db.add(
BizOutboundReleaseCell(
id=generate_uuid(),
material_id=header.id,
infusion_schedule_id=schedule_id,
cell_product_id=cp_id,
product_code=enriched.get("productCode") or "",
product_name=enriched.get("productName") or "",
product_type_name=enriched.get("productTypeName") or "",
spec_name=enriched.get("specName") or "",
passage=enriched.get("passage") or "",
batch_no=enriched.get("batchNo") or "",
storage_slot_name=enriched.get("storageSlotName") or "",
product_status=enriched.get("productStatus") or "",
tenant_no=tenant_no,
order_num=idx + 1,
remark=(item.get("remark") or "").strip() or None,
create_by=user_id,
create_dept_id=create_dept_id or "",
create_time=now,
update_by=user_id,
update_time=now,
del_flag=0,
)
)
for idx, item in enumerate(qc_materials or []):
mid = (item.get("materialId") or item.get("material_id") or "").strip()
qty_raw = item.get("qty")
if not mid:
raise HTTPException(status_code=400, detail="质检物料ID不能为空")
try:
qty_dec = Decimal(str(qty_raw))
except Exception:
raise HTTPException(status_code=400, detail="物料用量格式无效")
if qty_dec <= 0:
raise HTTPException(status_code=400, detail="物料用量必须大于0")
material = (
db.query(BizQcMaterial)
.filter(
BizQcMaterial.id == mid,
BizQcMaterial.tenant_no == tenant_no,
BizQcMaterial.del_flag == 0,
)
.first()
)
if not material:
raise HTTPException(status_code=400, detail=f"质检物料不存在或已删除(ID: {mid})")
db.add(
BizOutboundReleaseQcMaterial(
id=generate_uuid(),
material_id=header.id,
infusion_schedule_id=schedule_id,
qc_material_id=mid,
qty=qty_dec,
material_code=material.material_code or "",
material_name=material.material_name or "",
spec_model=material.spec_model or "",
unit=material.unit or "",
tenant_no=tenant_no,
order_num=idx + 1,
remark=(item.get("remark") or "").strip() or None,
create_by=user_id,
create_dept_id=create_dept_id or "",
create_time=now,
update_by=user_id,
update_time=now,
del_flag=0,
)
)
for idx, item in enumerate(paper_materials or []):
paper_name = (item.get("paperName") or item.get("paper_name") or "").strip()
attachment_url = (item.get("attachmentUrl") or item.get("attachment_url") or "").strip()
copies_raw = item.get("copies")
if not paper_name:
raise HTTPException(status_code=400, detail="纸质材料名称不能为空")
if not attachment_url:
raise HTTPException(status_code=400, detail="纸质材料附件不能为空")
try:
copies = int(copies_raw)
except Exception:
raise HTTPException(status_code=400, detail="纸质材料份数格式无效")
if copies <= 0:
raise HTTPException(status_code=400, detail="纸质材料份数必须大于0")
db.add(
BizOutboundReleasePaper(
id=generate_uuid(),
material_id=header.id,
infusion_schedule_id=schedule_id,
paper_name=paper_name,
copies=copies,
attachment_url=attachment_url,
tenant_no=tenant_no,
order_num=idx + 1,
remark=(item.get("remark") or "").strip() or None,
create_by=user_id,
create_dept_id=create_dept_id or "",
create_time=now,
update_by=user_id,
update_time=now,
del_flag=0,
)
)
db.flush()
return get_outbound_material(db, schedule_id, tenant_no)
+555 -85
View File
@@ -1,149 +1,619 @@
"""出库放行审核 CRUD"""
from __future__ import annotations
import math
from datetime import datetime
from typing import Any, Dict, List, Optional
from sqlalchemy import and_
from sqlalchemy import func, or_
from sqlalchemy.orm import Session
from app.core.utils import generate_uuid
from app.models.models import BizOutboundReleaseReview
from app.models.models import (
BizOutboundReleaseReview,
BizPilotApplication,
BizPilotInfusionPlan,
BizPilotInfusionSchedule,
BizPilotPatient,
BizProductionTask,
BizProductionWorkOrder,
BizQcTask,
BizQcWorkOrder,
SysUser,
)
from app.models.qc_param import BizQcTaskResult
_REVIEW_CONCLUSION_LABELS = {"tg": "通过", "btg": "不通过"}
_SCHEDULE_STATUS_LABELS = {
"dsc": "待生产",
"ysc": "已生产",
"yjf": "已交付",
"yqx": "已取消",
}
_QC_STATUS_LABELS = {
"dzc": "待质检",
"yzj": "已质检",
"yqx": "已取消",
}
_BIZ_TYPE_LABELS = {
"pilot_service": "中试服务",
"clinical_application": "临床应用",
}
# ────────────────────────────────────────────
# Helpers: _row_to_dict
# Helpers
# ────────────────────────────────────────────
def _fmt_dt(t: Optional[datetime]) -> str:
return t.strftime("%Y-%m-%d %H:%M:%S") if t else ""
def _total_pages(total: int, page_size: int) -> int:
if total <= 0:
return 0
return int(math.ceil(total / float(page_size)))
def _get_user_name(db: Session, user_id: str) -> str:
u = db.query(SysUser).filter(SysUser.id == user_id).first()
return (u.nick_name or "") if u else ""
def _resolve_schedule_biz_type(
app: Optional[BizPilotApplication],
qwo: Optional[BizQcWorkOrder],
pwo: Optional[BizProductionWorkOrder],
) -> str:
"""输注计划业务类型:优先出库工单的 biz_type,否则关联中试申请单视为中试服务。"""
if qwo and (qwo.biz_type or "").strip():
return (qwo.biz_type or "").strip()
if pwo and (pwo.biz_type or "").strip():
return (pwo.biz_type or "").strip()
if app:
return "pilot_service"
return ""
def _row_to_dict(row) -> Dict[str, Any]:
"""将 BizOutboundReleaseReview ORM 对象转为前端字典。"""
return {
"id": row.id,
"infusionScheduleId": row.infusion_schedule_id or "",
"productionWorkOrderId": row.production_work_order_id or "",
"qcWorkOrderId": row.qc_work_order_id or "",
"reviewConclusion": row.review_conclusion or "",
"reviewConclusionLabel": _REVIEW_CONCLUSION_LABELS.get(
row.review_conclusion or "", row.review_conclusion or ""
),
"reviewerUserId": row.reviewer_user_id or "",
"reviewTime": row.review_time.strftime("%Y-%m-%d %H:%M:%S") if row.review_time else "",
"reviewByName": row.review_by_name or "",
"reviewAttachments": row.review_attachments or "",
"reviewRemark": row.review_remark or "",
"reviewTime": _fmt_dt(row.review_time),
"tenantNo": row.tenant_no or "",
"orderNum": row.order_num if row.order_num is not None else 0,
"remark": row.remark or "",
"createBy": row.create_by or "",
"createTime": row.create_time.strftime("%Y-%m-%d %H:%M:%S") if row.create_time else "",
"createTime": _fmt_dt(row.create_time),
"updateBy": row.update_by or "",
"updateTime": row.update_time.strftime("%Y-%m-%d %H:%M:%S") if row.update_time else "",
"updateTime": _fmt_dt(row.update_time),
}
# ────────────────────────────────────────────
# CRUD
# Paginated list
# ────────────────────────────────────────────
def create_release_review(
def list_reviews_paginated(
db: Session,
*,
schedule_id: str,
tenant_no: str,
user_id: str,
create_dept_id: str,
keyword: Optional[str] = None,
review_conclusion: Optional[str] = None,
schedule_status: Optional[str] = None,
qc_status: Optional[str] = None,
page: int = 1,
page_size: int = 10,
user_info=None,
) -> Dict[str, Any]:
now = datetime.now()
row = BizOutboundReleaseReview(
id=generate_uuid(),
infusion_schedule_id=schedule_id,
production_work_order_id="",
qc_work_order_id="",
review_conclusion="",
reviewer_user_id=user_id,
review_time=now,
review_remark="",
tenant_no=tenant_no,
order_num=0,
remark="",
create_by=user_id,
create_dept_id=create_dept_id or "",
create_time=now,
update_by=user_id,
update_time=now,
del_flag=0,
"""分页列出出库放行审核数据,以输注计划为主表 LEFT JOIN 审核/生产/质检工单。"""
# ── 基础查询:输注计划 ──
q0 = db.query(BizPilotInfusionSchedule).filter(
BizPilotInfusionSchedule.tenant_no == tenant_no,
BizPilotInfusionSchedule.del_flag == 0,
)
db.add(row)
db.flush()
return _row_to_dict(row)
# ── 关键字过滤(application_no, patient_name)需要子查询 ──
kw = (keyword or "").strip()
if kw:
like = f"%{kw}%"
# 通过 infusion_plan_id 关联 plan → application → patient
plan_ids = (
db.query(BizPilotInfusionPlan.id)
.filter(
BizPilotInfusionPlan.tenant_no == tenant_no,
BizPilotInfusionPlan.del_flag == 0,
)
.subquery()
)
app_ids = (
db.query(BizPilotApplication.id)
.filter(
BizPilotApplication.tenant_no == tenant_no,
BizPilotApplication.del_flag == 0,
or_(
BizPilotApplication.application_no.like(like),
BizPilotApplication.application_name.like(like),
),
)
.subquery()
)
patient_app_ids = (
db.query(BizPilotPatient.pilot_application_id)
.filter(
BizPilotPatient.tenant_no == tenant_no,
BizPilotPatient.del_flag == 0,
BizPilotPatient.patient_name.like(like),
)
.subquery()
)
# 找出满足条件的 infusion_plan_id
matched_plan_ids = (
db.query(BizPilotInfusionPlan.id)
.filter(
BizPilotInfusionPlan.tenant_no == tenant_no,
BizPilotInfusionPlan.del_flag == 0,
or_(
BizPilotInfusionPlan.pilot_application_id.in_(app_ids),
BizPilotInfusionPlan.pilot_application_id.in_(patient_app_ids),
),
)
.subquery()
)
q0 = q0.filter(
BizPilotInfusionSchedule.infusion_plan_id.in_(matched_plan_ids)
)
def list_reviews_by_schedule(
db: Session, schedule_id: str, tenant_no: str
) -> List[Dict[str, Any]]:
rows = (
db.query(BizOutboundReleaseReview)
.filter(
and_(
BizOutboundReleaseReview.infusion_schedule_id == schedule_id,
# ── schedule_status 过滤 ──
ss = (schedule_status or "").strip()
if ss:
q0 = q0.filter(BizPilotInfusionSchedule.schedule_status == ss)
# ── qc_status 过滤 ──
qs = (qc_status or "").strip()
if qs:
q0 = q0.filter(BizPilotInfusionSchedule.qc_status == qs)
# ── review_conclusion 过滤 ──
rc = (review_conclusion or "").strip()
if rc == "pending":
# 待审核:不存在审核记录
reviewed_schedule_ids = (
db.query(BizOutboundReleaseReview.infusion_schedule_id)
.filter(
BizOutboundReleaseReview.tenant_no == tenant_no,
BizOutboundReleaseReview.del_flag == 0,
BizOutboundReleaseReview.review_conclusion != "",
)
.subquery()
)
.order_by(BizOutboundReleaseReview.create_time.desc())
q0 = q0.filter(
~BizPilotInfusionSchedule.id.in_(reviewed_schedule_ids)
)
elif rc:
# 有具体结论
reviewed_schedule_ids = (
db.query(BizOutboundReleaseReview.infusion_schedule_id)
.filter(
BizOutboundReleaseReview.tenant_no == tenant_no,
BizOutboundReleaseReview.del_flag == 0,
BizOutboundReleaseReview.review_conclusion == rc,
)
.subquery()
)
q0 = q0.filter(
BizPilotInfusionSchedule.id.in_(reviewed_schedule_ids)
)
# ── 数据权限 ──
if user_info:
from app.core.data_scope import apply_data_scope
q0 = apply_data_scope(q0, BizPilotInfusionSchedule, user_info, db, tenant_no)
# ── 分页 ──
total = (
q0.order_by(None)
.with_entities(func.count(BizPilotInfusionSchedule.id))
.scalar()
or 0
)
page = max(1, page)
page_size = min(max(1, page_size), 100)
schedules = (
q0.order_by(BizPilotInfusionSchedule.create_time.desc())
.offset((page - 1) * page_size)
.limit(page_size)
.all()
)
return [_row_to_dict(r) for r in rows]
schedule_ids = [s.id for s in schedules]
# ── 批量加载关联数据 ──
# 审核记录
review_map: Dict[str, BizOutboundReleaseReview] = {}
if schedule_ids:
for rev in (
db.query(BizOutboundReleaseReview)
.filter(
BizOutboundReleaseReview.infusion_schedule_id.in_(schedule_ids),
BizOutboundReleaseReview.tenant_no == tenant_no,
BizOutboundReleaseReview.del_flag == 0,
)
.all()
):
review_map[rev.infusion_schedule_id] = rev
# 生产工单(出库类型)
production_map: Dict[str, BizProductionWorkOrder] = {}
if schedule_ids:
for pwo in (
db.query(BizProductionWorkOrder)
.filter(
BizProductionWorkOrder.infusion_schedule_id.in_(schedule_ids),
BizProductionWorkOrder.work_order_type == "outbound",
BizProductionWorkOrder.biz_type.in_(
list(_BIZ_TYPE_LABELS.keys())
),
BizProductionWorkOrder.tenant_no == tenant_no,
BizProductionWorkOrder.del_flag == 0,
)
.all()
):
production_map[pwo.infusion_schedule_id] = pwo
# 质检工单(出库类型)
qc_map: Dict[str, BizQcWorkOrder] = {}
if schedule_ids:
for qwo in (
db.query(BizQcWorkOrder)
.filter(
BizQcWorkOrder.infusion_schedule_id.in_(schedule_ids),
BizQcWorkOrder.qc_biz_type == "outbound",
BizQcWorkOrder.biz_type.in_(list(_BIZ_TYPE_LABELS.keys())),
BizQcWorkOrder.tenant_no == tenant_no,
BizQcWorkOrder.del_flag == 0,
)
.all()
):
qc_map[qwo.infusion_schedule_id] = qwo
# 输注计划 → 申请单 → 患者
plan_ids_for_schedules = {
s.id: s.infusion_plan_id for s in schedules if s.infusion_plan_id
}
unique_plan_ids = list(set(plan_ids_for_schedules.values()))
plan_map: Dict[str, BizPilotInfusionPlan] = {}
if unique_plan_ids:
for plan in (
db.query(BizPilotInfusionPlan)
.filter(
BizPilotInfusionPlan.id.in_(unique_plan_ids),
BizPilotInfusionPlan.tenant_no == tenant_no,
BizPilotInfusionPlan.del_flag == 0,
)
.all()
):
plan_map[plan.id] = plan
unique_app_ids = list(
{p.pilot_application_id for p in plan_map.values() if p.pilot_application_id}
)
app_map: Dict[str, BizPilotApplication] = {}
if unique_app_ids:
for app in (
db.query(BizPilotApplication)
.filter(
BizPilotApplication.id.in_(unique_app_ids),
BizPilotApplication.tenant_no == tenant_no,
BizPilotApplication.del_flag == 0,
)
.all()
):
app_map[app.id] = app
# 患者
patient_map: Dict[str, BizPilotPatient] = {}
if unique_app_ids:
for patient in (
db.query(BizPilotPatient)
.filter(
BizPilotPatient.pilot_application_id.in_(unique_app_ids),
BizPilotPatient.tenant_no == tenant_no,
BizPilotPatient.del_flag == 0,
)
.all()
):
patient_map[patient.pilot_application_id] = patient
# ── 组装列表项 ──
items: List[Dict[str, Any]] = []
for s in schedules:
plan = plan_map.get(s.infusion_plan_id)
app = app_map.get(plan.pilot_application_id) if plan else None
patient = patient_map.get(app.id) if app else None
rev = review_map.get(s.id)
pwo = production_map.get(s.id)
qwo = qc_map.get(s.id)
biz_type = _resolve_schedule_biz_type(app, qwo, pwo)
item: Dict[str, Any] = {
"scheduleId": s.id,
"bizType": biz_type,
"bizTypeLabel": _BIZ_TYPE_LABELS.get(biz_type, biz_type),
"applicationNo": (app.application_no or "") if app else "",
"applicationName": (app.application_name or "") if app else "",
"channelName": (app.channel_name or "") if app else "",
"patientName": (patient.patient_name or "") if patient else "",
"cellType": s.cell_type or (plan.cell_type or "") if plan else (s.cell_type or ""),
"specText": s.spec_text or (plan.spec_text or "") if plan else (s.spec_text or ""),
"infusionTime": _fmt_dt(s.infusion_time),
"scheduleStatus": s.schedule_status or "",
"scheduleStatusLabel": _SCHEDULE_STATUS_LABELS.get(
s.schedule_status or "", s.schedule_status or ""
),
"qcStatus": s.qc_status or "",
"qcStatusLabel": _QC_STATUS_LABELS.get(
s.qc_status or "", s.qc_status or ""
),
"reviewConclusion": "",
"reviewConclusionLabel": "",
"reviewByName": "",
"reviewTime": "",
"reviewRemark": "",
"reviewAttachments": "",
"reviewId": "",
"productionWorkOrderNo": "",
"productionWorkOrderStatus": "",
"qcWorkOrderNo": "",
"qcWorkOrderStatus": "",
}
if rev:
rc_val = rev.review_conclusion or ""
item["reviewConclusion"] = rc_val
item["reviewConclusionLabel"] = _REVIEW_CONCLUSION_LABELS.get(rc_val, rc_val)
item["reviewByName"] = rev.review_by_name or ""
item["reviewTime"] = _fmt_dt(rev.review_time)
item["reviewRemark"] = rev.review_remark or ""
item["reviewAttachments"] = rev.review_attachments or ""
item["reviewId"] = rev.id
else:
item["reviewConclusionLabel"] = "待审核"
if pwo:
item["productionWorkOrderNo"] = pwo.work_order_no or ""
item["productionWorkOrderStatus"] = pwo.work_order_status or ""
if qwo:
item["qcWorkOrderNo"] = qwo.work_order_no or ""
item["qcWorkOrderStatus"] = qwo.work_order_status or ""
items.append(item)
return {
"list": items,
"total": int(total),
"page": page,
"pageSize": page_size,
"totalPages": _total_pages(int(total), page_size),
}
def update_review_conclusion(
# ────────────────────────────────────────────
# Detail aggregation
# ────────────────────────────────────────────
def get_schedule_detail(
db: Session, schedule_id: str, tenant_no: str
) -> Optional[Dict[str, Any]]:
"""按输注计划 ID 聚合出库放行审核详情(中试上下文 + 生产 + 质检 + 审核)。"""
from app.crud.qc_work_order import build_outbound_pilot_context_by_schedule
pilot_context = build_outbound_pilot_context_by_schedule(db, schedule_id, tenant_no)
# ── 生产工单 + 任务 ──
production_info: Dict[str, Any] = {}
pwo = (
db.query(BizProductionWorkOrder)
.filter(
BizProductionWorkOrder.infusion_schedule_id == schedule_id,
BizProductionWorkOrder.work_order_type == "outbound",
BizProductionWorkOrder.biz_type == "pilot_service",
BizProductionWorkOrder.tenant_no == tenant_no,
BizProductionWorkOrder.del_flag == 0,
)
.first()
)
if pwo:
from app.crud.production_work_order import (
_production_info_item,
)
production_info = _production_info_item(db, pwo)
# ── 质检工单 + 任务 + 结果 ──
qc_info: Dict[str, Any] = {}
qwo = (
db.query(BizQcWorkOrder)
.filter(
BizQcWorkOrder.infusion_schedule_id == schedule_id,
BizQcWorkOrder.qc_biz_type == "outbound",
BizQcWorkOrder.biz_type == "pilot_service",
BizQcWorkOrder.tenant_no == tenant_no,
BizQcWorkOrder.del_flag == 0,
)
.first()
)
if qwo:
from app.crud.qc_work_order import _qc_info_item
qc_info = _qc_info_item(db, qwo, tenant_no)
# ── 审核记录 ──
review_info: Dict[str, Any] = {}
rev = (
db.query(BizOutboundReleaseReview)
.filter(
BizOutboundReleaseReview.infusion_schedule_id == schedule_id,
BizOutboundReleaseReview.tenant_no == tenant_no,
BizOutboundReleaseReview.del_flag == 0,
)
.first()
)
if rev:
review_info = _row_to_dict(rev)
outbound_material: Dict[str, Any] = {}
try:
from app.crud import outbound_release_material as orm_svc
outbound_material = orm_svc.get_outbound_material(db, schedule_id, tenant_no)
except Exception:
outbound_material = {}
# 与 OutboundReleaseReviewDetail / 出库质检详情一致:中试字段展平到顶层,勿嵌套 pilotContext
return {
**(pilot_context or {}),
"productionInfo": production_info,
"qcInfo": qc_info,
"reviewInfo": review_info,
"outboundMaterial": outbound_material,
}
# ────────────────────────────────────────────
# Review operations
# ────────────────────────────────────────────
def review_schedule(
db: Session,
review_id: str,
schedule_id: str,
*,
conclusion: str,
remark: str,
remark: Optional[str] = None,
attachments: Optional[str] = None,
tenant_no: str,
user_id: str,
) -> Dict[str, Any]:
row = (
db.query(BizOutboundReleaseReview)
.filter(
and_(
BizOutboundReleaseReview.id == review_id,
BizOutboundReleaseReview.tenant_no == tenant_no,
BizOutboundReleaseReview.del_flag == 0,
)
)
.first()
)
if not row:
raise ValueError("审核记录不存在")
"""对指定输注计划执行出库放行审核(upsert)。"""
now = datetime.now()
row.review_conclusion = conclusion
row.review_remark = remark
row.reviewer_user_id = user_id
row.review_time = now
row.update_by = user_id
row.update_time = now
db.commit()
db.refresh(row)
return _row_to_dict(row)
user_name = _get_user_name(db, user_id)
def delete_release_review(
db: Session, review_id: str, tenant_no: str, user_id: str
) -> None:
row = (
# 查找已有审核记录
rev = (
db.query(BizOutboundReleaseReview)
.filter(
and_(
BizOutboundReleaseReview.id == review_id,
BizOutboundReleaseReview.tenant_no == tenant_no,
BizOutboundReleaseReview.del_flag == 0,
)
BizOutboundReleaseReview.infusion_schedule_id == schedule_id,
BizOutboundReleaseReview.tenant_no == tenant_no,
BizOutboundReleaseReview.del_flag == 0,
)
.first()
)
if not row:
raise ValueError("审核记录不存在")
row.del_flag = 1
row.update_by = user_id
row.update_time = datetime.now()
db.commit()
# 自动填充生产工单 ID
pwo = (
db.query(BizProductionWorkOrder)
.filter(
BizProductionWorkOrder.infusion_schedule_id == schedule_id,
BizProductionWorkOrder.work_order_type == "outbound",
BizProductionWorkOrder.tenant_no == tenant_no,
BizProductionWorkOrder.del_flag == 0,
)
.first()
)
# 自动填充质检工单 ID
qwo = (
db.query(BizQcWorkOrder)
.filter(
BizQcWorkOrder.infusion_schedule_id == schedule_id,
BizQcWorkOrder.qc_biz_type == "outbound",
BizQcWorkOrder.tenant_no == tenant_no,
BizQcWorkOrder.del_flag == 0,
)
.first()
)
if rev:
# update
rev.review_conclusion = conclusion
rev.review_remark = (remark or "").strip() or None
rev.review_attachments = (attachments or "").strip() or None
rev.reviewer_user_id = user_id
rev.review_by_name = user_name
rev.review_time = now
rev.production_work_order_id = pwo.id if pwo else (rev.production_work_order_id or "")
rev.qc_work_order_id = qwo.id if qwo else (rev.qc_work_order_id or "")
rev.update_by = user_id
rev.update_time = now
else:
# create
rev = BizOutboundReleaseReview(
id=generate_uuid(),
infusion_schedule_id=schedule_id,
production_work_order_id=pwo.id if pwo else "",
qc_work_order_id=qwo.id if qwo else "",
review_conclusion=conclusion,
reviewer_user_id=user_id,
review_by_name=user_name,
review_time=now,
review_remark=(remark or "").strip() or None,
review_attachments=(attachments or "").strip() or None,
tenant_no=tenant_no,
order_num=0,
remark="",
create_by=user_id,
create_dept_id="",
create_time=now,
update_by=user_id,
update_time=now,
del_flag=0,
)
db.add(rev)
db.flush()
return _row_to_dict(rev)
def batch_review(
db: Session,
schedule_ids: List[str],
*,
conclusion: str,
remark: Optional[str] = None,
attachments: Optional[str] = None,
tenant_no: str,
user_id: str,
) -> Dict[str, Any]:
"""批量审核多个输注计划。"""
success = 0
fail = 0
for sid in schedule_ids:
try:
review_schedule(
db,
sid,
conclusion=conclusion,
remark=remark,
attachments=attachments,
tenant_no=tenant_no,
user_id=user_id,
)
success += 1
except Exception:
fail += 1
return {"success": success, "fail": fail}
+12
View File
@@ -1496,9 +1496,15 @@ def soft_delete_schedule(
)
.first()
)
row.schedule_status = "yqx"
row.qc_status = "yqx"
if outbound_wo:
outbound_wo.work_order_status = "yzf"
outbound_wo.update_time = now
from app.crud.pilot_outbound_status_sync import sync_schedule_from_production_work_order
sync_schedule_from_production_work_order(db, outbound_wo)
for qc_wo in (
db.query(BizQcWorkOrder)
@@ -1511,6 +1517,9 @@ def soft_delete_schedule(
):
qc_wo.work_order_status = "yzf"
qc_wo.update_time = now
from app.crud.pilot_outbound_status_sync import sync_schedule_from_qc_work_order
sync_schedule_from_qc_work_order(db, qc_wo)
db.query(BizPilotInfusionScheduleProduct).filter(
BizPilotInfusionScheduleProduct.infusion_schedule_id == schedule_id,
@@ -1544,6 +1553,9 @@ def mark_schedule_complete(
row.schedule_status = "ysc"
row.update_by = user_id
row.update_time = datetime.now()
from app.crud.pilot_outbound_status_sync import sync_pilot_outbound_from_schedule
sync_pilot_outbound_from_schedule(db, row, user_id=user_id)
db.commit()
db.refresh(row)
return _row_to_dict_infusion_schedule(row)
+4
View File
@@ -461,6 +461,10 @@ def create_delivery(
schedule.update_by = user_id
schedule.update_time = now
from app.crud.pilot_outbound_status_sync import sync_pilot_outbound_from_schedule
sync_pilot_outbound_from_schedule(db, schedule, user_id=user_id)
db.commit()
db.refresh(row)
return _row_to_dict_delivery(row, db, tenant_no)
@@ -107,6 +107,37 @@ def list_confirms_by_application(
return [_row_to_dict(r) for r in rows]
def get_confirm_by_schedule(
db: Session, schedule_id: str, tenant_no: str
) -> Optional[Dict[str, Any]]:
"""按输注计划 ID 获取应用确认(含确认人姓名快照)。"""
from app.models.models import SysUser
row = (
db.query(BizPilotInfusionConfirm)
.filter(
BizPilotInfusionConfirm.infusion_schedule_id == schedule_id,
BizPilotInfusionConfirm.tenant_no == tenant_no,
BizPilotInfusionConfirm.del_flag == 0,
)
.first()
)
if not row:
return None
data = _row_to_dict(row)
uid = (row.confirm_user_id or "").strip()
if uid:
user = (
db.query(SysUser)
.filter(SysUser.id == uid, SysUser.del_flag == 0)
.first()
)
data["confirmUserName"] = (user.nick_name or user.user_no or "") if user else ""
else:
data["confirmUserName"] = ""
return data
def get_confirm_by_id(
db: Session, confirm_id: str, tenant_no: str
) -> Optional[Dict[str, Any]]:
@@ -28,6 +28,9 @@ from app.crud.pilot_service import (
_reduce_channel_product_quota,
_resolve_agreement_price_cell_type,
)
from app.crud import outbound_handover as handover_svc
from app.crud import outbound_release_review as orr_svc
from app.crud import pilot_infusion_confirm as confirm_svc
# ────────────────────────────────────────────
@@ -449,10 +452,73 @@ def get_infusion_schedule_detail(
if row.infusion_plan_id:
batch_meta = _get_plan_schedule_course_meta(db, [row.infusion_plan_id], tenant_no)
plan_meta = batch_meta.get(row.infusion_plan_id)
return _row_to_dict_schedule(
flat = _row_to_dict_schedule(
row, application, plan_row, patient, products, service_order, plan_meta=plan_meta
)
aggregated = orr_svc.get_schedule_detail(db, schedule_id, tenant_no) or {}
app = dict(aggregated.get("application") or {})
app["applicationNo"] = app.get("applicationNo") or flat.get("applicationNo") or ""
app["applicationName"] = app.get("applicationName") or flat.get("applicationName") or ""
app["applicationStatus"] = app.get("applicationStatus") or flat.get("applicationStatus") or ""
app["channelName"] = app.get("channelName") or flat.get("channelName") or ""
app["orderType"] = flat.get("orderType") or ""
app["channelServiceOrderName"] = flat.get("channelServiceOrderName") or ""
app["channelServiceOrderId"] = flat.get("channelServiceOrderId") or ""
plan = dict(aggregated.get("infusionPlan") or {})
if plan_row:
plan.setdefault("cellType", plan_row.cell_type or "")
plan.setdefault("specText", plan_row.spec_text or "")
plan.setdefault("totalCourseCount", plan_row.total_course_count)
plan.setdefault("courseInterval", plan_row.course_interval or "")
plan.setdefault("infusionStartDate", plan_row.infusion_start_date or "")
sched = dict(aggregated.get("infusionSchedule") or {})
sched["sortNo"] = flat.get("sortNo")
sched["totalCourseCount"] = flat.get("totalCourseCount")
sched["cellType"] = flat.get("cellType") or sched.get("cellType") or ""
sched["specText"] = flat.get("specText") or sched.get("specText") or ""
sched["infusionTime"] = flat.get("infusionTime") or sched.get("infusionTime") or ""
sched["infusionLocation"] = flat.get("infusionLocation") or sched.get("infusionLocation") or ""
sched["infusionMethod"] = flat.get("infusionMethod") or sched.get("infusionMethod") or ""
sched["scheduleStatus"] = flat.get("scheduleStatus") or sched.get("scheduleStatus") or ""
sched["infusionStatus"] = flat.get("infusionStatus") or sched.get("infusionStatus") or ""
sched["qcStatus"] = flat.get("qcStatus") or sched.get("qcStatus") or ""
sched["cancelReason"] = flat.get("cancelReason") or sched.get("cancelReason") or ""
sched["remark"] = flat.get("remark") or ""
patient_data = dict(aggregated.get("patient") or {})
if patient:
patient_data.setdefault("patientName", patient.patient_name or "")
patient_data.setdefault("sex", patient.sex or "")
patient_data.setdefault("age", str(patient.age) if patient.age is not None else "")
patient_data.setdefault("phoneNo", patient.phone_no or "")
patient_data.setdefault("idCardNo", patient.id_card_no or "")
patient_data.setdefault("emergencyContact", patient.emergency_contact or "")
patient_data.setdefault("emergencyPhone", patient.emergency_phone or "")
patient_data.setdefault("clinicalDiagnosis", patient.clinical_diagnosis or "")
patient_data.setdefault("diagnosisAttachments", patient.diagnosis_attachments or "")
patient_data.setdefault("needCheckup", patient.need_checkup)
result: Dict[str, Any] = {
**aggregated,
**flat,
"application": app,
"patient": patient_data,
"infusionPlan": plan,
"infusionSchedule": sched,
"products": flat.get("products") or aggregated.get("products") or [],
"productionInfo": aggregated.get("productionInfo") or {},
"qcInfo": aggregated.get("qcInfo") or {},
"reviewInfo": aggregated.get("reviewInfo") or {},
"outboundMaterial": aggregated.get("outboundMaterial") or {},
"outboundHandover": handover_svc.get_outbound_handover_view(db, schedule_id, tenant_no),
"infusionConfirm": confirm_svc.get_confirm_by_schedule(db, schedule_id, tenant_no) or {},
}
return result
# ────────────────────────────────────────────
# Status update
@@ -496,6 +562,8 @@ def update_infusion_status(
if infusion_status == "yqx":
row.cancel_reason = cancel_reason or ""
row.schedule_status = "yqx"
row.qc_status = "yqx"
# 自动作废关联的未完成出库生产工单
outbound_wo = (
@@ -529,6 +597,10 @@ def update_infusion_status(
order.update_by = user_id
order.update_time = now
from app.crud.pilot_outbound_status_sync import sync_pilot_outbound_from_schedule
sync_pilot_outbound_from_schedule(db, row, user_id=user_id)
# Sync all related products' product_status
product_rows = (
db.query(BizPilotInfusionScheduleProduct)
@@ -585,6 +657,10 @@ def update_qc_status(
row.update_by = user_id
row.update_time = now
from app.crud.pilot_outbound_status_sync import sync_pilot_outbound_from_schedule
sync_pilot_outbound_from_schedule(db, row, user_id=user_id)
db.commit()
db.refresh(row)
return get_infusion_schedule_detail(db, row.id, tenant_no)
@@ -0,0 +1,213 @@
"""中试服务出库生产/质检工单与输注计划生产状态、质检状态双向联动。"""
from __future__ import annotations
from datetime import datetime
from typing import Optional
from sqlalchemy.orm import Session
from app.models.models import (
BizPilotInfusionSchedule,
BizProductionWorkOrder,
BizQcWorkOrder,
)
def _is_pilot_outbound_production(wo: BizProductionWorkOrder) -> bool:
return (
(getattr(wo, "work_order_type", None) or "") == "outbound"
and (getattr(wo, "biz_type", None) or "") == "pilot_service"
and bool(getattr(wo, "infusion_schedule_id", None))
)
def _is_pilot_outbound_qc(wo: BizQcWorkOrder) -> bool:
return (
(getattr(wo, "work_order_type", None) or "") == "outbound"
and (getattr(wo, "biz_type", None) or "") == "pilot_service"
and bool(getattr(wo, "infusion_schedule_id", None))
)
def _get_schedule(
db: Session, schedule_id: str, tenant_no: str
) -> Optional[BizPilotInfusionSchedule]:
if not (schedule_id or "").strip():
return None
return (
db.query(BizPilotInfusionSchedule)
.filter(
BizPilotInfusionSchedule.id == schedule_id.strip(),
BizPilotInfusionSchedule.tenant_no == tenant_no,
BizPilotInfusionSchedule.del_flag == 0,
)
.first()
)
def _touch(row, user_id: Optional[str]) -> None:
now = datetime.now()
if user_id:
row.update_by = user_id
row.update_time = now
def sync_schedule_from_production_work_order(
db: Session,
wo: BizProductionWorkOrder,
*,
user_id: Optional[str] = None,
) -> None:
"""出库生产工单状态 → 输注计划 schedule_status。"""
if not _is_pilot_outbound_production(wo):
return
sched = _get_schedule(db, wo.infusion_schedule_id or "", wo.tenant_no or "")
if not sched:
return
wo_status = (wo.work_order_status or "").strip()
current = (sched.schedule_status or "").strip()
new_status: Optional[str] = None
if wo_status in ("dpz", "jxz"):
if current not in ("ysc", "yjf", "yqx"):
new_status = "dsc"
elif wo_status == "ywc":
if current not in ("yjf", "yqx"):
new_status = "ysc"
elif wo_status == "yzf":
new_status = "yqx"
if new_status and new_status != current:
sched.schedule_status = new_status
_touch(sched, user_id)
db.add(sched)
def sync_schedule_from_qc_work_order(
db: Session,
wo: BizQcWorkOrder,
*,
user_id: Optional[str] = None,
) -> None:
"""出库质检工单状态 → 输注计划 qc_status。"""
if not _is_pilot_outbound_qc(wo):
return
sched = _get_schedule(db, wo.infusion_schedule_id or "", wo.tenant_no or "")
if not sched:
return
wo_status = (wo.work_order_status or "").strip()
current = (sched.qc_status or "").strip()
new_status: Optional[str] = None
if wo_status in ("dpz", "ypz"):
if current not in ("yzj", "yqx"):
new_status = "dzc"
elif wo_status == "ywc":
if current != "yqx":
new_status = "yzj"
elif wo_status == "yzf":
new_status = "yqx"
if new_status and new_status != current:
sched.qc_status = new_status
_touch(sched, user_id)
db.add(sched)
def sync_production_work_order_from_schedule(
db: Session,
schedule: BizPilotInfusionSchedule,
*,
user_id: Optional[str] = None,
) -> None:
"""输注计划 schedule_status → 出库生产工单状态。"""
schedule_id = schedule.id or ""
tenant_no = schedule.tenant_no or ""
if not schedule_id:
return
wo = (
db.query(BizProductionWorkOrder)
.filter(
BizProductionWorkOrder.infusion_schedule_id == schedule_id,
BizProductionWorkOrder.tenant_no == tenant_no,
BizProductionWorkOrder.del_flag == 0,
BizProductionWorkOrder.work_order_type == "outbound",
BizProductionWorkOrder.biz_type == "pilot_service",
)
.first()
)
if not wo:
return
sched_status = (schedule.schedule_status or "").strip()
current = (wo.work_order_status or "").strip()
new_status: Optional[str] = None
if sched_status in ("ysc", "yjf"):
if current not in ("ywc", "yzf"):
new_status = "ywc"
elif sched_status == "yqx":
if current != "ywc":
new_status = "yzf"
if new_status and new_status != current:
wo.work_order_status = new_status
_touch(wo, user_id)
db.add(wo)
def sync_qc_work_order_from_schedule(
db: Session,
schedule: BizPilotInfusionSchedule,
*,
user_id: Optional[str] = None,
) -> None:
"""输注计划 qc_status → 出库质检工单状态。"""
schedule_id = schedule.id or ""
tenant_no = schedule.tenant_no or ""
if not schedule_id:
return
wo = (
db.query(BizQcWorkOrder)
.filter(
BizQcWorkOrder.infusion_schedule_id == schedule_id,
BizQcWorkOrder.tenant_no == tenant_no,
BizQcWorkOrder.del_flag == 0,
BizQcWorkOrder.work_order_type == "outbound",
BizQcWorkOrder.biz_type == "pilot_service",
)
.first()
)
if not wo:
return
qc_status = (schedule.qc_status or "").strip()
current = (wo.work_order_status or "").strip()
new_status: Optional[str] = None
if qc_status == "yzj":
if current not in ("ywc", "yzf"):
new_status = "ywc"
elif qc_status == "yqx":
if current != "ywc":
new_status = "yzf"
if new_status and new_status != current:
wo.work_order_status = new_status
_touch(wo, user_id)
db.add(wo)
def sync_pilot_outbound_from_schedule(
db: Session,
schedule: BizPilotInfusionSchedule,
*,
user_id: Optional[str] = None,
) -> None:
"""输注计划状态变更后,回写关联出库工单。"""
sync_production_work_order_from_schedule(db, schedule, user_id=user_id)
sync_qc_work_order_from_schedule(db, schedule, user_id=user_id)
@@ -501,6 +501,9 @@ def sync_production_work_order_status_from_tasks(
wo.update_by = user_id
wo.update_time = now
db.add(wo)
from app.crud.pilot_outbound_status_sync import sync_schedule_from_production_work_order
sync_schedule_from_production_work_order(db, wo, user_id=user_id)
def get_production_work_order(
@@ -556,6 +559,9 @@ def complete_production_work_order(
if data and data.remark is not None:
wo.remark = data.remark
db.add(wo)
from app.crud.pilot_outbound_status_sync import sync_schedule_from_production_work_order
sync_schedule_from_production_work_order(db, wo, user_id=user_id)
db.commit()
db.refresh(wo)
return wo
+6
View File
@@ -988,6 +988,9 @@ def configure_work_order(
wo.update_by = user_id
wo.update_time = datetime.now()
db.add(wo)
from app.crud.pilot_outbound_status_sync import sync_schedule_from_qc_work_order
sync_schedule_from_qc_work_order(db, wo, user_id=user_id)
db.commit()
db.refresh(wo)
return wo
@@ -1011,6 +1014,9 @@ def try_complete_work_order(db: Session, work_order_id: str, tenant_no: str) ->
wo.work_order_status = "ywc"
wo.update_time = datetime.now()
db.add(wo)
from app.crud.pilot_outbound_status_sync import sync_schedule_from_qc_work_order
sync_schedule_from_qc_work_order(db, wo)
db.commit()
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_application_py", "label": "pilot_application.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L1"}, {"id": "crud_pilot_application_normalize_yyyymmdd", "label": "_normalize_yyyymmdd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L32"}, {"id": "crud_pilot_application_format_yyyy_mm_dd", "label": "_format_yyyy_mm_dd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L39"}, {"id": "crud_pilot_application_parse_infusion_datetime", "label": "_parse_infusion_datetime()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L46"}, {"id": "crud_pilot_application_release_application_no_for_soft_delete", "label": "_release_application_no_for_soft_delete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L66"}, {"id": "crud_pilot_application_generate_application_no", "label": "_generate_application_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L74"}, {"id": "crud_pilot_application_row_to_dict_application", "label": "_row_to_dict_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L96"}, {"id": "crud_pilot_application_row_to_dict_patient", "label": "_row_to_dict_patient()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L166"}, {"id": "crud_pilot_application_row_to_dict_infusion_plan", "label": "_row_to_dict_infusion_plan()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L189"}, {"id": "crud_pilot_application_row_to_dict_schedule_product", "label": "_row_to_dict_schedule_product()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L236"}, {"id": "crud_pilot_application_row_to_dict_infusion_schedule", "label": "_row_to_dict_infusion_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L253"}, {"id": "crud_pilot_application_list_applications", "label": "list_applications()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L284"}, {"id": "crud_pilot_application_get_application", "label": "get_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L353"}, {"id": "crud_pilot_application_create_application", "label": "create_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L385"}, {"id": "crud_pilot_application_update_application", "label": "update_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L437"}, {"id": "crud_pilot_application_soft_delete_application", "label": "soft_delete_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L462"}, {"id": "crud_pilot_application_start_application", "label": "start_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L483"}, {"id": "crud_pilot_application_complete_application", "label": "complete_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L506"}, {"id": "crud_pilot_application_void_application", "label": "void_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L529"}, {"id": "crud_pilot_application_get_patient_by_application", "label": "get_patient_by_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L557"}, {"id": "crud_pilot_application_save_patient", "label": "save_patient()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L574"}, {"id": "crud_pilot_application_list_infusion_plans", "label": "list_infusion_plans()", "file_type": "code", "source_file": "/Users/wuzilong/work/Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_application_py", "label": "pilot_application.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L1"}, {"id": "api_pilot_application_get_tenant_no", "label": "_get_tenant_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L17"}, {"id": "api_pilot_application_idbody", "label": "IdBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L32"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "api_pilot_application_planidbody", "label": "PlanIdBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L38"}, {"id": "api_pilot_application_applicationcreatebody", "label": "ApplicationCreateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L44"}, {"id": "api_pilot_application_applicationupdatebody", "label": "ApplicationUpdateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L51"}, {"id": "api_pilot_application_patientsavebody", "label": "PatientSaveBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L58"}, {"id": "api_pilot_application_infusionplancreatebody", "label": "InfusionPlanCreateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L75"}, {"id": "api_pilot_application_infusionplanupdatebody", "label": "InfusionPlanUpdateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L87"}, {"id": "api_pilot_application_infusionscheduleupdatebody", "label": "InfusionScheduleUpdateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L99"}, {"id": "api_pilot_application_schedulecreatebody", "label": "ScheduleCreateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L108"}, {"id": "api_pilot_application_patientnestedbody", "label": "PatientNestedBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L119"}, {"id": "api_pilot_application_scheduleproductnestedbody", "label": "ScheduleProductNestedBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L135"}, {"id": "api_pilot_application_infusionschedulenestedbody", "label": "InfusionScheduleNestedBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L151"}, {"id": "api_pilot_application_infusionplannestedbody", "label": "InfusionPlanNestedBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L162"}, {"id": "api_pilot_application_applicationsavebody", "label": "ApplicationSaveBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L175"}, {"id": "api_pilot_application_api_list_applications", "label": "api_list_applications()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L198"}, {"id": "api_pilot_application_api_get_application", "label": "api_get_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L223"}, {"id": "api_pilot_application_api_create_application", "label": "api_create_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L236"}, {"id": "api_pilot_application_api_update_application", "label": "api_update_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L260"}, {"id": "api_pilot_application_api_save_application", "label": "api_save_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L279"}, {"id": "api_pilot_application_api_delete_application", "label": "api_delete_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.pLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_review_py", "label": "outbound_release_review.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L1"}, {"id": "schemas_outbound_release_review_outboundreviewlistparams", "label": "OutboundReviewListParams", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "schemas_outbound_release_review_outboundreviewsubmitbody", "label": "OutboundReviewSubmitBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L17"}, {"id": "schemas_outbound_release_review_outboundbatchreviewbody", "label": "OutboundBatchReviewBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L25"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_review_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_review_py", "target": "pydantic", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L3", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_review_py", "target": "schemas_outbound_release_review_outboundreviewlistparams", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L6", "weight": 1.0}, {"source": "schemas_outbound_release_review_outboundreviewlistparams", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_review_py", "target": "schemas_outbound_release_review_outboundreviewsubmitbody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L17", "weight": 1.0}, {"source": "schemas_outbound_release_review_outboundreviewsubmitbody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L17", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_review_py", "target": "schemas_outbound_release_review_outboundbatchreviewbody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L25", "weight": 1.0}, {"source": "schemas_outbound_release_review_outboundbatchreviewbody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py", "source_location": "L25", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_qc_work_order_py", "label": "qc_work_order.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L1"}, {"id": "crud_qc_work_order_dec", "label": "_dec()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L66"}, {"id": "crud_qc_work_order_fmt_dt", "label": "_fmt_dt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L72"}, {"id": "crud_qc_work_order_normalize_date_bound", "label": "_normalize_date_bound()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L76"}, {"id": "crud_qc_work_order_reception_source_label", "label": "_reception_source_label()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L83"}, {"id": "crud_qc_work_order_qc_biz_type_label", "label": "_qc_biz_type_label()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L88"}, {"id": "crud_qc_work_order_work_order_qc_biz_type", "label": "_work_order_qc_biz_type()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L93"}, {"id": "crud_qc_work_order_validate_cell_product_id", "label": "_validate_cell_product_id()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L100"}, {"id": "crud_qc_work_order_enrich_work_order_cell_products", "label": "_enrich_work_order_cell_products()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L112"}, {"id": "crud_qc_work_order_enrich_outbound_work_orders", "label": "_enrich_outbound_work_orders()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L141"}, {"id": "crud_qc_work_order_accept_conclusion_label", "label": "_accept_conclusion_label()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L198"}, {"id": "crud_qc_work_order_load_sample_type_name_map", "label": "_load_sample_type_name_map()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L203"}, {"id": "crud_qc_work_order_sample_type_name_for_reception", "label": "_sample_type_name_for_reception()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L215"}, {"id": "crud_qc_work_order_enrich_work_order_list_items", "label": "_enrich_work_order_list_items()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L232"}, {"id": "crud_qc_work_order_gen_daily_no", "label": "_gen_daily_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L344"}, {"id": "crud_qc_work_order_user_nick_name_map", "label": "_user_nick_name_map()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L358"}, {"id": "crud_qc_work_order_wo_to_dict", "label": "_wo_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L366"}, {"id": "crud_qc_work_order_create_work_order_from_reception", "label": "create_work_order_from_reception()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L426"}, {"id": "crud_qc_work_order_list_work_orders", "label": "list_work_orders()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L541"}, {"id": "crud_qc_work_order_get_work_order", "label": "get_work_order()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L610"}, {"id": "crud_qc_work_order_lab_lines", "label": "_lab_lines()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L619"}, {"id": "crud_qc_work_order_third_lines", "label": "_third_lines()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "source_location": "L640"}, {"id": "crud_qc_work_order_qc_info_item", "label": "_qc_info_item()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py", "souLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_application_py", "label": "pilot_application.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L1"}, {"id": "api_pilot_application_get_tenant_no", "label": "_get_tenant_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L17"}, {"id": "api_pilot_application_idbody", "label": "IdBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L32"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "api_pilot_application_planidbody", "label": "PlanIdBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L38"}, {"id": "api_pilot_application_applicationcreatebody", "label": "ApplicationCreateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L44"}, {"id": "api_pilot_application_applicationupdatebody", "label": "ApplicationUpdateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L51"}, {"id": "api_pilot_application_patientsavebody", "label": "PatientSaveBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L58"}, {"id": "api_pilot_application_infusionplancreatebody", "label": "InfusionPlanCreateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L75"}, {"id": "api_pilot_application_infusionplanupdatebody", "label": "InfusionPlanUpdateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L87"}, {"id": "api_pilot_application_infusionscheduleupdatebody", "label": "InfusionScheduleUpdateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L99"}, {"id": "api_pilot_application_schedulecreatebody", "label": "ScheduleCreateBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L108"}, {"id": "api_pilot_application_patientnestedbody", "label": "PatientNestedBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L119"}, {"id": "api_pilot_application_scheduleproductnestedbody", "label": "ScheduleProductNestedBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L135"}, {"id": "api_pilot_application_infusionschedulenestedbody", "label": "InfusionScheduleNestedBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L151"}, {"id": "api_pilot_application_infusionplannestedbody", "label": "InfusionPlanNestedBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L162"}, {"id": "api_pilot_application_applicationsavebody", "label": "ApplicationSaveBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L175"}, {"id": "api_pilot_application_api_list_applications", "label": "api_list_applications()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L198"}, {"id": "api_pilot_application_api_get_application", "label": "api_get_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L223"}, {"id": "api_pilot_application_api_create_application", "label": "api_create_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L236"}, {"id": "api_pilot_application_api_update_application", "label": "api_update_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L260"}, {"id": "api_pilot_application_api_save_application", "label": "api_save_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py", "source_location": "L279"}, {"id": "api_pilot_application_api_delete_application", "label": "api_delete_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.pLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "label": "outbound_release_material.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L1"}, {"id": "schemas_outbound_release_material_outboundreleasecellitem", "label": "OutboundReleaseCellItem", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L7"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "schemas_outbound_release_material_outboundreleaseqcmaterialitem", "label": "OutboundReleaseQcMaterialItem", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L14"}, {"id": "schemas_outbound_release_material_coerce_qty", "label": "_coerce_qty()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L23"}, {"id": "schemas_outbound_release_material_outboundreleasepaperitem", "label": "OutboundReleasePaperItem", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L29"}, {"id": "schemas_outbound_release_material_outboundreleasematerialsavebody", "label": "OutboundReleaseMaterialSaveBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L38"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "decimal", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "pydantic", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "schemas_outbound_release_material_outboundreleasecellitem", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L7", "weight": 1.0}, {"source": "schemas_outbound_release_material_outboundreleasecellitem", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "schemas_outbound_release_material_outboundreleaseqcmaterialitem", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L14", "weight": 1.0}, {"source": "schemas_outbound_release_material_outboundreleaseqcmaterialitem", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L14", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "schemas_outbound_release_material_coerce_qty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L23", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "schemas_outbound_release_material_outboundreleasepaperitem", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L29", "weight": 1.0}, {"source": "schemas_outbound_release_material_outboundreleasepaperitem", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L29", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_pLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_review_py", "label": "outbound_release_review.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L1"}, {"id": "crud_outbound_release_review_fmt_dt", "label": "_fmt_dt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L49"}, {"id": "crud_outbound_release_review_total_pages", "label": "_total_pages()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L53"}, {"id": "crud_outbound_release_review_get_user_name", "label": "_get_user_name()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L59"}, {"id": "crud_outbound_release_review_resolve_schedule_biz_type", "label": "_resolve_schedule_biz_type()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L64"}, {"id": "crud_outbound_release_review_row_to_dict", "label": "_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L79"}, {"id": "crud_outbound_release_review_list_reviews_paginated", "label": "list_reviews_paginated()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L110"}, {"id": "crud_outbound_release_review_get_schedule_detail", "label": "get_schedule_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L420"}, {"id": "crud_outbound_release_review_review_schedule", "label": "review_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L503"}, {"id": "crud_outbound_release_review_batch_review", "label": "batch_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L592"}, {"id": "crud_outbound_release_review_rationale_69", "label": "\u8f93\u6ce8\u8ba1\u5212\u4e1a\u52a1\u7c7b\u578b\uff1a\u4f18\u5148\u51fa\u5e93\u5de5\u5355\u7684 biz_type\uff0c\u5426\u5219\u5173\u8054\u4e2d\u8bd5\u7533\u8bf7\u5355\u89c6\u4e3a\u4e2d\u8bd5\u670d\u52a1\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L69"}, {"id": "crud_outbound_release_review_rationale_80", "label": "\u5c06 BizOutboundReleaseReview ORM \u5bf9\u8c61\u8f6c\u4e3a\u524d\u7aef\u5b57\u5178\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L80"}, {"id": "crud_outbound_release_review_rationale_122", "label": "\u5206\u9875\u5217\u51fa\u51fa\u5e93\u653e\u884c\u5ba1\u6838\u6570\u636e\uff0c\u4ee5\u8f93\u6ce8\u8ba1\u5212\u4e3a\u4e3b\u8868 LEFT JOIN \u5ba1\u6838/\u751f\u4ea7/\u8d28\u68c0\u5de5\u5355\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L122"}, {"id": "crud_outbound_release_review_rationale_423", "label": "\u6309\u8f93\u6ce8\u8ba1\u5212 ID \u805a\u5408\u51fa\u5e93\u653e\u884c\u5ba1\u6838\u8be6\u60c5\uff08\u4e2d\u8bd5\u4e0a\u4e0b\u6587 + \u751f\u4ea7 + \u8d28\u68c0 + \u5ba1\u6838\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L423"}, {"id": "crud_outbound_release_review_rationale_513", "label": "\u5bf9\u6307\u5b9a\u8f93\u6ce8\u8ba1\u5212\u6267\u884c\u51fa\u5e93\u653e\u884c\u5ba1\u6838\uff08upsert\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L513"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_review_py", "target": "math", "relation": "imports", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_review_py", "target": "datetime", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_review_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuziLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_outbound_status_sync_py", "label": "pilot_outbound_status_sync.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L1"}, {"id": "crud_pilot_outbound_status_sync_is_pilot_outbound_production", "label": "_is_pilot_outbound_production()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L16"}, {"id": "crud_pilot_outbound_status_sync_is_pilot_outbound_qc", "label": "_is_pilot_outbound_qc()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L24"}, {"id": "crud_pilot_outbound_status_sync_get_schedule", "label": "_get_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L32"}, {"id": "crud_pilot_outbound_status_sync_touch", "label": "_touch()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L48"}, {"id": "crud_pilot_outbound_status_sync_sync_schedule_from_production_work_order", "label": "sync_schedule_from_production_work_order()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L55"}, {"id": "crud_pilot_outbound_status_sync_sync_schedule_from_qc_work_order", "label": "sync_schedule_from_qc_work_order()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L87"}, {"id": "crud_pilot_outbound_status_sync_sync_production_work_order_from_schedule", "label": "sync_production_work_order_from_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L119"}, {"id": "crud_pilot_outbound_status_sync_sync_qc_work_order_from_schedule", "label": "sync_qc_work_order_from_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L162"}, {"id": "crud_pilot_outbound_status_sync_sync_pilot_outbound_from_schedule", "label": "sync_pilot_outbound_from_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L205"}, {"id": "crud_pilot_outbound_status_sync_rationale_1", "label": "\u4e2d\u8bd5\u670d\u52a1\u51fa\u5e93\u751f\u4ea7/\u8d28\u68c0\u5de5\u5355\u4e0e\u8f93\u6ce8\u8ba1\u5212\u751f\u4ea7\u72b6\u6001\u3001\u8d28\u68c0\u72b6\u6001\u53cc\u5411\u8054\u52a8\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L1"}, {"id": "crud_pilot_outbound_status_sync_rationale_61", "label": "\u51fa\u5e93\u751f\u4ea7\u5de5\u5355\u72b6\u6001 \u2192 \u8f93\u6ce8\u8ba1\u5212 schedule_status\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L61"}, {"id": "crud_pilot_outbound_status_sync_rationale_93", "label": "\u51fa\u5e93\u8d28\u68c0\u5de5\u5355\u72b6\u6001 \u2192 \u8f93\u6ce8\u8ba1\u5212 qc_status\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L93"}, {"id": "crud_pilot_outbound_status_sync_rationale_125", "label": "\u8f93\u6ce8\u8ba1\u5212 schedule_status \u2192 \u51fa\u5e93\u751f\u4ea7\u5de5\u5355\u72b6\u6001\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L125"}, {"id": "crud_pilot_outbound_status_sync_rationale_168", "label": "\u8f93\u6ce8\u8ba1\u5212 qc_status \u2192 \u51fa\u5e93\u8d28\u68c0\u5de5\u5355\u72b6\u6001\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L168"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_outbound_status_sync_py", "target": "datetime", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_outbound_status_sync_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_outbound_stLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_models_models_py", "label": "models.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L1"}, {"id": "models_models_userrole", "label": "UserRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L10"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_models_sysuser", "label": "SysUser", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L22"}, {"id": "base", "label": "Base", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_models_sysrole", "label": "SysRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L48"}, {"id": "models_models_sysuserrole", "label": "SysUserRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L68"}, {"id": "models_models_sysrolemenu", "label": "SysRoleMenu", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L87"}, {"id": "models_models_sysroledatascopedetail", "label": "SysRoleDataScopeDetail", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L106"}, {"id": "models_models_sysmenu", "label": "SysMenu", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L126"}, {"id": "models_models_sysdept", "label": "SysDept", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L152"}, {"id": "models_models_systenant", "label": "SysTenant", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L175"}, {"id": "models_models_syssite", "label": "SysSite", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L195"}, {"id": "models_models_syspost", "label": "SysPost", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L220"}, {"id": "models_models_sysuserpost", "label": "SysUserPost", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L240"}, {"id": "models_models_bizitemunit", "label": "BizItemUnit", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L259"}, {"id": "models_models_bizexpresscompany", "label": "BizExpressCompany", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L278"}, {"id": "models_models_bizcustomer", "label": "BizCustomer", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L297"}, {"id": "models_models_bizcellsampletype", "label": "BizCellSampleType", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L320"}, {"id": "models_models_bizcollectionregion", "label": "BizCollectionRegion", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L341"}, {"id": "models_models_bizcollectionhospital", "label": "BizCollectionHospital", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L359"}, {"id": "models_models_bizcollectionprotocolno", "label": "BizCollectionProtocolNo", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L378"}, {"id": "models_models_bizsamplecode", "label": "BizSampleCode", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L400"}, {"id": "models_models_sysdicttype", "label": "SysDictType", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L428"}, {"id": "models_models_sysethnic", "label": "SysEthnic", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L447"}, {"id": "models_models_sysdictdata", "label": "SysDictData", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L466"}, {"id": "models_models_sysapirequestlog", "label": "SysApiRequestLog", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location"Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_infusion_schedule_mgmt_py", "label": "pilot_infusion_schedule_mgmt.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L1"}, {"id": "api_pilot_infusion_schedule_mgmt_get_tenant_no", "label": "_get_tenant_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L19"}, {"id": "api_pilot_infusion_schedule_mgmt_updatestatusbody", "label": "UpdateStatusBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L34"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "api_pilot_infusion_schedule_mgmt_updateqcstatusbody", "label": "UpdateQcStatusBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L44"}, {"id": "api_pilot_infusion_schedule_mgmt_productitembody", "label": "ProductItemBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L51"}, {"id": "api_pilot_infusion_schedule_mgmt_updateschedulebody", "label": "UpdateScheduleBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L71"}, {"id": "api_pilot_infusion_schedule_mgmt_api_list", "label": "api_list()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L95"}, {"id": "api_pilot_infusion_schedule_mgmt_api_detail", "label": "api_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L122"}, {"id": "api_pilot_infusion_schedule_mgmt_api_update_status", "label": "api_update_status()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L137"}, {"id": "api_pilot_infusion_schedule_mgmt_api_update_qc_status", "label": "api_update_qc_status()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L158"}, {"id": "api_pilot_infusion_schedule_mgmt_api_update", "label": "api_update()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L178"}, {"id": "api_pilot_infusion_schedule_mgmt_api_get_outbound_handover", "label": "api_get_outbound_handover()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L208"}, {"id": "api_pilot_infusion_schedule_mgmt_api_save_outbound_handover", "label": "api_save_outbound_handover()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L226"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_infusion_schedule_mgmt_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_infusion_schedule_mgmt_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_infusion_schedule_mgmt_py", "target": "pydantic", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_infusion_schedule_mgmt_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_infusion_schedule_mgmt_py", "target": "app_core_database", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_pilot_infusion_schedule_mgmt_py", "target": "app_core_menu_guard", "relation": "imports_from", "confiLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_inventory_py", "label": "outbound_handover_inventory.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L1"}, {"id": "crud_outbound_handover_inventory_handover_usage_remark", "label": "_handover_usage_remark()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L21"}, {"id": "crud_outbound_handover_inventory_handover_usage_remark_prefix", "label": "_handover_usage_remark_prefix()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L25"}, {"id": "crud_outbound_handover_inventory_remove_cell_occupancy_no_commit", "label": "_remove_cell_occupancy_no_commit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L29"}, {"id": "crud_outbound_handover_inventory_restore_cell_occupancy_no_commit", "label": "_restore_cell_occupancy_no_commit()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L58"}, {"id": "crud_outbound_handover_inventory_get_cell_product_locked", "label": "_get_cell_product_locked()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L109"}, {"id": "crud_outbound_handover_inventory_revert_handover_inventory", "label": "revert_handover_inventory()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L130"}, {"id": "crud_outbound_handover_inventory_apply_handover_inventory", "label": "apply_handover_inventory()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L200"}, {"id": "crud_outbound_handover_inventory_rationale_1", "label": "\u8f93\u6ce8\u8ba1\u5212\u51fa\u5e93\u4ea4\u63a5 \u2014 \u7ec6\u80de\u4ea7\u54c1\u72b6\u6001\u4e0e\u8d28\u68c0\u7269\u6599\u5e93\u5b58\u8054\u52a8\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L1"}, {"id": "crud_outbound_handover_inventory_rationale_35", "label": "\u6309\u7ec6\u80de\u4ea7\u54c1 ID \u91ca\u653e\u5e93\u4f4d\u5360\u7528\uff08\u4e0d commit\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L35"}, {"id": "crud_outbound_handover_inventory_rationale_65", "label": "\u51fa\u5e93\u4ea4\u63a5\u56de\u6eda\u65f6\u6062\u590d\u5e93\u4f4d\u5360\u7528\uff08\u4e0d commit\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L65"}, {"id": "crud_outbound_handover_inventory_rationale_138", "label": "\u56de\u6eda\u672c\u8f93\u6ce8\u8ba1\u5212\u4e0a\u6b21\u51fa\u5e93\u4ea4\u63a5\u4ea7\u751f\u7684\u5e93\u5b58/\u72b6\u6001\u53d8\u66f4\uff08\u4e0d commit\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L138"}, {"id": "crud_outbound_handover_inventory_rationale_211", "label": "\u5e94\u7528\u51fa\u5e93\u4ea4\u63a5\uff1a\u7ec6\u80de\u4ea7\u54c1\u51fa\u5e93 + \u8d28\u68c0\u7269\u6599\u6263\u51cf\uff08\u4e0d commit\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L211"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_inventory_py", "target": "datetime", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_inventory_py", "target": "decimal", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_inventory_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_inventory_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED",Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_production_work_order_py", "label": "production_work_order.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L1"}, {"id": "crud_production_work_order_normalize_date_bound", "label": "_normalize_date_bound()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L46"}, {"id": "crud_production_work_order_fmt_dt", "label": "_fmt_dt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L53"}, {"id": "crud_production_work_order_soft_delete_sub", "label": "_soft_delete_sub()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L57"}, {"id": "crud_production_work_order_generate_work_order_no", "label": "_generate_work_order_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L69"}, {"id": "crud_production_work_order_wo_to_dict", "label": "_wo_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L88"}, {"id": "crud_production_work_order_enrich_wo_items", "label": "_enrich_wo_items()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L117"}, {"id": "crud_production_work_order_enrich_outbound_items", "label": "_enrich_outbound_items()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L126"}, {"id": "crud_production_work_order_reception_source_label", "label": "_reception_source_label()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L182"}, {"id": "crud_production_work_order_accept_conclusion_label", "label": "_accept_conclusion_label()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L187"}, {"id": "crud_production_work_order_attach_reception_detail", "label": "_attach_reception_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L192"}, {"id": "crud_production_work_order_attach_outbound_detail", "label": "_attach_outbound_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L222"}, {"id": "crud_production_work_order_wo_to_response_dict", "label": "_wo_to_response_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L275"}, {"id": "crud_production_work_order_create_production_work_order_from_reception", "label": "create_production_work_order_from_reception()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L285"}, {"id": "crud_production_work_order_list_production_work_orders", "label": "list_production_work_orders()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L396"}, {"id": "crud_production_work_order_sync_production_work_order_status_from_tasks", "label": "sync_production_work_order_status_from_tasks()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L466"}, {"id": "crud_production_work_order_get_production_work_order", "label": "get_production_work_order()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L509"}, {"id": "crud_production_work_order_update_production_work_order", "label": "update_production_work_order()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L523"}, {"id": "crud_production_work_order_complete_production_work_order", "label": "complete_production_work_order()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L544"}, {"id": "crud_production_work_order_production_task_info", "label": "_production_task_info()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py", "source_location": "L578"}, {"id": "crud_production_work_order_production_info_item", "label": "_production_info_item()", "file_type": "code", "source_file": "/Users/wuziloLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_schedule_mgmt_py", "label": "pilot_infusion_schedule_mgmt.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L1"}, {"id": "crud_pilot_infusion_schedule_mgmt_row_to_dict_schedule", "label": "_row_to_dict_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L52"}, {"id": "crud_pilot_infusion_schedule_mgmt_row_to_dict_product", "label": "_row_to_dict_product()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L128"}, {"id": "crud_pilot_infusion_schedule_mgmt_get_plan_schedule_course_meta", "label": "_get_plan_schedule_course_meta()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L145"}, {"id": "crud_pilot_infusion_schedule_mgmt_resolve_course_display", "label": "_resolve_course_display()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L185"}, {"id": "crud_pilot_infusion_schedule_mgmt_get_products_for_schedule", "label": "_get_products_for_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L215"}, {"id": "crud_pilot_infusion_schedule_mgmt_list_infusion_schedules_mgmt", "label": "list_infusion_schedules_mgmt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L237"}, {"id": "crud_pilot_infusion_schedule_mgmt_get_infusion_schedule_detail", "label": "get_infusion_schedule_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L391"}, {"id": "crud_pilot_infusion_schedule_mgmt_update_infusion_status", "label": "update_infusion_status()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L462"}, {"id": "crud_pilot_infusion_schedule_mgmt_update_qc_status", "label": "update_qc_status()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L564"}, {"id": "crud_pilot_infusion_schedule_mgmt_settlement_remark_marker", "label": "_settlement_remark_marker()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L603"}, {"id": "crud_pilot_infusion_schedule_mgmt_settlement_remark_markers_for_lookup", "label": "_settlement_remark_markers_for_lookup()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L608"}, {"id": "crud_pilot_infusion_schedule_mgmt_find_existing_settlement_txn", "label": "_find_existing_settlement_txn()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L612"}, {"id": "crud_pilot_infusion_schedule_mgmt_resolve_yfk_unit_price", "label": "_resolve_yfk_unit_price()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L632"}, {"id": "crud_pilot_infusion_schedule_mgmt_find_service_order_product", "label": "_find_service_order_product()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L675"}, {"id": "crud_pilot_infusion_schedule_mgmt_schedule_product_to_txn_item", "label": "_schedule_product_to_txn_item()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L708"}, {"id": "crud_pilot_infusion_schedule_mgmt_create_settlement_txn", "label": "_create_settlement_txn()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L721"}, {"id": "crud_pilot_infusion_schedule_mgmt_deduct_fee_on_complete", "label": "_deduct_fee_on_complete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L768"}, {"id": "crud_pilot_infusion_schedule_mgmt_update_infusion_schedule_mgmt", "label": "update_infusion_schedule_mgmt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L974"}, {"id": "crud_pilot_infusion_schedule_mgmt_Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_schedule_mgmt_py", "label": "pilot_infusion_schedule_mgmt.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L1"}, {"id": "crud_pilot_infusion_schedule_mgmt_row_to_dict_schedule", "label": "_row_to_dict_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L55"}, {"id": "crud_pilot_infusion_schedule_mgmt_row_to_dict_product", "label": "_row_to_dict_product()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L131"}, {"id": "crud_pilot_infusion_schedule_mgmt_get_plan_schedule_course_meta", "label": "_get_plan_schedule_course_meta()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L148"}, {"id": "crud_pilot_infusion_schedule_mgmt_resolve_course_display", "label": "_resolve_course_display()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L188"}, {"id": "crud_pilot_infusion_schedule_mgmt_get_products_for_schedule", "label": "_get_products_for_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L218"}, {"id": "crud_pilot_infusion_schedule_mgmt_list_infusion_schedules_mgmt", "label": "list_infusion_schedules_mgmt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L240"}, {"id": "crud_pilot_infusion_schedule_mgmt_get_infusion_schedule_detail", "label": "get_infusion_schedule_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L394"}, {"id": "crud_pilot_infusion_schedule_mgmt_update_infusion_status", "label": "update_infusion_status()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L528"}, {"id": "crud_pilot_infusion_schedule_mgmt_update_qc_status", "label": "update_qc_status()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L630"}, {"id": "crud_pilot_infusion_schedule_mgmt_settlement_remark_marker", "label": "_settlement_remark_marker()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L669"}, {"id": "crud_pilot_infusion_schedule_mgmt_settlement_remark_markers_for_lookup", "label": "_settlement_remark_markers_for_lookup()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L674"}, {"id": "crud_pilot_infusion_schedule_mgmt_find_existing_settlement_txn", "label": "_find_existing_settlement_txn()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L678"}, {"id": "crud_pilot_infusion_schedule_mgmt_resolve_yfk_unit_price", "label": "_resolve_yfk_unit_price()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L698"}, {"id": "crud_pilot_infusion_schedule_mgmt_find_service_order_product", "label": "_find_service_order_product()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L741"}, {"id": "crud_pilot_infusion_schedule_mgmt_schedule_product_to_txn_item", "label": "_schedule_product_to_txn_item()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L774"}, {"id": "crud_pilot_infusion_schedule_mgmt_create_settlement_txn", "label": "_create_settlement_txn()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L787"}, {"id": "crud_pilot_infusion_schedule_mgmt_deduct_fee_on_complete", "label": "_deduct_fee_on_complete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L834"}, {"id": "crud_pilot_infusion_schedule_mgmt_update_infusion_schedule_mgmt", "label": "update_infusion_schedule_mgmt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py", "source_location": "L1040"}, {"id": "crud_pilot_infusion_schedule_mgmtLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_py", "label": "outbound_handover.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L1"}, {"id": "crud_outbound_handover_fmt_dt", "label": "_fmt_dt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L17"}, {"id": "crud_outbound_handover_parse_handover_time", "label": "_parse_handover_time()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L21"}, {"id": "crud_outbound_handover_handover_row_to_dict", "label": "_handover_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L33"}, {"id": "crud_outbound_handover_handover_view_dict", "label": "_handover_view_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L53"}, {"id": "crud_outbound_handover_get_handover_by_schedule", "label": "get_handover_by_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L71"}, {"id": "crud_outbound_handover_get_outbound_handover_view", "label": "get_outbound_handover_view()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L90"}, {"id": "crud_outbound_handover_get_outbound_handover", "label": "get_outbound_handover()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L100"}, {"id": "crud_outbound_handover_save_outbound_handover", "label": "save_outbound_handover()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L129"}, {"id": "crud_outbound_handover_rationale_95", "label": "\u4f9b\u8f93\u6ce8\u8ba1\u5212 detail \u805a\u5408\u7684\u4ea4\u63a5\u53ea\u8bfb\u4fe1\u606f\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L95"}, {"id": "crud_outbound_handover_rationale_105", "label": "\u83b7\u53d6\u51fa\u5e93\u4ea4\u63a5\u7f16\u8f91\u6570\u636e\uff08\u7269\u6599 + \u4ea4\u63a5\u4fe1\u606f + \u6458\u8981\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L105"}, {"id": "crud_outbound_handover_rationale_139", "label": "\u4fdd\u5b58\u51fa\u5e93\u7269\u6599\u53f0\u8d26 + \u51fa\u5e93\u4ea4\u63a5\uff08\u5355\u4e8b\u52a1\uff0c\u8c03\u7528\u65b9 commit\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L139"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_py", "target": "datetime", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_py", "target": "app_core_utils", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L10", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_py", "target": "app_crud", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py", "source_location": "L11", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_handover_py", "target": "app_crud", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "label": "outbound_release_material.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L1"}, {"id": "crud_outbound_release_material_fmt_dt", "label": "_fmt_dt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L23"}, {"id": "crud_outbound_release_material_cell_row_to_dict", "label": "_cell_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L27"}, {"id": "crud_outbound_release_material_qc_material_row_to_dict", "label": "_qc_material_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L46"}, {"id": "crud_outbound_release_material_material_header_to_dict", "label": "_material_header_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L62"}, {"id": "crud_outbound_release_material_get_schedule", "label": "_get_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L90"}, {"id": "crud_outbound_release_material_get_outbound_material", "label": "get_outbound_material()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L105"}, {"id": "crud_outbound_release_material_save_outbound_material", "label": "save_outbound_material()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L159"}, {"id": "crud_outbound_release_material_rationale_1", "label": "\u51fa\u5e93\u653e\u884c\u5ba1\u6838 \u00b7 \u51fa\u5e93\u7269\u6599\u51c6\u5907\uff08\u53f0\u8d26 CRUD\uff09", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L1"}, {"id": "crud_outbound_release_material_rationale_171", "label": "\u5168\u91cf\u4fdd\u5b58\u51fa\u5e93\u7269\u6599\u51c6\u5907\uff08\u53f0\u8d26\uff0c\u4e0d\u8054\u52a8\u5e93\u5b58\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L171"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "datetime", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "decimal", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "app_core_utils", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L11", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "app_crud", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L12", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "app_models_models", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilongLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "label": "pilot_infusion_confirm.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L1"}, {"id": "crud_pilot_infusion_confirm_row_to_dict", "label": "_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L16"}, {"id": "crud_pilot_infusion_confirm_create_infusion_confirm", "label": "create_infusion_confirm()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L36"}, {"id": "crud_pilot_infusion_confirm_list_confirms_by_application", "label": "list_confirms_by_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L68"}, {"id": "crud_pilot_infusion_confirm_get_confirm_by_schedule", "label": "get_confirm_by_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L110"}, {"id": "crud_pilot_infusion_confirm_get_confirm_by_id", "label": "get_confirm_by_id()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L141"}, {"id": "crud_pilot_infusion_confirm_confirm_infusion", "label": "confirm_infusion()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L158"}, {"id": "crud_pilot_infusion_confirm_update_infusion_confirm", "label": "update_infusion_confirm()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L185"}, {"id": "crud_pilot_infusion_confirm_delete_infusion_confirm", "label": "delete_infusion_confirm()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L215"}, {"id": "crud_pilot_infusion_confirm_rationale_113", "label": "\u6309\u8f93\u6ce8\u8ba1\u5212 ID \u83b7\u53d6\u5e94\u7528\u786e\u8ba4\uff08\u542b\u786e\u8ba4\u4eba\u59d3\u540d\u5feb\u7167\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L113"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "target": "datetime", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L3", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "target": "app_core_utils", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "target": "app_models_models", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "target": "crud_pilot_infusion_confirm_row_to_dict", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L16", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "target": "crud_pilot_infusion_confirm_create_infusion_confirm", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py", "source_location": "L36", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_infusion_confirm_py", "target": "crud_pilot_infusion_confirm_list_confirms_by_application", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/aLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "label": "outbound_release_material.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L1"}, {"id": "schemas_outbound_release_material_outboundreleasecellitem", "label": "OutboundReleaseCellItem", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L7"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "schemas_outbound_release_material_outboundreleaseqcmaterialitem", "label": "OutboundReleaseQcMaterialItem", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L14"}, {"id": "schemas_outbound_release_material_coerce_qty", "label": "_coerce_qty()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L23"}, {"id": "schemas_outbound_release_material_outboundreleasematerialsavebody", "label": "OutboundReleaseMaterialSaveBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L29"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "decimal", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "pydantic", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "schemas_outbound_release_material_outboundreleasecellitem", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L7", "weight": 1.0}, {"source": "schemas_outbound_release_material_outboundreleasecellitem", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "schemas_outbound_release_material_outboundreleaseqcmaterialitem", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L14", "weight": 1.0}, {"source": "schemas_outbound_release_material_outboundreleaseqcmaterialitem", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L14", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "schemas_outbound_release_material_coerce_qty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L23", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_release_material_py", "target": "schemas_outbound_release_material_outboundreleasematerialsavebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L29", "weight": 1.0}, {"source": "schemas_outbound_release_material_outboundreleasematerialsavebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L29", "weight": 1.0}], "raw_calls": [{"caller_nid": "schemas_outbound_release_material_coerce_qty", "callee": "ValueError", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py", "source_location": "L25"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_delivery_py", "label": "pilot_delivery.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L1"}, {"id": "crud_pilot_delivery_generate_delivery_no", "label": "_generate_delivery_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L37"}, {"id": "crud_pilot_delivery_row_to_dict_delivery", "label": "_row_to_dict_delivery()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L59"}, {"id": "crud_pilot_delivery_row_to_dict_delivery_material", "label": "_row_to_dict_delivery_material()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L99"}, {"id": "crud_pilot_delivery_row_to_dict_delivery_method", "label": "_row_to_dict_delivery_method()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L130"}, {"id": "crud_pilot_delivery_deduct_fee_on_delivery", "label": "_deduct_fee_on_delivery()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L174"}, {"id": "crud_pilot_delivery_get_delivery_by_schedule", "label": "get_delivery_by_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L335"}, {"id": "crud_pilot_delivery_list_deliveries_by_application", "label": "list_deliveries_by_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L352"}, {"id": "crud_pilot_delivery_create_delivery", "label": "create_delivery()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L398"}, {"id": "crud_pilot_delivery_soft_delete_delivery", "label": "soft_delete_delivery()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L473"}, {"id": "crud_pilot_delivery_list_delivery_materials", "label": "list_delivery_materials()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L512"}, {"id": "crud_pilot_delivery_save_delivery_materials", "label": "save_delivery_materials()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L531"}, {"id": "crud_pilot_delivery_delete_delivery_material", "label": "delete_delivery_material()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L590"}, {"id": "crud_pilot_delivery_get_delivery_method", "label": "get_delivery_method()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L615"}, {"id": "crud_pilot_delivery_save_delivery_method", "label": "save_delivery_method()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L632"}, {"id": "crud_pilot_delivery_rationale_1", "label": "\u4e2d\u8bd5\u4ea4\u4ed8\u7ba1\u7406 CRUD\uff08\u4ea4\u4ed8\u4fe1\u606f\u3001\u4ea4\u4ed8\u7269\u6599\u3001\u4ea4\u4ed8\u65b9\u5f0f + \u8d39\u7528\u6263\u51cf\uff09", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L1"}, {"id": "crud_pilot_delivery_rationale_175", "label": "\u521b\u5efa\u4ea4\u4ed8\u65f6\u6263\u51cf\u8d39\u7528\u3002 \u6d41\u7a0b: 1. schedule \u2192 plan \u2192 application 2. application.chan", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L175"}, {"id": "crud_pilot_delivery_rationale_355", "label": "List all deliveries for an application (through plan \u2192 schedule \u2192 delivery).", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L355"}, {"id": "crud_pilot_delivery_rationale_538", "label": "Bulk save: soft-delete existing + insert new.", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L538"}, {"id": "crud_pilot_delivery_rationale_639", "label": "Create or update delivery method (upsert pattern).", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py", "source_location": "L639"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_delivery_py", "target": "uLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_models_models_py", "label": "models.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L1"}, {"id": "models_models_userrole", "label": "UserRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L10"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_models_sysuser", "label": "SysUser", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L22"}, {"id": "base", "label": "Base", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_models_sysrole", "label": "SysRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L48"}, {"id": "models_models_sysuserrole", "label": "SysUserRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L68"}, {"id": "models_models_sysrolemenu", "label": "SysRoleMenu", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L87"}, {"id": "models_models_sysroledatascopedetail", "label": "SysRoleDataScopeDetail", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L106"}, {"id": "models_models_sysmenu", "label": "SysMenu", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L126"}, {"id": "models_models_sysdept", "label": "SysDept", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L152"}, {"id": "models_models_systenant", "label": "SysTenant", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L175"}, {"id": "models_models_syssite", "label": "SysSite", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L195"}, {"id": "models_models_syspost", "label": "SysPost", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L220"}, {"id": "models_models_sysuserpost", "label": "SysUserPost", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L240"}, {"id": "models_models_bizitemunit", "label": "BizItemUnit", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L259"}, {"id": "models_models_bizexpresscompany", "label": "BizExpressCompany", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L278"}, {"id": "models_models_bizcustomer", "label": "BizCustomer", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L297"}, {"id": "models_models_bizcellsampletype", "label": "BizCellSampleType", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L320"}, {"id": "models_models_bizcollectionregion", "label": "BizCollectionRegion", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L341"}, {"id": "models_models_bizcollectionhospital", "label": "BizCollectionHospital", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L359"}, {"id": "models_models_bizcollectionprotocolno", "label": "BizCollectionProtocolNo", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L378"}, {"id": "models_models_bizsamplecode", "label": "BizSampleCode", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L400"}, {"id": "models_models_sysdicttype", "label": "SysDictType", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L428"}, {"id": "models_models_sysethnic", "label": "SysEthnic", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L447"}, {"id": "models_models_sysdictdata", "label": "SysDictData", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L466"}, {"id": "models_models_sysapirequestlog", "label": "SysApiRequestLog", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location"Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_handover_py", "label": "outbound_handover.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L1"}, {"id": "schemas_outbound_handover_outboundhandoveritem", "label": "OutboundHandoverItem", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L9"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "schemas_outbound_handover_outboundhandoversavebody", "label": "OutboundHandoverSaveBody", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L19"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_handover_py", "target": "datetime", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L1", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_handover_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_handover_py", "target": "pydantic", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_handover_py", "target": "app_schemas_outbound_release_material", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_handover_py", "target": "schemas_outbound_handover_outboundhandoveritem", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L9", "weight": 1.0}, {"source": "schemas_outbound_handover_outboundhandoveritem", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_schemas_outbound_handover_py", "target": "schemas_outbound_handover_outboundhandoversavebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L19", "weight": 1.0}, {"source": "schemas_outbound_handover_outboundhandoversavebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py", "source_location": "L19", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_pilot_application_py", "label": "pilot_application.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L1"}, {"id": "crud_pilot_application_normalize_yyyymmdd", "label": "_normalize_yyyymmdd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L32"}, {"id": "crud_pilot_application_format_yyyy_mm_dd", "label": "_format_yyyy_mm_dd()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L39"}, {"id": "crud_pilot_application_parse_infusion_datetime", "label": "_parse_infusion_datetime()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L46"}, {"id": "crud_pilot_application_release_application_no_for_soft_delete", "label": "_release_application_no_for_soft_delete()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L66"}, {"id": "crud_pilot_application_generate_application_no", "label": "_generate_application_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L74"}, {"id": "crud_pilot_application_row_to_dict_application", "label": "_row_to_dict_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L96"}, {"id": "crud_pilot_application_row_to_dict_patient", "label": "_row_to_dict_patient()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L166"}, {"id": "crud_pilot_application_row_to_dict_infusion_plan", "label": "_row_to_dict_infusion_plan()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L189"}, {"id": "crud_pilot_application_row_to_dict_schedule_product", "label": "_row_to_dict_schedule_product()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L236"}, {"id": "crud_pilot_application_row_to_dict_infusion_schedule", "label": "_row_to_dict_infusion_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L253"}, {"id": "crud_pilot_application_list_applications", "label": "list_applications()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L284"}, {"id": "crud_pilot_application_get_application", "label": "get_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L353"}, {"id": "crud_pilot_application_create_application", "label": "create_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L385"}, {"id": "crud_pilot_application_update_application", "label": "update_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L437"}, {"id": "crud_pilot_application_soft_delete_application", "label": "soft_delete_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L462"}, {"id": "crud_pilot_application_start_application", "label": "start_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L483"}, {"id": "crud_pilot_application_complete_application", "label": "complete_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L506"}, {"id": "crud_pilot_application_void_application", "label": "void_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L529"}, {"id": "crud_pilot_application_get_patient_by_application", "label": "get_patient_by_application()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L557"}, {"id": "crud_pilot_application_save_patient", "label": "save_patient()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py", "source_location": "L574"}, {"id": "crud_pilot_application_list_infusion_plans", "label": "list_infusion_plans()", "file_type": "code", "source_file": "/Users/wuzilong/work/Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "label": "outbound_release_material.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L1"}, {"id": "crud_outbound_release_material_fmt_dt", "label": "_fmt_dt()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L24"}, {"id": "crud_outbound_release_material_cell_row_to_dict", "label": "_cell_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L28"}, {"id": "crud_outbound_release_material_qc_material_row_to_dict", "label": "_qc_material_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L47"}, {"id": "crud_outbound_release_material_paper_row_to_dict", "label": "_paper_row_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L63"}, {"id": "crud_outbound_release_material_legacy_paper_rows_from_attachments", "label": "_legacy_paper_rows_from_attachments()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L76"}, {"id": "crud_outbound_release_material_material_header_to_dict", "label": "_material_header_to_dict()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L98"}, {"id": "crud_outbound_release_material_get_schedule", "label": "_get_schedule()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L129"}, {"id": "crud_outbound_release_material_get_outbound_material", "label": "get_outbound_material()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L144"}, {"id": "crud_outbound_release_material_save_outbound_material", "label": "save_outbound_material()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L216"}, {"id": "crud_outbound_release_material_rationale_1", "label": "\u51fa\u5e93\u653e\u884c\u5ba1\u6838 \u00b7 \u51fa\u5e93\u7269\u6599\u51c6\u5907\uff08\u53f0\u8d26 CRUD\uff09", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L1"}, {"id": "crud_outbound_release_material_rationale_229", "label": "\u5168\u91cf\u4fdd\u5b58\u51fa\u5e93\u7269\u6599\u51c6\u5907\uff08\u53f0\u8d26\uff0c\u4e0d\u8054\u52a8\u5e93\u5b58\uff09\u3002", "file_type": "rationale", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L229"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "datetime", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "decimal", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L6", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_crud_outbound_release_material_py", "target": "app_core_utils", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py", "source_location": "L11", "weight": 1.0}, {"sourceLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "label": "outbound_release_review.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L1"}, {"id": "api_outbound_release_review_get_tenant_no", "label": "_get_tenant_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L22"}, {"id": "api_outbound_release_review_get_current_user_id", "label": "_get_current_user_id()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L32"}, {"id": "api_outbound_release_review_list_pilot_release_reviews", "label": "list_pilot_release_reviews()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L40"}, {"id": "api_outbound_release_review_get_pilot_release_review_detail", "label": "get_pilot_release_review_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L71"}, {"id": "api_outbound_release_review_submit_single_review", "label": "submit_single_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L89"}, {"id": "api_outbound_release_review_batch_review", "label": "batch_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L118"}, {"id": "api_outbound_release_review_get_outbound_release_materials", "label": "get_outbound_release_materials()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L146"}, {"id": "api_outbound_release_review_save_outbound_release_materials", "label": "save_outbound_release_materials()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L164"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_core_database", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_core_menu_guard", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_core_response", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_crud", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L10", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_models_models", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L11", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_schemas_outbound_release_review", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L12", "weight": 1Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_models_models_py", "label": "models.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L1"}, {"id": "models_models_userrole", "label": "UserRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L10"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_models_sysuser", "label": "SysUser", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L22"}, {"id": "base", "label": "Base", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_models_sysrole", "label": "SysRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L48"}, {"id": "models_models_sysuserrole", "label": "SysUserRole", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L68"}, {"id": "models_models_sysrolemenu", "label": "SysRoleMenu", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L87"}, {"id": "models_models_sysroledatascopedetail", "label": "SysRoleDataScopeDetail", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L106"}, {"id": "models_models_sysmenu", "label": "SysMenu", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L126"}, {"id": "models_models_sysdept", "label": "SysDept", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L152"}, {"id": "models_models_systenant", "label": "SysTenant", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L175"}, {"id": "models_models_syssite", "label": "SysSite", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L195"}, {"id": "models_models_syspost", "label": "SysPost", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L220"}, {"id": "models_models_sysuserpost", "label": "SysUserPost", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L240"}, {"id": "models_models_bizitemunit", "label": "BizItemUnit", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L259"}, {"id": "models_models_bizexpresscompany", "label": "BizExpressCompany", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L278"}, {"id": "models_models_bizcustomer", "label": "BizCustomer", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L297"}, {"id": "models_models_bizcellsampletype", "label": "BizCellSampleType", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L320"}, {"id": "models_models_bizcollectionregion", "label": "BizCollectionRegion", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L341"}, {"id": "models_models_bizcollectionhospital", "label": "BizCollectionHospital", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L359"}, {"id": "models_models_bizcollectionprotocolno", "label": "BizCollectionProtocolNo", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L378"}, {"id": "models_models_bizsamplecode", "label": "BizSampleCode", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L400"}, {"id": "models_models_sysdicttype", "label": "SysDictType", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L428"}, {"id": "models_models_sysethnic", "label": "SysEthnic", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L447"}, {"id": "models_models_sysdictdata", "label": "SysDictData", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location": "L466"}, {"id": "models_models_sysapirequestlog", "label": "SysApiRequestLog", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py", "source_location"Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "label": "outbound_release_review.py", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L1"}, {"id": "api_outbound_release_review_get_tenant_no", "label": "_get_tenant_no()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L22"}, {"id": "api_outbound_release_review_get_current_user_id", "label": "_get_current_user_id()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L32"}, {"id": "api_outbound_release_review_list_pilot_release_reviews", "label": "list_pilot_release_reviews()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L40"}, {"id": "api_outbound_release_review_get_pilot_release_review_detail", "label": "get_pilot_release_review_detail()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L71"}, {"id": "api_outbound_release_review_submit_single_review", "label": "submit_single_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L89"}, {"id": "api_outbound_release_review_batch_review", "label": "batch_review()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L118"}, {"id": "api_outbound_release_review_get_outbound_release_materials", "label": "get_outbound_release_materials()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L146"}, {"id": "api_outbound_release_review_save_outbound_release_materials", "label": "save_outbound_release_materials()", "file_type": "code", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L164"}], "edges": [{"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "typing", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L2", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "fastapi", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L4", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "sqlalchemy_orm", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L5", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_core_database", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L7", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_core_menu_guard", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L8", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_core_response", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L9", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_crud", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L10", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_models_models", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L11", "weight": 1.0}, {"source": "users_wuzilong_work_00code_zkxw_backend_app_api_outbound_release_review_py", "target": "app_schemas_outbound_release_review", "relation": "imports_from", "confidence": "EXTRACTED", "source_file": "/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py", "source_location": "L12", "weight": 1Line truncated
+119
View File
@@ -3105,6 +3105,123 @@ class BizPilotInfusionConfirm(Base):
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class BizOutboundReleaseMaterial(Base):
"""出库放行-出库物料准备主表 biz_outbound_release_material"""
__tablename__ = "biz_outbound_release_material"
id = Column(String(64), primary_key=True, comment="主键ID")
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
paper_attachments = Column(String(4000), nullable=True, comment="其他纸质材料附件")
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人id")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人id")
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class BizOutboundReleaseCell(Base):
"""出库放行-出库细胞(台账) biz_outbound_release_cell"""
__tablename__ = "biz_outbound_release_cell"
id = Column(String(64), primary_key=True, comment="主键ID")
material_id = Column(String(64), nullable=False, comment="出库物料主表ID")
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
cell_product_id = Column(String(64), nullable=False, comment="细胞产品ID")
product_code = Column(String(128), nullable=True, comment="产品编码快照")
product_name = Column(String(200), nullable=True, comment="产品名称快照")
product_type_name = Column(String(100), nullable=True, comment="产品类型快照")
spec_name = Column(String(100), nullable=True, comment="规格快照")
passage = Column(String(32), nullable=True, comment="代次快照")
batch_no = Column(String(64), nullable=True, comment="批次号快照")
storage_slot_name = Column(String(200), nullable=True, comment="储物格快照")
product_status = Column(String(32), nullable=True, comment="保存时状态快照")
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人id")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人id")
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class BizOutboundReleasePaper(Base):
"""出库放行-其他纸质材料(台账) biz_outbound_release_paper"""
__tablename__ = "biz_outbound_release_paper"
id = Column(String(64), primary_key=True, comment="主键ID")
material_id = Column(String(64), nullable=False, comment="出库物料主表ID")
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
paper_name = Column(String(200), nullable=False, comment="材料名称")
copies = Column(Integer, nullable=False, default=1, comment="份数")
attachment_url = Column(String(2000), nullable=True, comment="附件URL")
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人id")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人id")
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class BizOutboundHandover(Base):
"""输注计划-出库交接 biz_outbound_handover"""
__tablename__ = "biz_outbound_handover"
id = Column(String(64), primary_key=True, comment="主键ID")
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
handover_user_id = Column(String(64), nullable=True, comment="交接人用户ID")
handover_person = Column(String(64), nullable=True, comment="交接人姓名快照")
handover_time = Column(DateTime, nullable=True, comment="交接时间")
handover_location = Column(String(200), nullable=True, comment="交接地点")
receiver_person = Column(String(200), nullable=True, comment="接收人(文本)")
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="交接备注")
create_by = Column(String(64), nullable=True, comment="创建人id")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人id")
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class BizOutboundReleaseQcMaterial(Base):
"""出库放行-质检物料(台账) biz_outbound_release_qc_material"""
__tablename__ = "biz_outbound_release_qc_material"
id = Column(String(64), primary_key=True, comment="主键ID")
material_id = Column(String(64), nullable=False, comment="出库物料主表ID")
infusion_schedule_id = Column(String(64), nullable=False, comment="输注计划ID")
qc_material_id = Column(String(64), nullable=False, comment="质检物料ID")
qty = Column(Numeric(18, 4), nullable=False, comment="计划用量")
material_code = Column(String(64), nullable=True, comment="物料编码快照")
material_name = Column(String(200), nullable=True, comment="物料名称快照")
spec_model = Column(String(200), nullable=True, comment="规格型号快照")
unit = Column(String(32), nullable=True, comment="单位快照")
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人id")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建人部门ID")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人id")
update_time = Column(DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间")
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class BizOutboundReleaseReview(Base):
"""出库放行审核 biz_outbound_release_review"""
@@ -3118,6 +3235,8 @@ class BizOutboundReleaseReview(Base):
reviewer_user_id = Column(String(64), nullable=True, comment="审核人")
review_time = Column(DateTime, nullable=True, comment="审核时间")
review_remark = Column(String(2000), nullable=True, comment="审核备注")
review_attachments = Column(String(4000), nullable=True, comment="审核附件(逗号分隔URL)")
review_by_name = Column(String(64), nullable=True, comment="审核人姓名")
tenant_no = Column(String(64), nullable=False, default="zkxw", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
+23
View File
@@ -0,0 +1,23 @@
from datetime import datetime
from typing import List, Optional
from pydantic import BaseModel, ConfigDict, Field
from app.schemas.outbound_release_material import OutboundReleaseMaterialSaveBody
class OutboundHandoverItem(BaseModel):
model_config = ConfigDict(populate_by_name=True)
handoverUserId: str = Field(..., min_length=1)
handoverTime: str = Field(..., min_length=1)
handoverLocation: Optional[str] = None
receiverPerson: str = Field(..., min_length=1)
remark: Optional[str] = None
class OutboundHandoverSaveBody(BaseModel):
model_config = ConfigDict(populate_by_name=True)
outboundMaterial: OutboundReleaseMaterialSaveBody
handover: OutboundHandoverItem
@@ -0,0 +1,45 @@
from decimal import Decimal
from typing import List, Optional
from pydantic import BaseModel, ConfigDict, Field, field_validator
class OutboundReleaseCellItem(BaseModel):
model_config = ConfigDict(populate_by_name=True)
cellProductId: str = Field(..., min_length=1)
remark: Optional[str] = None
class OutboundReleaseQcMaterialItem(BaseModel):
model_config = ConfigDict(populate_by_name=True)
materialId: str = Field(..., min_length=1)
qty: Decimal = Field(..., gt=0)
remark: Optional[str] = None
@field_validator("qty", mode="before")
@classmethod
def _coerce_qty(cls, v):
if v is None or v == "":
raise ValueError("用量必须大于0")
return v
class OutboundReleasePaperItem(BaseModel):
model_config = ConfigDict(populate_by_name=True)
paperName: str = Field(..., min_length=1)
copies: int = Field(..., ge=1)
attachmentUrl: str = Field(..., min_length=1)
remark: Optional[str] = None
class OutboundReleaseMaterialSaveBody(BaseModel):
model_config = ConfigDict(populate_by_name=True)
paperAttachments: Optional[str] = None
paperMaterials: List[OutboundReleasePaperItem] = Field(default_factory=list)
remark: Optional[str] = None
cells: List[OutboundReleaseCellItem] = Field(default_factory=list)
qcMaterials: List[OutboundReleaseQcMaterialItem] = Field(default_factory=list)
@@ -0,0 +1,31 @@
from typing import List, Optional
from pydantic import BaseModel, ConfigDict, Field
class OutboundReviewListParams(BaseModel):
model_config = ConfigDict(populate_by_name=True)
page: int = Field(1, ge=1)
pageSize: int = Field(10, ge=1, le=100)
keyword: Optional[str] = None
reviewConclusion: Optional[str] = None
scheduleStatus: Optional[str] = None
qcStatus: Optional[str] = None
class OutboundReviewSubmitBody(BaseModel):
model_config = ConfigDict(populate_by_name=True)
reviewConclusion: str = Field(..., description="tg/btg")
reviewRemark: Optional[str] = None
reviewAttachments: Optional[str] = None
class OutboundBatchReviewBody(BaseModel):
model_config = ConfigDict(populate_by_name=True)
scheduleIds: List[str] = Field(..., min_length=1)
reviewConclusion: str = Field(..., description="tg/btg")
reviewRemark: Optional[str] = None
reviewAttachments: Optional[str] = None
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+119 -184
View File
@@ -1,12 +1,12 @@
# Graph Report - app (2026-05-26)
# Graph Report - app (2026-05-27)
## Corpus Check
- 160 files · ~167,784 words
- 167 files · ~173,555 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 3093 nodes · 13377 edges · 60 communities detected
- Extraction: 39% EXTRACTED · 61% INFERRED · 0% AMBIGUOUS · INFERRED: 8198 edges (avg confidence: 0.62)
- 3181 nodes · 13761 edges · 47 communities detected
- Extraction: 39% EXTRACTED · 61% INFERRED · 0% AMBIGUOUS · INFERRED: 8443 edges (avg confidence: 0.62)
- Token cost: 0 input · 0 output
## Community Hubs (Navigation)
@@ -51,37 +51,24 @@
- [[_COMMUNITY_Community 38|Community 38]]
- [[_COMMUNITY_Community 39|Community 39]]
- [[_COMMUNITY_Community 40|Community 40]]
- [[_COMMUNITY_Community 41|Community 41]]
- [[_COMMUNITY_Community 42|Community 42]]
- [[_COMMUNITY_Community 43|Community 43]]
- [[_COMMUNITY_Community 44|Community 44]]
- [[_COMMUNITY_Community 45|Community 45]]
- [[_COMMUNITY_Community 46|Community 46]]
- [[_COMMUNITY_Community 47|Community 47]]
- [[_COMMUNITY_Community 48|Community 48]]
- [[_COMMUNITY_Community 49|Community 49]]
- [[_COMMUNITY_Community 50|Community 50]]
- [[_COMMUNITY_Community 51|Community 51]]
- [[_COMMUNITY_Community 52|Community 52]]
- [[_COMMUNITY_Community 53|Community 53]]
- [[_COMMUNITY_Community 56|Community 56]]
- [[_COMMUNITY_Community 57|Community 57]]
- [[_COMMUNITY_Community 58|Community 58]]
- [[_COMMUNITY_Community 59|Community 59]]
- [[_COMMUNITY_Community 60|Community 60]]
- [[_COMMUNITY_Community 61|Community 61]]
## God Nodes (most connected - your core abstractions)
1. `success_response()` - 502 edges
2. `error_response()` - 401 edges
3. `SysUser` - 323 edges
4. `BizQcTaskResult` - 246 edges
5. `BizQcMaterialUsage` - 244 edges
6. `BizMaterialStockLog` - 240 edges
7. `BizQcMaterial` - 240 edges
8. `BizMaterial` - 237 edges
9. `BizQcItemParam` - 235 edges
10. `generate_uuid()` - 168 edges
1. `success_response()` - 506 edges
2. `error_response()` - 406 edges
3. `SysUser` - 329 edges
4. `BizQcTaskResult` - 261 edges
5. `BizQcMaterialUsage` - 260 edges
6. `BizQcMaterial` - 257 edges
7. `BizMaterialStockLog` - 250 edges
8. `BizMaterial` - 247 edges
9. `BizQcItemParam` - 245 edges
10. `generate_uuid()` - 172 edges
## Surprising Connections (you probably didn't know these)
- `统一记录 API 请求/响应出入参的中间件` --uses--> `SysApiRequestLog` [INFERRED]
@@ -99,284 +86,232 @@
### Community 0 - "Community 0"
Cohesion: 0.02
Nodes (553): attachment_download_url(), create_dept(), create_dict_data(), create_dict_type(), create_express_company(), create_item_unit(), create_menu(), create_post() (+545 more)
Nodes (560): attachment_download_url(), create_dept(), create_dict_data(), create_dict_type(), create_express_company(), create_item_unit(), create_menu(), create_post() (+552 more)
### Community 1 - "Community 1"
Cohesion: 0.01
Nodes (473): AttachmentDownloadUrlBody, DeptCreateBody, DeptUpdateBody, DictDataCreateBody, DictDataUpdateBody, DictTypeCreateBody, DictTypeUpdateBody, ExpressCompanyCreateBody (+465 more)
Nodes (468): AttachmentDownloadUrlBody, DeptCreateBody, DeptUpdateBody, DictDataCreateBody, DictDataUpdateBody, DictTypeCreateBody, DictTypeUpdateBody, ExpressCompanyCreateBody (+460 more)
### Community 2 - "Community 2"
Cohesion: 0.04
Nodes (363): AuditCreateBody, BatchDetailIdsBody, BatchRefundFinanceSubmitBody, FinanceConfirmBody, FullmoonTodoInsuranceBody, ProtocolCreateBody, ProtocolUpdateBody, 细胞存储 — 采集协议单 / 审核 / 财务确认 / 分期预警 API (+355 more)
Nodes (373): AuditCreateBody, BatchDetailIdsBody, BatchRefundFinanceSubmitBody, FinanceConfirmBody, FullmoonTodoInsuranceBody, ProtocolCreateBody, ProtocolUpdateBody, 细胞存储 — 采集协议单 / 审核 / 财务确认 / 分期预警 API (+365 more)
### Community 3 - "Community 3"
Cohesion: 0.02
Nodes (252): api_save_application(), delete(), get_multi_with_filters(), _format_attachment_file_size(), get_protocol_nos_used_in_protocols(), urls_to_attachment_list(), create_dict_type(), dict_type_code_exists() (+244 more)
Nodes (165): generate_uuid(), batch_stock_in(), batch_stock_out(), consumable_code_exists(), create_consumable(), _dec(), get_consumable(), _is_enabled_status() (+157 more)
### Community 4 - "Community 4"
Cohesion: 0.06
Nodes (156): generate_uuid(), activate_channel_agreement(), _apply_gmcp_order_quotas(), _apply_purchase_txn_holdings(), _apply_unsubscribe_txn_holdings(), _calc_gmcp_purchase_total(), cell_product_price_code_exists(), cell_product_spec_code_exists() (+148 more)
Cohesion: 0.05
Nodes (173): 中试交付管理 CRUD(交付信息、交付物料、交付方式 + 费用扣减), 创建交付时扣减费用。 流程: 1. schedule → plan → application 2. application.chan, List all deliveries for an application (through plan → schedule → delivery)., Bulk save: soft-delete existing + insert new., Create or update delivery method (upsert pattern)., activate_channel_agreement(), _apply_gmcp_order_quotas(), _apply_purchase_txn_holdings() (+165 more)
### Community 5 - "Community 5"
Cohesion: 0.03
Nodes (105): _leave_local_callback(), submit_leave(), get_designer_data(), ProcessDefCreateBody, ProcessDefUpdateBody, PublishVersionBody, 审批意见:前端传 commentText,兼容 comment。, StartInstanceBody (+97 more)
Cohesion: 0.02
Nodes (142): CellSampleTypeCreateBody, CellSampleTypeUpdateBody, CollectionRegionCreateBody, CollectionRegionUpdateBody, create_collection_region(), CustomerCreateBody, CustomerUpdateBody, delete_cell_sample_type() (+134 more)
### Community 6 - "Community 6"
Cohesion: 0.04
Nodes (121): create_collection_protocol(), delete_collection_protocol(), _ensure_customer_for_mother(), get_collection_protocol_detail(), _get_current_user_id(), _get_tenant_no(), list_collection_protocol_audits(), list_collection_protocols() (+113 more)
Cohesion: 0.03
Nodes (97): get_designer_data(), ProcessDefCreateBody, ProcessDefUpdateBody, PublishVersionBody, 审批意见:前端传 commentText,兼容 comment。, StartInstanceBody, TaskActionBody, _error_json() (+89 more)
### Community 7 - "Community 7"
Cohesion: 0.03
Nodes (93): get_role_menus(), _avatar_url_field(), _build_user_info_payload(), get_web_auth_menu_codes(), _jwt_user_payload(), logout(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/zkxw.sql 基线), 登出:吊销 Redis 会话(若已配置 REDIS_HOST)。 (+85 more)
Cohesion: 0.04
Nodes (102): create_lab_item(), get_lab_item(), item_code_exists(), list_active_lab_items(), list_lab_items(), _row_to_dict(), soft_delete_lab_item(), update_lab_item() (+94 more)
### Community 8 - "Community 8"
Cohesion: 0.05
Nodes (79): get_next_cell_product_code(), _build_ancestor_chain(), _build_descendant_chain(), _build_facility_path_label(), build_split_product_codes(), create_cell_products_batch(), create_cell_products_by_quantity(), delete_cell_product() (+71 more)
Cohesion: 0.04
Nodes (75): get_by_schedule(), get_method(), _get_tenant_no(), list_by_application(), list_materials(), 中试服务交付管理 API(交付信息、交付物料、交付方式), soft_delete(), get_protocol_nos_used_in_protocols() (+67 more)
### Community 9 - "Community 9"
Cohesion: 0.07
Nodes (67): AccessLogCreateBody, AccessLogUpdateBody, CleanRoomCreateBody, CleanRoomUpdateBody, ExhibitionAppointmentCreateBody, ExhibitionAppointmentUpdateBody, OccupancyCreateBody, 运营支撑 API(洁净室、进出记录、仓储设施、储位、展厅预约) (+59 more)
Cohesion: 0.04
Nodes (64): _avatar_url_field(), _build_user_info_payload(), get_web_auth_menu_codes(), _jwt_user_payload(), logout(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/zkxw.sql 基线), 登出:吊销 Redis 会话(若已配置 REDIS_HOST)。, 获取当前用户菜单权限标识(sys_menu.perms,经角色继承)。 (+56 more)
### Community 10 - "Community 10"
Cohesion: 0.06
Nodes (80): _persist_protocol_sub_resources(), _add_months_yyyymmdd(), align_fq_payment_details_payload(), _apply_payment_detail_list_filters(), _apply_submit_receipt_finance(), _apply_submit_refund_finance(), attachments_to_urls(), _audit_to_dict() (+72 more)
### Community 11 - "Community 11"
Cohesion: 0.06
Nodes (69): _format_attachment_file_size(), urls_to_attachment_list(), _accept_conclusion_label(), _attach_outbound_detail(), _attach_reception_detail(), complete_production_work_order(), configure_temp_production_work_order(), create_outbound_production_work_order() (+61 more)
### Community 12 - "Community 12"
Cohesion: 0.07
Nodes (66): AccessLogCreateBody, AccessLogUpdateBody, CleanRoomCreateBody, CleanRoomUpdateBody, ExhibitionAppointmentCreateBody, ExhibitionAppointmentUpdateBody, OccupancyCreateBody, 运营支撑 API(洁净室、进出记录、仓储设施、储位、展厅预约) (+58 more)
### Community 13 - "Community 13"
Cohesion: 0.35
Nodes (61): BatchStockInBody, BatchStockInItem, BatchStockOutBody, BatchStockOutItem, ConsumableCreateBody, ConsumablePackCreateBody, ConsumablePackUpdateBody, ConsumableUpdateBody (+53 more)
### Community 11 - "Community 11"
### Community 14 - "Community 14"
Cohesion: 0.07
Nodes (54): _fmt_dt(), get_handover_by_schedule(), get_outbound_handover(), get_outbound_handover_view(), _handover_row_to_dict(), _handover_view_dict(), _parse_handover_time(), 获取出库交接编辑数据(物料 + 交接信息 + 摘要)。 (+46 more)
### Community 15 - "Community 15"
Cohesion: 0.08
Nodes (54): api_save_application(), auto_generate_schedules(), complete_application(), create_application(), create_infusion_plan(), create_schedule(), _create_schedule_products(), _format_yyyy_mm_dd() (+46 more)
### Community 16 - "Community 16"
Cohesion: 0.07
Nodes (13): BaseStorage, convert_heic_to_jpeg(), get_storage(), LocalStorage, MinIOStorage, OSSStorage, process_image_content(), QiniuStorage (+5 more)
### Community 12 - "Community 12"
Cohesion: 0.11
Nodes (40): create_collection_protocol(), _active_link_query(), assert_biz_no_available(), create_convert_link(), get_convert_partner(), get_partner_sample_codes(), has_active_convert_link(), upsert_convert_link_for_to_storage() (+32 more)
### Community 17 - "Community 17"
Cohesion: 0.08
Nodes (41): get_next_cell_product_code(), _build_ancestor_chain(), _build_descendant_chain(), _build_facility_path_label(), build_split_product_codes(), create_cell_products_batch(), create_cell_products_by_quantity(), delete_cell_product() (+33 more)
### Community 13 - "Community 13"
### Community 18 - "Community 18"
Cohesion: 0.11
Nodes (42): create_collection_protocol(), _active_link_query(), assert_biz_no_available(), create_convert_link(), get_convert_partner(), get_partner_sample_codes(), has_active_convert_link(), upsert_convert_link_for_to_storage() (+34 more)
### Community 19 - "Community 19"
Cohesion: 0.12
Nodes (11): get_wechat_pay_client(), get_wechat_pay_v2(), 微信支付工具模块 支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.ht, 统一下单接口 (V3) Args: out_trade_no: 商户订单号 total, 申请退款 Args: out_trade_no: 商户订单号 total_amount, 小程序调起支付的二次签名参数(与公众号 JSAPI 规则一致), 统一下单 (V2 API) Args: out_trade_no: 商户订单号 tot, 生成签名 V3 (SHA256 with RSA) (+3 more)
### Community 14 - "Community 14"
Cohesion: 0.13
Nodes (22): _accept_conclusion_label(), _base_query(), _ensure_notification(), _fmt_dt(), generate_sms_content(), list_notifications(), _normalize_date_bound(), resolve_notification() (+14 more)
### Community 15 - "Community 15"
Cohesion: 0.18
Nodes (24): add_step(), copy_step(), create_route(), _create_step_consumable(), _create_step_data_collection(), _create_step_output(), _create_step_reagent(), get_route() (+16 more)
### Community 16 - "Community 16"
Cohesion: 0.17
Nodes (12): BusinessException, InvalidStatusTransitionException, log_delivery_operation(), log_operation(), log_order_operation(), log_settlement_operation(), log_user_operation(), OrderLockedException (+4 more)
### Community 17 - "Community 17"
Cohesion: 0.21
Nodes (19): _consumable_row_to_dict(), create_process(), _create_sub_consumable(), _create_sub_data_collection(), _create_sub_output(), _create_sub_reagent(), _data_collection_row_to_dict(), get_process() (+11 more)
### Community 18 - "Community 18"
Cohesion: 0.22
Nodes (18): _create_settlement_txn(), _deduct_fee_on_complete(), _find_existing_settlement_txn(), _find_service_order_product(), get_infusion_schedule_detail(), _get_plan_schedule_course_meta(), _get_products_for_schedule(), list_infusion_schedules_mgmt() (+10 more)
### Community 19 - "Community 19"
Cohesion: 0.23
Nodes (14): batch_stock_in(), batch_stock_out(), consumable_code_exists(), create_consumable(), _dec(), get_consumable(), _is_enabled_status(), list_consumables() (+6 more)
### Community 20 - "Community 20"
Cohesion: 0.25
Nodes (14): batch_stock_in(), batch_stock_out(), create_reagent(), _dec(), get_reagent(), _is_enabled_status(), list_reagents(), _norm_status() (+6 more)
### Community 21 - "Community 21"
Cohesion: 0.21
Nodes (13): get_method(), create_delivery(), _deduct_fee_on_delivery(), _generate_delivery_no(), get_delivery_by_schedule(), get_delivery_method(), list_deliveries_by_application(), list_delivery_materials() (+5 more)
### Community 22 - "Community 22"
Cohesion: 0.25
Nodes (13): code_exists(), create_material(), _dec(), _fmt_dt(), get_material(), list_materials(), _norm_status(), options_list() (+5 more)
### Community 23 - "Community 23"
Cohesion: 0.25
Nodes (13): batch_issue_protocol_nos(), batch_revoke_protocol_nos(), create_protocol_no(), get_protocol_no(), list_protocol_nos(), _parse_issued_time(), protocol_no_exists(), 采集协议号池 CRUD(biz_collection_protocol_no) (+5 more)
### Community 21 - "Community 21"
Cohesion: 0.27
Nodes (11): _accept_conclusion_label(), _base_query(), _ensure_notification(), _fmt_dt(), generate_sms_content(), list_notifications(), _normalize_date_bound(), resolve_notification() (+3 more)
### Community 24 - "Community 24"
Cohesion: 0.26
Nodes (12): batch_issue_sample_codes(), batch_revoke_sample_codes(), create_sample_code(), get_sample_code(), list_sample_codes(), _parse_issued_time(), 样本编码池 CRUD(biz_sample_code), _resolve_issued_user_display_name() (+4 more)
### Community 25 - "Community 25"
Cohesion: 0.23
Nodes (12): create_collection_region(), create_hospital(), get_collection_region(), get_hospital(), _hospital_names_by_region_ids(), _hospital_to_dict(), list_collection_regions(), list_hospitals() (+4 more)
### Community 26 - "Community 26"
### Community 22 - "Community 22"
Cohesion: 0.24
Nodes (9): 微信消息通知服务 支持微信小程序模板消息推送 使用方式: from app.core.wechat_message import Wech, 发送模板消息 Args: openid: 用户openid templ, send_delivery_notice(), send_delivery_warning(), send_order_status(), send_payment_success(), send_refund_result(), send_urge_notification() (+1 more)
### Community 27 - "Community 27"
Cohesion: 0.23
Nodes (12): Config, ProductBase, ProductCategoryBase, ProductCategoryCreate, ProductCategoryResponse, ProductCreate, ProductResponse, ProductUnitBase (+4 more)
### Community 23 - "Community 23"
Cohesion: 0.27
Nodes (11): _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept(), get_dept(), list_depts(), list_depts_tree(), 保留匹配节点及其全部上级,供关键词检索后仍能正确组树。 (+3 more)
### Community 28 - "Community 28"
Cohesion: 0.31
Nodes (12): _code_exists(), create_material(), _dec(), _fmt_dt(), get_material(), list_materials(), options_list(), _row_to_dict() (+4 more)
### Community 24 - "Community 24"
Cohesion: 0.29
Nodes (9): _build_tree(), _cascade_soft_delete(), create_menu(), get_menu(), list_menus(), list_menus_tree(), _row_to_dict(), soft_delete_menu() (+1 more)
### Community 29 - "Community 29"
Cohesion: 0.24
Nodes (12): list_depts(), _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept(), get_dept(), list_depts(), list_depts_tree() (+4 more)
### Community 30 - "Community 30"
Cohesion: 0.26
Nodes (10): list_menus(), _build_tree(), _cascade_soft_delete(), create_menu(), get_menu(), list_menus(), list_menus_tree(), _row_to_dict() (+2 more)
### Community 31 - "Community 31"
Cohesion: 0.3
Nodes (10): create_consumable_pack(), get_consumable_pack(), get_pack_detail(), _item_row_to_dict(), list_all_packs(), list_consumable_packs(), pack_code_exists(), _row_to_dict() (+2 more)
### Community 32 - "Community 32"
Cohesion: 0.24
Nodes (9): dict_data_options(), create_dict_data(), get_dict_data(), list_dict_data(), list_dict_data_options(), 字典数据 CRUD(sys_dict_data), _row_to_dict(), soft_delete_dict_data() (+1 more)
### Community 33 - "Community 33"
Cohesion: 0.31
Nodes (8): create_sop_document(), get_sop_document(), list_sop_documents(), SOP文档 CRUD(biz_sop_document), _row_to_dict(), soft_delete_sop_document(), sop_code_exists(), update_sop_document()
### Community 34 - "Community 34"
Cohesion: 0.36
Nodes (9): deduct_for_task(), _display_remark(), list_usages(), list_usages_by_task(), _parse_receiver_purpose_from_remark(), _resolve_receiver_purpose(), revert_task_material_usages(), _row_to_dict() (+1 more)
### Community 35 - "Community 35"
### Community 25 - "Community 25"
Cohesion: 0.31
Nodes (8): create_express_company(), express_code_exists(), get_express_company(), list_express_companies(), 快递公司 CRUD(biz_express_company), _row_to_dict(), soft_delete_express_company(), update_express_company()
### Community 36 - "Community 36"
### Community 26 - "Community 26"
Cohesion: 0.38
Nodes (9): create_check_item(), get_check_item(), item_code_exists(), list_active_check_items(), list_check_items(), _order_query(), _row_to_dict(), soft_delete_check_item() (+1 more)
### Community 37 - "Community 37"
### Community 27 - "Community 27"
Cohesion: 0.27
Nodes (8): create_dict_data(), get_dict_data(), list_dict_data(), list_dict_data_options(), 字典数据 CRUD(sys_dict_data), _row_to_dict(), soft_delete_dict_data(), update_dict_data()
### Community 28 - "Community 28"
Cohesion: 0.31
Nodes (8): category_code_exists(), create_process_category(), get_process_category(), list_process_categories(), 工艺工序分类 CRUD(biz_process_category), _row_to_dict(), soft_delete_process_category(), update_process_category()
### Community 38 - "Community 38"
### Community 29 - "Community 29"
Cohesion: 0.31
Nodes (8): create_item_unit(), get_item_unit(), list_item_units(), 物品单位 CRUD(biz_item_unit), _row_to_dict(), soft_delete_item_unit(), unit_code_exists(), update_item_unit()
### Community 39 - "Community 39"
Cohesion: 0.31
Nodes (8): create_cell_sample_type(), get_cell_sample_type(), list_cell_sample_types(), 细胞样本类型 CRUD(biz_cell_sample_type), _row_to_dict(), soft_delete_cell_sample_type(), type_code_exists(), update_cell_sample_type()
### Community 40 - "Community 40"
### Community 30 - "Community 30"
Cohesion: 0.31
Nodes (8): create_output_type(), get_output_type(), list_output_types(), 工艺产出物类型 CRUD(biz_output_type), _row_to_dict(), soft_delete_output_type(), type_code_exists(), update_output_type()
### Community 41 - "Community 41"
### Community 31 - "Community 31"
Cohesion: 0.36
Nodes (7): create_post(), get_post(), list_posts(), post_code_exists(), _row_to_dict(), soft_delete_post(), update_post()
### Community 42 - "Community 42"
### Community 32 - "Community 32"
Cohesion: 0.36
Nodes (7): create_tenant(), get_tenant(), list_tenants(), _row_to_dict(), soft_delete_tenant(), tenant_no_exists(), update_tenant()
### Community 43 - "Community 43"
### Community 33 - "Community 33"
Cohesion: 0.36
Nodes (7): create_site(), get_site(), list_sites(), _row_to_dict(), site_code_exists(), soft_delete_site(), update_site()
### Community 44 - "Community 44"
### Community 34 - "Community 34"
Cohesion: 0.29
Nodes (2): BaseModel, SoftDeleteModel
### Community 45 - "Community 45"
Cohesion: 0.43
Nodes (7): confirm_infusion(), create_infusion_confirm(), delete_infusion_confirm(), get_confirm_by_id(), list_confirms_by_application(), _row_to_dict(), update_infusion_confirm()
### Community 46 - "Community 46"
Cohesion: 0.43
Nodes (7): _display_remark(), list_stock_logs(), _parse_receiver_purpose_from_remark(), _resolve_receiver_purpose(), revert_step_stock_changes(), _row_to_dict(), _user_nick_name_map()
### Community 47 - "Community 47"
### Community 35 - "Community 35"
Cohesion: 0.38
Nodes (6): derive_legacy_status_from_three(), derive_three_status_from_legacy(), 阶段A兼容:从旧 status 推导三字段。 约束:旧 status 本身混合了支付/配送/订单生命周期,因此只能尽力推断; 若业务侧已有更精确, 阶段A兼容:从三字段反推旧 status(用于旧前端/旧筛选参数兼容)。, ThreeStatus, _to_decimal()
### Community 48 - "Community 48"
Cohesion: 0.53
Nodes (5): create_release_review(), delete_release_review(), list_reviews_by_schedule(), _row_to_dict(), update_review_conclusion()
### Community 49 - "Community 49"
### Community 36 - "Community 36"
Cohesion: 0.5
Nodes (3): BaseSettings, Config, Settings
### Community 50 - "Community 50"
### Community 37 - "Community 37"
Cohesion: 0.5
Nodes (2): _auto_fill_create_dept_id(), ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID
### Community 51 - "Community 51"
### Community 38 - "Community 38"
Cohesion: 0.67
Nodes (2): get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,供后端菜单模式联调)
### Community 52 - "Community 52"
### Community 39 - "Community 39"
Cohesion: 1.0
Nodes (1): 请求级别的用户上下文变量 通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传
### Community 53 - "Community 53"
### Community 40 - "Community 40"
Cohesion: 1.0
Nodes (1): API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)
### Community 56 - "Community 56"
### Community 43 - "Community 43"
Cohesion: 1.0
Nodes (1): 发送订单状态通知 Args: openid: 用户openid ord
### Community 57 - "Community 57"
### Community 44 - "Community 44"
Cohesion: 1.0
Nodes (1): 发送支付成功通知 Args: openid: 用户openid ord
### Community 58 - "Community 58"
### Community 45 - "Community 45"
Cohesion: 1.0
Nodes (1): 发送配送通知 Args: openid: 配送员openid task
### Community 59 - "Community 59"
### Community 46 - "Community 46"
Cohesion: 1.0
Nodes (1): 发送配送时效预警 Args: openid: 配送员openid ta
### Community 60 - "Community 60"
### Community 47 - "Community 47"
Cohesion: 1.0
Nodes (1): 发送退款结果通知 Args: openid: 用户openid ord
### Community 61 - "Community 61"
### Community 48 - "Community 48"
Cohesion: 1.0
Nodes (1): 发送催单通知给配送员 Args: deliver_openid: 配送员openid
## Knowledge Gaps
- **90 isolated node(s):** `刷新会话 TTL(refreshToken 续期;已登录用户每次 API 校验通过后滑动续期)`, `写入 refreshToken(用于 one-time 使用/吊销)`, `根据 token 获取当前用户(包含 Redis 会话校验;会话滑动续期)`, `登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。`, `Base64 密文 -> JSON 对象(须含 username、password、ts 毫秒时间戳)。` (+85 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **Thin community `Community 44`** (8 nodes): `BaseModel`, `.to_dict()`, `get_active()`, `base.py`, `SoftDeleteModel`, `.restore()`, `.soft_delete()`, `__tablename__()`
- **Thin community `Community 34`** (8 nodes): `BaseModel`, `.to_dict()`, `get_active()`, `base.py`, `SoftDeleteModel`, `.restore()`, `.soft_delete()`, `__tablename__()`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 50`** (4 nodes): `_auto_fill_create_dept_id()`, `get_db()`, `database.py`, `ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID`
- **Thin community `Community 37`** (4 nodes): `_auto_fill_create_dept_id()`, `get_db()`, `database.py`, `ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 51`** (3 nodes): `get_menu_list()`, `menu.py`, `运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,供后端菜单模式联调)`
- **Thin community `Community 38`** (3 nodes): `get_menu_list()`, `menu.py`, `运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,供后端菜单模式联调)`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 52`** (2 nodes): `context.py`, `请求级别的用户上下文变量 通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传`
- **Thin community `Community 39`** (2 nodes): `context.py`, `请求级别的用户上下文变量 通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 53`** (2 nodes): `__init__.py`, `API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)`
- **Thin community `Community 40`** (2 nodes): `__init__.py`, `API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 56`** (1 nodes): `发送订单状态通知 Args: openid: 用户openid ord`
- **Thin community `Community 43`** (1 nodes): `发送订单状态通知 Args: openid: 用户openid ord`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 57`** (1 nodes): `发送支付成功通知 Args: openid: 用户openid ord`
- **Thin community `Community 44`** (1 nodes): `发送支付成功通知 Args: openid: 用户openid ord`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 58`** (1 nodes): `发送配送通知 Args: openid: 配送员openid task`
- **Thin community `Community 45`** (1 nodes): `发送配送通知 Args: openid: 配送员openid task`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 59`** (1 nodes): `发送配送时效预警 Args: openid: 配送员openid ta`
- **Thin community `Community 46`** (1 nodes): `发送配送时效预警 Args: openid: 配送员openid ta`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 60`** (1 nodes): `发送退款结果通知 Args: openid: 用户openid ord`
- **Thin community `Community 47`** (1 nodes): `发送退款结果通知 Args: openid: 用户openid ord`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
- **Thin community `Community 61`** (1 nodes): `发送催单通知给配送员 Args: deliver_openid: 配送员openid`
- **Thin community `Community 48`** (1 nodes): `发送催单通知给配送员 Args: deliver_openid: 配送员openid`
Too small to be a meaningful cluster - may be noise or needs more connections extracted.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `SysUser` connect `Community 1` to `Community 2`, `Community 4`, `Community 5`, `Community 7`, `Community 9`, `Community 10`, `Community 23`, `Community 24`?**
_High betweenness centrality (0.087) - this node is a cross-community bridge._
- **Why does `generate_uuid()` connect `Community 4` to `Community 0`, `Community 1`, `Community 2`, `Community 3`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 12`, `Community 14`, `Community 15`, `Community 17`, `Community 18`, `Community 19`, `Community 20`, `Community 22`, `Community 23`, `Community 24`, `Community 25`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 32`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`, `Community 38`, `Community 39`, `Community 40`, `Community 41`, `Community 42`, `Community 43`, `Community 45`, `Community 48`?**
_High betweenness centrality (0.083) - this node is a cross-community bridge._
- **Why does `success_response()` connect `Community 0` to `Community 32`, `Community 1`, `Community 3`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 51`, `Community 21`, `Community 29`, `Community 30`?**
_High betweenness centrality (0.078) - this node is a cross-community bridge._
- **Are the 501 inferred relationships involving `success_response()` (e.g. with `list_storage_release_reviews()` and `get_storage_release_review_detail()`) actually correct?**
_`success_response()` has 501 INFERRED edges - model-reasoned connections that need verification._
- **Are the 477 inferred relationships involving `str` (e.g. with `unhandled_exception_handler()` and `extract_login_credentials()`) actually correct?**
_`str` has 477 INFERRED edges - model-reasoned connections that need verification._
- **Are the 400 inferred relationships involving `error_response()` (e.g. with `_json_error_response()` and `list_storage_release_reviews()`) actually correct?**
_`error_response()` has 400 INFERRED edges - model-reasoned connections that need verification._
- **Are the 321 inferred relationships involving `SysUser` (e.g. with `数据权限过滤(V0.3:基于角色 data_scope 的查询级行级过滤) data_scope 值: 1 = 全部数据 2 = 本部门数据 3` and `从 SysUser 读取用户的 dept_id。`) actually correct?**
_`SysUser` has 321 INFERRED edges - model-reasoned connections that need verification._
- **Why does `SysUser` connect `Community 1` to `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 6`, `Community 8`, `Community 9`, `Community 12`, `Community 13`, `Community 14`?**
_High betweenness centrality (0.116) - this node is a cross-community bridge._
- **Why does `success_response()` connect `Community 0` to `Community 1`, `Community 5`, `Community 38`, `Community 6`, `Community 8`, `Community 9`, `Community 15`, `Community 17`?**
_High betweenness centrality (0.075) - this node is a cross-community bridge._
- **Why does `generate_uuid()` connect `Community 3` to `Community 0`, `Community 2`, `Community 4`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 14`, `Community 15`, `Community 17`, `Community 18`, `Community 20`, `Community 21`, `Community 23`, `Community 24`, `Community 25`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 32`, `Community 33`?**
_High betweenness centrality (0.055) - this node is a cross-community bridge._
- **Are the 505 inferred relationships involving `success_response()` (e.g. with `list_storage_release_reviews()` and `get_storage_release_review_detail()`) actually correct?**
_`success_response()` has 505 INFERRED edges - model-reasoned connections that need verification._
- **Are the 487 inferred relationships involving `str` (e.g. with `unhandled_exception_handler()` and `extract_login_credentials()`) actually correct?**
_`str` has 487 INFERRED edges - model-reasoned connections that need verification._
- **Are the 405 inferred relationships involving `error_response()` (e.g. with `_json_error_response()` and `list_storage_release_reviews()`) actually correct?**
_`error_response()` has 405 INFERRED edges - model-reasoned connections that need verification._
- **Are the 327 inferred relationships involving `SysUser` (e.g. with `数据权限过滤(V0.3:基于角色 data_scope 的查询级行级过滤) data_scope 值: 1 = 全部数据 2 = 本部门数据 3` and `从 SysUser 读取用户的 dept_id。`) actually correct?**
_`SysUser` has 327 INFERRED edges - model-reasoned connections that need verification._
+4 -4
View File
@@ -57,12 +57,12 @@
</div>
<div id="legend"></div>
</div>
<div id="stats">3093 nodes &middot; 13377 edges &middot; 66 communities</div>
<div id="stats">3181 nodes &middot; 13761 edges &middot; 53 communities</div>
</div>
<script>
const RAW_NODES = [{"id": "init_py", "label": "__init__.py", "color": {"background": "#59A14F", "border": "#59A14F", "highlight": {"background": "#ffffff", "border": "#59A14F"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "__init__.py", "community": 54, "community_name": "Community 54", "source_file": "__init__.py", "file_type": "code", "degree": 0}, {"id": "main_py", "label": "main.py", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.4, "font": {"size": 0, "color": "#ffffff"}, "title": "main.py", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "code", "degree": 7}, {"id": "app_main_lifespan", "label": "lifespan()", "color": {"background": "#FF9DA7", "border": "#FF9DA7", "highlight": {"background": "#ffffff", "border": "#FF9DA7"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "lifespan()", "community": 7, "community_name": "Community 7", "source_file": "main.py", "file_type": "code", "degree": 4}, {"id": "app_main_error_json", "label": "_error_json()", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "_error_json()", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "code", "degree": 3}, {"id": "app_main_sqlalchemy_exception_handler", "label": "sqlalchemy_exception_handler()", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "sqlalchemy_exception_handler()", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "code", "degree": 4}, {"id": "app_main_unhandled_exception_handler", "label": "unhandled_exception_handler()", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "unhandled_exception_handler()", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "code", "degree": 5}, {"id": "app_main_mask_secret", "label": "_mask_secret()", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "_mask_secret()", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "code", "degree": 1}, {"id": "app_main_root", "label": "root()", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "root()", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "code", "degree": 1}, {"id": "app_main_health_check", "label": "health_check()", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "health_check()", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "code", "degree": 1}, {"id": "app_main_rationale_81", "label": "\u6570\u636e\u5e93\u5f02\u5e38\uff1a\u8fd4\u56de JSON \u5e76\u4fdd\u7559 CORS \u5934\uff0c\u907f\u514d\u6d4f\u89c8\u5668\u53ea\u62a5\u8de8\u57df\u9519\u8bef", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "\u6570\u636e\u5e93\u5f02\u5e38\uff1a\u8fd4\u56de JSON \u5e76\u4fdd\u7559 CORS \u5934\uff0c\u907f\u514d\u6d4f\u89c8\u5668\u53ea\u62a5\u8de8\u57df\u9519\u8bef", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "rationale", "degree": 3}, {"id": "app_main_rationale_92", "label": "\u672a\u6355\u83b7\u5f02\u5e38\uff1a\u7edf\u4e00 JSON 500\uff0c\u786e\u4fdd\u8de8\u57df\u573a\u666f\u4e0b\u4ecd\u6709 Access-Control-Allow-Origin", "color": {"background": "#EDC948", "border": "#EDC948", "highlight": {"background": "#ffffff", "border": "#EDC948"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "\u672a\u6355\u83b7\u5f02\u5e38\uff1a\u7edf\u4e00 JSON 500\uff0c\u786e\u4fdd\u8de8\u57df\u573a\u666f\u4e0b\u4ecd\u6709 Access-Control-Allow-Origin", "community": 5, "community_name": "Community 5", "source_file": "main.py", "file_type": "rationale", "degree": 3}, {"id": "tasks_init_py", "label": "__init__.py", "color": {"background": "#FF9DA7", "border": "#FF9DA7", "highlight": {"background": "#ffffff", "border": "#FF9DA7"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "__init__.py", "community": 7, "community_name": "Community 7", "source_file": "tasks/__init__.py", "file_type": "code", "degLine truncated
const RAW_EDGES = [{"from": "main_py", "to": "app_main_lifespan", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_error_json", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_sqlalchemy_exception_handler", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_unhandled_exception_handler", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_mask_secret", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_root", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_health_check", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_lifespan", "to": "core_login_crypto_ensure_initialized", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_lifespan", "to": "tasks_init_init_scheduled_tasks", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_lifespan", "to": "tasks_init_shutdown_scheduler", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_error_json", "to": "app_main_sqlalchemy_exception_handler", "label": "calls", "title": "calls [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_error_json", "to": "app_main_unhandled_exception_handler", "label": "calls", "title": "calls [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_sqlalchemy_exception_handler", "to": "app_main_rationale_81", "label": "rationale_for", "title": "rationale_for [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_sqlalchemy_exception_handler", "to": "exception", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_unhandled_exception_handler", "to": "app_main_rationale_92", "label": "rationale_for", "title": "rationale_for [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_unhandled_exception_handler", "to": "exception", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_unhandled_exception_handler", "to": "str", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_rationale_81", "to": "core_api_request_log_middleware_apirequestlogmiddleware", "label": "uses", "title": "uses [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_rationale_81", "to": "core_api_crypto_middleware_apicryptomiddleware", "label": "uses", "title": "uses [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_rationale_92", "to": "core_api_request_log_middleware_apirequestlogmiddleware", "label": "uses", "title": "uses [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_rationale_92", "to": "core_api_crypto_middleware_apicryptomiddleware", "label": "uses", "title": "uses [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "tasks_init_py", "to": "tasks_init_init_scheduled_tasks", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "tasks_init_py", "to": "tasks_init_shutdown_scheduler", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "core_auth_py", "to": "core_auth_redis_session_enabled", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "core_auth_py", "to": "core_auth_get_redis_client", "labeLine truncated
const LEGEND = [{"cid": 0, "color": "#4E79A7", "label": "Community 0", "count": 570}, {"cid": 1, "color": "#F28E2B", "label": "Community 1", "count": 506}, {"cid": 2, "color": "#E15759", "label": "Community 2", "count": 368}, {"cid": 3, "color": "#76B7B2", "label": "Community 3", "count": 273}, {"cid": 4, "color": "#59A14F", "label": "Community 4", "count": 165}, {"cid": 5, "color": "#EDC948", "label": "Community 5", "count": 134}, {"cid": 6, "color": "#B07AA1", "label": "Community 6", "count": 133}, {"cid": 7, "color": "#FF9DA7", "label": "Community 7", "count": 120}, {"cid": 8, "color": "#9C755F", "label": "Community 8", "count": 86}, {"cid": 9, "color": "#BAB0AC", "label": "Community 9", "count": 71}, {"cid": 10, "color": "#4E79A7", "label": "Community 10", "count": 68}, {"cid": 11, "color": "#F28E2B", "label": "Community 11", "count": 46}, {"cid": 12, "color": "#E15759", "label": "Community 12", "count": 43}, {"cid": 13, "color": "#76B7B2", "label": "Community 13", "count": 31}, {"cid": 14, "color": "#59A14F", "label": "Community 14", "count": 28}, {"cid": 15, "color": "#EDC948", "label": "Community 15", "count": 26}, {"cid": 16, "color": "#B07AA1", "label": "Community 16", "count": 21}, {"cid": 17, "color": "#FF9DA7", "label": "Community 17", "count": 21}, {"cid": 18, "color": "#9C755F", "label": "Community 18", "count": 19}, {"cid": 19, "color": "#BAB0AC", "label": "Community 19", "count": 17}, {"cid": 20, "color": "#4E79A7", "label": "Community 20", "count": 16}, {"cid": 21, "color": "#F28E2B", "label": "Community 21", "count": 15}, {"cid": 22, "color": "#E15759", "label": "Community 22", "count": 15}, {"cid": 23, "color": "#76B7B2", "label": "Community 23", "count": 15}, {"cid": 24, "color": "#59A14F", "label": "Community 24", "count": 14}, {"cid": 25, "color": "#EDC948", "label": "Community 25", "count": 14}, {"cid": 26, "color": "#B07AA1", "label": "Community 26", "count": 13}, {"cid": 27, "color": "#FF9DA7", "label": "Community 27", "count": 13}, {"cid": 28, "color": "#9C755F", "label": "Community 28", "count": 13}, {"cid": 29, "color": "#BAB0AC", "label": "Community 29", "count": 13}, {"cid": 30, "color": "#4E79A7", "label": "Community 30", "count": 12}, {"cid": 31, "color": "#F28E2B", "label": "Community 31", "count": 12}, {"cid": 32, "color": "#E15759", "label": "Community 32", "count": 11}, {"cid": 33, "color": "#76B7B2", "label": "Community 33", "count": 10}, {"cid": 34, "color": "#59A14F", "label": "Community 34", "count": 10}, {"cid": 35, "color": "#EDC948", "label": "Community 35", "count": 10}, {"cid": 36, "color": "#B07AA1", "label": "Community 36", "count": 10}, {"cid": 37, "color": "#FF9DA7", "label": "Community 37", "count": 10}, {"cid": 38, "color": "#9C755F", "label": "Community 38", "count": 10}, {"cid": 39, "color": "#BAB0AC", "label": "Community 39", "count": 10}, {"cid": 40, "color": "#4E79A7", "label": "Community 40", "count": 10}, {"cid": 41, "color": "#F28E2B", "label": "Community 41", "count": 9}, {"cid": 42, "color": "#E15759", "label": "Community 42", "count": 9}, {"cid": 43, "color": "#76B7B2", "label": "Community 43", "count": 9}, {"cid": 44, "color": "#59A14F", "label": "Community 44", "count": 8}, {"cid": 45, "color": "#EDC948", "label": "Community 45", "count": 8}, {"cid": 46, "color": "#B07AA1", "label": "Community 46", "count": 8}, {"cid": 47, "color": "#FF9DA7", "label": "Community 47", "count": 7}, {"cid": 48, "color": "#9C755F", "label": "Community 48", "count": 6}, {"cid": 49, "color": "#BAB0AC", "label": "Community 49", "count": 4}, {"cid": 50, "color": "#4E79A7", "label": "Community 50", "count": 4}, {"cid": 51, "color": "#F28E2B", "label": "Community 51", "count": 3}, {"cid": 52, "color": "#E15759", "label": "Community 52", "count": 2}, {"cid": 53, "color": "#76B7B2", "label": "Community 53", "count": 2}, {"cid": 54, "color": "#59A14F", "label": "Community 54", "count": 1}, {"cid": 55, "color": "#EDC948", "label": "Community 55", "count": 1}, {"cid": 56, "color": "#B07AA1", "label": "Community 56", "count": 1}, {"cid": 57, "color": "#FF9DA7", "label": "Community 57", "count": 1}, {"cid": 58, "color": "#9C755F", "label": "Community 58", "count": 1}];
const RAW_NODES = [{"id": "init_py", "label": "__init__.py", "color": {"background": "#F28E2B", "border": "#F28E2B", "highlight": {"background": "#ffffff", "border": "#F28E2B"}}, "size": 10.0, "font": {"size": 0, "color": "#ffffff"}, "title": "__init__.py", "community": 41, "community_name": "Community 41", "source_file": "__init__.py", "file_type": "code", "degree": 0}, {"id": "main_py", "label": "main.py", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.4, "font": {"size": 0, "color": "#ffffff"}, "title": "main.py", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "code", "degree": 7}, {"id": "app_main_lifespan", "label": "lifespan()", "color": {"background": "#BAB0AC", "border": "#BAB0AC", "highlight": {"background": "#ffffff", "border": "#BAB0AC"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "lifespan()", "community": 9, "community_name": "Community 9", "source_file": "main.py", "file_type": "code", "degree": 4}, {"id": "app_main_error_json", "label": "_error_json()", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "_error_json()", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "code", "degree": 3}, {"id": "app_main_sqlalchemy_exception_handler", "label": "sqlalchemy_exception_handler()", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "sqlalchemy_exception_handler()", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "code", "degree": 4}, {"id": "app_main_unhandled_exception_handler", "label": "unhandled_exception_handler()", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.3, "font": {"size": 0, "color": "#ffffff"}, "title": "unhandled_exception_handler()", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "code", "degree": 5}, {"id": "app_main_mask_secret", "label": "_mask_secret()", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "_mask_secret()", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "code", "degree": 1}, {"id": "app_main_root", "label": "root()", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "root()", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "code", "degree": 1}, {"id": "app_main_health_check", "label": "health_check()", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "health_check()", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "code", "degree": 1}, {"id": "app_main_rationale_81", "label": "\u6570\u636e\u5e93\u5f02\u5e38\uff1a\u8fd4\u56de JSON \u5e76\u4fdd\u7559 CORS \u5934\uff0c\u907f\u514d\u6d4f\u89c8\u5668\u53ea\u62a5\u8de8\u57df\u9519\u8bef", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "\u6570\u636e\u5e93\u5f02\u5e38\uff1a\u8fd4\u56de JSON \u5e76\u4fdd\u7559 CORS \u5934\uff0c\u907f\u514d\u6d4f\u89c8\u5668\u53ea\u62a5\u8de8\u57df\u9519\u8bef", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "rationale", "degree": 3}, {"id": "app_main_rationale_92", "label": "\u672a\u6355\u83b7\u5f02\u5e38\uff1a\u7edf\u4e00 JSON 500\uff0c\u786e\u4fdd\u8de8\u57df\u573a\u666f\u4e0b\u4ecd\u6709 Access-Control-Allow-Origin", "color": {"background": "#B07AA1", "border": "#B07AA1", "highlight": {"background": "#ffffff", "border": "#B07AA1"}}, "size": 10.2, "font": {"size": 0, "color": "#ffffff"}, "title": "\u672a\u6355\u83b7\u5f02\u5e38\uff1a\u7edf\u4e00 JSON 500\uff0c\u786e\u4fdd\u8de8\u57df\u573a\u666f\u4e0b\u4ecd\u6709 Access-Control-Allow-Origin", "community": 6, "community_name": "Community 6", "source_file": "main.py", "file_type": "rationale", "degree": 3}, {"id": "tasks_init_py", "label": "__init__.py", "color": {"background": "#BAB0AC", "border": "#BAB0AC", "highlight": {"background": "#ffffff", "border": "#BAB0AC"}}, "size": 10.1, "font": {"size": 0, "color": "#ffffff"}, "title": "__init__.py", "community": 9, "community_name": "Community 9", "source_file": "tasks/__init__.py", "file_type": "code", "degLine truncated
const RAW_EDGES = [{"from": "main_py", "to": "app_main_lifespan", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_error_json", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_sqlalchemy_exception_handler", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_unhandled_exception_handler", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_mask_secret", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_root", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "main_py", "to": "app_main_health_check", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_lifespan", "to": "core_login_crypto_ensure_initialized", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_lifespan", "to": "tasks_init_init_scheduled_tasks", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_lifespan", "to": "tasks_init_shutdown_scheduler", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_error_json", "to": "app_main_sqlalchemy_exception_handler", "label": "calls", "title": "calls [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_error_json", "to": "app_main_unhandled_exception_handler", "label": "calls", "title": "calls [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_sqlalchemy_exception_handler", "to": "app_main_rationale_81", "label": "rationale_for", "title": "rationale_for [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_sqlalchemy_exception_handler", "to": "exception", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_unhandled_exception_handler", "to": "app_main_rationale_92", "label": "rationale_for", "title": "rationale_for [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "app_main_unhandled_exception_handler", "to": "exception", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_unhandled_exception_handler", "to": "str", "label": "calls", "title": "calls [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_rationale_81", "to": "core_api_request_log_middleware_apirequestlogmiddleware", "label": "uses", "title": "uses [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_rationale_81", "to": "core_api_crypto_middleware_apicryptomiddleware", "label": "uses", "title": "uses [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_rationale_92", "to": "core_api_request_log_middleware_apirequestlogmiddleware", "label": "uses", "title": "uses [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "app_main_rationale_92", "to": "core_api_crypto_middleware_apicryptomiddleware", "label": "uses", "title": "uses [INFERRED]", "dashes": true, "width": 1, "color": {"opacity": 0.35}, "confidence": "INFERRED"}, {"from": "tasks_init_py", "to": "tasks_init_init_scheduled_tasks", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "tasks_init_py", "to": "tasks_init_shutdown_scheduler", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "core_auth_py", "to": "core_auth_redis_session_enabled", "label": "contains", "title": "contains [EXTRACTED]", "dashes": false, "width": 2, "color": {"opacity": 0.7}, "confidence": "EXTRACTED"}, {"from": "core_auth_py", "to": "core_auth_get_redis_client", "labeLine truncated
const LEGEND = [{"cid": 0, "color": "#4E79A7", "label": "Community 0", "count": 582}, {"cid": 1, "color": "#F28E2B", "label": "Community 1", "count": 502}, {"cid": 2, "color": "#E15759", "label": "Community 2", "count": 378}, {"cid": 3, "color": "#76B7B2", "label": "Community 3", "count": 182}, {"cid": 4, "color": "#59A14F", "label": "Community 4", "count": 181}, {"cid": 5, "color": "#EDC948", "label": "Community 5", "count": 168}, {"cid": 6, "color": "#B07AA1", "label": "Community 6", "count": 129}, {"cid": 7, "color": "#FF9DA7", "label": "Community 7", "count": 109}, {"cid": 8, "color": "#9C755F", "label": "Community 8", "count": 89}, {"cid": 9, "color": "#BAB0AC", "label": "Community 9", "count": 87}, {"cid": 10, "color": "#4E79A7", "label": "Community 10", "count": 85}, {"cid": 11, "color": "#F28E2B", "label": "Community 11", "count": 75}, {"cid": 12, "color": "#E15759", "label": "Community 12", "count": 70}, {"cid": 13, "color": "#76B7B2", "label": "Community 13", "count": 68}, {"cid": 14, "color": "#59A14F", "label": "Community 14", "count": 59}, {"cid": 15, "color": "#EDC948", "label": "Community 15", "count": 56}, {"cid": 16, "color": "#B07AA1", "label": "Community 16", "count": 46}, {"cid": 17, "color": "#FF9DA7", "label": "Community 17", "count": 45}, {"cid": 18, "color": "#9C755F", "label": "Community 18", "count": 45}, {"cid": 19, "color": "#BAB0AC", "label": "Community 19", "count": 31}, {"cid": 20, "color": "#4E79A7", "label": "Community 20", "count": 15}, {"cid": 21, "color": "#F28E2B", "label": "Community 21", "count": 14}, {"cid": 22, "color": "#E15759", "label": "Community 22", "count": 13}, {"cid": 23, "color": "#76B7B2", "label": "Community 23", "count": 12}, {"cid": 24, "color": "#59A14F", "label": "Community 24", "count": 11}, {"cid": 25, "color": "#EDC948", "label": "Community 25", "count": 10}, {"cid": 26, "color": "#B07AA1", "label": "Community 26", "count": 10}, {"cid": 27, "color": "#FF9DA7", "label": "Community 27", "count": 10}, {"cid": 28, "color": "#9C755F", "label": "Community 28", "count": 10}, {"cid": 29, "color": "#BAB0AC", "label": "Community 29", "count": 10}, {"cid": 30, "color": "#4E79A7", "label": "Community 30", "count": 10}, {"cid": 31, "color": "#F28E2B", "label": "Community 31", "count": 9}, {"cid": 32, "color": "#E15759", "label": "Community 32", "count": 9}, {"cid": 33, "color": "#76B7B2", "label": "Community 33", "count": 9}, {"cid": 34, "color": "#59A14F", "label": "Community 34", "count": 8}, {"cid": 35, "color": "#EDC948", "label": "Community 35", "count": 7}, {"cid": 36, "color": "#B07AA1", "label": "Community 36", "count": 4}, {"cid": 37, "color": "#FF9DA7", "label": "Community 37", "count": 4}, {"cid": 38, "color": "#9C755F", "label": "Community 38", "count": 3}, {"cid": 39, "color": "#BAB0AC", "label": "Community 39", "count": 2}, {"cid": 40, "color": "#4E79A7", "label": "Community 40", "count": 2}, {"cid": 41, "color": "#F28E2B", "label": "Community 41", "count": 1}, {"cid": 42, "color": "#E15759", "label": "Community 42", "count": 1}, {"cid": 43, "color": "#76B7B2", "label": "Community 43", "count": 1}, {"cid": 44, "color": "#59A14F", "label": "Community 44", "count": 1}, {"cid": 45, "color": "#EDC948", "label": "Community 45", "count": 1}, {"cid": 46, "color": "#B07AA1", "label": "Community 46", "count": 1}, {"cid": 47, "color": "#FF9DA7", "label": "Community 47", "count": 1}, {"cid": 48, "color": "#9C755F", "label": "Community 48", "count": 1}, {"cid": 49, "color": "#BAB0AC", "label": "Community 49", "count": 1}, {"cid": 50, "color": "#4E79A7", "label": "Community 50", "count": 1}, {"cid": 51, "color": "#F28E2B", "label": "Community 51", "count": 1}, {"cid": 52, "color": "#E15759", "label": "Community 52", "count": 1}, {"cid": 53, "color": "#76B7B2", "label": "Community 53", "count": 0}, {"cid": 54, "color": "#59A14F", "label": "Community 54", "count": 0}, {"cid": 55, "color": "#EDC948", "label": "Community 55", "count": 0}, {"cid": 56, "color": "#B07AA1", "label": "Community 56", "count": 0}, {"cid": 57, "color": "#FF9DA7", "label": "Community 57", "count": 0}, {"cid": 58, "color": "#9C755F", "label": "Community 58", "count": 0}];
// HTML-escape helper — prevents XSS when injecting graph data into innerHTML
function esc(s) {
File diff suppressed because it is too large. Load diff
+18 -11
View File
@@ -25,7 +25,7 @@
"/Users/wuzilong/work/00code/zkxw/backend/app/core/wechat_message.py": 1778578258.0458734,
"/Users/wuzilong/work/00code/zkxw/backend/app/models/material.py": 1779283385.245847,
"/Users/wuzilong/work/00code/zkxw/backend/app/models/qc_param.py": 1779022399.0175831,
"/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py": 1779792400.2401285,
"/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py": 1779828240.789942,
"/Users/wuzilong/work/00code/zkxw/backend/app/models/__init__.py": 1779418058.876012,
"/Users/wuzilong/work/00code/zkxw/backend/app/models/research_donation.py": 1779177348.5945773,
"/Users/wuzilong/work/00code/zkxw/backend/app/models/qc_material.py": 1779284411.5179992,
@@ -35,6 +35,7 @@
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/process_route.py": 1779367496.1718137,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/auth.py": 1778578258.0939043,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/delivery.py": 1778578258.0949655,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_review.py": 1779808997.3299003,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/price_list.py": 1778578258.096609,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/user.py": 1778578258.099944,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/production_work_order.py": 1779692778.4620268,
@@ -58,9 +59,11 @@
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/common.py": 1778578258.094703,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/unit.py": 1778578258.0996897,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/qc_work_order.py": 1779791557.200459,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_release_material.py": 1779827058.9935315,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/product.py": 1778578258.0968297,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/workflow.py": 1778633845.5937889,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/product_review.py": 1778578258.098316,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/outbound_handover.py": 1779828242.039992,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/category.py": 1778578258.0941947,
"/Users/wuzilong/work/00code/zkxw/backend/app/schemas/leave.py": 1778666088.7680702,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_release_review.py": 1779616246.7074304,
@@ -68,11 +71,11 @@
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/process_route.py": 1779587424.6859367,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_code.py": 1779279460.690872,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_task_result.py": 1779331731.6720955,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py": 1779656973.8652866,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_review.py": 1779825896.040372,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/post.py": 1779265648.38155,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_reception_check_result.py": 1779255909.8554008,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/user.py": 1778775532.8870275,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py": 1779801387.303171,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py": 1779807082.0841787,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/material.py": 1779283386.3879013,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/dict_type.py": 1779265621.5212462,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_occupancy.py": 1779418213.0446064,
@@ -86,20 +89,20 @@
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/reagent.py": 1779512669.9847593,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/collection_protocol.py": 1779692218.216856,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_material_usage.py": 1779332036.2049248,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py": 1779657020.847086,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_confirm.py": 1779828818.7646794,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/reagent_stock_log.py": 1779515479.6599197,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py": 1779794445.3921702,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_infusion_schedule_mgmt.py": 1779828859.820152,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/clean_room.py": 1778775238.2993922,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/__init__.py": 1778605691.3816392,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_entry_sms_notification.py": 1779691734.0972729,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/express_company.py": 1779265659.3453207,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py": 1779794392.4726036,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_application.py": 1779807155.5996397,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_lab_test_item.py": 1779265673.3888667,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/role.py": 1779265616.3701816,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/cell_product.py": 1779600789.9863036,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/menu.py": 1779265729.0381103,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/collection_region.py": 1779277867.6408322,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py": 1779655560.688,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_delivery.py": 1779807151.291718,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_reception_check_item.py": 1779007909.2933013,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/site.py": 1779265643.0128026,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/api_request_log.py": 1778578258.0614743,
@@ -109,7 +112,9 @@
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_checkup.py": 1779767080.896167,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/process_category.py": 1779265700.0606413,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/item_unit.py": 1779265653.7504313,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py": 1779801381.700379,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_work_order.py": 1779807125.279701,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover_inventory.py": 1779830339.8633556,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_release_material.py": 1779827094.4205513,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/process.py": 1779309113.0447981,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_service.py": 1779792399.6927543,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/customer.py": 1779686149.7508218,
@@ -119,8 +124,10 @@
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/consumable_pack.py": 1779265715.416005,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_material.py": 1779284415.64655,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/collection_protocol_no.py": 1779279043.1571646,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/outbound_handover.py": 1779830359.238616,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/storage_facility.py": 1779270989.9713993,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/cell_sample_type.py": 1778733001.8375483,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py": 1779807071.7870579,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/consumable_stock_log.py": 1779515477.284446,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/dept.py": 1779265637.7914758,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/base.py": 1778578258.062207,
@@ -130,17 +137,17 @@
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/output_type.py": 1779265703.7363207,
"/Users/wuzilong/work/00code/zkxw/backend/app/crud/exhibition_appointment.py": 1778801075.5211918,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_release_review.py": 1779526635.1455016,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py": 1779656994.641828,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/outbound_release_review.py": 1779827082.0736034,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/public.py": 1779313409.0685387,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/material.py": 1779526648.041865,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/qc.py": 1779791675.3703022,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/collection_protocol.py": 1779692218.217267,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/basic_info.py": 1779686149.7501295,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_confirm.py": 1779657043.1389203,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py": 1779781585.2199733,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py": 1779828267.2070124,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/__init__.py": 1779771972.6553016,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_entry_sms_notification.py": 1779691738.9150457,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py": 1779791571.100721,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py": 1779807078.5962884,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/operations.py": 1779685679.1959367,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py": 1779263225.4964793,
"/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_delivery.py": 1779655584.820777,