refactor: 重构工艺工序相关命名与数据模型
1. 全局替换"工序"为"工艺"统一术语,包括页面文案、枚举、注释
2. 重构工单与工件工艺数据模型:
- 新增工艺组合表flow_material作为备料/齐套唯一源头
- 新增工位状态表station_state支持自主停单/恢复接单
- 移除station_process派工表,改用工单工艺组合作为路线唯一源头
- 替换processCode为flowId作为工艺关联标识
- 重构工件当前进度字段为currentStationNo
3. 删除冗余的静态备份资源文件
4. 调整物料选择组件默认启用仅显示激活物料
5. 优化工单创建/编辑逻辑,新增工艺组合校验与保存
This commit is contained in:
@@ -97,10 +97,11 @@ type ProductTypeRow struct {
|
||||
Name string `json:"name"`
|
||||
Spec string `json:"spec"`
|
||||
Unit string `json:"unit"`
|
||||
Category string `json:"category"`
|
||||
IsActive bool `json:"isActive"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
UpdatedAt int64 `json:"updatedAt"`
|
||||
Category string `json:"category"`
|
||||
ManageMode int `json:"manageMode"` // 1结构件(批次)/2电气件(SN)
|
||||
IsActive bool `json:"isActive"`
|
||||
CreatedAt int64 `json:"createdAt"`
|
||||
UpdatedAt int64 `json:"updatedAt"`
|
||||
}
|
||||
|
||||
// get 调 WMS GET 接口并解出 {code,data}
|
||||
@@ -199,16 +200,16 @@ func (c *Client) ProductTypePage(ctx context.Context, code, name, category, isAc
|
||||
|
||||
// CreateProductType 新建产品型号(code 可空由 WMS 自动生成 PROD-日期-流水)
|
||||
// spec/unit 必填(与 WMS 物料档案必填口径一致)
|
||||
func (c *Client) CreateProductType(ctx context.Context, code, name, spec, unit, category string, isActive bool) error {
|
||||
func (c *Client) CreateProductType(ctx context.Context, code, name, spec, unit, category string, isActive bool, manageMode int) error {
|
||||
return c.post(ctx, "/api/internal/product-types", map[string]any{
|
||||
"code": code, "name": name, "spec": spec, "unit": unit, "category": category, "isActive": isActive,
|
||||
"code": code, "name": name, "spec": spec, "unit": unit, "category": category, "isActive": isActive, "manageMode": manageMode,
|
||||
})
|
||||
}
|
||||
|
||||
// UpdateProductType 修改产品型号(编码不可改)
|
||||
func (c *Client) UpdateProductType(ctx context.Context, id int, name, spec, unit, category string, isActive bool) error {
|
||||
func (c *Client) UpdateProductType(ctx context.Context, id int, name, spec, unit, category string, isActive bool, manageMode int) error {
|
||||
return c.putJSON(ctx, "/api/internal/product-types", map[string]any{
|
||||
"id": id, "name": name, "spec": spec, "unit": unit, "category": category, "isActive": isActive,
|
||||
"id": id, "name": name, "spec": spec, "unit": unit, "category": category, "isActive": isActive, "manageMode": manageMode,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user