feat(server): add GET /attachment/status with derived boxed qty
Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,8 @@ from sqlalchemy.orm import Session
|
||||
|
||||
from app.core.database import get_db
|
||||
from app.models.attachment import AttachmentCategory
|
||||
from app.schemas.attachment import CategoryResponse
|
||||
from app.schemas.attachment import AttachmentStatusResponse, CategoryResponse
|
||||
from app.services.attachment_service import get_attachment_status
|
||||
|
||||
router = APIRouter(tags=["attachment"])
|
||||
|
||||
@@ -20,3 +21,8 @@ def list_categories(db: Session = Depends(get_db)):
|
||||
return [
|
||||
CategoryResponse(id=r.id, name=r.name, sort_order=r.sort_order) for r in rows
|
||||
]
|
||||
|
||||
|
||||
@router.get("/attachment/status", response_model=AttachmentStatusResponse)
|
||||
def attachment_status(zongpai_no: str, db: Session = Depends(get_db)):
|
||||
return get_attachment_status(db, zongpai_no)
|
||||
|
||||
Reference in New Issue
Block a user