docs: 统一修正全项目“SN管理”相关术语为“序列号”

本次 commit 统一修正了全项目范围内关于 SN 管理的术语表述,将原“SN管理”、“序列号件”、“批次件”等表述调整为“序列号”、“序列号=是”、“序列号=否”,同时同步更新了相关文档、代码注释、前端提示文本、数据库 schema 注释、API 文档等,确保全链路术语统一,消除理解歧义。
This commit is contained in:
SunYF
2026-10-10 15:58:59 +08:00
parent b032f47fc7
commit 8be6e03a15
335 changed files with 5742 additions and 1616 deletions
+11 -8
View File
@@ -179,7 +179,7 @@ type FinishedPayload struct {
OrderNo string
Operator string
ProductStatus string // 完工检结论:已通过 / 部分通过(不合格不触发本接口)
QualityStatus string // 质量状态:合格(默认)/让步接收(CONCESSION,可发货但标记)
QualityStatus string // 质量状态:合格(默认)/不合格/未检/待退
RelatedStandard string // 相关标准(无则传空)
TestRecordNo string // 试验记录单号(无则传空)
OwnershipType string // 归属类型:workorder=合同号/project=科技项目号/other=其他
@@ -275,7 +275,7 @@ type ProductTypeRow struct {
Unit string `json:"unit"`
Category string `json:"category"`
ManageMode int `json:"manageMode"` // 类型 1结构件/2电气件/3其他
SnMode int `json:"snMode"` // 是否逐件SN管理 0未选择/1序列号件(录SN)/2批次件(不录SN)
SnMode int `json:"snMode"` // 是否逐件SN管理 0未选择/1序列号=是(录SN)/2序列号=否(不录SN)
IsActive bool `json:"isActive"`
// SyncPending 推送 WMS 失败标记(两库对等 M3):true=本地已落、WMS 待重推
SyncPending bool `json:"syncPending"`
@@ -317,7 +317,7 @@ func (c *Client) get(ctx context.Context, path string, out any) error {
// ExportProductTypes 拉取产品型号导出 xlsx 字节流(WMS 端执行统一导出时间规则)。
// 编码/名称各自独立模糊筛选(禁止关键字混搜)。
func (c *Client) ExportProductTypes(ctx context.Context, code, name, isActive, startDate, endDate string) ([]byte, error) {
func (c *Client) ExportProductTypes(ctx context.Context, code, name, spec, isActive, startDate, endDate string) ([]byte, error) {
q := "/api/internal/product-types/export?"
if code != "" {
q += "code=" + url.QueryEscape(code) + "&"
@@ -325,6 +325,9 @@ func (c *Client) ExportProductTypes(ctx context.Context, code, name, isActive, s
if name != "" {
q += "name=" + url.QueryEscape(name) + "&"
}
if spec != "" {
q += "spec=" + url.QueryEscape(spec) + "&"
}
if isActive != "" {
q += "isActive=" + isActive + "&"
}
@@ -446,7 +449,7 @@ type ProducibleDemand struct {
Future5Qty int `json:"future5Qty"`
}
// MaterialTypes 批量查询物料在 WMS 的品类(1原材料/2半成品/3成品/4其他)。
// MaterialTypes 批量查询物料在 WMS 的物料类别(1原材料/2半成品/3成品/4其他)。
// 供产品物料清单递归展开使用:成品子项需继续向下展开到原材料/外购件。
// WMS 不可达返回 err,由调用方按"全部视为叶子物料"降级(不阻塞产线)。
func (c *Client) MaterialTypes(ctx context.Context, codes []string) (map[string]int, error) {
@@ -479,7 +482,7 @@ func (c *Client) MaterialTypes(ctx context.Context, codes []string) (map[string]
if body.Msg != "" {
return nil, errors.New(body.Msg)
}
return nil, errors.New("WMS 查询物料品类失败")
return nil, errors.New("WMS 查询物料物料类别失败")
}
if body.Data.Types == nil {
return map[string]int{}, nil
@@ -488,7 +491,7 @@ func (c *Client) MaterialTypes(ctx context.Context, codes []string) (map[string]
}
// MaterialManageModes 批量查询物料在 WMS 的「类型」(manage_mode: 1结构件/2电气件/3其他)。
// 与 MaterialTypes(品类 item_type)相互独立:品类=成品/组件类,类型=结构件/电气件/其他。
// 与 MaterialTypes(物料类别 item_type)相互独立:物料类别=成品/组件类,类型=结构件/电气件/其他。
// WMS 不可达返回 err,由调用方降级(不阻塞产线)。
func (c *Client) MaterialManageModes(ctx context.Context, codes []string) (map[string]int, error) {
b, err := json.Marshal(map[string]any{"codes": codes})
@@ -802,7 +805,7 @@ type MaterialRow struct {
Description string `json:"description"`
ItemType int `json:"itemType"`
ManageMode int `json:"manageMode"` // 类型 1结构件/2电气件/3其他
SnMode int `json:"snMode"` // 是否逐件SN管理 0未选择/1序列号件/2批次件(WMS 侧未改造时缺省 0)
SnMode int `json:"snMode"` // 是否逐件SN管理 0未选择/1序列号=是/2序列号=否(WMS 侧未改造时缺省 0)
TemplateCode string `json:"templateCode"`
SafetyStock int `json:"safetyStock"`
IsActive bool `json:"isActive"`
@@ -847,7 +850,7 @@ type MaterialUpsert struct {
Description string `json:"description"`
ItemType int `json:"itemType"`
ManageMode int `json:"manageMode"` // 类型 1结构件/2电气件/3其他
SnMode int `json:"snMode"` // 是否逐件SN管理 1序列号件/2批次件(与 WMS 并行改造,字段契约一致)
SnMode int `json:"snMode"` // 是否逐件SN管理 1序列号=是/2序列号=否(与 WMS 并行改造,字段契约一致)
TemplateCode string `json:"templateCode"`
SafetyStock int `json:"safetyStock"`
IsActive *bool `json:"isActive"`