feat(pl): allow optional stop/product ids on plan write bodies.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
9e2f563a04
commit
ca14bb7ca5
2 files changed
+4
-1
No files matched your search
@@ -53,6 +53,7 @@ class PlanProductBase(BaseModel):
|
||||
|
||||
|
||||
class PlanProductCreate(PlanProductBase):
|
||||
id: Optional[str] = Field(default=None, description="已有计划产品行ID;编辑回传以保留主键")
|
||||
model_config = {"populate_by_name": True}
|
||||
|
||||
|
||||
@@ -141,6 +142,7 @@ class PlanStopProductRead(PlanStopProductBody):
|
||||
|
||||
|
||||
class PlanLoadBody(BaseModel):
|
||||
id: Optional[str] = Field(default=None, description="已有段ID;编辑回传以保留主键")
|
||||
customer_id: Optional[str] = Field(default=None, alias="customerId", description="装货客户ID")
|
||||
customer_name: Optional[str] = Field(default=None, max_length=200, alias="customerName", description="装货客户名称")
|
||||
address: Optional[str] = Field(default=None, max_length=500, description="装货地址")
|
||||
@@ -160,6 +162,7 @@ class PlanLoadBody(BaseModel):
|
||||
|
||||
|
||||
class PlanDeliveryBody(BaseModel):
|
||||
id: Optional[str] = Field(default=None, description="已有段ID;编辑回传以保留主键")
|
||||
seq: int = Field(default=1, description="顺序号(打印、链接展示)")
|
||||
customer_id: Optional[str] = Field(default=None, alias="customerId", description="送货客户ID")
|
||||
customer_name: Optional[str] = Field(default=None, max_length=200, alias="customerName", description="送货客户名称")
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 运输计划段次稳定 ID + 外围单据就地复用
|
||||
|
||||
**日期:** 2026-09-05
|
||||
**状态:** 待审阅(brainstorming 已确认方案 3)
|
||||
**状态:** 已确认
|
||||
**触发案例:** 生产 `PO20260904024` — 库内已有地磅单,详情「送货」段显示「暂无关联地磅单」
|
||||
**相关:** `2026-08-26-pl-multi-stop-redesign-design.md`、`2026-08-30-pl-plan-save-sync-dibang-date-design.md`、`2026-06-20-pl-arrange-dibang-design.md`
|
||||
|
||||
|
||||
Reference in new issue
Block a user