Files
shanxia2.0/backend/app/services/db/plan_helpers.py
T
2026-06-10 22:59:34 +08:00

15 lines
386 B
Python

"""地磅计划辅助函数。"""
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 "待出库"