refactor: 重构工艺工序相关命名与数据模型

1.  全局替换"工序"为"工艺"统一术语,包括页面文案、枚举、注释
2.  重构工单与工件工艺数据模型:
    - 新增工艺组合表flow_material作为备料/齐套唯一源头
    - 新增工位状态表station_state支持自主停单/恢复接单
    - 移除station_process派工表,改用工单工艺组合作为路线唯一源头
    - 替换processCode为flowId作为工艺关联标识
    - 重构工件当前进度字段为currentStationNo
3.  删除冗余的静态备份资源文件
4.  调整物料选择组件默认启用仅显示激活物料
5.  优化工单创建/编辑逻辑,新增工艺组合校验与保存
This commit is contained in:
SunYF
2026-09-22 11:32:29 +08:00
parent 932700ca65
commit d609ff8a9e
185 changed files with 8623 additions and 4501 deletions
-10
View File
@@ -27,8 +27,6 @@ const (
FieldUnit = "unit"
// FieldManageMode holds the string denoting the managemode field in the database.
FieldManageMode = "manage_mode"
// FieldProcessCode holds the string denoting the processcode field in the database.
FieldProcessCode = "process_code"
// FieldUnitQty holds the string denoting the unitqty field in the database.
FieldUnitQty = "unit_qty"
// FieldLossRate holds the string denoting the lossrate field in the database.
@@ -55,7 +53,6 @@ var Columns = []string{
FieldSpec,
FieldUnit,
FieldManageMode,
FieldProcessCode,
FieldUnitQty,
FieldLossRate,
FieldRelatedStandard,
@@ -101,8 +98,6 @@ var (
DefaultManageMode string
// ManageModeValidator is a validator for the "manageMode" field. It is called by the builders before save.
ManageModeValidator func(string) error
// DefaultProcessCode holds the default value on creation for the "processCode" field.
DefaultProcessCode int
// DefaultUnitQty holds the default value on creation for the "unitQty" field.
DefaultUnitQty float64
// DefaultLossRate holds the default value on creation for the "lossRate" field.
@@ -162,11 +157,6 @@ func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
}
// ByProcessCode orders the results by the processCode field.
func ByProcessCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProcessCode, opts...).ToFunc()
}
// ByUnitQty orders the results by the unitQty field.
func ByUnitQty(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldUnitQty, opts...).ToFunc()
-45
View File
@@ -89,11 +89,6 @@ func ManageMode(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldManageMode, v))
}
// ProcessCode applies equality check predicate on the "processCode" field. It's identical to ProcessCodeEQ.
func ProcessCode(v int) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldProcessCode, v))
}
// UnitQty applies equality check predicate on the "unitQty" field. It's identical to UnitQtyEQ.
func UnitQty(v float64) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldUnitQty, v))
@@ -574,46 +569,6 @@ func ManageModeContainsFold(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldContainsFold(FieldManageMode, v))
}
// ProcessCodeEQ applies the EQ predicate on the "processCode" field.
func ProcessCodeEQ(v int) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldProcessCode, v))
}
// ProcessCodeNEQ applies the NEQ predicate on the "processCode" field.
func ProcessCodeNEQ(v int) predicate.BomItem {
return predicate.BomItem(sql.FieldNEQ(FieldProcessCode, v))
}
// ProcessCodeIn applies the In predicate on the "processCode" field.
func ProcessCodeIn(vs ...int) predicate.BomItem {
return predicate.BomItem(sql.FieldIn(FieldProcessCode, vs...))
}
// ProcessCodeNotIn applies the NotIn predicate on the "processCode" field.
func ProcessCodeNotIn(vs ...int) predicate.BomItem {
return predicate.BomItem(sql.FieldNotIn(FieldProcessCode, vs...))
}
// ProcessCodeGT applies the GT predicate on the "processCode" field.
func ProcessCodeGT(v int) predicate.BomItem {
return predicate.BomItem(sql.FieldGT(FieldProcessCode, v))
}
// ProcessCodeGTE applies the GTE predicate on the "processCode" field.
func ProcessCodeGTE(v int) predicate.BomItem {
return predicate.BomItem(sql.FieldGTE(FieldProcessCode, v))
}
// ProcessCodeLT applies the LT predicate on the "processCode" field.
func ProcessCodeLT(v int) predicate.BomItem {
return predicate.BomItem(sql.FieldLT(FieldProcessCode, v))
}
// ProcessCodeLTE applies the LTE predicate on the "processCode" field.
func ProcessCodeLTE(v int) predicate.BomItem {
return predicate.BomItem(sql.FieldLTE(FieldProcessCode, v))
}
// UnitQtyEQ applies the EQ predicate on the "unitQty" field.
func UnitQtyEQ(v float64) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldUnitQty, v))