This commit is contained in:
zlwu committed 2026-06-10 22:59:34 +08:00
1 parent 725774ef0c
commit c3be9d1dce
176 files changed
+41925 -6342

No files matched your search

+1 -1
View File
@@ -1 +1 @@
35826
65868
+2
View File
@@ -7,6 +7,7 @@ from app.api.leave import router as leave_router
from app.api.crm import router as crm_router
from app.api.monitor import router as monitor_router
from app.api.bx import bx_router
from app.api.db import db_router
__all__ = [
"public_router",
@@ -17,4 +18,5 @@ __all__ = [
"crm_router",
"monitor_router",
"bx_router",
"db_router",
]
+17
View File
@@ -0,0 +1,17 @@
"""地磅 API 路由聚合 — REST 风格,协议对齐原 simple-dibang-xiaoshou。"""
from fastapi import APIRouter
from app.api.db import dashboard, inventory, plans, vehicles, weighing
db_router = APIRouter(tags=["地磅管理"])
db_router.include_router(vehicles.router)
db_router.include_router(plans.router)
db_router.include_router(inventory.router)
db_router.include_router(weighing.router)
db_router.include_router(dashboard.router)
@db_router.get("/db/health")
def db_health():
"""P0 健康检查:验证 db 路由已挂载。"""
return {"status": "ok", "module": "db"}
+180
View File
@@ -0,0 +1,180 @@
from __future__ import annotations
from datetime import date
from fastapi import APIRouter, Depends
from sqlalchemy import func, text
from sqlalchemy.orm import Session
from app.core.database import get_db
from app.core.db_auth import DbUserContext, get_db_current_user
from app.core.tenant_context import get_tenant_no
from app.models.db_models import DbInboundOutbound, DbWeighingSlip
from app.schemas.db.dashboard import (
DashboardCargoStat,
DashboardPartnerCargoStat,
DashboardStats,
)
router = APIRouter(prefix="/dashboard", tags=["dashboard"])
@router.get("/stats", response_model=DashboardStats)
def get_dashboard_stats(
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> DashboardStats:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
today = date.today()
today_inbound = float(
db.query(func.coalesce(func.sum(DbInboundOutbound.quantity), 0))
.filter(
DbInboundOutbound.date == today,
DbInboundOutbound.business_type == "入库",
DbInboundOutbound.del_flag == 0,
DbInboundOutbound.tenant_no == tenant_no,
)
.scalar()
or 0
)
today_outbound = float(
db.query(func.coalesce(func.sum(DbInboundOutbound.quantity), 0))
.filter(
DbInboundOutbound.date == today,
DbInboundOutbound.business_type == "出库",
DbInboundOutbound.del_flag == 0,
DbInboundOutbound.tenant_no == tenant_no,
)
.scalar()
or 0
)
abnormal_orders = int(
db.query(func.count(DbWeighingSlip.id))
.filter(
DbWeighingSlip.is_voided == 0,
DbWeighingSlip.del_flag == 0,
DbWeighingSlip.tenant_no == tenant_no,
)
.scalar()
or 0
)
return DashboardStats(
today_inbound=today_inbound,
today_outbound=today_outbound,
abnormal_orders=abnormal_orders,
)
@router.get("/inbound/by-cargo", response_model=list[DashboardCargoStat])
def get_inbound_by_cargo(
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> list[DashboardCargoStat]:
return _cargo_stats(db, user, business_type="入库")
@router.get("/inbound/by-partner-cargo", response_model=list[DashboardPartnerCargoStat])
def get_inbound_by_partner_cargo(
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> list[DashboardPartnerCargoStat]:
return _partner_cargo_stats(db, user, business_type="入库")
@router.get("/outbound/by-cargo", response_model=list[DashboardCargoStat])
def get_outbound_by_cargo(
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> list[DashboardCargoStat]:
return _cargo_stats(db, user, business_type="出库")
@router.get("/outbound/by-partner-cargo", response_model=list[DashboardPartnerCargoStat])
def get_outbound_by_partner_cargo(
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> list[DashboardPartnerCargoStat]:
return _partner_cargo_stats(db, user, business_type="出库")
def _cargo_stats(db: Session, user: DbUserContext, *, business_type: str) -> list[DashboardCargoStat]:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
today = date.today()
query = text(
"""
SELECT
COALESCE(io.product, ws.cargo_name, '未填写货物') AS label,
COALESCE(SUM(io.quantity), 0) AS planned,
COALESCE(SUM(ws.net_weight) / 1000.0, 0) AS actual
FROM db_inbound_outbound io
LEFT JOIN db_weighing_slip ws
ON ws.inbound_outbound_id = io.id
AND ws.is_voided = 0
AND ws.del_flag = 0
AND ws.tenant_no = io.tenant_no
WHERE io.date = :today
AND io.business_type = :business_type
AND io.del_flag = 0
AND io.tenant_no = :tenant_no
GROUP BY COALESCE(io.product, ws.cargo_name, '未填写货物')
ORDER BY planned DESC
"""
)
rows = db.execute(
query,
{"today": today, "business_type": business_type, "tenant_no": tenant_no},
).all()
return [
DashboardCargoStat(label=row.label, planned=float(row.planned), actual=float(row.actual))
for row in rows
]
def _partner_cargo_stats(
db: Session,
user: DbUserContext,
*,
business_type: str,
) -> list[DashboardPartnerCargoStat]:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
today = date.today()
query = text(
"""
SELECT
CONCAT(
COALESCE(io.partner_company, ''),
' - ',
COALESCE(io.product, ws.cargo_name, '未填写货物')
) AS label,
COALESCE(SUM(io.quantity), 0) AS planned,
COALESCE(SUM(ws.net_weight) / 1000.0, 0) AS actual
FROM db_inbound_outbound io
LEFT JOIN db_weighing_slip ws
ON ws.inbound_outbound_id = io.id
AND ws.is_voided = 0
AND ws.del_flag = 0
AND ws.tenant_no = io.tenant_no
WHERE io.date = :today
AND io.business_type = :business_type
AND io.del_flag = 0
AND io.tenant_no = :tenant_no
GROUP BY io.partner_company, io.product, ws.cargo_name
ORDER BY io.partner_company, planned DESC
"""
)
rows = db.execute(
query,
{"today": today, "business_type": business_type, "tenant_no": tenant_no},
).all()
return [
DashboardPartnerCargoStat(
label=row.label,
planned=float(row.planned),
actual=float(row.actual),
)
for row in rows
]
+488
View File
@@ -0,0 +1,488 @@
from typing import Optional
import re
from datetime import datetime
from fastapi import APIRouter, Depends, HTTPException, Query, status
from pydantic import BaseModel
from sqlalchemy import func, or_
from sqlalchemy.orm import Session
from app.core.database import get_db
from app.core.db_auth import DbUserContext, get_db_current_user, get_db_current_user_optional
from app.core.tenant_context import get_tenant_no
from app.core.utils import generate_uuid
from app.services.db.inventory_id import next_inbound_outbound_id
from app.models.db_models import DbInboundOutbound, DbPurchasePlan, DbVehicle, DbWeighingSlip
from app.schemas.db.inventory import (
CreateLinkForPlanPayload,
InboundOutboundCreate,
InboundOutboundRead,
InboundOutboundUpdate,
)
from app.schemas.db.plans import PurchasePlanRead
from app.schemas.db.weighing import WeighingSlipRead
from app.services.db.mappers import (
EMPTY_INVENTORY_DATE,
inventory_to_read,
is_empty_inventory_date,
parse_date_str,
plan_to_read,
weighing_to_read,
)
from app.services.db.product_helpers import (
apply_product_snapshot_to_inventory,
resolve_crm_product,
)
router = APIRouter(prefix="/inventory", tags=["inventory"])
STATUS_THIRD_PARTY_FILL = "待三方填写"
_INVENTORY_REMARK_FIELD = "remarks"
def _base_query(db: Session, tenant_no: str):
return db.query(DbInboundOutbound).filter(
DbInboundOutbound.tenant_no == tenant_no,
DbInboundOutbound.del_flag == 0,
)
def _generate_batch_no(db: Session, tenant_no: str) -> str:
rows = (
db.query(DbInboundOutbound.batch_no)
.filter(
DbInboundOutbound.tenant_no == tenant_no,
DbInboundOutbound.del_flag == 0,
DbInboundOutbound.batch_no.like("CRKDH%"),
)
.all()
)
max_seq = 0
pattern = re.compile(r"^CRKDH(\d+)$")
for (batch_no,) in rows:
if batch_no:
match = pattern.match(batch_no)
if match:
max_seq = max(max_seq, int(match.group(1)))
return f"CRKDH{max_seq + 1:07d}"
def _resolve_tenant_no(
db: Session,
user: Optional[DbUserContext],
purchase_plan_id: Optional[str] = None,
) -> str:
if user:
return get_tenant_no(db, user.to_tenant_user_dict())
if purchase_plan_id:
plan = (
db.query(DbPurchasePlan)
.filter(DbPurchasePlan.id == purchase_plan_id, DbPurchasePlan.del_flag == 0)
.one_or_none()
)
if plan:
return plan.tenant_no
raise HTTPException(status_code=status.HTTP_400_BAD_REQUEST, detail="无法确定租户")
def _get_inventory_by_id(db: Session, inventory_id: str) -> DbInboundOutbound:
row = (
db.query(DbInboundOutbound)
.filter(DbInboundOutbound.id == inventory_id, DbInboundOutbound.del_flag == 0)
.one_or_none()
)
if row is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Inventory {inventory_id} not found",
)
return row
def _get_inventory(db: Session, tenant_no: str, inventory_id: str) -> DbInboundOutbound:
row = (
_base_query(db, tenant_no)
.filter(DbInboundOutbound.id == inventory_id)
.one_or_none()
)
if row is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Inventory {inventory_id} not found",
)
return row
def _ensure_vehicle_exists(
db: Session,
tenant_no: str,
vehicle_no: str,
*,
create_by: Optional[str] = None,
create_dept_id: Optional[str] = None,
) -> None:
if not (vehicle_no and vehicle_no.strip()):
return
normalized = vehicle_no.strip().lower()
exists = (
db.query(DbVehicle)
.filter(
DbVehicle.tenant_no == tenant_no,
DbVehicle.del_flag == 0,
func.lower(DbVehicle.vehicle_no) == normalized,
)
.first()
)
if exists:
return
db.add(
DbVehicle(
id=generate_uuid(),
tenant_no=tenant_no,
vehicle_no=vehicle_no.strip(),
remark=None,
create_by=create_by,
create_dept_id=create_dept_id or "",
)
)
def _apply_inventory_product_update(
db: Session, tenant_no: str, row: DbInboundOutbound, payload_dict: dict
) -> None:
if "product" in payload_dict and "product_id" not in payload_dict:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="请从 CRM 重新选择产品",
)
product_id = payload_dict.pop("product_id", None)
payload_dict.pop("product", None)
payload_dict.pop("specification", None)
if product_id is not None:
snapshot = resolve_crm_product(db, tenant_no, product_id)
apply_product_snapshot_to_inventory(row, snapshot)
def _apply_inventory_update(row: DbInboundOutbound, payload_dict: dict) -> None:
for key, value in payload_dict.items():
if key == _INVENTORY_REMARK_FIELD:
if isinstance(value, str):
value = value.strip()
row.remark = value
continue
if key == "date":
if value is None or (isinstance(value, str) and not value.strip()):
row.date = EMPTY_INVENTORY_DATE
else:
row.date = parse_date_str(str(value)) or EMPTY_INVENTORY_DATE
continue
if isinstance(value, str):
value = value.strip()
setattr(row, key, value)
def _maybe_promote_third_party_status(row: DbInboundOutbound) -> None:
if row.status != STATUS_THIRD_PARTY_FILL:
return
has_date = not is_empty_inventory_date(row.date)
has_qty = row.quantity is not None and row.quantity != 0
has_vehicle = bool(row.vehicle_no and row.vehicle_no.strip())
if has_date and has_qty and has_vehicle:
row.status = "待入库" if row.business_type == "入库" else "待出库"
@router.get("/", response_model=list[InboundOutboundRead])
def list_inventory(
q: Optional[str] = Query(default=None, description="模糊搜索关键词"),
plan_no: Optional[str] = Query(default=None, alias="planNo", description="计划号"),
batch_no: Optional[str] = Query(default=None, alias="batchNo", description="出入库单号"),
partner_company: Optional[str] = Query(
default=None, alias="partnerCompany", description="往来单位"
),
product: Optional[str] = Query(default=None, description="产品"),
vehicle_no: Optional[str] = Query(default=None, alias="vehicleNo", description="车牌号"),
date_from: Optional[str] = Query(default=None, alias="dateFrom", description="开始日期"),
date_to: Optional[str] = Query(default=None, alias="dateTo", description="结束日期"),
status_filter: Optional[str] = Query(default=None, alias="status", description="状态筛选"),
business_type: Optional[str] = Query(default=None, alias="businessType", description="业务类型"),
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> list[InboundOutboundRead]:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
query = _base_query(db, tenant_no).order_by(
DbInboundOutbound.date.desc(),
DbInboundOutbound.id.desc(),
)
if q:
keyword = q.lower()
query = query.filter(
or_(
func.lower(DbInboundOutbound.partner_company).contains(keyword),
func.lower(DbInboundOutbound.product).contains(keyword),
func.lower(DbInboundOutbound.plan_no).contains(keyword),
func.lower(DbInboundOutbound.batch_no).contains(keyword),
func.lower(DbInboundOutbound.vehicle_no).contains(keyword),
)
)
if plan_no:
query = query.filter(DbInboundOutbound.plan_no.contains(plan_no))
if batch_no:
query = query.filter(DbInboundOutbound.batch_no.contains(batch_no))
if partner_company:
query = query.filter(
func.lower(DbInboundOutbound.partner_company).contains(partner_company.lower())
)
if product:
query = query.filter(func.lower(DbInboundOutbound.product).contains(product.lower()))
if vehicle_no:
query = query.filter(DbInboundOutbound.vehicle_no.contains(vehicle_no))
if date_from:
start = parse_date_str(date_from)
if start:
query = query.filter(DbInboundOutbound.date >= start)
if date_to:
end = parse_date_str(date_to)
if end:
query = query.filter(DbInboundOutbound.date <= end)
if status_filter:
query = query.filter(DbInboundOutbound.status == status_filter)
if business_type:
query = query.filter(DbInboundOutbound.business_type == business_type)
inventories = query.all()
inventory_ids = [inv.id for inv in inventories]
weighing_map: dict[str, DbWeighingSlip] = {}
if inventory_ids:
weighings = (
db.query(DbWeighingSlip)
.filter(
DbWeighingSlip.tenant_no == tenant_no,
DbWeighingSlip.del_flag == 0,
DbWeighingSlip.inbound_outbound_id.in_(inventory_ids),
DbWeighingSlip.is_voided == 0,
)
.order_by(DbWeighingSlip.id.asc())
.all()
)
for weighing in weighings:
if (
weighing.inbound_outbound_id
and weighing.inbound_outbound_id not in weighing_map
):
weighing_map[weighing.inbound_outbound_id] = weighing
result_list: list[InboundOutboundRead] = []
for inventory in inventories:
try:
result_list.append(
inventory_to_read(
inventory,
weighing=weighing_map.get(inventory.id),
)
)
except Exception:
continue
return result_list
@router.post("/", response_model=InboundOutboundRead, status_code=status.HTTP_201_CREATED)
def create_inventory(
payload: InboundOutboundCreate,
db: Session = Depends(get_db),
user: Optional[DbUserContext] = Depends(get_db_current_user_optional),
) -> InboundOutboundRead:
tenant_no = _resolve_tenant_no(db, user, payload.purchase_plan_id)
batch_no = payload.batch_no.strip() if payload.batch_no else None
if not batch_no:
batch_no = _generate_batch_no(db, tenant_no)
status_value = (
payload.status.strip()
if payload.status and str(payload.status).strip()
else ("待入库" if payload.business_type == "入库" else "待出库")
)
snapshot = resolve_crm_product(db, tenant_no, payload.product_id)
row = DbInboundOutbound(
id=next_inbound_outbound_id(db, tenant_no),
tenant_no=tenant_no,
date=parse_date_str(payload.date) or datetime.now().date(),
partner_company=payload.partner_company.strip(),
business_type=payload.business_type,
quantity=payload.quantity,
plan_no=payload.plan_no.strip() if payload.plan_no else None,
batch_no=batch_no,
vehicle_no=payload.vehicle_no.strip(),
status=status_value,
remark=payload.remarks,
purchase_plan_id=payload.purchase_plan_id,
create_by=user.id if user else None,
create_dept_id=user.dept_id if user else "",
)
apply_product_snapshot_to_inventory(row, snapshot)
db.add(row)
db.commit()
db.refresh(row)
return inventory_to_read(row)
@router.post(
"/create-link-for-plan",
response_model=InboundOutboundRead,
status_code=status.HTTP_201_CREATED,
)
def create_link_for_plan(
payload: CreateLinkForPlanPayload,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> InboundOutboundRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
plan = (
db.query(DbPurchasePlan)
.filter(
DbPurchasePlan.id == payload.purchase_plan_id,
DbPurchasePlan.tenant_no == tenant_no,
DbPurchasePlan.del_flag == 0,
)
.one_or_none()
)
if not plan:
raise HTTPException(status_code=status.HTTP_404_NOT_FOUND, detail="Plan not found")
if not plan.product_id:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="计划未关联 CRM 产品,请先编辑计划并选择产品",
)
row = DbInboundOutbound(
id=next_inbound_outbound_id(db, tenant_no),
tenant_no=tenant_no,
date=EMPTY_INVENTORY_DATE,
partner_company=(plan.customer_name or "").strip() or "待填写",
business_type=plan.business_type,
product_id=plan.product_id,
product=(plan.product or "").strip(),
specification=plan.specification,
quantity=0.0,
plan_no=(plan.plan_no or "").strip() or None,
batch_no=_generate_batch_no(db, tenant_no),
vehicle_no="",
status=STATUS_THIRD_PARTY_FILL,
remark=payload.remarks,
purchase_plan_id=plan.id,
create_by=user.id,
create_dept_id=user.dept_id,
)
db.add(row)
db.commit()
db.refresh(row)
return inventory_to_read(row)
@router.get("/{id}", response_model=InboundOutboundRead)
def get_inventory(
id: str,
db: Session = Depends(get_db),
) -> InboundOutboundRead:
"""单条查询(三方 H5 填写页无需门户登录)。"""
row = _get_inventory_by_id(db, id)
weighing = (
db.query(DbWeighingSlip)
.filter(
DbWeighingSlip.inbound_outbound_id == row.id,
DbWeighingSlip.is_voided == 0,
DbWeighingSlip.del_flag == 0,
)
.order_by(DbWeighingSlip.id.asc())
.first()
)
return inventory_to_read(row, weighing=weighing)
@router.patch("/{id}", response_model=InboundOutboundRead)
def update_inventory(
id: str,
payload: InboundOutboundUpdate,
db: Session = Depends(get_db),
) -> InboundOutboundRead:
"""更新(三方 H5 填写页无需门户登录)。"""
row = _get_inventory_by_id(db, id)
payload_dict = payload.model_dump(exclude_unset=True)
vehicle_no_updated = payload_dict.get("vehicle_no")
if vehicle_no_updated is not None and str(vehicle_no_updated).strip():
_ensure_vehicle_exists(db, row.tenant_no, str(vehicle_no_updated).strip())
_apply_inventory_product_update(db, row.tenant_no, row, payload_dict)
_apply_inventory_update(row, payload_dict)
_maybe_promote_third_party_status(row)
db.commit()
db.refresh(row)
return inventory_to_read(row)
@router.delete("/{id}", status_code=status.HTTP_204_NO_CONTENT)
def delete_inventory(
id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> None:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_inventory(db, tenant_no, id)
row.del_flag = 1
row.update_by = user.id
db.commit()
class InventoryRelatedData(BaseModel):
plan: Optional[PurchasePlanRead]
weighing: Optional[WeighingSlipRead]
@router.get("/{id}/related", response_model=InventoryRelatedData)
def get_inventory_related(
id: str,
db: Session = Depends(get_db),
) -> InventoryRelatedData:
row = _get_inventory_by_id(db, id)
plan = None
if row.purchase_plan_id:
plan = (
db.query(DbPurchasePlan)
.filter(
DbPurchasePlan.id == row.purchase_plan_id,
DbPurchasePlan.del_flag == 0,
)
.one_or_none()
)
weighing = (
db.query(DbWeighingSlip)
.filter(
DbWeighingSlip.inbound_outbound_id == row.id,
DbWeighingSlip.is_voided == 0,
DbWeighingSlip.del_flag == 0,
)
.limit(1)
.first()
)
return InventoryRelatedData(
plan=plan_to_read(plan) if plan else None,
weighing=weighing_to_read(weighing) if weighing else None,
)
+475
View File
@@ -0,0 +1,475 @@
from typing import Optional
from datetime import date, datetime
from fastapi import APIRouter, Depends, HTTPException, Query, status
from pydantic import BaseModel
from sqlalchemy import func, or_
from sqlalchemy.orm import Session
from app.core.database import get_db
from app.core.db_auth import DbUserContext, get_db_current_user
from app.core.tenant_context import get_tenant_no
from app.core.utils import generate_uuid
from app.models.db_models import DbInboundOutbound, DbPurchasePlan, DbWeighingSlip
from app.schemas.db.inventory import InboundOutboundRead
from app.schemas.db.plans import (
PurchasePlanCreate,
PurchasePlanRead,
PurchasePlanUpdate,
PurchasePlanWithFillLink,
)
from app.schemas.db.weighing import WeighingSlipRead
from app.services.db.mappers import (
inventory_to_read,
parse_date_str,
parse_datetime_str,
plan_to_read,
plan_to_read_with_fill_link,
weighing_to_read,
)
from app.services.db.product_helpers import (
apply_product_snapshot_to_plan,
resolve_crm_product,
)
router = APIRouter(prefix="/plans", tags=["plans"])
STATUS_THIRD_PARTY_FILL = "待三方填写"
_PLAN_DATE_FIELDS = {"plan_date", "start_date", "end_date"}
_PLAN_REMARK_FIELD = "remarks"
def _base_query(db: Session, tenant_no: str):
return db.query(DbPurchasePlan).filter(
DbPurchasePlan.tenant_no == tenant_no,
DbPurchasePlan.del_flag == 0,
)
@router.get("/", response_model=list[PurchasePlanWithFillLink])
def list_plans(
q: Optional[str] = Query(default=None, description="模糊搜索往来单位或产品"),
plan_no: Optional[str] = Query(default=None, alias="planNo", description="计划号"),
customer_name: Optional[str] = Query(
default=None, alias="customerName", description="往来单位"
),
product: Optional[str] = Query(default=None, description="产品"),
business_type: Optional[str] = Query(default=None, alias="businessType", description="业务类型"),
execution_status: Optional[str] = Query(
default=None, alias="executionStatus", description="执行状态"
),
created_from: Optional[str] = Query(default=None, alias="createdFrom", description="创建开始日期"),
created_to: Optional[str] = Query(default=None, alias="createdTo", description="创建结束日期"),
start_date_from: Optional[str] = Query(
default=None, alias="startDateFrom", description="计划起始日期开始"
),
start_date_to: Optional[str] = Query(
default=None, alias="startDateTo", description="计划起始日期结束"
),
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> list[PurchasePlanWithFillLink]:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
query = _base_query(db, tenant_no).order_by(DbPurchasePlan.create_time.desc())
if q:
keyword = q.lower()
query = query.filter(
or_(
func.lower(DbPurchasePlan.customer_name).contains(keyword),
func.lower(DbPurchasePlan.product).contains(keyword),
func.lower(DbPurchasePlan.plan_no).contains(keyword),
)
)
if plan_no:
query = query.filter(DbPurchasePlan.plan_no.contains(plan_no))
if customer_name:
query = query.filter(
func.lower(DbPurchasePlan.customer_name).contains(customer_name.lower())
)
if product:
query = query.filter(func.lower(DbPurchasePlan.product).contains(product.lower()))
if business_type:
query = query.filter(DbPurchasePlan.business_type == business_type)
if execution_status:
query = query.filter(DbPurchasePlan.execution_status == execution_status)
if created_from:
query = query.filter(DbPurchasePlan.create_time >= created_from)
if created_to:
query = query.filter(DbPurchasePlan.create_time <= f"{created_to} 23:59:59")
if start_date_from:
start_from = parse_date_str(start_date_from)
if start_from:
query = query.filter(DbPurchasePlan.start_date >= start_from)
if start_date_to:
start_to = parse_date_str(start_date_to)
if start_to:
query = query.filter(DbPurchasePlan.start_date <= start_to)
plans = query.all()
if not plans:
return []
plan_ids = [p.id for p in plans]
fill_links = (
db.query(DbInboundOutbound)
.filter(
DbInboundOutbound.tenant_no == tenant_no,
DbInboundOutbound.del_flag == 0,
DbInboundOutbound.purchase_plan_id.in_(plan_ids),
DbInboundOutbound.status == STATUS_THIRD_PARTY_FILL,
)
.all()
)
plan_id_to_inv_id = {
inv.purchase_plan_id: inv.id for inv in fill_links if inv.purchase_plan_id
}
plan_nos = [p.plan_no for p in plans if p.plan_no]
executed_sum_map: dict[tuple[Optional[str], Optional[str]], float] = {}
if plan_ids or plan_nos:
weighing_filters = [DbWeighingSlip.is_voided == 0, DbWeighingSlip.del_flag == 0]
weighing_filters.append(DbWeighingSlip.tenant_no == tenant_no)
id_filters = []
if plan_ids:
id_filters.append(DbWeighingSlip.purchase_plan_id.in_(plan_ids))
if plan_nos:
id_filters.append(DbWeighingSlip.plan_no.in_(plan_nos))
weighing_filters.append(or_(*id_filters))
weighing_rows = (
db.query(
DbWeighingSlip.purchase_plan_id,
DbWeighingSlip.plan_no,
func.sum(DbWeighingSlip.net_weight).label("total_executed"),
)
.filter(*weighing_filters)
.group_by(DbWeighingSlip.purchase_plan_id, DbWeighingSlip.plan_no)
.all()
)
for row in weighing_rows:
key = (row.purchase_plan_id, row.plan_no)
executed_sum_map[key] = float(row.total_executed or 0)
def calc_executed_for_plan(plan: DbPurchasePlan) -> float:
if not executed_sum_map:
return 0.0
total = 0.0
for (pid, pno), executed in executed_sum_map.items():
if pid is not None and pid == plan.id:
total += executed
elif pno and plan.plan_no and pno == plan.plan_no:
total += executed
return total
result_list: list[PurchasePlanWithFillLink] = []
for plan in plans:
result_list.append(
plan_to_read_with_fill_link(
plan,
executed_quantity=calc_executed_for_plan(plan),
fill_link_inventory_id=plan_id_to_inv_id.get(plan.id),
)
)
return result_list
def _generate_plan_no() -> str:
from app.services.db.plan_helpers import generate_plan_no
return generate_plan_no()
@router.post("/", response_model=PurchasePlanRead, status_code=status.HTTP_201_CREATED)
def create_plan(
payload: PurchasePlanCreate,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> PurchasePlanRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
plan_no = payload.plan_no if payload.plan_no else _generate_plan_no()
execution_status = payload.execution_status
if not execution_status:
execution_status = "待入库" if payload.business_type == "入库" else "待出库"
snapshot = resolve_crm_product(db, tenant_no, payload.product_id)
plan = DbPurchasePlan(
id=generate_uuid(),
tenant_no=tenant_no,
plan_no=plan_no,
plan_date=parse_date_str(payload.plan_date) or date.today(),
start_date=parse_date_str(payload.start_date),
end_date=parse_date_str(payload.end_date),
business_type=payload.business_type,
planned_quantity=payload.planned_quantity,
vehicle_no=payload.vehicle_no or "",
customer_name=payload.customer_name.strip() if payload.customer_name else None,
remark=payload.remarks,
execution_status=execution_status,
executed_at=None,
last_weighing_slip_id=None,
executed_quantity=0,
auto_generate_enabled=payload.auto_generate_enabled or 0,
auto_generate_end_month=payload.auto_generate_end_month,
auto_generate_last_month=None,
create_by=user.id,
create_dept_id=user.dept_id,
)
apply_product_snapshot_to_plan(plan, snapshot)
db.add(plan)
db.commit()
db.refresh(plan)
return plan_to_read(plan)
class AutoGenerateMonthlyResult(BaseModel):
created_count: int
skipped_reason: Optional[str] = None
current_month: str
@router.post("/run-auto-generate", response_model=AutoGenerateMonthlyResult)
def run_auto_generate_monthly(
force: bool = Query(default=False, description="true 时跳过「仅每月1日」限制,供验收手动触发"),
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> AutoGenerateMonthlyResult:
"""手动触发计划按月自动生成(定时任务同款逻辑)。"""
get_tenant_no(db, user.to_tenant_user_dict())
from app.services.db.auto_generate_plans import run_auto_generate_monthly_plans
result = run_auto_generate_monthly_plans(db, force=force)
return AutoGenerateMonthlyResult(**result)
@router.get("/{id}", response_model=PurchasePlanRead)
def get_plan(
id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> PurchasePlanRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
plan = _get_plan(db, tenant_no, id)
return plan_to_read(plan)
@router.patch("/{id}", response_model=PurchasePlanRead)
def update_plan(
id: str,
payload: PurchasePlanUpdate,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> PurchasePlanRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
plan = _get_plan(db, tenant_no, id)
payload_dict = payload.model_dump(exclude_unset=True)
_apply_plan_product_update(db, tenant_no, plan, payload_dict)
_apply_plan_update(plan, payload_dict)
plan.update_by = user.id
db.commit()
db.refresh(plan)
return plan_to_read(plan)
@router.delete("/{id}", status_code=status.HTTP_204_NO_CONTENT)
def delete_plan(
id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> None:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
plan = _get_plan(db, tenant_no, id)
plan.del_flag = 1
plan.update_by = user.id
db.commit()
def _get_plan(db: Session, tenant_no: str, plan_id: str) -> DbPurchasePlan:
plan = (
_base_query(db, tenant_no)
.filter(DbPurchasePlan.id == plan_id)
.one_or_none()
)
if plan is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Plan {plan_id} not found",
)
return plan
def _get_plan_by_id_only(db: Session, plan_id: str) -> DbPurchasePlan:
plan = (
db.query(DbPurchasePlan)
.filter(DbPurchasePlan.id == plan_id, DbPurchasePlan.del_flag == 0)
.one_or_none()
)
if plan is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Plan {plan_id} not found",
)
return plan
def _apply_plan_product_update(
db: Session, tenant_no: str, plan: DbPurchasePlan, payload_dict: dict
) -> None:
if "product" in payload_dict and "product_id" not in payload_dict:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="请从 CRM 重新选择产品",
)
product_id = payload_dict.pop("product_id", None)
payload_dict.pop("product", None)
payload_dict.pop("specification", None)
if product_id is not None:
snapshot = resolve_crm_product(db, tenant_no, product_id)
apply_product_snapshot_to_plan(plan, snapshot)
def _apply_plan_update(plan: DbPurchasePlan, payload_dict: dict) -> None:
for key, value in payload_dict.items():
if key == _PLAN_REMARK_FIELD:
if isinstance(value, str):
value = value.strip()
plan.remark = value
continue
if key in _PLAN_DATE_FIELDS:
if value is None:
setattr(plan, key, None)
else:
setattr(plan, key, parse_date_str(str(value)))
continue
if key == "executed_at":
plan.executed_at = parse_datetime_str(str(value)) if value else None
continue
if isinstance(value, str):
value = value.strip()
setattr(plan, key, value)
class PlanRelatedData(BaseModel):
inventories: list[InboundOutboundRead]
weighings: list[WeighingSlipRead]
@router.get("/{id}/related", response_model=PlanRelatedData)
def get_plan_related(
id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> PlanRelatedData:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
plan = _get_plan(db, tenant_no, id)
inventories = (
db.query(DbInboundOutbound)
.filter(
DbInboundOutbound.tenant_no == tenant_no,
DbInboundOutbound.del_flag == 0,
DbInboundOutbound.purchase_plan_id == plan.id,
)
.order_by(DbInboundOutbound.date.desc(), DbInboundOutbound.id.desc())
.all()
)
weighing_query = db.query(DbWeighingSlip).filter(
DbWeighingSlip.tenant_no == tenant_no,
DbWeighingSlip.del_flag == 0,
DbWeighingSlip.is_voided == 0,
)
if plan.plan_no:
weighing_query = weighing_query.filter(
or_(
DbWeighingSlip.plan_no == plan.plan_no,
DbWeighingSlip.purchase_plan_id == plan.id,
)
)
else:
weighing_query = weighing_query.filter(DbWeighingSlip.purchase_plan_id == plan.id)
weighings = weighing_query.order_by(DbWeighingSlip.create_time.desc()).all()
return PlanRelatedData(
inventories=[inventory_to_read(inv) for inv in inventories],
weighings=[weighing_to_read(w) for w in weighings],
)
class ThirdPartyPlanPageData(BaseModel):
plan: PurchasePlanRead
today_inventories: list[InboundOutboundRead]
month_inventories: list[InboundOutboundRead]
@router.get("/{id}/third-party-page", response_model=ThirdPartyPlanPageData)
def get_third_party_plan_page(
id: str,
db: Session = Depends(get_db),
) -> ThirdPartyPlanPageData:
"""三方 H5 填写页初始化数据(无需门户登录,与原系统一致)。"""
plan = _get_plan_by_id_only(db, id)
tenant_no = plan.tenant_no
today = date.today()
start = plan.start_date
end = plan.end_date
if start and today < start:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="计划尚未生效,当前日期不允许填写出入库单",
)
if end and today > end:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="计划已过期,当前日期不允许填写出入库单",
)
today_str = today.strftime("%Y-%m-%d")
today_date = parse_date_str(today_str)
inventories = (
db.query(DbInboundOutbound)
.filter(
DbInboundOutbound.tenant_no == tenant_no,
DbInboundOutbound.del_flag == 0,
DbInboundOutbound.purchase_plan_id == plan.id,
DbInboundOutbound.date == today_date,
)
.order_by(DbInboundOutbound.date.desc(), DbInboundOutbound.id.desc())
.all()
)
month_start = today.replace(day=1)
month_history = (
db.query(DbInboundOutbound)
.filter(
DbInboundOutbound.tenant_no == tenant_no,
DbInboundOutbound.del_flag == 0,
DbInboundOutbound.purchase_plan_id == plan.id,
DbInboundOutbound.date >= month_start,
DbInboundOutbound.date < today,
)
.order_by(DbInboundOutbound.date.desc(), DbInboundOutbound.id.desc())
.all()
)
return ThirdPartyPlanPageData(
plan=plan_to_read(plan),
today_inventories=[inventory_to_read(inv) for inv in inventories],
month_inventories=[inventory_to_read(inv) for inv in month_history],
)
+146
View File
@@ -0,0 +1,146 @@
from typing import Optional
from fastapi import APIRouter, Depends, HTTPException, Query, status
from sqlalchemy import func, or_
from sqlalchemy.orm import Session
from app.core.database import get_db
from app.core.db_auth import DbUserContext, get_db_current_user
from app.core.tenant_context import get_tenant_no
from app.core.utils import generate_uuid
from app.models.db_models import DbVehicle
from app.schemas.db.master_data import VehicleCreate, VehicleRead, VehicleUpdate
from app.services.db.mappers import vehicle_to_read
router = APIRouter(prefix="/master-data/vehicles", tags=["vehicles"])
def _base_query(db: Session, tenant_no: str):
return db.query(DbVehicle).filter(
DbVehicle.tenant_no == tenant_no,
DbVehicle.del_flag == 0,
)
@router.get("/", response_model=list[VehicleRead])
def list_vehicles(
q: Optional[str] = Query(default=None, description="模糊搜索车牌号"),
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> list[VehicleRead]:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
query = _base_query(db, tenant_no).order_by(DbVehicle.create_time.desc())
if q:
keyword = q.lower()
query = query.filter(
or_(
func.lower(DbVehicle.vehicle_no).contains(keyword),
func.lower(DbVehicle.remark).contains(keyword),
)
)
rows = query.all()
return [vehicle_to_read(row) for row in rows]
@router.get("/{vehicle_id}", response_model=VehicleRead)
def get_vehicle(
vehicle_id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> VehicleRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_vehicle(db, tenant_no, vehicle_id)
return vehicle_to_read(row)
@router.post("/", response_model=VehicleRead, status_code=status.HTTP_201_CREATED)
def create_vehicle(
payload: VehicleCreate,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> VehicleRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
_ensure_unique_vehicle_no(db, tenant_no, payload.vehicle_no)
row = DbVehicle(
id=generate_uuid(),
tenant_no=tenant_no,
vehicle_no=payload.vehicle_no.strip(),
remark=payload.remarks,
create_by=user.id,
create_dept_id=user.dept_id,
)
db.add(row)
db.commit()
db.refresh(row)
return vehicle_to_read(row)
@router.put("/{vehicle_id}", response_model=VehicleRead)
def update_vehicle(
vehicle_id: str,
payload: VehicleUpdate,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> VehicleRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_vehicle(db, tenant_no, vehicle_id)
if payload.vehicle_no and payload.vehicle_no.strip().lower() != row.vehicle_no.lower():
_ensure_unique_vehicle_no(db, tenant_no, payload.vehicle_no)
row.vehicle_no = payload.vehicle_no.strip()
if payload.remarks is not None:
row.remark = payload.remarks
row.update_by = user.id
db.commit()
db.refresh(row)
return vehicle_to_read(row)
@router.patch("/{vehicle_id}", response_model=VehicleRead)
def patch_vehicle(
vehicle_id: str,
payload: VehicleUpdate,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> VehicleRead:
return update_vehicle(vehicle_id, payload, db, user)
@router.delete("/{vehicle_id}", status_code=status.HTTP_204_NO_CONTENT)
def delete_vehicle(
vehicle_id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> None:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_vehicle(db, tenant_no, vehicle_id)
row.del_flag = 1
row.update_by = user.id
db.commit()
def _get_vehicle(db: Session, tenant_no: str, vehicle_id: str) -> DbVehicle:
row = (
_base_query(db, tenant_no)
.filter(DbVehicle.id == vehicle_id)
.one_or_none()
)
if row is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Vehicle {vehicle_id} not found",
)
return row
def _ensure_unique_vehicle_no(db: Session, tenant_no: str, vehicle_no: str) -> None:
normalized = vehicle_no.strip().lower()
exists = (
_base_query(db, tenant_no)
.filter(func.lower(DbVehicle.vehicle_no) == normalized)
.first()
)
if exists:
raise HTTPException(
status_code=status.HTTP_409_CONFLICT,
detail="Vehicle number already exists",
)
+414
View File
@@ -0,0 +1,414 @@
from typing import Optional
from datetime import datetime
from fastapi import APIRouter, Depends, HTTPException, Query, status
from pydantic import BaseModel
from sqlalchemy import func, or_
from sqlalchemy.orm import Session
from app.core.database import get_db
from app.core.db_auth import DbUserContext, get_db_current_user
from app.core.tenant_context import get_tenant_no
from app.core.utils import generate_uuid
from app.models.db_models import DbInboundOutbound, DbPurchasePlan, DbWeighingSlip
from app.schemas.db.inventory import InboundOutboundRead
from app.schemas.db.plans import PurchasePlanRead
from app.schemas.db.weighing import WeighingSlipCreate, WeighingSlipRead, WeighingSlipUpdate
from app.services.db.mappers import (
datetime_end_of_day,
inventory_date_to_api,
inventory_to_read,
parse_date_str,
parse_datetime_str,
plan_to_read,
weighing_to_read,
)
from app.services.db.weighing_logic import process_weighing_business_logic
from app.services.db.product_helpers import (
apply_product_snapshot_to_weighing,
resolve_crm_product,
)
router = APIRouter(prefix="/weighing", tags=["weighing"])
_WEIGHING_REMARK_FIELD = "remarks"
def _base_query(db: Session, tenant_no: str):
return db.query(DbWeighingSlip).filter(
DbWeighingSlip.tenant_no == tenant_no,
DbWeighingSlip.del_flag == 0,
DbWeighingSlip.is_voided == 0,
)
def _get_weighing(db: Session, tenant_no: str, weighing_id: str) -> DbWeighingSlip:
row = (
db.query(DbWeighingSlip)
.filter(
DbWeighingSlip.id == weighing_id,
DbWeighingSlip.tenant_no == tenant_no,
DbWeighingSlip.del_flag == 0,
)
.one_or_none()
)
if row is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail=f"Weighing {weighing_id} not found",
)
return row
def _apply_weighing_product_update(
db: Session, tenant_no: str, row: DbWeighingSlip, payload_dict: dict
) -> None:
if "cargo_name" in payload_dict and "product_id" not in payload_dict:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="请从 CRM 重新选择产品",
)
product_id = payload_dict.pop("product_id", None)
payload_dict.pop("cargo_name", None)
payload_dict.pop("specification", None)
if product_id is not None:
snapshot = resolve_crm_product(db, tenant_no, product_id)
apply_product_snapshot_to_weighing(row, snapshot)
def _apply_weighing_update(row: DbWeighingSlip, payload_dict: dict) -> None:
for key, value in payload_dict.items():
if key == _WEIGHING_REMARK_FIELD:
if isinstance(value, str):
value = value.strip()
row.remark = value
continue
if key in {"gross_weight_time", "tare_weight_time"}:
if value is None or (isinstance(value, str) and not str(value).strip()):
if key == "tare_weight_time":
row.tare_weight_time = None
else:
parsed = parse_datetime_str(str(value))
if parsed:
setattr(row, key, parsed)
continue
if isinstance(value, str):
value = value.strip()
setattr(row, key, value)
@router.get("/", response_model=list[WeighingSlipRead])
def list_weighing(
q: Optional[str] = Query(default=None, description="模糊搜索关键词"),
date_from: Optional[str] = Query(default=None, alias="dateFrom", description="开始日期"),
date_to: Optional[str] = Query(default=None, alias="dateTo", description="结束日期"),
plan_no: Optional[str] = Query(default=None, alias="planNo", description="计划号"),
batch_no: Optional[str] = Query(default=None, alias="batchNo", description="出入库单号"),
vehicle_no: Optional[str] = Query(default=None, alias="vehicleNo", description="车牌号"),
cargo_name: Optional[str] = Query(default=None, alias="cargoName", description="货物名称"),
supplier: Optional[str] = Query(default=None, description="供货单位"),
consignee: Optional[str] = Query(default=None, description="收货单位"),
business_type: Optional[str] = Query(default=None, alias="businessType", description="业务类型"),
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> list[WeighingSlipRead]:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
query = _base_query(db, tenant_no).order_by(DbWeighingSlip.gross_weight_time.desc())
if q:
keyword = q.lower()
query = query.filter(
or_(
func.lower(DbWeighingSlip.vehicle_no).contains(keyword),
func.lower(DbWeighingSlip.plan_no).contains(keyword),
func.lower(DbWeighingSlip.batch_no).contains(keyword),
func.lower(DbWeighingSlip.cargo_name).contains(keyword),
func.lower(DbWeighingSlip.supplier).contains(keyword),
func.lower(DbWeighingSlip.consignee).contains(keyword),
)
)
if date_from:
start_date = parse_date_str(date_from)
if start_date:
query = query.filter(
DbWeighingSlip.gross_weight_time >= datetime.combine(start_date, datetime.min.time())
)
if date_to:
end_date = parse_date_str(date_to)
if end_date:
query = query.filter(DbWeighingSlip.gross_weight_time <= datetime_end_of_day(end_date))
if plan_no:
query = query.filter(DbWeighingSlip.plan_no.contains(plan_no))
if batch_no:
query = query.filter(DbWeighingSlip.batch_no.contains(batch_no))
if vehicle_no:
query = query.filter(DbWeighingSlip.vehicle_no.contains(vehicle_no))
if cargo_name:
query = query.filter(DbWeighingSlip.cargo_name.contains(cargo_name))
if supplier:
query = query.filter(func.lower(DbWeighingSlip.supplier).contains(supplier.lower()))
if consignee:
query = query.filter(func.lower(DbWeighingSlip.consignee).contains(consignee.lower()))
if business_type:
query = query.filter(DbWeighingSlip.business_type == business_type)
weighings = query.all()
inventory_ids = [w.inbound_outbound_id for w in weighings if w.inbound_outbound_id]
inventory_date_map: dict[str, str] = {}
if inventory_ids:
inventories = (
db.query(DbInboundOutbound)
.filter(
DbInboundOutbound.id.in_(inventory_ids),
DbInboundOutbound.del_flag == 0,
)
.all()
)
for inventory in inventories:
inventory_date_map[inventory.id] = inventory_date_to_api(inventory.date)
return [
weighing_to_read(
weighing,
inventory_date=inventory_date_map.get(weighing.inbound_outbound_id or ""),
)
for weighing in weighings
]
@router.post("/", response_model=WeighingSlipRead, status_code=status.HTTP_201_CREATED)
def create_weighing(
payload: WeighingSlipCreate,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> WeighingSlipRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
inbound_outbound_id = payload.inbound_outbound_id
if inbound_outbound_id:
existing = (
db.query(DbWeighingSlip)
.filter(
DbWeighingSlip.inbound_outbound_id == inbound_outbound_id,
DbWeighingSlip.is_voided == 0,
DbWeighingSlip.del_flag == 0,
)
.first()
)
if existing:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="该出入库单已经存在关联的地磅单,无法重复创建",
)
planned_quantity = payload.planned_quantity
current_quantity = payload.current_quantity
purchase_plan_id = payload.purchase_plan_id
batch_no = payload.batch_no.strip() if payload.batch_no else None
if inbound_outbound_id:
inventory = (
db.query(DbInboundOutbound)
.filter(
DbInboundOutbound.id == inbound_outbound_id,
DbInboundOutbound.tenant_no == tenant_no,
DbInboundOutbound.del_flag == 0,
)
.one_or_none()
)
if inventory:
if current_quantity is None:
current_quantity = inventory.quantity * 1000
if purchase_plan_id is None and inventory.purchase_plan_id:
purchase_plan_id = inventory.purchase_plan_id
if purchase_plan_id:
plan = (
db.query(DbPurchasePlan)
.filter(DbPurchasePlan.id == purchase_plan_id)
.one_or_none()
)
if plan and planned_quantity is None:
planned_quantity = plan.planned_quantity * 1000
if not batch_no and inventory.batch_no:
batch_no = inventory.batch_no
gross_time = parse_datetime_str(payload.gross_weight_time) if payload.gross_weight_time else None
tare_time = (
parse_datetime_str(payload.tare_weight_time)
if payload.tare_weight_time and payload.tare_weight_time.strip()
else None
)
snapshot = resolve_crm_product(db, tenant_no, payload.product_id)
row = DbWeighingSlip(
id=generate_uuid(),
tenant_no=tenant_no,
vehicle_no=payload.vehicle_no.strip(),
plan_no=payload.plan_no.strip() if payload.plan_no else None,
business_type=payload.business_type,
batch_no=batch_no,
supplier=payload.supplier.strip(),
consignee=payload.consignee.strip(),
gross_weight=payload.gross_weight or 0,
gross_weight_time=gross_time or datetime.now(),
tare_weight=payload.tare_weight or 0,
tare_weight_time=tare_time,
deduction=payload.deduction or 0,
net_weight=payload.net_weight or 0,
planned_quantity=planned_quantity,
executed_quantity=payload.executed_quantity,
purchase_plan_id=purchase_plan_id,
inbound_outbound_id=inbound_outbound_id,
weighing_point=payload.weighing_point or "山峡化工",
remark=payload.remarks,
current_quantity=current_quantity,
is_voided=0,
create_by=user.id,
create_dept_id=user.dept_id,
)
apply_product_snapshot_to_weighing(row, snapshot)
db.add(row)
db.commit()
db.refresh(row)
process_weighing_business_logic(db, row)
db.refresh(row)
return weighing_to_read(row)
@router.get("/{id}", response_model=WeighingSlipRead)
def get_weighing(
id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> WeighingSlipRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_weighing(db, tenant_no, id)
return weighing_to_read(row)
@router.patch("/{id}", response_model=WeighingSlipRead)
def update_weighing(
id: str,
payload: WeighingSlipUpdate,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> WeighingSlipRead:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_weighing(db, tenant_no, id)
if row.is_voided == 1:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="Cannot update voided weighing record",
)
payload_dict = payload.model_dump(exclude_unset=True)
_apply_weighing_product_update(db, tenant_no, row, payload_dict)
_apply_weighing_update(row, payload_dict)
row.update_by = user.id
db.commit()
db.refresh(row)
process_weighing_business_logic(db, row)
db.refresh(row)
return weighing_to_read(row)
@router.post("/{id}/void", status_code=status.HTTP_204_NO_CONTENT)
def void_weighing(
id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> None:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_weighing(db, tenant_no, id)
if row.is_voided == 1:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="Weighing record is already voided",
)
row.is_voided = 1
row.update_by = user.id
db.commit()
process_weighing_business_logic(db, row)
@router.delete("/{id}", status_code=status.HTTP_204_NO_CONTENT)
def delete_weighing(
id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> None:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_weighing(db, tenant_no, id)
row.is_voided = 1
row.update_by = user.id
db.commit()
process_weighing_business_logic(db, row)
class WeighingRelatedData(BaseModel):
plan: Optional[PurchasePlanRead]
inventory: Optional[InboundOutboundRead]
@router.get("/{id}/related", response_model=WeighingRelatedData)
def get_weighing_related(
id: str,
db: Session = Depends(get_db),
user: DbUserContext = Depends(get_db_current_user),
) -> WeighingRelatedData:
tenant_no = get_tenant_no(db, user.to_tenant_user_dict())
row = _get_weighing(db, tenant_no, id)
plan = None
if row.purchase_plan_id:
plan = (
db.query(DbPurchasePlan)
.filter(
DbPurchasePlan.id == row.purchase_plan_id,
DbPurchasePlan.del_flag == 0,
)
.one_or_none()
)
elif row.plan_no:
plan = (
db.query(DbPurchasePlan)
.filter(
DbPurchasePlan.plan_no == row.plan_no,
DbPurchasePlan.tenant_no == tenant_no,
DbPurchasePlan.del_flag == 0,
)
.limit(1)
.first()
)
inventory = None
if row.inbound_outbound_id:
inventory = (
db.query(DbInboundOutbound)
.filter(
DbInboundOutbound.id == row.inbound_outbound_id,
DbInboundOutbound.del_flag == 0,
)
.one_or_none()
)
return WeighingRelatedData(
plan=plan_to_read(plan) if plan else None,
inventory=inventory_to_read(inventory) if inventory else None,
)
+1
View File
@@ -140,6 +140,7 @@ class Settings(BaseSettings):
"/api/web/admin/users/upload-avatar,"
"/api/invoice/download,"
"/api/bx/health,"
"/api/db/health,"
"/api/expense-items,"
"/api/workflows,"
"/api/advances,"
+71
View File
@@ -0,0 +1,71 @@
"""地磅模块认证适配:门户 JWT 用户 → db 业务上下文。"""
from __future__ import annotations
from dataclasses import dataclass
from typing import Any, Dict, Optional
from fastapi import Depends, HTTPException
from fastapi.security import OAuth2PasswordBearer
from sqlalchemy.orm import Session
from app.core.auth import get_current_user_by_token
from app.core.database import get_db
from app.core.menu_guard import ADMIN_ROLES, require_admin_or_super_admin
optional_oauth2_scheme = OAuth2PasswordBearer(
tokenUrl="/api/public/login",
auto_error=False,
)
@dataclass
class DbUserContext:
"""db Router/Service 使用的当前用户上下文。"""
id: str
name: str
dept_id: str
role: str
tenant_no: str
def to_tenant_user_dict(self) -> Dict[str, Any]:
return {
"user_id": self.id,
"role": self.role,
"tenant_no": self.tenant_no,
}
def get_db_current_user(
user: dict = Depends(require_admin_or_super_admin),
) -> DbUserContext:
return DbUserContext(
id=(user.get("user_id") or "").strip(),
name=(user.get("real_name") or user.get("username") or "").strip(),
dept_id=(user.get("region_id") or "").strip(),
role=(user.get("role") or "").strip(),
tenant_no=(user.get("tenant_no") or "").strip(),
)
async def get_db_current_user_optional(
token: Optional[str] = Depends(optional_oauth2_scheme),
db: Session = Depends(get_db),
) -> DbUserContext | None:
"""有 Bearer 且为 admin/super_admin 时返回上下文,否则 None(供三方 H5 无登录调用)。"""
if not token:
return None
try:
user = await get_current_user_by_token(token, db)
except HTTPException:
return None
role = user.get("role")
if role not in ADMIN_ROLES:
return None
return DbUserContext(
id=(user.get("user_id") or "").strip(),
name=(user.get("real_name") or user.get("username") or "").strip(),
dept_id=(user.get("region_id") or "").strip(),
role=(role or "").strip(),
tenant_no=(user.get("tenant_no") or "").strip(),
)
+3
View File
@@ -14,6 +14,7 @@ from app.core.api_request_log_middleware import ApiRequestLogMiddleware
from app.core.api_crypto_middleware import ApiCryptoMiddleware
from app.models import models # noqa: F401
import app.models.bx_models # noqa: F401
import app.models.db_models # noqa: F401
from app.api import (
public_router,
menu_router,
@@ -23,6 +24,7 @@ from app.api import (
crm_router,
monitor_router,
bx_router,
db_router,
)
@@ -115,6 +117,7 @@ app.include_router(workflow_router, prefix=settings.API_V1_PREFIX)
app.include_router(leave_router, prefix=settings.API_V1_PREFIX)
app.include_router(crm_router, prefix=settings.API_V1_PREFIX)
app.include_router(bx_router, prefix=settings.API_V1_PREFIX)
app.include_router(db_router, prefix=settings.API_V1_PREFIX)
app.include_router(monitor_router, prefix=settings.API_V1_PREFIX)
+141
View File
@@ -0,0 +1,141 @@
"""地磅(db)模块数据模型 — 对齐 docs/sql/db_tables.sql"""
from datetime import datetime
from sqlalchemy import Column, Date, DateTime, Float, Integer, SmallInteger, String
from app.core.database import Base
class DbVehicle(Base):
__tablename__ = "db_vehicle"
id = Column(String(64), primary_key=True, comment="主键ID(UUID)")
vehicle_no = Column(String(255), nullable=False, comment="车牌号")
tenant_no = Column(String(64), nullable=False, default="shanxia2.0", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建部门")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人")
update_time = Column(
DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间"
)
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class DbPurchasePlan(Base):
__tablename__ = "db_purchase_plan"
id = Column(String(64), primary_key=True, comment="主键ID(UUID)")
plan_no = Column(String(255), nullable=True, comment="计划号")
plan_date = Column(Date, nullable=False, comment="计划日期")
start_date = Column(Date, nullable=True, comment="开始时间")
end_date = Column(Date, nullable=True, comment="结束时间")
business_type = Column(String(255), nullable=False, comment="业务类型")
product_id = Column(String(64), nullable=True, comment="CRM产品ID")
product = Column(String(255), nullable=False, comment="产品名称")
specification = Column(String(255), nullable=True, comment="规格")
planned_quantity = Column(Float, nullable=False, comment="计划数量(t)")
vehicle_no = Column(String(255), nullable=True, default="", comment="车牌号")
customer_name = Column(String(255), nullable=True, comment="往来单位")
execution_status = Column(String(50), nullable=True, comment="执行状态")
executed_at = Column(DateTime, nullable=True, comment="执行时间")
last_weighing_slip_id = Column(String(64), nullable=True, comment="最后关联地磅单ID")
executed_quantity = Column(Float, nullable=True, default=0, comment="已执行量(kg)")
auto_generate_enabled = Column(SmallInteger, nullable=False, default=0, comment="是否自动按月生成")
auto_generate_end_month = Column(String(7), nullable=True, comment="自动生成结束月份")
auto_generate_last_month = Column(String(7), nullable=True, comment="最后一次自动生成月份")
tenant_no = Column(String(64), nullable=False, default="shanxia2.0", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建部门")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人")
update_time = Column(
DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间"
)
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class DbInboundOutbound(Base):
__tablename__ = "db_inbound_outbound"
id = Column(String(64), primary_key=True, comment="主键ID(租户内纯数字字符串)")
date = Column(Date, nullable=False, comment="日期")
partner_company = Column(String(255), nullable=False, comment="往来单位")
business_type = Column(String(255), nullable=False, comment="业务类型")
product_id = Column(String(64), nullable=True, comment="CRM产品ID")
product = Column(String(255), nullable=False, comment="产品")
specification = Column(String(255), nullable=True, comment="规格")
quantity = Column(Float, nullable=False, comment="本次量(t)")
plan_no = Column(String(255), nullable=True, comment="计划号")
batch_no = Column(String(255), nullable=True, comment="批次号")
vehicle_no = Column(String(255), nullable=False, comment="车牌号")
status = Column(String(50), nullable=True, comment="状态")
purchase_plan_id = Column(String(64), nullable=True, comment="关联计划ID")
tenant_no = Column(String(64), nullable=False, default="shanxia2.0", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建部门")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人")
update_time = Column(
DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间"
)
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class DbWeighingSlip(Base):
__tablename__ = "db_weighing_slip"
id = Column(String(64), primary_key=True, comment="主键ID(UUID)")
vehicle_no = Column(String(255), nullable=False, comment="车号")
plan_no = Column(String(255), nullable=True, comment="计划单号")
product_id = Column(String(64), nullable=True, comment="CRM产品ID")
cargo_name = Column(String(255), nullable=False, comment="货物名称")
specification = Column(String(255), nullable=True, comment="规格")
business_type = Column(String(255), nullable=False, comment="业务类型")
batch_no = Column(String(255), nullable=True, comment="批次号")
supplier = Column(String(255), nullable=False, comment="供货单位")
consignee = Column(String(255), nullable=False, comment="收货单位")
gross_weight = Column(Float, nullable=False, comment="毛重(kg)")
gross_weight_time = Column(DateTime, nullable=False, comment="毛重时间")
tare_weight = Column(Float, nullable=False, comment="皮重(kg)")
tare_weight_time = Column(DateTime, nullable=True, comment="皮重时间")
deduction = Column(Float, nullable=True, default=0, comment="扣杂(kg)")
net_weight = Column(Float, nullable=False, comment="净重(kg)")
planned_quantity = Column(Float, nullable=True, comment="计划数量(kg)")
executed_quantity = Column(Float, nullable=True, comment="执行数量(kg)")
purchase_plan_id = Column(String(64), nullable=True, comment="关联计划ID")
inbound_outbound_id = Column(String(64), nullable=True, comment="关联出入库单ID")
weighing_point = Column(String(255), nullable=True, default="山峡地磅", comment="称重点")
current_quantity = Column(Float, nullable=True, comment="本次量(kg)")
is_voided = Column(SmallInteger, nullable=False, default=0, comment="是否作废")
tenant_no = Column(String(64), nullable=False, default="shanxia2.0", comment="租户编号")
order_num = Column(Integer, nullable=True, comment="排序号")
remark = Column(String(512), nullable=True, comment="备注")
create_by = Column(String(64), nullable=True, comment="创建人")
create_dept_id = Column(String(64), nullable=False, default="", comment="创建部门")
create_time = Column(DateTime, nullable=False, default=datetime.now, comment="创建时间")
update_by = Column(String(64), nullable=True, comment="更新人")
update_time = Column(
DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间"
)
del_flag = Column(SmallInteger, nullable=False, default=0, comment="删除标记")
class DbSequence(Base):
"""租户内业务序号(并发安全自增)。"""
__tablename__ = "db_sequence"
id = Column(String(64), primary_key=True, comment="主键ID(UUID)")
tenant_no = Column(String(64), nullable=False, comment="租户编号")
seq_name = Column(String(64), nullable=False, comment="序号名称")
next_val = Column(Integer, nullable=False, comment="下一个待分配序号")
update_time = Column(
DateTime, nullable=False, default=datetime.now, onupdate=datetime.now, comment="更新时间"
)
+1
View File
@@ -0,0 +1 @@
"""地磅(db)Pydantic schemas — 对齐原 simple-dibang-xiaoshou 契约。"""
+23
View File
@@ -0,0 +1,23 @@
from __future__ import annotations
from pydantic import BaseModel, Field
class DashboardStats(BaseModel):
today_inbound: float = Field(alias="todayInbound")
today_outbound: float = Field(alias="todayOutbound")
abnormal_orders: int = Field(alias="abnormalOrders")
model_config = {"populate_by_name": True}
class DashboardCargoStat(BaseModel):
label: str
planned: float
actual: float
class DashboardPartnerCargoStat(BaseModel):
label: str
planned: float
actual: float
+75
View File
@@ -0,0 +1,75 @@
from typing import Optional
from pydantic import BaseModel, Field
class InboundOutboundBase(BaseModel):
date: str = Field(max_length=255)
partner_company: str = Field(max_length=255, alias="partnerCompany")
business_type: str = Field(max_length=255, alias="businessType")
product_id: Optional[str] = Field(default=None, alias="productId")
product: str = Field(max_length=255)
specification: Optional[str] = Field(default=None, max_length=255)
quantity: float = Field()
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
batch_no: Optional[str] = Field(default=None, max_length=255, alias="batchNo")
vehicle_no: str = Field(max_length=255, alias="vehicleNo")
status: Optional[str] = Field(default=None, max_length=50)
remarks: Optional[str] = Field(default=None)
purchase_plan_id: Optional[str] = Field(default=None, alias="purchasePlanId")
model_config = {"from_attributes": True, "populate_by_name": True}
class InboundOutboundCreate(BaseModel):
date: str = Field(max_length=255)
partner_company: str = Field(max_length=255, alias="partnerCompany")
business_type: str = Field(max_length=255, alias="businessType")
product_id: str = Field(alias="productId")
quantity: float = Field()
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
batch_no: Optional[str] = Field(default=None, max_length=255, alias="batchNo")
vehicle_no: str = Field(max_length=255, alias="vehicleNo")
status: Optional[str] = Field(default=None, max_length=50)
remarks: Optional[str] = Field(default=None)
purchase_plan_id: Optional[str] = Field(default=None, alias="purchasePlanId")
model_config = {"populate_by_name": True}
class InboundOutboundUpdate(BaseModel):
date: Optional[str] = Field(default=None, max_length=255)
partner_company: Optional[str] = Field(default=None, max_length=255, alias="partnerCompany")
business_type: Optional[str] = Field(default=None, max_length=255, alias="businessType")
product_id: Optional[str] = Field(default=None, alias="productId")
product: Optional[str] = Field(default=None, max_length=255)
specification: Optional[str] = Field(default=None, max_length=255)
quantity: Optional[float] = Field(default=None)
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
batch_no: Optional[str] = Field(default=None, max_length=255, alias="batchNo")
vehicle_no: Optional[str] = Field(default=None, max_length=255, alias="vehicleNo")
status: Optional[str] = Field(default=None, max_length=50)
remarks: Optional[str] = Field(default=None)
purchase_plan_id: Optional[str] = Field(default=None, alias="purchasePlanId")
model_config = {"populate_by_name": True}
class CreateLinkForPlanPayload(BaseModel):
purchase_plan_id: str = Field(alias="purchasePlanId")
remarks: Optional[str] = None
model_config = {"populate_by_name": True}
class InboundOutboundRead(InboundOutboundBase):
id: str
is_deleted: int = Field(default=0, alias="isDeleted")
created_at: str = Field(alias="createdAt")
gross_weight: Optional[float] = Field(default=None, alias="grossWeight")
tare_weight: Optional[float] = Field(default=None, alias="tareWeight")
deduction: Optional[float] = Field(default=None)
net_weight: Optional[float] = Field(default=None, alias="netWeight")
gross_weight_time: Optional[str] = Field(default=None, alias="grossWeightTime")
tare_weight_time: Optional[str] = Field(default=None, alias="tareWeightTime")
has_weighing_slip: bool = Field(default=False, alias="hasWeighingSlip")
+25
View File
@@ -0,0 +1,25 @@
from typing import Optional
from pydantic import BaseModel, Field
class VehicleBase(BaseModel):
vehicle_no: str = Field(min_length=1, max_length=255, alias="vehicleNo")
remarks: Optional[str] = Field(default=None)
model_config = {"from_attributes": True, "populate_by_name": True}
class VehicleCreate(VehicleBase):
pass
class VehicleUpdate(BaseModel):
vehicle_no: Optional[str] = Field(default=None, min_length=1, max_length=255, alias="vehicleNo")
remarks: Optional[str] = Field(default=None)
model_config = {"populate_by_name": True}
class VehicleRead(VehicleBase):
id: str
+89
View File
@@ -0,0 +1,89 @@
from typing import Optional
from pydantic import BaseModel, Field
class PurchasePlanBase(BaseModel):
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
plan_date: str = Field(max_length=255, alias="planDate")
start_date: Optional[str] = Field(default=None, max_length=255, alias="startDate")
end_date: Optional[str] = Field(default=None, max_length=255, alias="endDate")
business_type: str = Field(max_length=255, alias="businessType")
product_id: Optional[str] = Field(default=None, alias="productId")
product: str = Field(max_length=255)
specification: Optional[str] = Field(default=None, max_length=255)
planned_quantity: float = Field(alias="plannedQuantity")
vehicle_no: Optional[str] = Field(default="", max_length=255, alias="vehicleNo")
customer_name: Optional[str] = Field(default=None, max_length=255, alias="customerName")
remarks: Optional[str] = Field(default=None)
execution_status: Optional[str] = Field(default=None, max_length=50, alias="executionStatus")
executed_at: Optional[str] = Field(default=None, max_length=255, alias="executedAt")
last_weighing_slip_id: Optional[str] = Field(default=None, alias="lastWeighingSlipId")
executed_quantity: Optional[float] = Field(default=0, alias="executedQuantity")
auto_generate_enabled: int = Field(default=0, alias="autoGenerateEnabled")
auto_generate_end_month: Optional[str] = Field(
default=None, max_length=7, alias="autoGenerateEndMonth"
)
auto_generate_last_month: Optional[str] = Field(
default=None, max_length=7, alias="autoGenerateLastMonth"
)
model_config = {"from_attributes": True, "populate_by_name": True}
class PurchasePlanCreate(BaseModel):
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
plan_date: str = Field(max_length=255, alias="planDate")
start_date: Optional[str] = Field(default=None, max_length=255, alias="startDate")
end_date: Optional[str] = Field(default=None, max_length=255, alias="endDate")
business_type: str = Field(max_length=255, alias="businessType")
product_id: str = Field(alias="productId")
planned_quantity: float = Field(alias="plannedQuantity")
vehicle_no: Optional[str] = Field(default="", max_length=255, alias="vehicleNo")
customer_name: Optional[str] = Field(default=None, max_length=255, alias="customerName")
remarks: Optional[str] = Field(default=None)
execution_status: Optional[str] = Field(default=None, max_length=50, alias="executionStatus")
auto_generate_enabled: Optional[int] = Field(default=0, alias="autoGenerateEnabled")
auto_generate_end_month: Optional[str] = Field(
default=None, max_length=7, alias="autoGenerateEndMonth"
)
model_config = {"populate_by_name": True}
class PurchasePlanUpdate(BaseModel):
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
plan_date: Optional[str] = Field(default=None, max_length=255, alias="planDate")
start_date: Optional[str] = Field(default=None, max_length=255, alias="startDate")
end_date: Optional[str] = Field(default=None, max_length=255, alias="endDate")
business_type: Optional[str] = Field(default=None, max_length=255, alias="businessType")
product_id: Optional[str] = Field(default=None, alias="productId")
product: Optional[str] = Field(default=None, max_length=255)
specification: Optional[str] = Field(default=None, max_length=255)
planned_quantity: Optional[float] = Field(default=None, alias="plannedQuantity")
vehicle_no: Optional[str] = Field(default=None, max_length=255, alias="vehicleNo")
customer_name: Optional[str] = Field(default=None, max_length=255, alias="customerName")
remarks: Optional[str] = Field(default=None)
execution_status: Optional[str] = Field(default=None, max_length=50, alias="executionStatus")
executed_at: Optional[str] = Field(default=None, max_length=255, alias="executedAt")
last_weighing_slip_id: Optional[str] = Field(default=None, alias="lastWeighingSlipId")
executed_quantity: Optional[float] = Field(default=None, alias="executedQuantity")
auto_generate_enabled: Optional[int] = Field(default=None, alias="autoGenerateEnabled")
auto_generate_end_month: Optional[str] = Field(
default=None, max_length=7, alias="autoGenerateEndMonth"
)
auto_generate_last_month: Optional[str] = Field(
default=None, max_length=7, alias="autoGenerateLastMonth"
)
model_config = {"populate_by_name": True}
class PurchasePlanRead(PurchasePlanBase):
id: str
is_deleted: int = Field(default=0, alias="isDeleted")
created_at: str = Field(alias="createdAt")
class PurchasePlanWithFillLink(PurchasePlanRead):
fill_link_inventory_id: Optional[str] = Field(default=None, alias="fillLinkInventoryId")
+90
View File
@@ -0,0 +1,90 @@
from typing import Optional
from pydantic import BaseModel, Field
class WeighingSlipBase(BaseModel):
vehicle_no: str = Field(max_length=255, alias="vehicleNo")
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
product_id: Optional[str] = Field(default=None, alias="productId")
cargo_name: str = Field(max_length=255, alias="cargoName")
specification: Optional[str] = Field(default=None, max_length=255)
business_type: str = Field(max_length=255, alias="businessType")
batch_no: Optional[str] = Field(default=None, max_length=255, alias="batchNo")
supplier: str = Field(max_length=255)
consignee: str = Field(max_length=255)
gross_weight: float = Field(alias="grossWeight")
gross_weight_time: str = Field(max_length=255, alias="grossWeightTime")
tare_weight: float = Field(alias="tareWeight")
tare_weight_time: str = Field(max_length=255, alias="tareWeightTime")
deduction: Optional[float] = Field(default=0)
net_weight: float = Field(alias="netWeight")
planned_quantity: Optional[float] = Field(default=None, alias="plannedQuantity")
executed_quantity: Optional[float] = Field(default=None, alias="executedQuantity")
purchase_plan_id: Optional[str] = Field(default=None, alias="purchasePlanId")
inbound_outbound_id: Optional[str] = Field(default=None, alias="inboundOutboundId")
weighing_point: Optional[str] = Field(default="山峡地磅", max_length=255, alias="weighingPoint")
remarks: Optional[str] = Field(default=None)
current_quantity: Optional[float] = Field(default=None, alias="currentQuantity")
model_config = {"from_attributes": True, "populate_by_name": True}
class WeighingSlipCreate(BaseModel):
vehicle_no: str = Field(max_length=255, alias="vehicleNo")
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
product_id: str = Field(alias="productId")
business_type: str = Field(max_length=255, alias="businessType")
batch_no: Optional[str] = Field(default=None, max_length=255, alias="batchNo")
supplier: str = Field(max_length=255)
consignee: str = Field(max_length=255)
gross_weight: float = Field(default=0, alias="grossWeight")
gross_weight_time: str = Field(default="", max_length=255, alias="grossWeightTime")
tare_weight: float = Field(default=0, alias="tareWeight")
tare_weight_time: str = Field(default="", max_length=255, alias="tareWeightTime")
deduction: Optional[float] = Field(default=0)
net_weight: float = Field(default=0, alias="netWeight")
planned_quantity: Optional[float] = Field(default=None, alias="plannedQuantity")
executed_quantity: Optional[float] = Field(default=None, alias="executedQuantity")
purchase_plan_id: Optional[str] = Field(default=None, alias="purchasePlanId")
inbound_outbound_id: Optional[str] = Field(default=None, alias="inboundOutboundId")
weighing_point: Optional[str] = Field(default="山峡地磅", max_length=255, alias="weighingPoint")
remarks: Optional[str] = Field(default=None)
current_quantity: Optional[float] = Field(default=None, alias="currentQuantity")
model_config = {"populate_by_name": True}
class WeighingSlipUpdate(BaseModel):
vehicle_no: Optional[str] = Field(default=None, max_length=255, alias="vehicleNo")
plan_no: Optional[str] = Field(default=None, max_length=255, alias="planNo")
product_id: Optional[str] = Field(default=None, alias="productId")
cargo_name: Optional[str] = Field(default=None, max_length=255, alias="cargoName")
specification: Optional[str] = Field(default=None, max_length=255)
business_type: Optional[str] = Field(default=None, max_length=255, alias="businessType")
batch_no: Optional[str] = Field(default=None, max_length=255, alias="batchNo")
supplier: Optional[str] = Field(default=None, max_length=255)
consignee: Optional[str] = Field(default=None, max_length=255)
gross_weight: Optional[float] = Field(default=None, alias="grossWeight")
gross_weight_time: Optional[str] = Field(default=None, max_length=255, alias="grossWeightTime")
tare_weight: Optional[float] = Field(default=None, alias="tareWeight")
tare_weight_time: Optional[str] = Field(default=None, max_length=255, alias="tareWeightTime")
deduction: Optional[float] = Field(default=None)
net_weight: Optional[float] = Field(default=None, alias="netWeight")
planned_quantity: Optional[float] = Field(default=None, alias="plannedQuantity")
executed_quantity: Optional[float] = Field(default=None, alias="executedQuantity")
purchase_plan_id: Optional[str] = Field(default=None, alias="purchasePlanId")
inbound_outbound_id: Optional[str] = Field(default=None, alias="inboundOutboundId")
weighing_point: Optional[str] = Field(default=None, max_length=255, alias="weighingPoint")
remarks: Optional[str] = Field(default=None)
current_quantity: Optional[float] = Field(default=None, alias="currentQuantity")
is_voided: Optional[int] = Field(default=None, alias="isVoided")
model_config = {"populate_by_name": True}
class WeighingSlipRead(WeighingSlipBase):
id: str
is_voided: int = Field(default=0, alias="isVoided")
created_at: str = Field(alias="createdAt")
inventory_date: Optional[str] = Field(default=None, alias="inventoryDate")
View File
Whitespace-only changes.
@@ -0,0 +1,139 @@
"""地磅计划按月自动生成 — 迁移自 simple-dibang-xiaoshou/auto-create-plan/auto_create_monthly_plan.py"""
from __future__ import annotations
import logging
from datetime import date, datetime, timedelta
from sqlalchemy import and_, or_
from sqlalchemy.orm import Session
from app.core.utils import generate_uuid
from app.models.db_models import DbPurchasePlan
from app.services.db.plan_helpers import default_execution_status, generate_plan_no
logger = logging.getLogger(__name__)
def month_range(dt: date) -> tuple[date, date]:
"""返回 dt 所在月份的首日、末日。"""
first = dt.replace(day=1)
if first.month == 12:
next_month = first.replace(year=first.year + 1, month=1, day=1)
else:
next_month = first.replace(month=first.month + 1, day=1)
last = next_month - timedelta(days=1)
return first, last
def get_last_month_range(now: date) -> tuple[date, date]:
"""返回上个月的首日、末日。"""
first_this, _ = month_range(now)
last_prev = first_this - timedelta(days=1)
return month_range(last_prev)
def run_auto_generate_monthly_plans(
db: Session,
*,
force: bool = False,
now: date | None = None,
) -> dict:
"""
按月自动生成采购计划。
- 默认仅在每月 1 日执行(force=True 时跳过该限制,供手动触发验收)
- 遍历所有租户,按上月计划模板生成本月计划
"""
today = now or date.today()
if today.day != 1 and not force:
logger.info("当前不是每月 1 日且未 force,跳过自动生成计划")
return {
"created_count": 0,
"skipped_reason": "not_first_day_of_month",
"current_month": today.strftime("%Y-%m"),
}
current_month = today.strftime("%Y-%m")
this_month_first, this_month_last = month_range(today)
last_month_first, last_month_last = get_last_month_range(today)
logger.info(
"开始执行自动生成计划任务,current_month=%s, last_month=[%s, %s], this_month=[%s, %s], force=%s",
current_month,
last_month_first,
last_month_last,
this_month_first,
this_month_last,
force,
)
plans = (
db.query(DbPurchasePlan)
.filter(
and_(
DbPurchasePlan.del_flag == 0,
DbPurchasePlan.auto_generate_enabled == 1,
or_(
DbPurchasePlan.auto_generate_last_month.is_(None),
DbPurchasePlan.auto_generate_last_month != current_month,
),
or_(
DbPurchasePlan.auto_generate_end_month.is_(None),
DbPurchasePlan.auto_generate_end_month >= current_month,
),
DbPurchasePlan.start_date == last_month_first,
DbPurchasePlan.end_date == last_month_last,
)
)
.all()
)
if not plans:
logger.info("未找到需要自动生成下月计划的记录")
return {
"created_count": 0,
"skipped_reason": None,
"current_month": current_month,
}
logger.info("找到 %d 条可自动生成的上月计划", len(plans))
created_count = 0
for source in plans:
new_plan = DbPurchasePlan(
id=generate_uuid(),
tenant_no=source.tenant_no,
plan_no=generate_plan_no(),
plan_date=this_month_first,
start_date=this_month_first,
end_date=this_month_last,
business_type=source.business_type,
product_id=source.product_id,
product=source.product,
specification=source.specification,
planned_quantity=source.planned_quantity,
vehicle_no=source.vehicle_no or "",
customer_name=source.customer_name,
remark=source.remark,
execution_status=default_execution_status(source.business_type),
executed_at=None,
last_weighing_slip_id=None,
executed_quantity=0,
auto_generate_enabled=source.auto_generate_enabled,
auto_generate_end_month=source.auto_generate_end_month,
auto_generate_last_month=None,
create_by=None,
create_dept_id="",
)
db.add(new_plan)
source.auto_generate_last_month = current_month
created_count += 1
db.commit()
logger.info("本次自动生成完成,共生成 %d 条新计划", created_count)
return {
"created_count": created_count,
"skipped_reason": None,
"current_month": current_month,
}
+87
View File
@@ -0,0 +1,87 @@
"""出入库单 id 生成 — 租户内纯数字自增,并发安全。"""
from __future__ import annotations
from sqlalchemy import text
from sqlalchemy.exc import IntegrityError
from sqlalchemy.orm import Session
from app.core.utils import generate_uuid
from app.models.db_models import DbInboundOutbound, DbSequence
SEQ_NAME_INBOUND_OUTBOUND = "inbound_outbound"
_NUMERIC_ID_PATTERN = r"^[0-9]+$"
def max_numeric_inbound_outbound_id(db: Session, tenant_no: str) -> int:
"""当前租户下纯数字 id 的最大值(不含 UUID 等非数字主键)。"""
result = db.execute(
text(
"""
SELECT COALESCE(MAX(CAST(id AS UNSIGNED)), 0) AS max_id
FROM db_inbound_outbound
WHERE tenant_no = :tenant_no
AND del_flag = 0
AND id REGEXP :pattern
"""
),
{"tenant_no": tenant_no, "pattern": _NUMERIC_ID_PATTERN},
).scalar()
return int(result or 0)
def _ensure_sequence_row(db: Session, tenant_no: str) -> None:
exists = (
db.query(DbSequence.id)
.filter(
DbSequence.tenant_no == tenant_no,
DbSequence.seq_name == SEQ_NAME_INBOUND_OUTBOUND,
)
.first()
)
if exists:
return
initial_next = max_numeric_inbound_outbound_id(db, tenant_no) + 1
db.add(
DbSequence(
id=generate_uuid(),
tenant_no=tenant_no,
seq_name=SEQ_NAME_INBOUND_OUTBOUND,
next_val=initial_next,
)
)
db.flush()
def _allocate_inbound_outbound_id(db: Session, tenant_no: str) -> str:
_ensure_sequence_row(db, tenant_no)
row = (
db.query(DbSequence)
.filter(
DbSequence.tenant_no == tenant_no,
DbSequence.seq_name == SEQ_NAME_INBOUND_OUTBOUND,
)
.with_for_update()
.one()
)
assigned = int(row.next_val)
row.next_val = assigned + 1
db.flush()
return str(assigned)
def next_inbound_outbound_id(db: Session, tenant_no: str) -> str:
"""
分配下一条出入库单 id(纯数字字符串)。
使用 db_sequence 行锁 + next_val 递增,避免并发下重复 id。
"""
last_error: IntegrityError | None = None
for _ in range(3):
try:
return _allocate_inbound_outbound_id(db, tenant_no)
except IntegrityError as exc:
db.rollback()
last_error = exc
if last_error is not None:
raise last_error
return _allocate_inbound_outbound_id(db, tenant_no)
+196
View File
@@ -0,0 +1,196 @@
"""地磅 ORM → API Read 模型映射。"""
from __future__ import annotations
from datetime import date, datetime, time
from app.core.utils import format_datetime
# 三方预生成出入库单「日期未填」占位(原系统 date="",DDL 为 NOT NULL DATE)
EMPTY_INVENTORY_DATE = date(1970, 1, 1)
from app.models.db_models import DbInboundOutbound, DbPurchasePlan, DbVehicle, DbWeighingSlip
from app.schemas.db.inventory import InboundOutboundRead
from app.schemas.db.master_data import VehicleRead
from app.schemas.db.plans import PurchasePlanRead, PurchasePlanWithFillLink
from app.schemas.db.weighing import WeighingSlipRead
def fmt_date(value: date | datetime | str | None) -> str | None:
if value is None:
return None
if isinstance(value, datetime):
return value.strftime("%Y-%m-%d")
if isinstance(value, date):
return value.strftime("%Y-%m-%d")
return str(value)
def fmt_datetime(value: datetime | str | None) -> str | None:
if value is None:
return None
if isinstance(value, datetime):
return format_datetime(value)
return str(value)
def vehicle_to_read(row: DbVehicle) -> VehicleRead:
return VehicleRead(
id=row.id,
vehicleNo=row.vehicle_no,
remarks=row.remark,
)
def plan_to_read(row: DbPurchasePlan, *, executed_quantity: float | None = None) -> PurchasePlanRead:
return PurchasePlanRead(
id=row.id,
planNo=row.plan_no,
planDate=fmt_date(row.plan_date) or "",
startDate=fmt_date(row.start_date),
endDate=fmt_date(row.end_date),
businessType=row.business_type,
productId=row.product_id,
product=row.product,
specification=row.specification,
plannedQuantity=row.planned_quantity,
vehicleNo=row.vehicle_no or "",
customerName=row.customer_name,
remarks=row.remark,
executionStatus=row.execution_status,
executedAt=fmt_datetime(row.executed_at),
lastWeighingSlipId=row.last_weighing_slip_id,
executedQuantity=(
executed_quantity if executed_quantity is not None else (row.executed_quantity or 0)
),
autoGenerateEnabled=row.auto_generate_enabled or 0,
autoGenerateEndMonth=row.auto_generate_end_month,
autoGenerateLastMonth=row.auto_generate_last_month,
isDeleted=row.del_flag,
createdAt=format_datetime(row.create_time) or "",
)
def plan_to_read_with_fill_link(
row: DbPurchasePlan,
*,
executed_quantity: float | None = None,
fill_link_inventory_id: str | None = None,
) -> PurchasePlanWithFillLink:
base = plan_to_read(row, executed_quantity=executed_quantity)
return PurchasePlanWithFillLink(
**base.model_dump(by_alias=False),
fill_link_inventory_id=fill_link_inventory_id,
)
def is_empty_inventory_date(value: date | None) -> bool:
return value is None or value == EMPTY_INVENTORY_DATE
def inventory_date_to_api(value: date | None) -> str:
if is_empty_inventory_date(value):
return ""
return fmt_date(value) or ""
def inventory_to_read(
row: DbInboundOutbound,
*,
weighing: DbWeighingSlip | None = None,
) -> InboundOutboundRead:
gross_weight = None
tare_weight = None
deduction = None
net_weight = None
gross_weight_time = None
tare_weight_time = None
has_weighing_slip = False
if weighing:
gross_weight = weighing.gross_weight
tare_weight = weighing.tare_weight
deduction = weighing.deduction
net_weight = weighing.net_weight
gross_weight_time = fmt_datetime(weighing.gross_weight_time)
tare_time = fmt_datetime(weighing.tare_weight_time)
tare_weight_time = tare_time if tare_time and tare_time.strip() else None
has_weighing_slip = True
return InboundOutboundRead(
id=row.id,
date=inventory_date_to_api(row.date),
partnerCompany=row.partner_company,
businessType=row.business_type,
productId=row.product_id,
product=row.product,
specification=row.specification,
quantity=row.quantity,
planNo=row.plan_no,
batchNo=row.batch_no,
vehicleNo=row.vehicle_no,
status=row.status,
remarks=row.remark,
purchasePlanId=row.purchase_plan_id,
isDeleted=row.del_flag,
createdAt=format_datetime(row.create_time) or "",
grossWeight=gross_weight,
tareWeight=tare_weight,
deduction=deduction,
netWeight=net_weight,
grossWeightTime=gross_weight_time,
tareWeightTime=tare_weight_time,
hasWeighingSlip=has_weighing_slip,
)
def weighing_to_read(row: DbWeighingSlip, *, inventory_date: str | None = None) -> WeighingSlipRead:
return WeighingSlipRead(
id=row.id,
vehicleNo=row.vehicle_no,
planNo=row.plan_no,
productId=row.product_id,
cargoName=row.cargo_name,
specification=row.specification,
businessType=row.business_type,
batchNo=row.batch_no,
supplier=row.supplier,
consignee=row.consignee,
grossWeight=row.gross_weight,
grossWeightTime=fmt_datetime(row.gross_weight_time) or "",
tareWeight=row.tare_weight,
tareWeightTime=fmt_datetime(row.tare_weight_time) or "",
deduction=row.deduction,
netWeight=row.net_weight,
plannedQuantity=row.planned_quantity,
executedQuantity=row.executed_quantity,
purchasePlanId=row.purchase_plan_id,
inboundOutboundId=row.inbound_outbound_id,
weighingPoint=row.weighing_point,
remarks=row.remark,
currentQuantity=row.current_quantity,
isVoided=row.is_voided,
createdAt=format_datetime(row.create_time) or "",
inventoryDate=inventory_date,
)
def datetime_end_of_day(value: date) -> datetime:
return datetime.combine(value, time(23, 59, 59))
def parse_date_str(value: str | None) -> date | None:
if not value:
return None
try:
return datetime.strptime(value[:10], "%Y-%m-%d").date()
except ValueError:
return None
def parse_datetime_str(value: str | None) -> datetime | None:
if not value:
return None
for fmt in ("%Y-%m-%d %H:%M:%S", "%Y-%m-%dT%H:%M:%S", "%Y-%m-%d"):
try:
return datetime.strptime(value[:19] if fmt != "%Y-%m-%d" else value[:10], fmt)
except ValueError:
continue
return None
+14
View File
@@ -0,0 +1,14 @@
"""地磅计划辅助函数。"""
from __future__ import annotations
from datetime import datetime
def generate_plan_no() -> str:
"""生成计划号:SX-YYYYMMDDHHMMSS001"""
now = datetime.now()
return f"SX-{now.strftime('%Y%m%d%H%M%S')}001"
def default_execution_status(business_type: str) -> str:
return "待入库" if business_type == "入库" else "待出库"
@@ -0,0 +1,66 @@
"""地磅模块 — CRM 产品解析与快照写入。"""
from __future__ import annotations
from dataclasses import dataclass
from fastapi import HTTPException, status
from sqlalchemy.orm import Session
from app.crud.crm.product import get_product
@dataclass(frozen=True)
class ProductSnapshot:
product_id: str
product_name: str
specification: str | None
def resolve_crm_product(db: Session, tenant_no: str, product_id: str) -> ProductSnapshot:
"""校验 CRM 产品并返回名称/规格快照。新建单据 product_id 必填。"""
pid = (product_id or "").strip()
if not pid:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="请选择 CRM 产品",
)
row = get_product(db, pid)
if row is None or row.tenant_no != tenant_no:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="产品不存在或不可用",
)
if row.status != "on":
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="产品已下架,请重新选择",
)
name = (row.product_name or "").strip()
if not name:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail="产品名称无效",
)
model = (row.model or "").strip() or None
return ProductSnapshot(product_id=row.id, product_name=name, specification=model)
def apply_product_snapshot_to_plan(plan, snapshot: ProductSnapshot) -> None:
plan.product_id = snapshot.product_id
plan.product = snapshot.product_name
plan.specification = snapshot.specification
def apply_product_snapshot_to_inventory(row, snapshot: ProductSnapshot) -> None:
row.product_id = snapshot.product_id
row.product = snapshot.product_name
row.specification = snapshot.specification
def apply_product_snapshot_to_weighing(row, snapshot: ProductSnapshot) -> None:
row.product_id = snapshot.product_id
row.cargo_name = snapshot.product_name
row.specification = snapshot.specification
+124
View File
@@ -0,0 +1,124 @@
"""地磅单联动业务逻辑 — 迁移自 simple-dibang-xiaoshou weighing._process_weighing_business_logic。"""
from __future__ import annotations
from datetime import datetime
from sqlalchemy import or_
from sqlalchemy.orm import Session
from app.models.db_models import DbInboundOutbound, DbPurchasePlan, DbWeighingSlip
def _has_weight_time(value: datetime | str | None) -> bool:
if value is None:
return False
if isinstance(value, datetime):
return True
return bool(str(value).strip())
def process_weighing_business_logic(db: Session, weighing: DbWeighingSlip) -> None:
"""
处理地磅单的业务逻辑:
1. 更新计划单的已执行量(单位:kg)
2. 更新出入库单的状态
3. 重新计算地磅单的 executed_quantity(按创建时间顺序累计)
"""
plan_ids_to_process: set[str] = set()
inventory_ids_to_process: set[str] = set()
if weighing.purchase_plan_id:
plan_ids_to_process.add(weighing.purchase_plan_id)
if weighing.inbound_outbound_id:
inventory_ids_to_process.add(weighing.inbound_outbound_id)
if weighing.plan_no:
plans = (
db.query(DbPurchasePlan)
.filter(
DbPurchasePlan.plan_no == weighing.plan_no,
DbPurchasePlan.del_flag == 0,
DbPurchasePlan.tenant_no == weighing.tenant_no,
)
.all()
)
for plan in plans:
plan_ids_to_process.add(plan.id)
for plan_id in plan_ids_to_process:
plan = db.query(DbPurchasePlan).filter(DbPurchasePlan.id == plan_id).one_or_none()
if not plan:
continue
plan_weighings = (
db.query(DbWeighingSlip)
.filter(
DbWeighingSlip.is_voided == 0,
DbWeighingSlip.del_flag == 0,
DbWeighingSlip.tenant_no == plan.tenant_no,
or_(
DbWeighingSlip.plan_no == plan.plan_no,
DbWeighingSlip.purchase_plan_id == plan.id,
),
)
.order_by(DbWeighingSlip.create_time.asc())
.all()
)
total_executed = sum(w.net_weight for w in plan_weighings if w.net_weight)
plan.executed_quantity = total_executed
planned_quantity_kg = plan.planned_quantity * 1000
if total_executed >= planned_quantity_kg:
plan.execution_status = "已入库" if plan.business_type == "入库" else "已出库"
elif total_executed > 0:
plan.execution_status = "入库中" if plan.business_type == "入库" else "出库中"
else:
plan.execution_status = "待入库" if plan.business_type == "入库" else "待出库"
db.commit()
db.refresh(plan)
cumulative_executed = 0.0
for slip in plan_weighings:
cumulative_executed += slip.net_weight if slip.net_weight else 0.0
slip.executed_quantity = cumulative_executed
db.commit()
for inventory_id in inventory_ids_to_process:
inventory = (
db.query(DbInboundOutbound)
.filter(DbInboundOutbound.id == inventory_id)
.one_or_none()
)
if not inventory:
continue
related_weighings = (
db.query(DbWeighingSlip)
.filter(
DbWeighingSlip.inbound_outbound_id == inventory_id,
DbWeighingSlip.is_voided == 0,
DbWeighingSlip.del_flag == 0,
)
.all()
)
all_complete = (
len(related_weighings) > 0
and all(
_has_weight_time(w.gross_weight_time) and _has_weight_time(w.tare_weight_time)
for w in related_weighings
)
)
if all_complete:
inventory.status = "已完成"
else:
inventory.status = (
"待入库" if inventory.business_type == "入库" else "待出库"
)
db.commit()
db.refresh(inventory)
+8
View File
@@ -20,6 +20,7 @@ def init_scheduled_tasks(get_db_session):
remind_customer_recycle,
warn_customer_recycle,
)
from app.tasks.db_auto_plan import auto_generate_monthly_plans_job
scheduler.add_job(
check_customer_protect_time,
@@ -27,6 +28,12 @@ def init_scheduled_tasks(get_db_session):
id="check_customer_protect_time",
replace_existing=True,
)
scheduler.add_job(
auto_generate_monthly_plans_job,
"cron", day=1, hour=1, minute=30,
id="db_auto_generate_monthly_plans",
replace_existing=True,
)
scheduler.add_job(
remind_customer_recycle,
"cron", hour=9, minute=0,
@@ -47,6 +54,7 @@ def init_scheduled_tasks(get_db_session):
)
logger.info(
"已注册定时任务: check_customer_protect_time(01:00), "
"db_auto_generate_monthly_plans(每月1日01:30), "
"pool_recovery_job(02:00), remind_customer_recycle(09:00), "
"warn_customer_recycle(10:00)"
)
+26
View File
@@ -0,0 +1,26 @@
"""地磅计划按月自动生成定时任务"""
import logging
from app.core.database import SessionLocal
from app.services.db.auto_generate_plans import run_auto_generate_monthly_plans
logger = logging.getLogger(__name__)
def auto_generate_monthly_plans_job():
"""每月 1 日凌晨执行:按上月计划模板生成本月计划。"""
db = SessionLocal()
try:
logger.info("======== 开始执行地磅计划按月自动生成任务 ========")
result = run_auto_generate_monthly_plans(db, force=False)
logger.info(
"======== 地磅计划按月自动生成任务完成:created=%s, month=%s, skipped=%s ========",
result.get("created_count"),
result.get("current_month"),
result.get("skipped_reason"),
)
except Exception:
db.rollback()
logger.exception("地磅计划按月自动生成任务异常")
finally:
db.close()
+5 -1
View File
@@ -128,5 +128,9 @@
"126": "Community 126",
"127": "Community 127",
"128": "Community 128",
"129": "Community 129"
"129": "Community 129",
"130": "Community 130",
"131": "Community 131",
"132": "Community 132",
"133": "Community 133"
}
+210 -195
View File
@@ -1,16 +1,16 @@
# Graph Report - backend (2026-06-06)
# Graph Report - backend (2026-06-09)
## Corpus Check
- 149 files · ~105,173 words
- 174 files · ~114,294 words
- Verdict: corpus is large enough that graph structure adds value.
## Summary
- 3047 nodes · 20600 edges · 130 communities (125 shown, 5 thin omitted)
- Extraction: 47% EXTRACTED · 53% INFERRED · 0% AMBIGUOUS · INFERRED: 10854 edges (avg confidence: 0.51)
- 3328 nodes · 21999 edges · 134 communities (129 shown, 5 thin omitted)
- Extraction: 48% EXTRACTED · 52% INFERRED · 0% AMBIGUOUS · INFERRED: 11419 edges (avg confidence: 0.51)
- Token cost: 0 input · 0 output
## Graph Freshness
- Built from commit: `f9676f87`
- Built from commit: `725774ef`
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
- Run `graphify update .` after code changes (no API cost).
@@ -129,7 +129,6 @@
- [[_COMMUNITY_Community 119|Community 119]]
- [[_COMMUNITY_Community 120|Community 120]]
- [[_COMMUNITY_Community 121|Community 121]]
- [[_COMMUNITY_Community 122|Community 122]]
- [[_COMMUNITY_Community 123|Community 123]]
- [[_COMMUNITY_Community 124|Community 124]]
- [[_COMMUNITY_Community 125|Community 125]]
@@ -137,16 +136,20 @@
- [[_COMMUNITY_Community 127|Community 127]]
- [[_COMMUNITY_Community 128|Community 128]]
- [[_COMMUNITY_Community 129|Community 129]]
- [[_COMMUNITY_Community 130|Community 130]]
- [[_COMMUNITY_Community 131|Community 131]]
- [[_COMMUNITY_Community 132|Community 132]]
- [[_COMMUNITY_Community 133|Community 133]]
## God Nodes (most connected - your core abstractions)
1. `BaseModel` - 281 edges
1. `BaseModel` - 301 edges
2. `Session` - 256 edges
3. `success_response()` - 246 edges
4. `Session` - 243 edges
5. `error_response()` - 234 edges
6. `SysUser` - 180 edges
7. `get_tenant_no()` - 170 edges
8. `generate_uuid()` - 114 edges
6. `get_tenant_no()` - 201 edges
7. `SysUser` - 180 edges
8. `generate_uuid()` - 128 edges
9. `int` - 111 edges
10. `CustomerListBody` - 108 edges
@@ -162,67 +165,67 @@
- `int` --uses--> `BxUserContext` [INFERRED]
app/api/bx/workflow.py → app/core/bx_auth.py
## Communities (130 total, 5 thin omitted)
## Communities (134 total, 5 thin omitted)
### Community 0 - "Community 0"
Cohesion: 0.25
Nodes (27): Any, bool, CRM 公海池规则 CRUD + 规则执行逻辑, int, Session, str, generate_uuid(), create_pool_rule() (+19 more)
### Community 1 - "Community 1"
Cohesion: 0.14
Nodes (28): Any, Any, bool, str, WfProcessInstance, Any, bool, Session (+20 more)
Cohesion: 0.08
Nodes (100): register_contract_routes(), register_contract_sub_routes(), Any, bool, CRM 合同 CRUD — 对照 CrmContractServiceImpl.java(列表/详情 P1), Decimal, int, Session (+92 more)
### Community 2 - "Community 2"
Cohesion: 0.23
Nodes (10): Any, bool, int, Session, str, camel_to_snake(), CRUDBase, get_model_attr() (+2 more)
Cohesion: 0.22
Nodes (18): bytes, int, str, download_file_bytes(), file_stream(), get_access_url(), get_download_url(), get_preview_url() (+10 more)
### Community 3 - "Community 3"
Cohesion: 0.13
Nodes (15): Any, bool, int, str, get_wechat_pay_client(), get_wechat_pay_v2(), 微信支付工具模块 支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.html, 统一下单接口 (V3) Args: out_trade_no: 商户订单号 total_amo (+7 more)
### Community 4 - "Community 4"
Cohesion: 0.14
Nodes (41): Any, bool, CRM 产品模块 CRUD(产品分类 + 产品 + 附件), int, Session, str, barcode_exists(), _build_category_tree() (+33 more)
Cohesion: 0.20
Nodes (29): bool, CRM 产品模块 CRUD(产品分类 + 产品 + 附件), Session, str, barcode_exists(), category_code_exists(), _category_row_to_dict(), create_category() (+21 more)
### Community 5 - "Community 5"
Cohesion: 0.14
Nodes (5): bool, BaseStorage, OSSStorage, QiniuStorage, 文件存储工具模块 支持多种存储方式: 1. 本地存储 (local) - 默认 2. 七牛云存储 (qiniu) - 推荐生产环境使用 3. 阿里云OSS (
Cohesion: 0.10
Nodes (33): BxUserContext, Session, str, Any, str, bool, BxUserContext, int (+25 more)
### Community 6 - "Community 6"
Cohesion: 0.11
Nodes (72): attachment_download_url(), create_dept(), create_dict_data(), create_dict_type(), create_menu(), create_post(), create_role_management(), create_site() (+64 more)
Cohesion: 0.09
Nodes (96): attachment_download_url(), AttachmentDownloadUrlBody, create_dept(), create_dict_data(), create_dict_type(), create_menu(), create_post(), create_role_management() (+88 more)
### Community 7 - "Community 7"
Cohesion: 0.22
Nodes (9): create_new_version(), Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id (+1 more)
Cohesion: 0.23
Nodes (15): Any, bool, bytes, int, Request, str, _claims_from_auth(), _format_body_bytes() (+7 more)
### Community 8 - "Community 8"
Cohesion: 0.11
Nodes (50): Session, str, Any, bool, int, Session, str, Any (+42 more)
Cohesion: 0.15
Nodes (34): Session, str, Any, bool, int, Session, str, apply_data_scope() (+26 more)
### Community 9 - "Community 9"
Cohesion: 0.33
Nodes (15): Any, int, Session, str, BizLeaveRequest, create_leave(), get_leave(), list_leaves() (+7 more)
Cohesion: 0.22
Nodes (11): Any, bool, int, Session, str, bool, camel_to_snake(), CRUDBase (+3 more)
### Community 10 - "Community 10"
Cohesion: 0.08
Nodes (68): Any, bool, CrmContract, datetime, int, Query, Session, str (+60 more)
Cohesion: 0.09
Nodes (55): Any, bool, datetime, int, Session, str, _advance_contract_after_approval(), approve_contract() (+47 more)
### Community 11 - "Community 11"
Cohesion: 0.05
Nodes (167): _apply_default_invoice_info_to_customers(), category_add(), category_delete(), category_tree(), category_update(), clue_assign(), clue_check_convert(), clue_check_duplicate() (+159 more)
### Community 12 - "Community 12"
Cohesion: 0.15
Nodes (52): ProcessDefCreateBody, ProcessDefUpdateBody, PublishVersionBody, 审批意见:前端传 commentText,兼容 comment。, StartInstanceBody, TaskActionBody, Any, int (+44 more)
Cohesion: 0.11
Nodes (73): Any, ProcessDefCreateBody, ProcessDefUpdateBody, PublishVersionBody, 审批意见:前端传 commentText,兼容 comment。, StartInstanceBody, TaskActionBody, Any (+65 more)
### Community 13 - "Community 13"
Cohesion: 0.36
Nodes (213): Any, bool, str, UploadFile, CRM 线索管理 Pydantic Schemas, CRM 商机管理 Pydantic Schemas, CRM 客户公海池规则 Pydantic Schemas, CRM 产品模块 Pydantic Schemas (+205 more)
### Community 14 - "Community 14"
Cohesion: 0.17
Nodes (45): Any, bool, CRM 客户 CRUD(客户主表 + 转移/成交/公海池操作), CrmCustomer, date, datetime, float, int (+37 more)
Cohesion: 0.20
Nodes (36): Any, CRM 客户 CRUD(客户主表 + 转移/成交/公海池操作), CrmCustomer, datetime, int, Session, str, assign_customer() (+28 more)
### Community 15 - "Community 15"
Cohesion: 0.08
@@ -233,12 +236,12 @@ Cohesion: 0.12
Nodes (31): CRM 报价单 API 路由 — 挂接到 crm.router, CRM 报价单 Pydantic Schemas, QuoteAcceptBody, QuoteApprovalApproveBody, QuoteApprovalListBody, QuoteApprovalRefreshNamesBody, QuoteApprovalWithdrawBody, QuoteCreateBody (+23 more)
### Community 17 - "Community 17"
Cohesion: 0.11
Nodes (59): BxUserContext, int, Session, str, BxUserContext, int, Session, str (+51 more)
Cohesion: 0.21
Nodes (40): BxUserContext, int, Session, str, int, Session, str, ApiResponse (+32 more)
### Community 18 - "Community 18"
Cohesion: 0.17
Nodes (34): Any, bool, int, Session, str, SysUser, create_user(), get_user() (+26 more)
Cohesion: 0.18
Nodes (32): Any, bool, int, Session, str, SysUser, create_user(), get_user() (+24 more)
### Community 19 - "Community 19"
Cohesion: 0.23
@@ -249,16 +252,16 @@ Cohesion: 0.37
Nodes (17): check_env(), check_python(), create_venv(), init_env(), install_dependencies(), log_error(), log_info(), log_success() (+9 more)
### Community 21 - "Community 21"
Cohesion: 0.34
Nodes (16): Any, int, Session, str, _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept() (+8 more)
Cohesion: 0.20
Nodes (20): API 路由包 — 山峡化工生产一体化门户, create_leave(), delete_leave(), get_leave(), _leave_local_callback(), leave_workflow_callback(), list_leaves(), submit_leave() (+12 more)
### Community 22 - "Community 22"
Cohesion: 0.18
Nodes (19): str, Any, bool, Session, str, StreamingResponse, CRM 模块 Excel 导出列定义(字段与字典类型对齐 Java *Vo @ExcelDictFormat)。, _yes_no() (+11 more)
Cohesion: 0.09
Nodes (32): clue_import_template(), customer_import_template(), product_import_template(), 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export (+24 more)
### Community 23 - "Community 23"
Cohesion: 0.13
Nodes (17): CrmContract, contract_row_to_dict(), _parse_letter_oss_ids_from_tier(), Java: validateFrameworkContractForSubmitApproval, Java: validateFrameworkContractForSubmitApproval, Java: validateFrameworkContractForSubmitApproval, Java: validateFrameworkContractForSubmitApproval, ORM → camelCase(单点真相) (+9 more)
Cohesion: 0.24
Nodes (50): InboundOutboundRead, bool, DbPurchasePlan, DbUserContext, PurchasePlanRead, PurchasePlanWithFillLink, Session, str (+42 more)
### Community 24 - "Community 24"
Cohesion: 0.29
@@ -273,8 +276,8 @@ Cohesion: 0.27
Nodes (11): Any, bool, str, decrypt_login_payload(), ensure_initialized(), extract_login_credentials(), get_public_pem(), 登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。 (+3 more)
### Community 27 - "Community 27"
Cohesion: 0.16
Nodes (31): Any, bool, int, Session, str, Any, Session, str (+23 more)
Cohesion: 0.26
Nodes (20): Any, bool, int, Session, str, create_follow(), _enrich_follow_dict(), _follow_row_to_dict() (+12 more)
### Community 28 - "Community 28"
Cohesion: 0.23
@@ -289,16 +292,16 @@ Cohesion: 0.40
Nodes (3): BaseSettings, Config, Settings
### Community 36 - "Community 36"
Cohesion: 0.27
Nodes (14): Any, bool, bytes, int, str, ApiCryptoError, _b64url_decode(), _b64url_encode() (+6 more)
Cohesion: 0.23
Nodes (16): bool, int, Redis, Request, str, _claims_from_auth(), _coerce_post_method_override_to_get(), _get_redis_client() (+8 more)
### Community 37 - "Community 37"
Cohesion: 0.08
Nodes (46): str, ContractApprovalPageListBody, 全局审批记录分页(approval/index.vue), CustomerFollowByCustomerBody, CustomerFollowDetailBody, BaseModel, AttachmentUploadResponse, ChangePasswordRequest (+38 more)
Cohesion: 0.22
Nodes (16): Any, bool, bytes, int, str, ApiCryptoError, _b64url_decode(), _b64url_encode() (+8 more)
### Community 38 - "Community 38"
Cohesion: 0.26
Nodes (21): approve_task(), _business_type_label(), create_process_def(), delete_process_def(), _enrich_task_list(), get_business_all_tasks(), _get_business_form_fields(), get_designer_data() (+13 more)
Cohesion: 0.19
Nodes (34): DbInboundOutbound, DbUserContext, Session, str, CreateLinkForPlanPayload, _apply_inventory_product_update(), _apply_inventory_update(), _base_query() (+26 more)
### Community 39 - "Community 39"
Cohesion: 0.20
@@ -317,48 +320,48 @@ Cohesion: 0.34
Nodes (16): Any, bool, int, Session, str, create_dict_type(), dict_type_code_exists(), get_dict_type() (+8 more)
### Community 43 - "Community 43"
Cohesion: 0.30
Nodes (11): bool, BxUserContext, BxWorkflowNode, int, Session, str, 按业务类型获取工作流;已知类型不存在时自动创建空定义(无节点)。, WorkflowService (+3 more)
Cohesion: 0.35
Nodes (17): Any, bool, int, Session, str, _build_tree(), _cascade_soft_delete(), create_menu() (+9 more)
### Community 44 - "Community 44"
Cohesion: 0.22
Nodes (16): Any, bool, bytes, int, Request, str, _claims_from_auth(), _format_body_bytes() (+8 more)
Cohesion: 0.33
Nodes (14): BxUserContext, Session, str, UploadFile, AttachmentOut, bind_biz(), delete_attachment(), download_file() (+6 more)
### Community 45 - "Community 45"
Cohesion: 0.29
Nodes (34): AdvanceIssueRequest, BxUserContext, int, ReimburseApplyOut, Session, str, str, BatchOffsetRequest (+26 more)
Cohesion: 0.18
Nodes (40): AdvanceIssueRequest, BxUserContext, int, ReimburseApplyOut, Session, str, str, BatchOffsetRequest (+32 more)
### Community 46 - "Community 46"
Cohesion: 0.05
Nodes (83): _avatar_url_field(), _build_user_info_payload(), get_current_user_profile(), get_web_auth_menu_codes(), _jwt_user_payload(), logout(), public_quote_share(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/shanxia2.0.sql 基线) (+75 more)
Cohesion: 0.12
Nodes (32): date, str, Session, str, format_datetime(), fmt_date(), fmt_datetime(), inventory_date_to_api() (+24 more)
### Community 47 - "Community 47"
Cohesion: 0.20
Nodes (25): Any, bool, BxUserContext, BxWorkflowNode, float, int, ReimburseApplyOut, Session (+17 more)
Cohesion: 0.21
Nodes (23): Any, bool, BxUserContext, BxWorkflowNode, float, int, ReimburseApplyOut, Session (+15 more)
### Community 48 - "Community 48"
Cohesion: 0.07
Nodes (52): CRM 合同 API 路由 — GET/PUT/DELETE/POST 对齐原 Java CRM, CRM 合同子模块路由 — 变更/模板/审批独立页, register_contract_sub_routes(), CRM 合同 Pydantic Schemas — 对照 CrmContractBo / CrmContractVo, ContractApprovalActionBody, ContractApprovalApproveBody, ContractApprovalByContractBody, ContractApprovalExportBody (+44 more)
Cohesion: 0.03
Nodes (114): CRM 合同 API 路由 — GET/PUT/DELETE/POST 对齐原 Java CRM, CRM 合同子模块路由 — 变更/模板/审批独立页, str, CRM 合同 Pydantic Schemas — 对照 CrmContractBo / CrmContractVo, CRM 客户管理 Pydantic Schemas, ContactByCustomerBody, ContactDetailBody, ContactSetPrimaryBody (+106 more)
### Community 49 - "Community 49"
Cohesion: 0.29
Nodes (29): AttachmentDownloadUrlBody, DeptCreateBody, DeptUpdateBody, DictDataCreateBody, DictDataUpdateBody, DictTypeCreateBody, DictTypeUpdateBody, MenuCreateBody (+21 more)
Cohesion: 0.12
Nodes (9): bool, int, str, BaseStorage, MinIOStorage, OSSStorage, QiniuStorage, MinIO 预签名下载 URL,携带原始文件名。 (+1 more)
### Community 50 - "Community 50"
Cohesion: 0.14
Nodes (22): _error_json(), lifespan(), _mask_secret(), Exception, int, Request, str, 未捕获异常:统一 JSON 500,确保跨域场景下仍有 Access-Control-Allow-Origin (+14 more)
Cohesion: 0.11
Nodes (27): 地磅 API 路由聚合 — REST 风格,协议对齐原 simple-dibang-xiaoshou。, _error_json(), lifespan(), _mask_secret(), Exception, int, Request, str (+19 more)
### Community 51 - "Community 51"
Cohesion: 0.16
Nodes (13): float, int, str, 微信消息通知服务 支持微信小程序模板消息推送 使用方式: from app.core.wechat_message import WechatMes, 发送订单状态通知 Args: openid: 用户openid order_n, 发送支付成功通知 Args: openid: 用户openid order_n, 发送配送通知 Args: openid: 配送员openid task_no:, 发送配送时效预警 Args: openid: 配送员openid task_n (+5 more)
### Community 52 - "Community 52"
Cohesion: 0.33
Nodes (6): int, Config, LeaveCreate, LeaveResponse, LeaveUpdate, Pydantic schemas - 请假申请
Cohesion: 0.06
Nodes (76): _avatar_url_field(), _build_user_info_payload(), get_current_user_profile(), get_web_auth_menu_codes(), _jwt_user_payload(), logout(), public_quote_share(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/shanxia2.0.sql 基线) (+68 more)
### Community 53 - "Community 53"
Cohesion: 0.28
Nodes (20): Any, bool, date, int, Session, str, _contact_row_to_dict(), create_contact() (+12 more)
Cohesion: 0.25
Nodes (8): create_from_quote(), _quote_products_to_contract_products(), Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id
### Community 54 - "Community 54"
Cohesion: 0.34
@@ -369,8 +372,8 @@ Cohesion: 0.34
Nodes (16): Any, bool, int, Session, str, create_tenant(), get_tenant(), list_tenants() (+8 more)
### Community 56 - "Community 56"
Cohesion: 0.18
Nodes (10): Any, Request, str, str, parse_admin_request_json(), 运营 Web(/web/admin)JSON 请求体解析。 与 ApiCryptoMiddleware 配合:中间件未改写 body 时,在路由内解密 `{, 读取 JSON body;dict 时走 resolve_request_payload(明文 / 密文 / data 包装)。 Returns:, 统一解析接口请求载荷(明文 / 密文信封)。 (+2 more)
Cohesion: 0.13
Nodes (31): CrmContract, Query, CrmContract, CrmContractProductPriceTier, date, datetime, Query, contract_row_to_dict() (+23 more)
### Community 57 - "Community 57"
Cohesion: 0.11
@@ -385,48 +388,48 @@ Cohesion: 0.19
Nodes (32): Any, bool, CrmContractProductPriceTier, date, Decimal, int, Session, str (+24 more)
### Community 61 - "Community 61"
Cohesion: 0.11
Nodes (27): API 路由包 — 山峡化工生产一体化门户, create_leave(), delete_leave(), get_leave(), _leave_local_callback(), leave_workflow_callback(), list_leaves(), submit_leave() (+19 more)
Cohesion: 0.18
Nodes (10): Any, Request, str, str, parse_admin_request_json(), 运营 Web(/web/admin)JSON 请求体解析。 与 ApiCryptoMiddleware 配合:中间件未改写 body 时,在路由内解密 `{, 读取 JSON body;dict 时走 resolve_request_payload(明文 / 密文 / data 包装)。 Returns:, 统一解析接口请求载荷(明文 / 密文信封)。 (+2 more)
### Community 62 - "Community 62"
Cohesion: 0.35
Nodes (17): Any, bool, int, Session, str, _build_tree(), _cascade_soft_delete(), create_menu() (+9 more)
Cohesion: 0.23
Nodes (26): approve_task(), _business_type_label(), delete_process_def(), _enrich_task_list(), get_business_all_tasks(), _get_business_form_fields(), get_designer_data(), get_instance_detail() (+18 more)
### Community 63 - "Community 63"
Cohesion: 0.17
Nodes (30): Any, bool, int, Session, str, date, Query, approve_quote() (+22 more)
Cohesion: 0.18
Nodes (26): Any, bool, int, Session, str, approve_quote(), can_user_approve(), create_approval_records() (+18 more)
### Community 65 - "Community 65"
Cohesion: 0.12
Nodes (16): invoice_info_list(), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价), 按客户ID查询开票信息(与 by-customer 等价) (+8 more)
### Community 68 - "Community 68"
Cohesion: 0.33
Nodes (14): BxUserContext, Session, str, UploadFile, AttachmentOut, bind_biz(), delete_attachment(), download_file() (+6 more)
Cohesion: 0.29
Nodes (7): Java: renewContract — 基础续签, Java: renewContract — 基础续签, Java: renewContract — 基础续签, Java: renewContract — 基础续签, Java: renewContract — 基础续签, Java: renewContract — 基础续签, renew_contract()
### Community 69 - "Community 69"
Cohesion: 0.19
Nodes (45): Any, CRM 商机 CRUD(主表 + 阶段/赢输单/统计/看板/漏斗), date, datetime, Decimal, int, Session, str (+37 more)
### Community 70 - "Community 70"
Cohesion: 0.33
Nodes (14): Any, int, Session, str, create_dict_data(), get_dict_data(), list_dict_data(), list_dict_data_options() (+6 more)
Cohesion: 0.34
Nodes (16): Any, int, Session, str, _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept() (+8 more)
### Community 71 - "Community 71"
Cohesion: 0.40
Nodes (5): _product_row_to_dict(), 产品 ORM 对象转 dict(camelCase 键名), 产品 ORM 对象转 dict(camelCase 键名), 产品 ORM 对象转 dict(camelCase 键名), 产品 ORM 对象转 dict(camelCase 键名)
Cohesion: 0.14
Nodes (17): Any, int, _build_category_tree(), _collect_category_with_ancestors(), list_category_tree(), list_products(), _product_row_to_dict(), 获取产品分类树(嵌套 children,供树形表格/树选择器使用) (+9 more)
### Community 72 - "Community 72"
Cohesion: 0.38
Nodes (15): Any, bool, int, Session, str, create_site(), get_site(), list_sites() (+7 more)
### Community 73 - "Community 73"
Cohesion: 0.33
Nodes (6): bx_health(), P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。
Cohesion: 0.24
Nodes (27): Engine, build_id_maps(), clip_text(), count_rows(), export_mapping(), fetch_rows(), legacy_id_to_str(), main() (+19 more)
### Community 74 - "Community 74"
Cohesion: 0.08
Nodes (99): register_contract_routes(), Any, bool, CRM 合同 CRUD — 对照 CrmContractServiceImpl.java(列表/详情 P1), Decimal, int, Session, str (+91 more)
Cohesion: 0.30
Nodes (9): Any, bool, int, M, Session, str, BxCrudService, 报销模块 Service 基类 — 租户隔离 + UUID + 软删除。 (+1 more)
### Community 75 - "Community 75"
Cohesion: 0.16
@@ -437,28 +440,28 @@ Cohesion: 0.35
Nodes (19): Any, bool, datetime, int, Session, str, create_opportunity_follow(), get_opportunity_follow() (+11 more)
### Community 78 - "Community 78"
Cohesion: 0.42
Nodes (13): Any, bool, Session, str, _clear_default_for_customer(), create_invoice_info(), get_invoice_info(), list_invoice_info_by_customer() (+5 more)
Cohesion: 0.22
Nodes (9): Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus (+1 more)
### Community 79 - "Community 79"
Cohesion: 0.22
Nodes (9): generate_contract_name(), Java: generateContractName, Java: generateContractName, Java: generateContractName, Java: generateContractName, Java: generateContractName, Java: generateContractName, Java: generateContractName (+1 more)
### Community 80 - "Community 80"
Cohesion: 0.22
Nodes (9): generate_contract_no(), Java: generateContractNo — {供方编码}/X-JT + yyyyMMdd + 3位流水, Java: generateContractNo — {供方编码}/X-JT + yyyyMMdd + 3位流水, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号}, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号}, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号}, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号}, Java: generateContractNo — {供方编码}/X-JT{yyyyMMdd}{3位序号} (+1 more)
### Community 80 - "Community 80"
Cohesion: 0.33
Nodes (15): Any, int, Session, str, BizLeaveRequest, create_leave(), get_leave(), list_leaves() (+7 more)
### Community 81 - "Community 81"
Cohesion: 0.22
Nodes (18): bytes, int, str, download_file_bytes(), file_stream(), get_access_url(), get_download_url(), get_preview_url() (+10 more)
Cohesion: 0.23
Nodes (26): DbUserContext, DbWeighingSlip, Session, str, datetime_end_of_day(), parse_datetime_str(), weighing_to_read(), apply_product_snapshot_to_weighing() (+18 more)
### Community 82 - "Community 82"
Cohesion: 0.33
Nodes (11): SysOss, int, Session, str, SysOss, create_oss(), _oss_row_to_dict(), create_oss() (+3 more)
### Community 83 - "Community 83"
Cohesion: 0.14
Nodes (14): _build_contract_filters(), export_contracts(), Java: queryList for export, Java: queryList for export, Java: queryList for export, Java: queryList for export, Java: buildQueryWrapper, Java: queryList for export (+6 more)
Cohesion: 0.21
Nodes (16): Any, int, str, BusinessException, InvalidStatusTransitionException, log_api_request(), log_delivery_operation(), log_operation() (+8 more)
### Community 84 - "Community 84"
Cohesion: 0.33
@@ -469,183 +472,195 @@ Cohesion: 0.11
Nodes (19): 分页查询供方列表 — Java: CrmSupplierInfoController.list, 分页查询供方列表 — Java: CrmSupplierInfoController.list, 分页查询供方列表 — Java: CrmSupplierInfoController.list, 分页查询供方列表 — Java: CrmSupplierInfoController.list, 分页查询供方列表 — Java: CrmSupplierInfoController.list, 分页查询供方列表 — Java: CrmSupplierInfoController.list, 分页查询供方列表 — Java: CrmSupplierInfoController.list, 分页查询供方列表 — Java: CrmSupplierInfoController.list (+11 more)
### Community 86 - "Community 86"
Cohesion: 0.30
Nodes (8): Any, bool, int, Session, str, BxCrudService, 报销模块 Service 基类 — 租户隔离 + UUID + 软删除。, M
Cohesion: 0.13
Nodes (14): Java: deleteWithValidByIds — 软删除, Java: deleteWithValidByIds — 软删除, Java: deleteWithValidByIds — 软删除, Java: deleteWithValidByIds — 软删除, Java Controller TODO — 保持 pending,记录备注, Java Controller TODO — 保持 pending,记录备注, Java Controller TODO — 保持 pending,记录备注, Java Controller TODO — 保持 pending,记录备注 (+6 more)
### Community 87 - "Community 87"
Cohesion: 0.20
Nodes (10): 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove (+2 more)
Cohesion: 0.44
Nodes (8): bool, int, Session, str, ApiRequestLogCRUD, SysApiRequestLog, SysApiRequestLogHis, SysApiRequestLog
### Community 88 - "Community 88"
Cohesion: 0.21
Nodes (16): Any, int, str, BusinessException, InvalidStatusTransitionException, log_api_request(), log_delivery_operation(), log_operation() (+8 more)
Cohesion: 0.15
Nodes (29): DbUserContext, Session, str, Any, Session, str, _auto_fill_create_dept_id(), get_db() (+21 more)
### Community 89 - "Community 89"
Cohesion: 0.25
Nodes (8): generate_product_no(), 生成产品编号(格式:CP + yyyyMMdd + 3位序号,如 CP20260530001), 生成产品编号(格式:CP + yyyyMMdd + 3位序号,如 CP20260530001), 生成产品编号(格式:CP + yyyyMMdd + 3位序号,如 CP20260530001), 生成产品编号(格式:CP + yyyyMMdd + 3位序号,如 CP20260530001), 生成产品编号(格式:CP + yyyyMMdd + 3位序号,如 CP20260530001), 生成产品编号(格式:CP + yyyyMMdd + 3位序号,如 CP20260530001), 生成产品编号(格式:CP + yyyyMMdd + 3位序号,如 CP20260530001)
### Community 90 - "Community 90"
Cohesion: 0.22
Nodes (9): Java: CrmQuoteServiceImpl.withdrawApproval(校验创建人), Java: CrmQuoteServiceImpl.withdrawApproval(校验创建人), Java: CrmQuoteServiceImpl.withdrawApproval(校验创建人), Java: CrmQuoteServiceImpl.withdrawApproval(校验创建人), Java: CrmQuoteServiceImpl.withdrawApproval(校验创建人), Java: CrmQuoteServiceImpl.withdrawApproval(校验创建人), Java: CrmQuoteServiceImpl.withdrawApproval(校验创建人), Java: CrmQuoteServiceImpl.withdrawApproval(校验创建人) (+1 more)
Cohesion: 0.09
Nodes (44): Any, CRM 报价单 CRUD — 对照 CrmQuoteServiceImpl.java(P2 全量), date, datetime, Decimal, Query, _build_quote_filters(), calculate_quote_amount() (+36 more)
### Community 91 - "Community 91"
Cohesion: 0.40
Nodes (5): generate_barcode(), 生成唯一条码(纯数字:yyyyMMdd + 6位序号,如 20260606000001), 生成唯一条码(纯数字:yyyyMMdd + 6位序号,如 20260606000001), 生成唯一条码(纯数字:yyyyMMdd + 6位序号,如 20260606000001), 生成唯一条码(纯数字:yyyyMMdd + 6位序号,如 20260606000001)
### Community 92 - "Community 92"
Cohesion: 0.29
Nodes (7): Java: renewContract — 基础续签, Java: renewContract — 基础续签, Java: renewContract — 基础续签, Java: renewContract — 基础续签, Java: renewContract — 基础续签, Java: renewContract — 基础续签, renew_contract()
Cohesion: 0.35
Nodes (20): DbUserContext, DbVehicle, Session, str, VehicleRead, vehicle_to_read(), VehicleBase, VehicleCreate (+12 more)
### Community 93 - "Community 93"
Cohesion: 0.26
Nodes (22): Any, bool, datetime, int, Session, str, BizSampleCode, batch_generate_sample_codes() (+14 more)
### Community 94 - "Community 94"
Cohesion: 0.18
Nodes (20): Decimal, str, Any, str, derive_legacy_status_from_three(), derive_three_status_from_legacy(), 阶段A兼容:从旧 status 推导三字段。 约束:旧 status 本身混合了支付/配送/订单生命周期,因此只能尽力推断; 若业务侧已有更精确, 阶段A兼容:从三字段反推旧 status(用于旧前端/旧筛选参数兼容)。 (+12 more)
Cohesion: 0.22
Nodes (9): create_new_version(), Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id, Java: createNewVersion — 返回新报价单 id (+1 more)
### Community 95 - "Community 95"
Cohesion: 0.13
Nodes (15): generate_auto_product_no(), _get_quote_item_field(), Java: generateAutoProductNo — SXWL + 8位随机大写字符, Java: generateAutoProductNo — SXWL + 8位随机大写字符, Java: resolveProductIdForQuoteItem(CrmProduct 无 tax_rate,跳过税率匹配), Java: resolveProductIdForQuoteItem(CrmProduct 无 tax_rate,跳过税率匹配), Java: generateAutoProductNo — SXWL + 8位随机大写字符, Java: generateAutoProductNo — SXWL + 8位随机大写字符 (+7 more)
### Community 96 - "Community 96"
Cohesion: 0.21
Nodes (14): Any, str, bool, BxUserContext, int, Session, str, AttachmentService (+6 more)
Cohesion: 0.28
Nodes (20): Any, bool, date, int, Session, str, _contact_row_to_dict(), create_contact() (+12 more)
### Community 97 - "Community 97"
Cohesion: 0.10
Nodes (61): register_quote_routes(), Any, bool, CRM 报价单 CRUD — 对照 CrmQuoteServiceImpl.java(P2 全量), int, Session, str, accept_quote() (+53 more)
Cohesion: 0.42
Nodes (13): Any, bool, Session, str, _clear_default_for_customer(), create_invoice_info(), get_invoice_info(), list_invoice_info_by_customer() (+5 more)
### Community 98 - "Community 98"
Cohesion: 0.26
Nodes (9): Exception, bytes, str, bytes, BytesIO, convert_heic_to_jpeg(), process_image_content(), 将 HEIC/HEIF 格式转换为 JPEG 格式 (+1 more)
Cohesion: 0.27
Nodes (9): Exception, bytes, bytes, BytesIO, convert_heic_to_jpeg(), process_image_content(), 文件存储工具模块 支持多种存储方式: 1. 本地存储 (local) - 默认 2. 七牛云存储 (qiniu) - 推荐生产环境使用 3. 阿里云OSS (, 将 HEIC/HEIF 格式转换为 JPEG 格式 (+1 more)
### Community 99 - "Community 99"
Cohesion: 0.20
Nodes (10): 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo (+2 more)
Cohesion: 0.33
Nodes (9): operlog_detail(), operlog_list(), 操作日志分页列表(基于 API 请求日志适配 RuoYi OperLog 结构), Session, OperLogDetailBody, OperLogListBody, 操作日志(兼容 RuoYi OperLog 视图), OperLogDetailBody (+1 more)
### Community 100 - "Community 100"
Cohesion: 0.36
Nodes (9): Any, int, Session, str, get_pool_record(), list_pool_records(), _row_to_dict(), total_pages() (+1 more)
Cohesion: 0.12
Nodes (20): bool, date, Session, str, get_last_month_range(), month_range(), 地磅计划按月自动生成 — 迁移自 simple-dibang-xiaoshou/auto-create-plan/auto_create_monthly_pla, 按月自动生成采购计划。 - 默认仅在每月 1 日执行(force=True 时跳过该限制,供手动触发验收) - 遍历所有租户,按上月计划模板生 (+12 more)
### Community 101 - "Community 101"
Cohesion: 0.18
Nodes (15): Any, int, Session, str, Base, list_ethnics(), 民族码表 CRUD(全局 sys_ethnic), _row_to_dict() (+7 more)
Cohesion: 0.33
Nodes (14): Any, int, Session, str, create_dict_data(), get_dict_data(), list_dict_data(), list_dict_data_options() (+6 more)
### Community 102 - "Community 102"
Cohesion: 0.22
Nodes (9): Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus, Java: statisticsStatus (+1 more)
Nodes (9): Java: statisticsTrend, Java: statisticsTrend, Java: statisticsTrend, Java: statisticsTrend, Java: statisticsTrend, Java: statisticsTrend, Java: statisticsTrend, Java: statisticsTrend (+1 more)
### Community 103 - "Community 103"
Cohesion: 0.22
Nodes (17): bool, int, Redis, Request, str, _claims_from_auth(), _coerce_post_method_override_to_get(), _get_redis_client() (+9 more)
Cohesion: 0.28
Nodes (13): bool, BxUserContext, BxWorkflowNode, int, Session, str, 按业务类型获取工作流;已知类型不存在时自动创建空定义(无节点)。, WorkflowService (+5 more)
### Community 104 - "Community 104"
Cohesion: 0.14
Nodes (25): Any, bool, BxUserContext, BxWorkflowNode, float, int, Session, str (+17 more)
Cohesion: 0.13
Nodes (26): Any, bool, BxUserContext, BxWorkflowNode, float, int, Session, str (+18 more)
### Community 105 - "Community 105"
Cohesion: 0.32
Nodes (10): datetime, int, str, 审批轮次过滤 — 驳回后重新提交时,进度接口仅展示当前轮次。, format_datetime(), generate_random_password(), get_current_time(), get_file_size_display() (+2 more)
Cohesion: 0.13
Nodes (34): datetime, int, str, datetime, int, Session, str, Any (+26 more)
### Community 106 - "Community 106"
Cohesion: 0.29
Nodes (10): datetime, int, Session, str, BizNoKind, allocate_next_biz_no(), _format_biz_no(), _prefix_for() (+2 more)
Cohesion: 0.18
Nodes (20): Decimal, str, Any, str, derive_legacy_status_from_three(), derive_three_status_from_legacy(), 阶段A兼容:从旧 status 推导三字段。 约束:旧 status 本身混合了支付/配送/订单生命周期,因此只能尽力推断; 若业务侧已有更精确, 阶段A兼容:从三字段反推旧 status(用于旧前端/旧筛选参数兼容)。 (+12 more)
### Community 107 - "Community 107"
Cohesion: 0.29
Nodes (7): batch_submit_contract_approval(), Java: batchSubmitApproval, Java: batchSubmitApproval, Java: batchSubmitApproval, Java: batchSubmitApproval, Java: batchSubmitApproval, Java: batchSubmitApproval
Cohesion: 0.12
Nodes (38): register_quote_routes(), bool, int, Session, str, accept_quote(), generate_pdf(), generate_share() (+30 more)
### Community 108 - "Community 108"
Cohesion: 0.18
Nodes (11): batch_assign_owner(), download_contract_pdf(), Java: batchAssignOwner, Java: downloadContractPdf — 返回合同文件 URL/路径, Java: batchAssignOwner, Java: batchAssignOwner, Java: batchAssignOwner, Java: batchAssignOwner (+3 more)
Cohesion: 0.28
Nodes (13): int, Session, str, _allocate_inbound_outbound_id(), _ensure_sequence_row(), max_numeric_inbound_outbound_id(), next_inbound_outbound_id(), 出入库单 id 生成 — 租户内纯数字自增,并发安全。 (+5 more)
### Community 109 - "Community 109"
Cohesion: 0.33
Nodes (5): str, 附件上传 bizType 与 MinIO 目录映射(对齐原 CRM oss 上传语义), 优先使用显式 folder;否则按 bizType 映射默认目录。, 优先使用显式 folder;否则按 bizType 映射默认目录。, resolve_upload_folder()
### Community 111 - "Community 111"
Cohesion: 0.18
Nodes (5): ContactByCustomerBody, ContactDetailBody, ContactSetPrimaryBody, CRM 联系人 Pydantic Schemas, SoftDeleteModel
### Community 112 - "Community 112"
Cohesion: 0.29
Nodes (7): create_from_opportunity(), _opportunity_products_to_contract_products(), Java: createFromOpportunity — 返回合同 id, Java: createFromOpportunity — 返回合同 id, Java: createFromOpportunity — 返回合同 id, Java: createFromOpportunity — 返回合同 id, Java: createFromOpportunity — 返回合同 id
### Community 113 - "Community 113"
Cohesion: 0.35
Nodes (9): check_customer_protect_time(), _execute_single_rule(), _get_all_tenant_nos(), pool_recovery_job(), 公海池自动回收任务(由 APScheduler 调度) 遍历所有租户的启用规则,执行自动回收。, 每天凌晨1点:检查保护期到期客户,跟进次数不足则退回公海, 每天早上9点:保护期到期提醒(3天内到期且跟进不足), remind_customer_recycle() (+1 more)
### Community 114 - "Community 114"
Cohesion: 0.29
Nodes (7): Java: withdrawApproval, Java: withdrawApproval, Java: withdrawApproval, Java: withdrawApproval, Java: withdrawApproval, Java: withdrawApproval, withdraw_contract_approval()
### Community 116 - "Community 116"
Cohesion: 0.25
Nodes (8): create_from_quote(), _quote_products_to_contract_products(), Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id, Java: createFromQuote — 返回合同 id
### Community 117 - "Community 117"
Cohesion: 0.33
Nodes (6): datetime, str, _dt_to_str(), PagedQuery, PagedResponse, bx 原系统 API 响应包装(code=0 / msg / data.rows),与门户 success_response 分离。
### Community 118 - "Community 118"
Cohesion: 0.09
Nodes (27): datetime, Decimal, calculate_quote_amount(), _decimal_value(), _parse_optional_datetime(), _period_key(), Java: statisticsOverview, Java: statisticsOverview (+19 more)
### Community 119 - "Community 119"
Cohesion: 0.29
Nodes (4): int, MinIOStorage, MinIO 预签名下载 URL,携带原始文件名。, 带下载文件名的访问 URL;默认实现为普通访问地址。
### Community 120 - "Community 120"
Cohesion: 0.33
Nodes (6): Java Controller TODO — 保持 pending,记录备注, Java Controller TODO — 保持 pending,记录备注, Java Controller TODO — 保持 pending,记录备注, Java Controller TODO — 保持 pending,记录备注, Java Controller TODO — 保持 pending,记录备注, submit_change_approval()
### Community 121 - "Community 121"
Cohesion: 0.44
Nodes (8): bool, int, Session, str, ApiRequestLogCRUD, SysApiRequestLog, SysApiRequestLogHis, SysApiRequestLog
### Community 122 - "Community 122"
### Community 111 - "Community 111"
Cohesion: 0.38
Nodes (11): Any, int, Session, str, _business_type_from_path(), get_oper_log(), list_oper_logs(), _oper_status() (+3 more)
### Community 123 - "Community 123"
### Community 112 - "Community 112"
Cohesion: 0.22
Nodes (12): Any, bool, str, WfProcessInstance, _LocalCallbackFn, _dispatch_local(), 工作流回调服务 —— 流程状态变更时通知业务系统, 注册本地回调函数。当 callback_url 以 path 开头时直接调用 fn。 (+4 more)
### Community 113 - "Community 113"
Cohesion: 0.18
Nodes (11): batch_assign_owner(), download_contract_pdf(), Java: batchAssignOwner, Java: downloadContractPdf — 返回合同文件 URL/路径, Java: batchAssignOwner, Java: batchAssignOwner, Java: batchAssignOwner, Java: batchAssignOwner (+3 more)
### Community 114 - "Community 114"
Cohesion: 0.44
Nodes (11): Any, Session, str, get_follow_statistics(), get_industry_statistics(), get_level_statistics(), get_overview_statistics(), get_owner_statistics() (+3 more)
### Community 116 - "Community 116"
Cohesion: 0.33
Nodes (10): Any, int, Session, str, list_ethnics(), 民族码表 CRUD(全局 sys_ethnic), _row_to_dict(), 民族码表 sys_ethnic(国标 GB/T 3304,全局) (+2 more)
### Community 117 - "Community 117"
Cohesion: 0.22
Nodes (18): Any, int, Session, str, bool, date, float, CrmCustomer (+10 more)
### Community 118 - "Community 118"
Cohesion: 0.29
Nodes (7): batch_submit_contract_approval(), Java: batchSubmitApproval, Java: batchSubmitApproval, Java: batchSubmitApproval, Java: batchSubmitApproval, Java: batchSubmitApproval, Java: batchSubmitApproval
### Community 119 - "Community 119"
Cohesion: 0.20
Nodes (10): 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export, 导出供方列表 — Java: CrmSupplierInfoController.export (+2 more)
Nodes (10): 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo, 供方详情 — Java: CrmSupplierInfoController.getInfo (+2 more)
### Community 120 - "Community 120"
Cohesion: 0.29
Nodes (7): export_contracts(), Java: queryList for export, Java: queryList for export, Java: queryList for export, Java: queryList for export, Java: queryList for export, Java: queryList for export
### Community 123 - "Community 123"
Cohesion: 0.28
Nodes (3): Path, LocalStorage, Path
### Community 124 - "Community 124"
Cohesion: 0.29
Nodes (6): _coerce_optional_id(), WorkflowDefCreate, WorkflowDefOut, WorkflowDefUpdate, WorkflowNodeCreate, WorkflowNodeOut
Cohesion: 0.22
Nodes (9): generate_contract_name(), Java: generateContractName, Java: generateContractName, Java: generateContractName, Java: generateContractName, Java: generateContractName, Java: generateContractName, Java: generateContractName (+1 more)
### Community 125 - "Community 125"
Cohesion: 0.29
Nodes (6): CustomerPoolDetailBody, CustomerPoolListBody, PoolCustomerListBody, PoolRecordDetailBody, PoolRecordListBody, CRM 客户公海池记录 Pydantic Schemas
### Community 127 - "Community 127"
Cohesion: 0.50
Nodes (3): Config, PageResult, ResponseModel
### Community 126 - "Community 126"
Cohesion: 0.33
Nodes (6): datetime, str, _dt_to_str(), PagedQuery, PagedResponse, bx 原系统 API 响应包装(code=0 / msg / data.rows),与门户 success_response 分离。
### Community 127 - "Community 127"
Cohesion: 0.25
Nodes (7): 报销(bx)API 路由聚合 — REST 风格,协议对齐 bx 原系统。, bx_health(), P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。, P0 健康检查:验证 bx 路由已挂载且响应协议为 code=0。
### Community 128 - "Community 128"
Cohesion: 0.67
Nodes (3): str, format_api_error_message(), 将 HTTP/SQLAlchemy 等异常转为可展示的错误文案(避免 str([]) 空列表)。
Cohesion: 0.20
Nodes (10): 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove, 删除供方 — Java: CrmSupplierInfoController.remove (+2 more)
### Community 129 - "Community 129"
Cohesion: 0.33
Nodes (5): CRM 客户管理 Pydantic Schemas, CustomerAssignPoolBody, CustomerCheckDuplicateBody, CustomerDetailBody, CRM 客户管理 CRUD(客户 + 联系人 + 跟进记录)
Nodes (5): str, 附件上传 bizType 与 MinIO 目录映射(对齐原 CRM oss 上传语义), 优先使用显式 folder;否则按 bizType 映射默认目录。, 优先使用显式 folder;否则按 bizType 映射默认目录。, resolve_upload_folder()
### Community 130 - "Community 130"
Cohesion: 0.22
Nodes (9): Java: statisticsOverview, Java: statisticsOverview, Java: statisticsOverview, Java: statisticsOverview, Java: statisticsOverview, Java: statisticsOverview, Java: statisticsOverview, Java: statisticsOverview (+1 more)
### Community 131 - "Community 131"
Cohesion: 0.29
Nodes (7): create_from_opportunity(), _opportunity_products_to_contract_products(), Java: createFromOpportunity — 返回合同 id, Java: createFromOpportunity — 返回合同 id, Java: createFromOpportunity — 返回合同 id, Java: createFromOpportunity — 返回合同 id, Java: createFromOpportunity — 返回合同 id
### Community 132 - "Community 132"
Cohesion: 0.29
Nodes (7): Java: withdrawApproval, Java: withdrawApproval, Java: withdrawApproval, Java: withdrawApproval, Java: withdrawApproval, Java: withdrawApproval, withdraw_contract_approval()
### Community 133 - "Community 133"
Cohesion: 0.40
Nodes (5): list_roles_for_designer(), 返回角色下拉选项(label=角色名,value=角色ID UUID),供流程设计器审批人选择使用。 与 /roles 不同,此端点返回角色 UUID, 返回角色下拉选项(label=角色名,value=角色ID UUID),供流程设计器审批人选择使用。 与 /roles 不同,此端点返回角色 UUID, 返回角色下拉选项(label=角色名,value=角色ID UUID),供流程设计器审批人选择使用。 与 /roles 不同,此端点返回角色 UUID, 返回角色下拉选项(label=角色名,value=角色ID UUID),供流程设计器审批人选择使用。 与 /roles 不同,此端点返回角色 UUID
## Knowledge Gaps
- **52 isolated node(s):** `bool`, `bool`, `Config`, `bool`, `bool` (+47 more)
- **57 isolated node(s):** `Any`, `Session`, `bool`, `bool`, `Config` (+52 more)
These have ≤1 connection - possible missing edges or undocumented components.
- **5 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
## Suggested Questions
_Questions this graph is uniquely positioned to answer:_
- **Why does `generate_uuid()` connect `Community 0` to `Community 4`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 12`, `Community 14`, `Community 18`, `Community 19`, `Community 21`, `Community 27`, `Community 39`, `Community 40`, `Community 42`, `Community 43`, `Community 46`, `Community 47`, `Community 53`, `Community 54`, `Community 55`, `Community 60`, `Community 62`, `Community 63`, `Community 69`, `Community 70`, `Community 72`, `Community 74`, `Community 75`, `Community 76`, `Community 78`, `Community 82`, `Community 86`, `Community 93`, `Community 95`, `Community 97`, `Community 100`, `Community 104`, `Community 105`, `Community 106`, `Community 113`?**
_High betweenness centrality (0.111) - this node is a cross-community bridge._
- **Why does `SysUser` connect `Community 101` to `Community 1`, `Community 6`, `Community 8`, `Community 10`, `Community 12`, `Community 14`, `Community 18`, `Community 23`, `Community 38`, `Community 40`, `Community 44`, `Community 46`, `Community 49`, `Community 63`, `Community 69`, `Community 74`, `Community 93`, `Community 97`, `Community 100`, `Community 105`, `Community 118`?**
_High betweenness centrality (0.101) - this node is a cross-community bridge._
- **Why does `BaseModel` connect `Community 37` to `Community 129`, `Community 12`, `Community 13`, `Community 16`, `Community 17`, `Community 28`, `Community 41`, `Community 45`, `Community 47`, `Community 48`, `Community 49`, `Community 52`, `Community 61`, `Community 68`, `Community 101`, `Community 111`, `Community 117`, `Community 124`, `Community 125`, `Community 127`?**
_High betweenness centrality (0.092) - this node is a cross-community bridge._
- **Why does `generate_uuid()` connect `Community 0` to `Community 1`, `Community 4`, `Community 8`, `Community 10`, `Community 12`, `Community 14`, `Community 18`, `Community 19`, `Community 27`, `Community 38`, `Community 39`, `Community 40`, `Community 42`, `Community 43`, `Community 46`, `Community 47`, `Community 52`, `Community 54`, `Community 55`, `Community 60`, `Community 62`, `Community 63`, `Community 69`, `Community 70`, `Community 72`, `Community 74`, `Community 75`, `Community 76`, `Community 80`, `Community 81`, `Community 82`, `Community 90`, `Community 92`, `Community 93`, `Community 94`, `Community 95`, `Community 96`, `Community 97`, `Community 100`, `Community 101`, `Community 103`, `Community 104`, `Community 105`, `Community 108`, `Community 109`, `Community 117`?**
_High betweenness centrality (0.118) - this node is a cross-community bridge._
- **Why does `BaseModel` connect `Community 48` to `Community 5`, `Community 6`, `Community 12`, `Community 13`, `Community 16`, `Community 17`, `Community 21`, `Community 23`, `Community 28`, `Community 38`, `Community 41`, `Community 44`, `Community 45`, `Community 46`, `Community 47`, `Community 81`, `Community 88`, `Community 92`, `Community 99`, `Community 125`, `Community 126`?**
_High betweenness centrality (0.103) - this node is a cross-community bridge._
- **Why does `SysUser` connect `Community 12` to `Community 1`, `Community 69`, `Community 6`, `Community 8`, `Community 40`, `Community 10`, `Community 107`, `Community 9`, `Community 105`, `Community 14`, `Community 18`, `Community 52`, `Community 117`, `Community 56`, `Community 90`, `Community 93`, `Community 62`, `Community 63`?**
_High betweenness centrality (0.099) - this node is a cross-community bridge._
- **Are the 28 inferred relationships involving `str` (e.g. with `CRUDBase` and `LeaveCreate`) actually correct?**
_`str` has 28 INFERRED edges - model-reasoned connections that need verification._
- **Are the 100 inferred relationships involving `Session` (e.g. with `ClueAssignBody` and `ClueConvertBody`) actually correct?**
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "label": "plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L1"}, {"id": "db_plans_purchaseplanbase", "label": "PurchasePlanBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_plans_purchaseplancreate", "label": "PurchasePlanCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L33"}, {"id": "db_plans_purchaseplanupdate", "label": "PurchasePlanUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54"}, {"id": "db_plans_purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L81"}, {"id": "db_plans_purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L87"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6", "weight": 1.0}, {"source": "db_plans_purchaseplanbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplancreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L33", "weight": 1.0}, {"source": "db_plans_purchaseplancreate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L33", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54", "weight": 1.0}, {"source": "db_plans_purchaseplanupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L81", "weight": 1.0}, {"source": "db_plans_purchaseplanread", "target": "db_plans_purchaseplanbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L81", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanwithfilllink", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L87", "weight": 1.0}, {"source": "db_plans_purchaseplanwithfilllink", "target": "db_plans_purchaseplanread", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L87", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plans_py", "label": "plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L1"}, {"id": "db_plans_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L44"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L44"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L44"}, {"id": "db_plans_list_plans", "label": "list_plans()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L52"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L52"}, {"id": "purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L52"}, {"id": "db_plans_generate_plan_no", "label": "_generate_plan_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L189"}, {"id": "db_plans_create_plan", "label": "create_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L196"}, {"id": "purchaseplancreate", "label": "PurchasePlanCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L196"}, {"id": "purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L196"}, {"id": "db_plans_autogeneratemonthlyresult", "label": "AutoGenerateMonthlyResult", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L239"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_plans_run_auto_generate_monthly", "label": "run_auto_generate_monthly()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L246"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L246"}, {"id": "db_plans_get_plan", "label": "get_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L260"}, {"id": "db_plans_update_plan", "label": "update_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L271"}, {"id": "purchaseplanupdate", "label": "PurchasePlanUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L271"}, {"id": "db_plans_delete_plan", "label": "delete_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L289"}, {"id": "dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L301"}, {"id": "db_plans_get_plan_by_id_only", "label": "_get_plan_by_id_only()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L315"}, {"id": "db_plans_apply_plan_product_update", "label": "_apply_plan_product_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L329"}, {"id": "db_plans_apply_plan_update", "label": "_apply_plan_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L345"}, {"id": "db_plans_planrelateddata", "label": "PlanRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L366"}, {"id": "db_plans_get_plan_related", "label": "get_plan_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L372"}, {"id": "db_plans_thirdpartyplanpagedata", "label": "ThirdPartyPlanPageData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L413"}, {"id": "db_plans_get_third_party_plan_page", "label": "get_third_party_plan_page()", "file_Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_inboundoutboundbase", "label": "InboundOutboundBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "db_inventory_inboundoutboundbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22", "weight": 1.0}, {"source": "db_inventory_inboundoutboundread", "target": "db_inventory_inboundoutboundbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L33"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L33"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L33"}, {"id": "db_weighing_get_weighing", "label": "_get_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L41"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L41"}, {"id": "db_weighing_apply_weighing_update", "label": "_apply_weighing_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L59"}, {"id": "db_weighing_list_weighing", "label": "list_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L81"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L81"}, {"id": "weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L81"}, {"id": "db_weighing_create_weighing", "label": "create_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L139"}, {"id": "weighingslipcreate", "label": "WeighingSlipCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L139"}, {"id": "db_weighing_update_weighing", "label": "update_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L249"}, {"id": "weighingslipupdate", "label": "WeighingSlipUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L249"}, {"id": "db_weighing_void_weighing", "label": "void_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L276"}, {"id": "db_weighing_delete_weighing", "label": "delete_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L297"}, {"id": "db_weighing_weighingrelateddata", "label": "WeighingRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L310"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_weighing_get_weighing_related", "label": "get_weighing_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L316"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "app_core_database", "relation": "imports_from", "contLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "label": "main.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L1"}, {"id": "app_main_lifespan", "label": "lifespan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L32"}, {"id": "fastapi", "label": "FastAPI", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L32"}, {"id": "app_main_error_json", "label": "_error_json()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L79"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L79"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L79"}, {"id": "jsonresponse", "label": "JSONResponse", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L79"}, {"id": "app_main_sqlalchemy_exception_handler", "label": "sqlalchemy_exception_handler()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L92"}, {"id": "request", "label": "Request", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L92"}, {"id": "sqlalchemyerror", "label": "SQLAlchemyError", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L92"}, {"id": "app_main_unhandled_exception_handler", "label": "unhandled_exception_handler()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L103"}, {"id": "exception", "label": "Exception", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L103"}, {"id": "app_main_mask_secret", "label": "_mask_secret()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L124"}, {"id": "app_main_root", "label": "root()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L146"}, {"id": "app_main_health_check", "label": "health_check()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L151"}, {"id": "app_main_rationale_93", "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", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L93"}, {"id": "app_main_rationale_104", "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", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L104"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "contextlib", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "logging", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi_middleware_cors", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi_responses", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L8", "weight": 1.0}, {"sLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_inboundoutboundbase", "label": "InboundOutboundBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_inboundoutboundcreate", "label": "InboundOutboundCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L24"}, {"id": "db_inventory_inboundoutboundupdate", "label": "InboundOutboundUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L40"}, {"id": "db_inventory_createlinkforplanpayload", "label": "CreateLinkForPlanPayload", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L58"}, {"id": "db_inventory_inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L65"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "db_inventory_inboundoutboundbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundcreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L24", "weight": 1.0}, {"source": "db_inventory_inboundoutboundcreate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L24", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L40", "weight": 1.0}, {"source": "db_inventory_inboundoutboundupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L40", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_createlinkforplanpayload", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L58", "weight": 1.0}, {"source": "db_inventory_createlinkforplanpayload", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L58", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L65", "weight": 1.0}, {"source": "db_inventory_inboundoutboundread", "target": "db_inventory_inboundoutboundbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L65", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_inventorycreatebody", "label": "InventoryCreateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L7"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_inventoryupdatebody", "label": "InventoryUpdateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L21"}, {"id": "db_inventory_rationale_1", "label": "\u5730\u78c5-\u51fa\u5165\u5e93 Pydantic schemas", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inventorycreatebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L7", "weight": 1.0}, {"source": "db_inventory_inventorycreatebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inventoryupdatebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L21", "weight": 1.0}, {"source": "db_inventory_inventoryupdatebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L21", "weight": 1.0}, {"source": "db_inventory_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "db_inventory_generate_batch_no", "label": "_generate_batch_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L46"}, {"id": "db_inventory_resolve_tenant_no", "label": "_resolve_tenant_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L66"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L66"}, {"id": "db_inventory_get_inventory_by_id", "label": "_get_inventory_by_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L84"}, {"id": "dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L84"}, {"id": "db_inventory_get_inventory", "label": "_get_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L98"}, {"id": "db_inventory_ensure_vehicle_exists", "label": "_ensure_vehicle_exists()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L112"}, {"id": "db_inventory_apply_inventory_update", "label": "_apply_inventory_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L146"}, {"id": "db_inventory_maybe_promote_third_party_status", "label": "_maybe_promote_third_party_status()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L164"}, {"id": "db_inventory_list_inventory", "label": "list_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L175"}, {"id": "inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L175"}, {"id": "db_inventory_create_inventory", "label": "create_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L279"}, {"id": "inboundoutboundcreate", "label": "InboundOutboundCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L279"}, {"id": "db_inventory_create_link_for_plan", "label": "create_link_for_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L324"}, {"id": "createlinkforplanpayload", "label": "CreateLinkForPlanPayload", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L324"}, {"id": "db_inventory_update_inventory", "label": "update_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L386"}, {"id": "inboundoutboundupdate", "label": "InboundOutboundUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L386"}, {"id": "db_inventory_delete_inventory", "label": "delete_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L407"}, {"id": "db_inventory_inventoryrelateddata", "label": "InventoryRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L419"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_get_inventory_related", "label": "get_inventory_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L42Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "label": "db_auth.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L1"}, {"id": "core_db_auth_dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L22"}, {"id": "core_db_auth_dbusercontext_to_tenant_user_dict", "label": ".to_tenant_user_dict()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L31"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L31"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L31"}, {"id": "core_db_auth_get_db_current_user", "label": "get_db_current_user()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L39"}, {"id": "core_db_auth_get_db_current_user_optional", "label": "get_db_current_user_optional()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L51"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L51"}, {"id": "core_db_auth_rationale_1", "label": "\u5730\u78c5\u6a21\u5757\u8ba4\u8bc1\u9002\u914d\uff1a\u95e8\u6237 JWT \u7528\u6237 \u2192 db \u4e1a\u52a1\u4e0a\u4e0b\u6587\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L1"}, {"id": "core_db_auth_rationale_23", "label": "db Router/Service \u4f7f\u7528\u7684\u5f53\u524d\u7528\u6237\u4e0a\u4e0b\u6587\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L23"}, {"id": "core_db_auth_rationale_55", "label": "\u6709 Bearer \u4e14\u4e3a admin/super_admin \u65f6\u8fd4\u56de\u4e0a\u4e0b\u6587\uff0c\u5426\u5219 None\uff08\u4f9b\u4e09\u65b9 H5 \u65e0\u767b\u5f55\u8c03\u7528\uff09\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L55"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "dataclasses", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "fastapi_security", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L8", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "app_core_auth", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L11", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L12", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "app_core_menu_guard", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "targLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}, {"id": "db_init_db_health", "label": "db_health()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L12"}, {"id": "db_init_rationale_1", "label": "\u5730\u78c5 API \u8def\u7531\u805a\u5408 \u2014 REST \u98ce\u683c\uff0c\u534f\u8bae\u5bf9\u9f50\u539f simple-dibang-xiaoshou\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_api_db", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "db_init_db_health", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L12", "weight": 1.0}, {"source": "db_init_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}, {"id": "db_init_db_health", "label": "db_health()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L12"}, {"id": "db_init_rationale_13", "label": "P0 \u5065\u5eb7\u68c0\u67e5\uff1a\u9a8c\u8bc1 db \u8def\u7531\u5df2\u6302\u8f7d\u4e14\u54cd\u5e94\u534f\u8bae\u4e3a code=0\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L13"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_api_db", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_schemas_bx_common", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "db_init_db_health", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L12", "weight": 1.0}, {"source": "db_init_rationale_13", "target": "db_init_db_health", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L13", "weight": 1.0}], "raw_calls": [{"caller_nid": "db_init_db_health", "callee": "ApiResponse", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L14"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L40"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L40"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L40"}, {"id": "db_inventory_generate_batch_no", "label": "_generate_batch_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L47"}, {"id": "db_inventory_resolve_tenant_no", "label": "_resolve_tenant_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L67"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L67"}, {"id": "db_inventory_get_inventory_by_id", "label": "_get_inventory_by_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L85"}, {"id": "dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L85"}, {"id": "db_inventory_get_inventory", "label": "_get_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L99"}, {"id": "db_inventory_ensure_vehicle_exists", "label": "_ensure_vehicle_exists()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L113"}, {"id": "db_inventory_apply_inventory_update", "label": "_apply_inventory_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L147"}, {"id": "db_inventory_maybe_promote_third_party_status", "label": "_maybe_promote_third_party_status()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L165"}, {"id": "db_inventory_list_inventory", "label": "list_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L176"}, {"id": "inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L176"}, {"id": "db_inventory_create_inventory", "label": "create_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L280"}, {"id": "inboundoutboundcreate", "label": "InboundOutboundCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L280"}, {"id": "db_inventory_create_link_for_plan", "label": "create_link_for_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L325"}, {"id": "createlinkforplanpayload", "label": "CreateLinkForPlanPayload", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L325"}, {"id": "db_inventory_update_inventory", "label": "update_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L387"}, {"id": "inboundoutboundupdate", "label": "InboundOutboundUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L387"}, {"id": "db_inventory_delete_inventory", "label": "delete_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L408"}, {"id": "db_inventory_inventoryrelateddata", "label": "InventoryRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L420"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_get_inventory_related", "label": "get_inventory_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L42Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_weighingcreatebody", "label": "WeighingCreateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L7"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_weighing_weighingupdatebody", "label": "WeighingUpdateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L29"}, {"id": "db_weighing_rationale_1", "label": "\u5730\u78c5-\u5730\u78c5\u5355 Pydantic schemas", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingcreatebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L7", "weight": 1.0}, {"source": "db_weighing_weighingcreatebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingupdatebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L29", "weight": 1.0}, {"source": "db_weighing_weighingupdatebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L29", "weight": 1.0}, {"source": "db_weighing_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}, {"id": "db_init_db_health", "label": "db_health()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L14"}, {"id": "db_init_rationale_15", "label": "P0 \u5065\u5eb7\u68c0\u67e5\uff1a\u9a8c\u8bc1 db \u8def\u7531\u5df2\u6302\u8f7d\u4e14\u54cd\u5e94\u534f\u8bae\u4e3a code=0\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L15"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_api_db", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_schemas_bx_common", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "db_init_db_health", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L14", "weight": 1.0}, {"source": "db_init_rationale_15", "target": "db_init_db_health", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L15", "weight": 1.0}], "raw_calls": [{"caller_nid": "db_init_db_health", "callee": "ApiResponse", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L16"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/__init__.py", "source_location": "L1"}], "edges": [], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "db_inventory_generate_batch_no", "label": "_generate_batch_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L46"}, {"id": "db_inventory_resolve_tenant_no", "label": "_resolve_tenant_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L66"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L66"}, {"id": "db_inventory_get_inventory_by_id", "label": "_get_inventory_by_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L84"}, {"id": "dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L84"}, {"id": "db_inventory_get_inventory", "label": "_get_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L98"}, {"id": "db_inventory_ensure_vehicle_exists", "label": "_ensure_vehicle_exists()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L112"}, {"id": "db_inventory_apply_inventory_update", "label": "_apply_inventory_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L146"}, {"id": "db_inventory_maybe_promote_third_party_status", "label": "_maybe_promote_third_party_status()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L164"}, {"id": "db_inventory_list_inventory", "label": "list_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L175"}, {"id": "inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L175"}, {"id": "db_inventory_create_inventory", "label": "create_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L252"}, {"id": "inboundoutboundcreate", "label": "InboundOutboundCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L252"}, {"id": "db_inventory_create_link_for_plan", "label": "create_link_for_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L297"}, {"id": "createlinkforplanpayload", "label": "CreateLinkForPlanPayload", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L297"}, {"id": "db_inventory_update_inventory", "label": "update_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L359"}, {"id": "inboundoutboundupdate", "label": "InboundOutboundUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L359"}, {"id": "db_inventory_delete_inventory", "label": "delete_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L380"}, {"id": "db_inventory_inventoryrelateddata", "label": "InventoryRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L392"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_get_inventory_related", "label": "get_inventory_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plan_py", "label": "plan.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L1"}, {"id": "db_plan_plancreatebody", "label": "PlanCreateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L7"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_plan_planupdatebody", "label": "PlanUpdateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L24"}, {"id": "db_plan_rationale_1", "label": "\u5730\u78c5-\u8ba1\u5212 Pydantic schemas", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plan_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plan_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plan_py", "target": "db_plan_plancreatebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L7", "weight": 1.0}, {"source": "db_plan_plancreatebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plan_py", "target": "db_plan_planupdatebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L24", "weight": 1.0}, {"source": "db_plan_planupdatebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L24", "weight": 1.0}, {"source": "db_plan_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plan_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plan.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "label": "main.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L1"}, {"id": "app_main_lifespan", "label": "lifespan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L31"}, {"id": "fastapi", "label": "FastAPI", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L31"}, {"id": "app_main_error_json", "label": "_error_json()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L78"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L78"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L78"}, {"id": "jsonresponse", "label": "JSONResponse", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L78"}, {"id": "app_main_sqlalchemy_exception_handler", "label": "sqlalchemy_exception_handler()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L91"}, {"id": "request", "label": "Request", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L91"}, {"id": "sqlalchemyerror", "label": "SQLAlchemyError", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L91"}, {"id": "app_main_unhandled_exception_handler", "label": "unhandled_exception_handler()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L102"}, {"id": "exception", "label": "Exception", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L102"}, {"id": "app_main_mask_secret", "label": "_mask_secret()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L122"}, {"id": "app_main_root", "label": "root()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L144"}, {"id": "app_main_health_check", "label": "health_check()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L149"}, {"id": "app_main_rationale_92", "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", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L92"}, {"id": "app_main_rationale_103", "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", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L103"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "contextlib", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "logging", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi_middleware_cors", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_main_py", "target": "fastapi_responses", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/main.py", "source_location": "L8", "weight": 1.0}, {"sLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_list_inventories", "label": "list_inventories()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L19"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L19"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L19"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L19"}, {"id": "db_inventory_get_inventory", "label": "get_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L58"}, {"id": "db_inventory_create_inventory", "label": "create_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L71"}, {"id": "inventorycreatebody", "label": "InventoryCreateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L71"}, {"id": "db_inventory_update_inventory", "label": "update_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L95"}, {"id": "inventoryupdatebody", "label": "InventoryUpdateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L95"}, {"id": "db_inventory_delete_inventory", "label": "delete_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L122"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "app_core_menu_guard", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "app_core_response", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L11", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "app_schemas_db_inventory", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L12", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "app_services_db_inventory", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "target": "db_inventory_list_inventories", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L19", "weight": 1.0}, {"source": "db_inventory_list_inventorieLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "label": "vehicles.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L1"}, {"id": "db_vehicles_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L18"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L18"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L18"}, {"id": "db_vehicles_list_vehicles", "label": "list_vehicles()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L26"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L26"}, {"id": "vehicleread", "label": "VehicleRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L26"}, {"id": "db_vehicles_get_vehicle", "label": "get_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L40"}, {"id": "db_vehicles_create_vehicle", "label": "create_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L51"}, {"id": "vehiclecreate", "label": "VehicleCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L51"}, {"id": "db_vehicles_update_vehicle", "label": "update_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L73"}, {"id": "vehicleupdate", "label": "VehicleUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L73"}, {"id": "db_vehicles_patch_vehicle", "label": "patch_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L93"}, {"id": "db_vehicles_delete_vehicle", "label": "delete_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L103"}, {"id": "dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L115"}, {"id": "db_vehicles_ensure_unique_vehicle_no", "label": "_ensure_unique_vehicle_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L129"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "app_core_db_auth", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L8", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "app_core_tenant_context", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_pLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_scripts_run_db_auto_generate_plans_py", "label": "run_db_auto_generate_plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L1"}, {"id": "scripts_run_db_auto_generate_plans_main", "label": "main()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L17"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L17"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_scripts_run_db_auto_generate_plans_py", "target": "argparse", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_scripts_run_db_auto_generate_plans_py", "target": "sys", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_scripts_run_db_auto_generate_plans_py", "target": "pathlib", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_scripts_run_db_auto_generate_plans_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_scripts_run_db_auto_generate_plans_py", "target": "app_services_db_auto_generate_plans", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L14", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_scripts_run_db_auto_generate_plans_py", "target": "scripts_run_db_auto_generate_plans_main", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L17", "weight": 1.0}, {"source": "scripts_run_db_auto_generate_plans_main", "target": "int", "relation": "references", "context": "return_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L17", "weight": 1.0}], "raw_calls": [{"caller_nid": "scripts_run_db_auto_generate_plans_main", "callee": "ArgumentParser", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L18"}, {"caller_nid": "scripts_run_db_auto_generate_plans_main", "callee": "add_argument", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L19"}, {"caller_nid": "scripts_run_db_auto_generate_plans_main", "callee": "parse_args", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L24"}, {"caller_nid": "scripts_run_db_auto_generate_plans_main", "callee": "SessionLocal", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L26"}, {"caller_nid": "scripts_run_db_auto_generate_plans_main", "callee": "run_auto_generate_monthly_plans", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L28"}, {"caller_nid": "scripts_run_db_auto_generate_plans_main", "callee": "rollback", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L32"}, {"caller_nid": "scripts_run_db_auto_generate_plans_main", "callee": "close", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/run_db_auto_generate_plans.py", "source_location": "L35"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_inboundoutboundbase", "label": "InboundOutboundBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_inboundoutboundcreate", "label": "InboundOutboundCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22"}, {"id": "db_inventory_inboundoutboundupdate", "label": "InboundOutboundUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L38"}, {"id": "db_inventory_createlinkforplanpayload", "label": "CreateLinkForPlanPayload", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L54"}, {"id": "db_inventory_inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L61"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "db_inventory_inboundoutboundbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundcreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22", "weight": 1.0}, {"source": "db_inventory_inboundoutboundcreate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L38", "weight": 1.0}, {"source": "db_inventory_inboundoutboundupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L38", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_createlinkforplanpayload", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L54", "weight": 1.0}, {"source": "db_inventory_createlinkforplanpayload", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L54", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L61", "weight": 1.0}, {"source": "db_inventory_inboundoutboundread", "target": "db_inventory_inboundoutboundbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L61", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_weighing_logic_py", "label": "weighing_logic.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L1"}, {"id": "db_weighing_logic_has_weight_time", "label": "_has_weight_time()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L12"}, {"id": "datetime", "label": "datetime", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L12"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L12"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L12"}, {"id": "db_weighing_logic_process_weighing_business_logic", "label": "process_weighing_business_logic()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L20"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L20"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L20"}, {"id": "db_weighing_logic_rationale_1", "label": "\u5730\u78c5\u5355\u8054\u52a8\u4e1a\u52a1\u903b\u8f91 \u2014 \u8fc1\u79fb\u81ea simple-dibang-xiaoshou weighing._process_weighing_business_logic", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L1"}, {"id": "db_weighing_logic_rationale_21", "label": "\u5904\u7406\u5730\u78c5\u5355\u7684\u4e1a\u52a1\u903b\u8f91\uff1a 1. \u66f4\u65b0\u8ba1\u5212\u5355\u7684\u5df2\u6267\u884c\u91cf\uff08\u5355\u4f4d\uff1akg\uff09 2. \u66f4\u65b0\u51fa\u5165\u5e93\u5355\u7684\u72b6\u6001 3. \u91cd\u65b0\u8ba1\u7b97\u5730\u78c5\u5355\u7684 executed_q", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L21"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_weighing_logic_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_weighing_logic_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_weighing_logic_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_weighing_logic_py", "target": "app_models_db_models", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_weighing_logic_py", "target": "db_weighing_logic_has_weight_time", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L12", "weight": 1.0}, {"source": "db_weighing_logic_has_weight_time", "target": "datetime", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L12", "weight": 1.0}, {"source": "db_weighing_logic_has_weight_time", "target": "str", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L12", "weight": 1.0}, {"source": "db_weighing_logic_has_weight_time", "target": "bool", "relation": "references", "context": "return_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing_logic.py", "source_location": "L12", "weight": 1.0}, {"sourcLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L39"}, {"id": "db_inventory_generate_batch_no", "label": "_generate_batch_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L46"}, {"id": "db_inventory_resolve_tenant_no", "label": "_resolve_tenant_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L66"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L66"}, {"id": "db_inventory_get_inventory_by_id", "label": "_get_inventory_by_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L84"}, {"id": "dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L84"}, {"id": "db_inventory_get_inventory", "label": "_get_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L98"}, {"id": "db_inventory_ensure_vehicle_exists", "label": "_ensure_vehicle_exists()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L112"}, {"id": "db_inventory_apply_inventory_update", "label": "_apply_inventory_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L146"}, {"id": "db_inventory_maybe_promote_third_party_status", "label": "_maybe_promote_third_party_status()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L164"}, {"id": "db_inventory_list_inventory", "label": "list_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L175"}, {"id": "inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L175"}, {"id": "db_inventory_create_inventory", "label": "create_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L279"}, {"id": "inboundoutboundcreate", "label": "InboundOutboundCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L279"}, {"id": "db_inventory_create_link_for_plan", "label": "create_link_for_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L324"}, {"id": "createlinkforplanpayload", "label": "CreateLinkForPlanPayload", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L324"}, {"id": "db_inventory_update_inventory", "label": "update_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L386"}, {"id": "inboundoutboundupdate", "label": "InboundOutboundUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L386"}, {"id": "db_inventory_delete_inventory", "label": "delete_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L407"}, {"id": "db_inventory_inventoryrelateddata", "label": "InventoryRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L419"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_get_inventory_related", "label": "get_inventory_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L42Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "label": "plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L1"}, {"id": "db_plans_purchaseplanbase", "label": "PurchasePlanBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_plans_purchaseplancreate", "label": "PurchasePlanCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L34"}, {"id": "db_plans_purchaseplanupdate", "label": "PurchasePlanUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54"}, {"id": "db_plans_purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L82"}, {"id": "db_plans_purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L88"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6", "weight": 1.0}, {"source": "db_plans_purchaseplanbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplancreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L34", "weight": 1.0}, {"source": "db_plans_purchaseplancreate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L34", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54", "weight": 1.0}, {"source": "db_plans_purchaseplanupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L82", "weight": 1.0}, {"source": "db_plans_purchaseplanread", "target": "db_plans_purchaseplanbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L82", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanwithfilllink", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L88", "weight": 1.0}, {"source": "db_plans_purchaseplanwithfilllink", "target": "db_plans_purchaseplanread", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L88", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_dashboard_py", "label": "dashboard.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L1"}, {"id": "db_dashboard_get_dashboard_stats", "label": "get_dashboard_stats()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L23"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L23"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L23"}, {"id": "dashboardstats", "label": "DashboardStats", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L23"}, {"id": "db_dashboard_get_inbound_by_cargo", "label": "get_inbound_by_cargo()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L73"}, {"id": "dashboardcargostat", "label": "DashboardCargoStat", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L73"}, {"id": "db_dashboard_get_inbound_by_partner_cargo", "label": "get_inbound_by_partner_cargo()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L81"}, {"id": "dashboardpartnercargostat", "label": "DashboardPartnerCargoStat", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L81"}, {"id": "db_dashboard_get_outbound_by_cargo", "label": "get_outbound_by_cargo()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L89"}, {"id": "db_dashboard_get_outbound_by_partner_cargo", "label": "get_outbound_by_partner_cargo()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L97"}, {"id": "db_dashboard_cargo_stats", "label": "_cargo_stats()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L104"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L104"}, {"id": "db_dashboard_partner_cargo_stats", "label": "_partner_cargo_stats()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L137"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_dashboard_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_dashboard_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_dashboard_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_dashboard_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_dashboard_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_dashboard_py", "target": "app_core_db_auth", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_dashboard_py", "target": "app_core_tenant_context", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/dashboard.py", "source_locaLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}, {"id": "db_init_db_health", "label": "db_health()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L10"}, {"id": "db_init_rationale_11", "label": "P0 \u5065\u5eb7\u68c0\u67e5\uff1a\u9a8c\u8bc1 db \u8def\u7531\u5df2\u6302\u8f7d\u4e14\u54cd\u5e94\u534f\u8bae\u4e3a code=0\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L11"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_schemas_bx_common", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "db_init_db_health", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L10", "weight": 1.0}, {"source": "db_init_rationale_11", "target": "db_init_db_health", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L11", "weight": 1.0}], "raw_calls": [{"caller_nid": "db_init_db_health", "callee": "ApiResponse", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L12"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/__init__.py", "source_location": "L1"}, {"id": "db_init_rationale_1", "label": "\u5730\u78c5\uff08db\uff09Pydantic schemas \u2014 \u5bf9\u9f50\u539f simple-dibang-xiaoshou \u5951\u7ea6\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/__init__.py", "source_location": "L1"}], "edges": [{"source": "db_init_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_init_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/__init__.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "label": "db_auth.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L1"}, {"id": "core_db_auth_dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L13"}, {"id": "core_db_auth_dbusercontext_to_tenant_user_dict", "label": ".to_tenant_user_dict()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L22"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L22"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L22"}, {"id": "core_db_auth_get_db_current_user", "label": "get_db_current_user()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L30"}, {"id": "core_db_auth_rationale_1", "label": "\u5730\u78c5\u6a21\u5757\u8ba4\u8bc1\u9002\u914d\uff1a\u95e8\u6237 JWT \u7528\u6237 \u2192 db \u4e1a\u52a1\u4e0a\u4e0b\u6587\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L1"}, {"id": "core_db_auth_rationale_14", "label": "db Router/Service \u4f7f\u7528\u7684\u5f53\u524d\u7528\u6237\u4e0a\u4e0b\u6587\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L14"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "dataclasses", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "app_core_menu_guard", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "core_db_auth_dbusercontext", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L13", "weight": 1.0}, {"source": "core_db_auth_dbusercontext", "target": "core_db_auth_dbusercontext_to_tenant_user_dict", "relation": "method", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L22", "weight": 1.0}, {"source": "core_db_auth_dbusercontext_to_tenant_user_dict", "target": "str", "relation": "references", "context": "generic_arg", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L22", "weight": 1.0}, {"source": "core_db_auth_dbusercontext_to_tenant_user_dict", "target": "any", "relation": "references", "context": "generic_arg", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L22", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_db_auth_py", "target": "core_db_auth_get_db_current_user", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L30", "weight": 1.0}, {"source": "core_db_auth_get_db_current_user", "target": "core_db_auth_dbusercontext", "relation": "references", "context": "return_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L30", "weight": 1.0}, {"source": "core_db_auth_get_db_current_user", "target": "core_db_auth_dbusercontext", "relation": "calls", "context": "call", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/db_auth.py", "source_location": "L33", "weight": 1.0}, {"source": "core_db_auth_rationale_1", "target": "users_zlwLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_plan_helpers_py", "label": "plan_helpers.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L1"}, {"id": "db_plan_helpers_generate_plan_no", "label": "generate_plan_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L7"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L7"}, {"id": "db_plan_helpers_default_execution_status", "label": "default_execution_status()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L13"}, {"id": "db_plan_helpers_rationale_8", "label": "\u751f\u6210\u8ba1\u5212\u53f7\uff1aSX-YYYYMMDDHHMMSS001", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L8"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_plan_helpers_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_plan_helpers_py", "target": "db_plan_helpers_generate_plan_no", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L7", "weight": 1.0}, {"source": "db_plan_helpers_generate_plan_no", "target": "str", "relation": "references", "context": "return_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_plan_helpers_py", "target": "db_plan_helpers_default_execution_status", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L13", "weight": 1.0}, {"source": "db_plan_helpers_default_execution_status", "target": "str", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L13", "weight": 1.0}, {"source": "db_plan_helpers_default_execution_status", "target": "str", "relation": "references", "context": "return_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L13", "weight": 1.0}, {"source": "db_plan_helpers_rationale_8", "target": "db_plan_helpers_generate_plan_no", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L8", "weight": 1.0}], "raw_calls": [{"caller_nid": "db_plan_helpers_generate_plan_no", "callee": "now", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L9"}, {"caller_nid": "db_plan_helpers_generate_plan_no", "callee": "strftime", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/plan_helpers.py", "source_location": "L10"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "label": "master_data.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L1"}, {"id": "db_master_data_vehiclebase", "label": "VehicleBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_master_data_vehiclecreate", "label": "VehicleCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L13"}, {"id": "db_master_data_vehicleupdate", "label": "VehicleUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L17"}, {"id": "db_master_data_vehicleread", "label": "VehicleRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L24"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "db_master_data_vehiclebase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L6", "weight": 1.0}, {"source": "db_master_data_vehiclebase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "db_master_data_vehiclecreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L13", "weight": 1.0}, {"source": "db_master_data_vehiclecreate", "target": "db_master_data_vehiclebase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "db_master_data_vehicleupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L17", "weight": 1.0}, {"source": "db_master_data_vehicleupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L17", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "db_master_data_vehicleread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L24", "weight": 1.0}, {"source": "db_master_data_vehicleread", "target": "db_master_data_vehiclebase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L24", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plans_py", "label": "plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L1"}, {"id": "db_plans_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "db_plans_list_plans", "label": "list_plans()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "db_plans_generate_plan_no", "label": "_generate_plan_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L185"}, {"id": "db_plans_create_plan", "label": "create_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L192"}, {"id": "purchaseplancreate", "label": "PurchasePlanCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L192"}, {"id": "purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L192"}, {"id": "db_plans_autogeneratemonthlyresult", "label": "AutoGenerateMonthlyResult", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L234"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_plans_run_auto_generate_monthly", "label": "run_auto_generate_monthly()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L241"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L241"}, {"id": "db_plans_get_plan", "label": "get_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L255"}, {"id": "db_plans_update_plan", "label": "update_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L266"}, {"id": "purchaseplanupdate", "label": "PurchasePlanUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L266"}, {"id": "db_plans_delete_plan", "label": "delete_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L283"}, {"id": "dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L295"}, {"id": "db_plans_get_plan_by_id_only", "label": "_get_plan_by_id_only()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L309"}, {"id": "db_plans_apply_plan_update", "label": "_apply_plan_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L323"}, {"id": "db_plans_planrelateddata", "label": "PlanRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L344"}, {"id": "db_plans_get_plan_related", "label": "get_plan_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L350"}, {"id": "db_plans_thirdpartyplanpagedata", "label": "ThirdPartyPlanPageData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L391"}, {"id": "db_plans_get_third_party_plan_page", "label": "get_third_party_plan_page()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L398"}, {"id": "db_plans_rationale_246", "label": "\u624b\u52a8\u89e6\u53d1\u8ba1\u5212\u6309\u6708\Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_db_inventory_id_py", "label": "test_db_inventory_id.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L1"}, {"id": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_parses_scalar", "label": "test_max_numeric_inbound_outbound_id_parses_scalar()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L7"}, {"id": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_empty", "label": "test_max_numeric_inbound_outbound_id_empty()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L14"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_db_inventory_id_py", "target": "unittest_mock", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_db_inventory_id_py", "target": "app_services_db_inventory_id", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_db_inventory_id_py", "target": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_parses_scalar", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_tests_test_db_inventory_id_py", "target": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_empty", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L14", "weight": 1.0}], "raw_calls": [{"caller_nid": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_parses_scalar", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L8"}, {"caller_nid": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_parses_scalar", "callee": "max_numeric_inbound_outbound_id", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L10"}, {"caller_nid": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_parses_scalar", "callee": "assert_called_once", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L11"}, {"caller_nid": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_empty", "callee": "MagicMock", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L15"}, {"caller_nid": "tests_test_db_inventory_id_test_max_numeric_inbound_outbound_id_empty", "callee": "max_numeric_inbound_outbound_id", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/tests/test_db_inventory_id.py", "source_location": "L17"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_mappers_py", "label": "mappers.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L1"}, {"id": "db_mappers_fmt_date", "label": "fmt_date()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L17"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L17"}, {"id": "datetime", "label": "datetime", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L17"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L17"}, {"id": "db_mappers_fmt_datetime", "label": "fmt_datetime()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L27"}, {"id": "db_mappers_vehicle_to_read", "label": "vehicle_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L35"}, {"id": "dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L35"}, {"id": "vehicleread", "label": "VehicleRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L35"}, {"id": "db_mappers_plan_to_read", "label": "plan_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L43"}, {"id": "dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L43"}, {"id": "float", "label": "float", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L43"}, {"id": "purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L43"}, {"id": "db_mappers_plan_to_read_with_fill_link", "label": "plan_to_read_with_fill_link()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L71"}, {"id": "purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L71"}, {"id": "db_mappers_is_empty_inventory_date", "label": "is_empty_inventory_date()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L84"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L84"}, {"id": "db_mappers_inventory_date_to_api", "label": "inventory_date_to_api()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L88"}, {"id": "db_mappers_inventory_to_read", "label": "inventory_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L94"}, {"id": "dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L94"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L94"}, {"id": "inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L94"}, {"id": "db_mappers_weighing_to_read", "label": "weighing_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L141"}, {"id": "weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L141"}, {"id": "db_mappers_datetime_end_of_day", "label": "datetime_end_of_day()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L170"}, {"id": "db_mappers_parse_date_str", "label": "parse_date_str()", "file_type": "code", "source_file": "/Users/zLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L38"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L38"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L38"}, {"id": "db_weighing_get_weighing", "label": "_get_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L46"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L46"}, {"id": "db_weighing_apply_weighing_product_update", "label": "_apply_weighing_product_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L64"}, {"id": "db_weighing_apply_weighing_update", "label": "_apply_weighing_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L80"}, {"id": "db_weighing_list_weighing", "label": "list_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L102"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L102"}, {"id": "weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L102"}, {"id": "db_weighing_create_weighing", "label": "create_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L190"}, {"id": "weighingslipcreate", "label": "WeighingSlipCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L190"}, {"id": "db_weighing_update_weighing", "label": "update_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L302"}, {"id": "weighingslipupdate", "label": "WeighingSlipUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L302"}, {"id": "db_weighing_void_weighing", "label": "void_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L330"}, {"id": "db_weighing_delete_weighing", "label": "delete_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L351"}, {"id": "db_weighing_weighingrelateddata", "label": "WeighingRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L364"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_weighing_get_weighing_related", "label": "get_weighing_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L370"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_init_py", "target": "app_services_db_base", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/__init__.py", "source_location": "L2", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_core_config_py", "label": "config.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L1"}, {"id": "core_config_settings", "label": "Settings", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L7"}, {"id": "basesettings", "label": "BaseSettings", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "core_config_config", "label": "Config", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L152"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_config_py", "target": "pydantic_settings", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_config_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_config_py", "target": "pathlib", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_config_py", "target": "os", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_config_py", "target": "core_config_settings", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L7", "weight": 1.0}, {"source": "core_config_settings", "target": "basesettings", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_core_config_py", "target": "core_config_config", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/core/config.py", "source_location": "L152", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L44"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L44"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L44"}, {"id": "db_inventory_generate_batch_no", "label": "_generate_batch_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L51"}, {"id": "db_inventory_resolve_tenant_no", "label": "_resolve_tenant_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L71"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L71"}, {"id": "db_inventory_get_inventory_by_id", "label": "_get_inventory_by_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L89"}, {"id": "dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L89"}, {"id": "db_inventory_get_inventory", "label": "_get_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L103"}, {"id": "db_inventory_ensure_vehicle_exists", "label": "_ensure_vehicle_exists()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L117"}, {"id": "db_inventory_apply_inventory_product_update", "label": "_apply_inventory_product_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L151"}, {"id": "db_inventory_apply_inventory_update", "label": "_apply_inventory_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L167"}, {"id": "db_inventory_maybe_promote_third_party_status", "label": "_maybe_promote_third_party_status()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L185"}, {"id": "db_inventory_list_inventory", "label": "list_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L196"}, {"id": "inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L196"}, {"id": "db_inventory_create_inventory", "label": "create_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L300"}, {"id": "inboundoutboundcreate", "label": "InboundOutboundCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L300"}, {"id": "db_inventory_create_link_for_plan", "label": "create_link_for_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L347"}, {"id": "createlinkforplanpayload", "label": "CreateLinkForPlanPayload", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L347"}, {"id": "db_inventory_update_inventory", "label": "update_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L417"}, {"id": "inboundoutboundupdate", "label": "InboundOutboundUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L417"}, {"id": "db_inventory_delete_inventory", "label": "delete_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L439"}, {"id": "db_inventory_inventoryrelateddata", "label": "InventoryRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/inventory.py", "source_location": "L451"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "",Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "label": "plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L1"}, {"id": "db_plans_purchaseplanbase", "label": "PurchasePlanBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_plans_purchaseplancreate", "label": "PurchasePlanCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L33"}, {"id": "db_plans_purchaseplanupdate", "label": "PurchasePlanUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54"}, {"id": "db_plans_purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L81"}, {"id": "db_plans_purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L87"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6", "weight": 1.0}, {"source": "db_plans_purchaseplanbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplancreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L33", "weight": 1.0}, {"source": "db_plans_purchaseplancreate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L33", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54", "weight": 1.0}, {"source": "db_plans_purchaseplanupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L54", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L81", "weight": 1.0}, {"source": "db_plans_purchaseplanread", "target": "db_plans_purchaseplanbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L81", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_plans_py", "target": "db_plans_purchaseplanwithfilllink", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L87", "weight": 1.0}, {"source": "db_plans_purchaseplanwithfilllink", "target": "db_plans_purchaseplanread", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/plans.py", "source_location": "L87", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "label": "vehicles.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L1"}, {"id": "db_vehicles_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L18"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L18"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L18"}, {"id": "db_vehicles_list_vehicles", "label": "list_vehicles()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L26"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L26"}, {"id": "vehicleread", "label": "VehicleRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L26"}, {"id": "db_vehicles_get_vehicle", "label": "get_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L46"}, {"id": "db_vehicles_create_vehicle", "label": "create_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L57"}, {"id": "vehiclecreate", "label": "VehicleCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L57"}, {"id": "db_vehicles_update_vehicle", "label": "update_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L79"}, {"id": "vehicleupdate", "label": "VehicleUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L79"}, {"id": "db_vehicles_patch_vehicle", "label": "patch_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L99"}, {"id": "db_vehicles_delete_vehicle", "label": "delete_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L109"}, {"id": "dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L121"}, {"id": "db_vehicles_ensure_unique_vehicle_no", "label": "_ensure_unique_vehicle_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L135"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "app_core_db_auth", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicles.py", "source_location": "L8", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicles_py", "target": "apLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L34"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L34"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L34"}, {"id": "db_weighing_get_weighing", "label": "_get_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L42"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L42"}, {"id": "db_weighing_apply_weighing_update", "label": "_apply_weighing_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L60"}, {"id": "db_weighing_list_weighing", "label": "list_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L82"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L82"}, {"id": "weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L82"}, {"id": "db_weighing_create_weighing", "label": "create_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L170"}, {"id": "weighingslipcreate", "label": "WeighingSlipCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L170"}, {"id": "db_weighing_update_weighing", "label": "update_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L280"}, {"id": "weighingslipupdate", "label": "WeighingSlipUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L280"}, {"id": "db_weighing_void_weighing", "label": "void_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L307"}, {"id": "db_weighing_delete_weighing", "label": "delete_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L328"}, {"id": "db_weighing_weighingrelateddata", "label": "WeighingRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L341"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_weighing_get_weighing_related", "label": "get_weighing_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L347"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import",Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_list_weighings", "label": "list_weighings()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L19"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L19"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L19"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L19"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L19"}, {"id": "db_weighing_get_weighing", "label": "get_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L60"}, {"id": "db_weighing_create_weighing", "label": "create_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L73"}, {"id": "weighingcreatebody", "label": "WeighingCreateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L73"}, {"id": "db_weighing_update_weighing", "label": "update_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L97"}, {"id": "weighingupdatebody", "label": "WeighingUpdateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L97"}, {"id": "db_weighing_void_weighing", "label": "void_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L126"}, {"id": "db_weighing_delete_weighing", "label": "delete_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L148"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "app_core_menu_guard", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "app_core_response", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L11", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "app_schemas_db_weighing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L12", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "app_services_db_weighing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00coLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}, {"id": "db_init_db_health", "label": "db_health()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L15"}, {"id": "db_init_rationale_1", "label": "\u5730\u78c5 API \u8def\u7531\u805a\u5408 \u2014 REST \u98ce\u683c\uff0c\u534f\u8bae\u5bf9\u9f50\u539f simple-dibang-xiaoshou\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_api_db", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "db_init_db_health", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L15", "weight": 1.0}, {"source": "db_init_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_db_auto_plan_py", "label": "db_auto_plan.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L1"}, {"id": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "label": "auto_generate_monthly_plans_job()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L10"}, {"id": "tasks_db_auto_plan_rationale_11", "label": "\u6bcf\u6708 1 \u65e5\u51cc\u6668\u6267\u884c\uff1a\u6309\u4e0a\u6708\u8ba1\u5212\u6a21\u677f\u751f\u6210\u672c\u6708\u8ba1\u5212\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L11"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_db_auto_plan_py", "target": "logging", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_db_auto_plan_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_db_auto_plan_py", "target": "app_services_db_auto_generate_plans", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_db_auto_plan_py", "target": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L10", "weight": 1.0}, {"source": "tasks_db_auto_plan_rationale_11", "target": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L11", "weight": 1.0}], "raw_calls": [{"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "SessionLocal", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L12"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "info", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L14"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "run_auto_generate_monthly_plans", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L15"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "info", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L16"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "get", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L18"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "get", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L19"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "get", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L20"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "rollback", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L23"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "exception", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L24"}, {"caller_nid": "tasks_db_auto_plan_auto_generate_monthly_plans_job", "callee": "close", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/db_auto_plan.py", "source_location": "L26"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "label": "db_models.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L1"}, {"id": "models_db_models_dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9"}, {"id": "base", "label": "Base", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_db_models_dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L29"}, {"id": "models_db_models_dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L65"}, {"id": "models_db_models_dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L94"}, {"id": "models_db_models_rationale_1", "label": "\u5730\u78c5\uff08db\uff09\u6a21\u5757\u6570\u636e\u6a21\u578b \u2014 \u5bf9\u9f50 docs/sql/db_tables.sql", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbvehicle", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9", "weight": 1.0}, {"source": "models_db_models_dbvehicle", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbpurchaseplan", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L29", "weight": 1.0}, {"source": "models_db_models_dbpurchaseplan", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L29", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbinboundoutbound", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L65", "weight": 1.0}, {"source": "models_db_models_dbinboundoutbound", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L65", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbweighingslip", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L94", "weight": 1.0}, {"source": "models_db_models_dbweighingslip", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L94", "weight": 1.0}, {"source": "models_db_models_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "label": "master_data.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L1"}, {"id": "db_master_data_vehiclebase", "label": "VehicleBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_master_data_vehiclecreate", "label": "VehicleCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L13"}, {"id": "db_master_data_vehicleupdate", "label": "VehicleUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L17"}, {"id": "db_master_data_vehicleread", "label": "VehicleRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L24"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "db_master_data_vehiclebase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L6", "weight": 1.0}, {"source": "db_master_data_vehiclebase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "db_master_data_vehiclecreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L13", "weight": 1.0}, {"source": "db_master_data_vehiclecreate", "target": "db_master_data_vehiclebase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "db_master_data_vehicleupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L17", "weight": 1.0}, {"source": "db_master_data_vehicleupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L17", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_master_data_py", "target": "db_master_data_vehicleread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L24", "weight": 1.0}, {"source": "db_master_data_vehicleread", "target": "db_master_data_vehiclebase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/master_data.py", "source_location": "L24", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_weighingslipbase", "label": "WeighingSlipBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_weighing_weighingslipcreate", "label": "WeighingSlipCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31"}, {"id": "db_weighing_weighingslipupdate", "label": "WeighingSlipUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L56"}, {"id": "db_weighing_weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L82"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "db_weighing_weighingslipbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipcreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31", "weight": 1.0}, {"source": "db_weighing_weighingslipcreate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L56", "weight": 1.0}, {"source": "db_weighing_weighingslipupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L56", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L82", "weight": 1.0}, {"source": "db_weighing_weighingslipread", "target": "db_weighing_weighingslipbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L82", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "label": "db_models.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L1"}, {"id": "models_db_models_dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9"}, {"id": "base", "label": "Base", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_db_models_dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L27"}, {"id": "models_db_models_dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L61"}, {"id": "models_db_models_dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L88"}, {"id": "models_db_models_dbsequence", "label": "DbSequence", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L125"}, {"id": "models_db_models_rationale_1", "label": "\u5730\u78c5\uff08db\uff09\u6a21\u5757\u6570\u636e\u6a21\u578b \u2014 \u5bf9\u9f50 docs/sql/db_tables.sql", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbvehicle", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9", "weight": 1.0}, {"source": "models_db_models_dbvehicle", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbpurchaseplan", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L27", "weight": 1.0}, {"source": "models_db_models_dbpurchaseplan", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L27", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbinboundoutbound", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L61", "weight": 1.0}, {"source": "models_db_models_dbinboundoutbound", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L61", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbweighingslip", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L88", "weight": 1.0}, {"source": "models_db_models_dbweighingslip", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L88", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbsequence", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "sLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_mappers_py", "label": "mappers.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L1"}, {"id": "db_mappers_fmt_date", "label": "fmt_date()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L14"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L14"}, {"id": "datetime", "label": "datetime", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L14"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L14"}, {"id": "db_mappers_fmt_datetime", "label": "fmt_datetime()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L24"}, {"id": "db_mappers_vehicle_to_read", "label": "vehicle_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L32"}, {"id": "dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L32"}, {"id": "vehicleread", "label": "VehicleRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L32"}, {"id": "db_mappers_plan_to_read", "label": "plan_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L40"}, {"id": "dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L40"}, {"id": "float", "label": "float", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L40"}, {"id": "purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L40"}, {"id": "db_mappers_plan_to_read_with_fill_link", "label": "plan_to_read_with_fill_link()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L68"}, {"id": "purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L68"}, {"id": "db_mappers_inventory_to_read", "label": "inventory_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L81"}, {"id": "dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L81"}, {"id": "inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L81"}, {"id": "db_mappers_weighing_to_read", "label": "weighing_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L100"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L100"}, {"id": "weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L100"}, {"id": "db_mappers_parse_date_str", "label": "parse_date_str()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L128"}, {"id": "db_mappers_parse_datetime_str", "label": "parse_datetime_str()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L137"}, {"id": "db_mappers_rationale_1", "label": "\u5730\u78c5 ORM \u2192 API Read \u6a21\u578b\u6620\u5c04\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_mappers_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/serviceLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "label": "plan.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L1"}, {"id": "db_plan_list_plans", "label": "list_plans()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L19"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L19"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L19"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L19"}, {"id": "db_plan_get_plan", "label": "get_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L58"}, {"id": "db_plan_create_plan", "label": "create_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L71"}, {"id": "plancreatebody", "label": "PlanCreateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L71"}, {"id": "db_plan_update_plan", "label": "update_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L95"}, {"id": "planupdatebody", "label": "PlanUpdateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L95"}, {"id": "db_plan_delete_plan", "label": "delete_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L122"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "app_core_menu_guard", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "app_core_response", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L11", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "app_schemas_db_plan", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L12", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "app_services_db_plan", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plan_py", "target": "db_plan_list_plans", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L19", "weight": 1.0}, {"source": "db_plan_list_plans", "target": "int", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plan.py", "source_location": "L19", "weight": 1.0}, {"source": "db_plan_list_plans", "target": "int", "relationLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "label": "vehicle.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L1"}, {"id": "db_vehicle_list_vehicles", "label": "list_vehicles()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L19"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L19"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L19"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L19"}, {"id": "db_vehicle_get_vehicle", "label": "get_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L44"}, {"id": "db_vehicle_create_vehicle", "label": "create_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L57"}, {"id": "vehiclecreatebody", "label": "VehicleCreateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L57"}, {"id": "db_vehicle_update_vehicle", "label": "update_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L83"}, {"id": "vehicleupdatebody", "label": "VehicleUpdateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L83"}, {"id": "db_vehicle_delete_vehicle", "label": "delete_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L110"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "app_core_menu_guard", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "app_core_response", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L11", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "app_schemas_db_vehicle", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L12", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "app_services_db_vehicle", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_vehicle_py", "target": "db_vehicle_list_vehicles", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/vehicle.py", "source_location": "L19", "weight": 1.0}, {"source": "db_vehicle_list_vehicles", "target": "int", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file"Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plans_py", "label": "plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L1"}, {"id": "db_plans_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "db_plans_list_plans", "label": "list_plans()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "db_plans_generate_plan_no", "label": "_generate_plan_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L169"}, {"id": "db_plans_create_plan", "label": "create_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L176"}, {"id": "purchaseplancreate", "label": "PurchasePlanCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L176"}, {"id": "purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L176"}, {"id": "db_plans_autogeneratemonthlyresult", "label": "AutoGenerateMonthlyResult", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L218"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_plans_run_auto_generate_monthly", "label": "run_auto_generate_monthly()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L225"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L225"}, {"id": "db_plans_get_plan", "label": "get_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L239"}, {"id": "db_plans_update_plan", "label": "update_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L250"}, {"id": "purchaseplanupdate", "label": "PurchasePlanUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L250"}, {"id": "db_plans_delete_plan", "label": "delete_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L267"}, {"id": "dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L279"}, {"id": "db_plans_get_plan_by_id_only", "label": "_get_plan_by_id_only()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L293"}, {"id": "db_plans_apply_plan_update", "label": "_apply_plan_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L307"}, {"id": "db_plans_planrelateddata", "label": "PlanRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L328"}, {"id": "db_plans_get_plan_related", "label": "get_plan_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L334"}, {"id": "db_plans_thirdpartyplanpagedata", "label": "ThirdPartyPlanPageData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L375"}, {"id": "db_plans_get_third_party_plan_page", "label": "get_third_party_plan_page()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L382"}, {"id": "db_plans_rationale_230", "label": "\u624b\u52a8\u89e6\u53d1\u8ba1\u5212\u6309\u6708\Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plans_py", "label": "plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L1"}, {"id": "db_plans_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L40"}, {"id": "db_plans_list_plans", "label": "list_plans()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L48"}, {"id": "db_plans_generate_plan_no", "label": "_generate_plan_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L169"}, {"id": "db_plans_create_plan", "label": "create_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L175"}, {"id": "purchaseplancreate", "label": "PurchasePlanCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L175"}, {"id": "purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L175"}, {"id": "db_plans_get_plan", "label": "get_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L218"}, {"id": "db_plans_update_plan", "label": "update_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L229"}, {"id": "purchaseplanupdate", "label": "PurchasePlanUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L229"}, {"id": "db_plans_delete_plan", "label": "delete_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L246"}, {"id": "dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L258"}, {"id": "db_plans_get_plan_by_id_only", "label": "_get_plan_by_id_only()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L272"}, {"id": "db_plans_apply_plan_update", "label": "_apply_plan_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L286"}, {"id": "db_plans_planrelateddata", "label": "PlanRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L307"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_plans_get_plan_related", "label": "get_plan_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L313"}, {"id": "db_plans_thirdpartyplanpagedata", "label": "ThirdPartyPlanPageData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L354"}, {"id": "db_plans_get_third_party_plan_page", "label": "get_third_party_plan_page()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L361"}, {"id": "db_plans_rationale_365", "label": "\u4e09\u65b9 H5 \u586b\u5199\u9875\u521d\u59cb\u5316\u6570\u636e\uff08\u65e0\u9700\u95e8\u6237\u767b\u5f55\uff0c\u4e0e\u539f\u7cfb\u7edf\u4e00\u81f4\uff09\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L365"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_plans_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/plans.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00codeLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "label": "db_models.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L1"}, {"id": "models_db_models_dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9"}, {"id": "base", "label": "Base", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "models_db_models_dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L27"}, {"id": "models_db_models_dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L62"}, {"id": "models_db_models_dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L91"}, {"id": "models_db_models_dbsequence", "label": "DbSequence", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L130"}, {"id": "models_db_models_rationale_1", "label": "\u5730\u78c5\uff08db\uff09\u6a21\u5757\u6570\u636e\u6a21\u578b \u2014 \u5bf9\u9f50 docs/sql/db_tables.sql", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "app_core_database", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbvehicle", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9", "weight": 1.0}, {"source": "models_db_models_dbvehicle", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbpurchaseplan", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L27", "weight": 1.0}, {"source": "models_db_models_dbpurchaseplan", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L27", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbinboundoutbound", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L62", "weight": 1.0}, {"source": "models_db_models_dbinboundoutbound", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L62", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbweighingslip", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L91", "weight": 1.0}, {"source": "models_db_models_dbweighingslip", "target": "base", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "source_location": "L91", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_models_db_models_py", "target": "models_db_models_dbsequence", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/models/db_models.py", "sLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "label": "inventory.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1"}, {"id": "db_inventory_inboundoutboundbase", "label": "InboundOutboundBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_inventory_inboundoutboundcreate", "label": "InboundOutboundCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22"}, {"id": "db_inventory_inboundoutboundupdate", "label": "InboundOutboundUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L38"}, {"id": "db_inventory_createlinkforplanpayload", "label": "CreateLinkForPlanPayload", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L54"}, {"id": "db_inventory_inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L61"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L1", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "db_inventory_inboundoutboundbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundcreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22", "weight": 1.0}, {"source": "db_inventory_inboundoutboundcreate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L22", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L38", "weight": 1.0}, {"source": "db_inventory_inboundoutboundupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L38", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_createlinkforplanpayload", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L54", "weight": 1.0}, {"source": "db_inventory_createlinkforplanpayload", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L54", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_inventory_py", "target": "db_inventory_inboundoutboundread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L61", "weight": 1.0}, {"source": "db_inventory_inboundoutboundread", "target": "db_inventory_inboundoutboundbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/inventory.py", "source_location": "L61", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_total_pages", "label": "total_pages()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L15"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L15"}, {"id": "db_weighing_parse_date", "label": "_parse_date()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L19"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L19"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L19"}, {"id": "db_weighing_parse_datetime", "label": "_parse_datetime()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L31"}, {"id": "datetime", "label": "datetime", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L31"}, {"id": "db_weighing_format_date", "label": "_format_date()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L51"}, {"id": "db_weighing_format_datetime", "label": "_format_datetime()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L57"}, {"id": "db_weighing_compute_net_weight", "label": "_compute_net_weight()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L63"}, {"id": "float", "label": "float", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L63"}, {"id": "db_weighing_has_complete_weighing", "label": "_has_complete_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L67"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L67"}, {"id": "db_weighing_partner_company", "label": "_partner_company()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L71"}, {"id": "db_weighing_row_to_dict", "label": "_row_to_dict()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L77"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L77"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L77"}, {"id": "db_weighing_weighingservice", "label": "WeighingService", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L112"}, {"id": "db_weighing_weighingservice_get_by_id", "label": ".get_by_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L114"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L114"}, {"id": "db_weighing_weighingservice_list_weighings", "label": ".list_weighings()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L128"}, {"id": "db_weighing_weighingservice_resolve_plan_fields", "label": "._resolve_plan_fields()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L212"}, {"id": "db_weighing_weighingservice_resolve_from_inventory", "label": "._resolve_from_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L246"}, {"id": "db_weighing_weighingservice_check_duplicate_inventory_link", "label": "._check_duplicate_inventory_link()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/weighing.py", "source_location": "L276"}, {Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/__init__.py", "source_location": "L1"}, {"id": "db_init_rationale_1", "label": "\u5730\u78c5\uff08db\uff09Pydantic schemas\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/__init__.py", "source_location": "L1"}], "edges": [{"source": "db_init_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_init_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/__init__.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}, {"id": "db_init_db_health", "label": "db_health()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L14"}, {"id": "db_init_rationale_1", "label": "\u5730\u78c5 API \u8def\u7531\u805a\u5408 \u2014 REST \u98ce\u683c\uff0c\u534f\u8bae\u5bf9\u9f50\u539f simple-dibang-xiaoshou\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_api_db", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "db_init_db_health", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L14", "weight": 1.0}, {"source": "db_init_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_weighingslipbase", "label": "WeighingSlipBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_weighing_weighingslipcreate", "label": "WeighingSlipCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31"}, {"id": "db_weighing_weighingslipupdate", "label": "WeighingSlipUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L56"}, {"id": "db_weighing_weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L82"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "db_weighing_weighingslipbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipcreate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31", "weight": 1.0}, {"source": "db_weighing_weighingslipcreate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipupdate", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L56", "weight": 1.0}, {"source": "db_weighing_weighingslipupdate", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L56", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L82", "weight": 1.0}, {"source": "db_weighing_weighingslipread", "target": "db_weighing_weighingslipbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L82", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_inventory_id_py", "label": "inventory_id.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L1"}, {"id": "db_inventory_id_max_numeric_inbound_outbound_id", "label": "max_numeric_inbound_outbound_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L15"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L15"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L15"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L15"}, {"id": "db_inventory_id_ensure_sequence_row", "label": "_ensure_sequence_row()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L32"}, {"id": "db_inventory_id_allocate_inbound_outbound_id", "label": "_allocate_inbound_outbound_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L56"}, {"id": "db_inventory_id_next_inbound_outbound_id", "label": "next_inbound_outbound_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L73"}, {"id": "db_inventory_id_rationale_1", "label": "\u51fa\u5165\u5e93\u5355 id \u751f\u6210 \u2014 \u79df\u6237\u5185\u7eaf\u6570\u5b57\u81ea\u589e\uff0c\u5e76\u53d1\u5b89\u5168\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L1"}, {"id": "db_inventory_id_rationale_16", "label": "\u5f53\u524d\u79df\u6237\u4e0b\u7eaf\u6570\u5b57 id \u7684\u6700\u5927\u503c\uff08\u4e0d\u542b UUID \u7b49\u975e\u6570\u5b57\u4e3b\u952e\uff09\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L16"}, {"id": "db_inventory_id_rationale_74", "label": "\u5206\u914d\u4e0b\u4e00\u6761\u51fa\u5165\u5e93\u5355 id\uff08\u7eaf\u6570\u5b57\u5b57\u7b26\u4e32\uff09\u3002 \u4f7f\u7528 db_sequence \u884c\u9501 + next_val \u9012\u589e\uff0c\u907f\u514d\u5e76\u53d1\u4e0b\u91cd\u590d id\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L74"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_inventory_id_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_inventory_id_py", "target": "sqlalchemy_exc", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_inventory_id_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_inventory_id_py", "target": "app_core_utils", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L8", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_inventory_id_py", "target": "app_models_db_models", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_inventory_id_py", "target": "db_inventory_id_max_numeric_inbound_outbound_id", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/inventory_id.py", "source_location": "L15", "weight": 1.0}, {"source": "db_inventory_id_max_numeric_inbound_outbound_id", "target": "session", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_scripts_migrate_dibang_data_py", "label": "migrate_dibang_data.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L1"}, {"id": "scripts_migrate_dibang_data_migrationstats", "label": "MigrationStats", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L59"}, {"id": "scripts_migrate_dibang_data_parse_date", "label": "parse_date()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L67"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L67"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L67"}, {"id": "scripts_migrate_dibang_data_parse_datetime", "label": "parse_datetime()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L83"}, {"id": "datetime", "label": "datetime", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L83"}, {"id": "scripts_migrate_dibang_data_clip_text", "label": "clip_text()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L107"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L107"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L107"}, {"id": "scripts_migrate_dibang_data_fetch_rows", "label": "fetch_rows()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L117"}, {"id": "engine", "label": "Engine", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L117"}, {"id": "scripts_migrate_dibang_data_count_rows", "label": "count_rows()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L123"}, {"id": "scripts_migrate_dibang_data_map_id", "label": "map_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L128"}, {"id": "scripts_migrate_dibang_data_build_id_maps", "label": "build_id_maps()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L148"}, {"id": "scripts_migrate_dibang_data_transform_vehicle", "label": "transform_vehicle()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L155"}, {"id": "scripts_migrate_dibang_data_transform_plan", "label": "transform_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L172"}, {"id": "scripts_migrate_dibang_data_transform_inventory", "label": "transform_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L213"}, {"id": "scripts_migrate_dibang_data_transform_weighing", "label": "transform_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L251"}, {"id": "scripts_migrate_dibang_data_truncate_target_tables", "label": "truncate_target_tables()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L369"}, {"id": "scripts_migrate_dibang_data_export_mapping", "label": "export_mapping()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L377"}, {"id": "path", "label": "Path", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L377"}, {"id": "scripts_migrate_dibang_data_print_report", "label": "print_report()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L385"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/scripts/migrate_dibang_data.py", "source_location": "L385"}, {"id": "scripts_migrLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_base_query", "label": "_base_query()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L34"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L34"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L34"}, {"id": "db_weighing_get_weighing", "label": "_get_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L42"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L42"}, {"id": "db_weighing_apply_weighing_update", "label": "_apply_weighing_update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L60"}, {"id": "db_weighing_list_weighing", "label": "list_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L82"}, {"id": "dbusercontext", "label": "DbUserContext", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L82"}, {"id": "weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L82"}, {"id": "db_weighing_create_weighing", "label": "create_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L170"}, {"id": "weighingslipcreate", "label": "WeighingSlipCreate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L170"}, {"id": "db_weighing_update_weighing", "label": "update_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L280"}, {"id": "weighingslipupdate", "label": "WeighingSlipUpdate", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L280"}, {"id": "db_weighing_void_weighing", "label": "void_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L307"}, {"id": "db_weighing_delete_weighing", "label": "delete_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L328"}, {"id": "db_weighing_weighingrelateddata", "label": "WeighingRelatedData", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L341"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_weighing_get_weighing_related", "label": "get_weighing_related()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L347"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/weighing.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_weighing_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_product_helpers_py", "label": "product_helpers.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L1"}, {"id": "db_product_helpers_productsnapshot", "label": "ProductSnapshot", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L13"}, {"id": "db_product_helpers_resolve_crm_product", "label": "resolve_crm_product()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L19"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L19"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L19"}, {"id": "db_product_helpers_apply_product_snapshot_to_plan", "label": "apply_product_snapshot_to_plan()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L51"}, {"id": "db_product_helpers_apply_product_snapshot_to_inventory", "label": "apply_product_snapshot_to_inventory()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L57"}, {"id": "db_product_helpers_apply_product_snapshot_to_weighing", "label": "apply_product_snapshot_to_weighing()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L63"}, {"id": "db_product_helpers_rationale_1", "label": "\u5730\u78c5\u6a21\u5757 \u2014 CRM \u4ea7\u54c1\u89e3\u6790\u4e0e\u5feb\u7167\u5199\u5165\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L1"}, {"id": "db_product_helpers_rationale_20", "label": "\u6821\u9a8c CRM \u4ea7\u54c1\u5e76\u8fd4\u56de\u540d\u79f0/\u89c4\u683c\u5feb\u7167\u3002\u65b0\u5efa\u5355\u636e product_id \u5fc5\u586b\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L20"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_product_helpers_py", "target": "dataclasses", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_product_helpers_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_product_helpers_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_product_helpers_py", "target": "app_crud_crm_product", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_product_helpers_py", "target": "db_product_helpers_productsnapshot", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L13", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_product_helpers_py", "target": "db_product_helpers_resolve_crm_product", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L19", "weight": 1.0}, {"source": "db_product_helpers_resolve_crm_product", "target": "session", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/product_helpers.py", "source_location": "L19", "weight": 1.0}, {"source": "db_product_helpers_resolve_crm_product", "target": "str", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_vehicle_py", "label": "vehicle.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L1"}, {"id": "db_vehicle_total_pages", "label": "total_pages()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L13"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L13"}, {"id": "db_vehicle_row_to_dict", "label": "_row_to_dict()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L17"}, {"id": "dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L17"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L17"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L17"}, {"id": "db_vehicle_normalize_vehicle_no", "label": "_normalize_vehicle_no()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L32"}, {"id": "db_vehicle_vehicle_no_exists", "label": "vehicle_no_exists()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L36"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L36"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L36"}, {"id": "db_vehicle_vehicleservice", "label": "VehicleService", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L56"}, {"id": "db_vehicle_vehicleservice_get_by_id", "label": ".get_by_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L58"}, {"id": "db_vehicle_vehicleservice_list_vehicles", "label": ".list_vehicles()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L63"}, {"id": "db_vehicle_vehicleservice_create", "label": ".create()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L87"}, {"id": "db_vehicle_vehicleservice_update", "label": ".update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L117"}, {"id": "db_vehicle_vehicleservice_soft_delete", "label": ".soft_delete()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L154"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_vehicle_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_vehicle_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_vehicle_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_vehicle_py", "target": "app_models_db_models", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L9", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_vehicle_py", "target": "app_services_db_base", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/vehicle.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_vehicle_py", "target": Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "label": "auto_generate_plans.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L1"}, {"id": "db_auto_generate_plans_month_range", "label": "month_range()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L17"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L17"}, {"id": "db_auto_generate_plans_get_last_month_range", "label": "get_last_month_range()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L28"}, {"id": "db_auto_generate_plans_run_auto_generate_monthly_plans", "label": "run_auto_generate_monthly_plans()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L35"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L35"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L35"}, {"id": "db_auto_generate_plans_rationale_1", "label": "\u5730\u78c5\u8ba1\u5212\u6309\u6708\u81ea\u52a8\u751f\u6210 \u2014 \u8fc1\u79fb\u81ea simple-dibang-xiaoshou/auto-create-plan/auto_create_monthly_pla", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L1"}, {"id": "db_auto_generate_plans_rationale_41", "label": "\u6309\u6708\u81ea\u52a8\u751f\u6210\u91c7\u8d2d\u8ba1\u5212\u3002 - \u9ed8\u8ba4\u4ec5\u5728\u6bcf\u6708 1 \u65e5\u6267\u884c\uff08force=True \u65f6\u8df3\u8fc7\u8be5\u9650\u5236\uff0c\u4f9b\u624b\u52a8\u89e6\u53d1\u9a8c\u6536\uff09 - \u904d\u5386\u6240\u6709\u79df\u6237\uff0c\u6309\u4e0a\u6708\u8ba1\u5212\u6a21\u677f\u751f", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L41"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "target": "logging", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "target": "datetime", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "target": "sqlalchemy", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L8", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "target": "app_core_utils", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "target": "app_models_db_models", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L11", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "target": "app_services_db_plan_helpers", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/auto_generate_plans.py", "source_location": "L12", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_auto_generate_plans_py", "target": "db_auto_generate_plans_month_range", "relation": Line truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L1"}, {"id": "db_init_db_health", "label": "db_health()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L15"}, {"id": "db_init_rationale_16", "label": "P0 \u5065\u5eb7\u68c0\u67e5\uff1a\u9a8c\u8bc1 db \u8def\u7531\u5df2\u6302\u8f7d\u4e14\u54cd\u5e94\u534f\u8bae\u4e3a code=0\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L16"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "fastapi", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_api_db", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "app_schemas_bx_common", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L5", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_api_db_init_py", "target": "db_init_db_health", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L15", "weight": 1.0}, {"source": "db_init_rationale_16", "target": "db_init_db_health", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L16", "weight": 1.0}], "raw_calls": [{"caller_nid": "db_init_db_health", "callee": "ApiResponse", "is_member_call": false, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/api/db/__init__.py", "source_location": "L17"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_init_py", "label": "__init__.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L1"}, {"id": "tasks_init_init_scheduled_tasks", "label": "init_scheduled_tasks()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L10"}, {"id": "tasks_init_shutdown_scheduler", "label": "shutdown_scheduler()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L63"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_init_py", "target": "logging", "relation": "imports", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_init_py", "target": "apscheduler_schedulers_background", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_init_py", "target": "tasks_init_init_scheduled_tasks", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L10", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_tasks_init_py", "target": "tasks_init_shutdown_scheduler", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L63", "weight": 1.0}], "raw_calls": [{"caller_nid": "tasks_init_init_scheduled_tasks", "callee": "start", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L14"}, {"caller_nid": "tasks_init_init_scheduled_tasks", "callee": "info", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L15"}, {"caller_nid": "tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L25"}, {"caller_nid": "tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L31"}, {"caller_nid": "tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L37"}, {"caller_nid": "tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L43"}, {"caller_nid": "tasks_init_init_scheduled_tasks", "callee": "add_job", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L49"}, {"caller_nid": "tasks_init_init_scheduled_tasks", "callee": "info", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L55"}, {"caller_nid": "tasks_init_shutdown_scheduler", "callee": "shutdown", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L65"}, {"caller_nid": "tasks_init_shutdown_scheduler", "callee": "info", "is_member_call": true, "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/tasks/__init__.py", "source_location": "L66"}]}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_base_py", "label": "base.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L1"}, {"id": "db_base_dbcrudservice", "label": "DbCrudService", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L13"}, {"id": "db_base_dbcrudservice_get_by_id", "label": ".get_by_id()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L15"}, {"id": "m", "label": "M", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L15"}, {"id": "session", "label": "Session", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L15"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L15"}, {"id": "db_base_dbcrudservice_get_paged", "label": ".get_paged()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L22"}, {"id": "int", "label": "int", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L22"}, {"id": "any", "label": "Any", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L22"}, {"id": "db_base_dbcrudservice_create", "label": ".create()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L44"}, {"id": "db_base_dbcrudservice_update", "label": ".update()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L64"}, {"id": "db_base_dbcrudservice_soft_delete", "label": ".soft_delete()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L84"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L84"}, {"id": "db_base_rationale_1", "label": "\u5730\u78c5\u6a21\u5757 Service \u57fa\u7c7b \u2014 \u79df\u6237\u9694\u79bb + UUID + \u8f6f\u5220\u9664\u3002", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_base_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_base_py", "target": "sqlalchemy_orm", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_base_py", "target": "app_core_utils", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L8", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_base_py", "target": "db_base_dbcrudservice", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L13", "weight": 1.0}, {"source": "db_base_dbcrudservice", "target": "db_base_dbcrudservice_get_by_id", "relation": "method", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L15", "weight": 1.0}, {"source": "db_base_dbcrudservice_get_by_id", "target": "m", "relation": "references", "context": "generic_arg", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L15", "weight": 1.0}, {"source": "db_base_dbcrudservice_get_by_id", "target": "session", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L15", "weight": 1.0}, {"source": "db_base_dbcrudservice_get_by_id", "target": "str", "relation": "references", "context": "parameter_type", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/base.py", "source_location": "L15", "weight": 1.0}, {"soLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "label": "weighing.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L1"}, {"id": "db_weighing_weighingslipbase", "label": "WeighingSlipBase", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_weighing_weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L3", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipbase", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "db_weighing_weighingslipbase", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L6", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_weighing_py", "target": "db_weighing_weighingslipread", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31", "weight": 1.0}, {"source": "db_weighing_weighingslipread", "target": "db_weighing_weighingslipbase", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/weighing.py", "source_location": "L31", "weight": 1.0}], "raw_calls": []}
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_services_db_mappers_py", "label": "mappers.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L1"}, {"id": "db_mappers_fmt_date", "label": "fmt_date()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L17"}, {"id": "date", "label": "date", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L17"}, {"id": "datetime", "label": "datetime", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L17"}, {"id": "str", "label": "str", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L17"}, {"id": "db_mappers_fmt_datetime", "label": "fmt_datetime()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L27"}, {"id": "db_mappers_vehicle_to_read", "label": "vehicle_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L35"}, {"id": "dbvehicle", "label": "DbVehicle", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L35"}, {"id": "vehicleread", "label": "VehicleRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L35"}, {"id": "db_mappers_plan_to_read", "label": "plan_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L43"}, {"id": "dbpurchaseplan", "label": "DbPurchasePlan", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L43"}, {"id": "float", "label": "float", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L43"}, {"id": "purchaseplanread", "label": "PurchasePlanRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L43"}, {"id": "db_mappers_plan_to_read_with_fill_link", "label": "plan_to_read_with_fill_link()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L72"}, {"id": "purchaseplanwithfilllink", "label": "PurchasePlanWithFillLink", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L72"}, {"id": "db_mappers_is_empty_inventory_date", "label": "is_empty_inventory_date()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L85"}, {"id": "bool", "label": "bool", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L85"}, {"id": "db_mappers_inventory_date_to_api", "label": "inventory_date_to_api()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L89"}, {"id": "db_mappers_inventory_to_read", "label": "inventory_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L95"}, {"id": "dbinboundoutbound", "label": "DbInboundOutbound", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L95"}, {"id": "dbweighingslip", "label": "DbWeighingSlip", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L95"}, {"id": "inboundoutboundread", "label": "InboundOutboundRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L95"}, {"id": "db_mappers_weighing_to_read", "label": "weighing_to_read()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L144"}, {"id": "weighingslipread", "label": "WeighingSlipRead", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L144"}, {"id": "db_mappers_datetime_end_of_day", "label": "datetime_end_of_day()", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/services/db/mappers.py", "source_location": "L175"}, {"id": "db_mappers_parse_date_str", "label": "parse_date_str()", "file_type": "code", "source_file": "/Users/zLine truncated
@@ -0,0 +1 @@
{"nodes": [{"id": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_vehicle_py", "label": "vehicle.py", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L1"}, {"id": "db_vehicle_vehiclecreatebody", "label": "VehicleCreateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L7"}, {"id": "basemodel", "label": "BaseModel", "file_type": "code", "source_file": "", "source_location": ""}, {"id": "db_vehicle_vehicleupdatebody", "label": "VehicleUpdateBody", "file_type": "code", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L13"}, {"id": "db_vehicle_rationale_1", "label": "\u5730\u78c5-\u8f66\u724c Pydantic schemas", "file_type": "rationale", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L1"}], "edges": [{"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_vehicle_py", "target": "typing", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L2", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_vehicle_py", "target": "pydantic", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L4", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_vehicle_py", "target": "db_vehicle_vehiclecreatebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L7", "weight": 1.0}, {"source": "db_vehicle_vehiclecreatebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L7", "weight": 1.0}, {"source": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_vehicle_py", "target": "db_vehicle_vehicleupdatebody", "relation": "contains", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L13", "weight": 1.0}, {"source": "db_vehicle_vehicleupdatebody", "target": "basemodel", "relation": "inherits", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L13", "weight": 1.0}, {"source": "db_vehicle_rationale_1", "target": "users_zlwu_work_00code_shanxia2_0_backend_app_schemas_db_vehicle_py", "relation": "rationale_for", "confidence": "EXTRACTED", "source_file": "/Users/zlwu/work/00code/shanxia2.0/backend/app/schemas/db/vehicle.py", "source_location": "L1", "weight": 1.0}], "raw_calls": []}
Loaded 100 of 176 files, more files were not shown because too many files have changed in this diff. Show more