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
+14 -14
View File
@@ -142,16 +142,16 @@ func (_c *MaterialRequestCreate) SetNillableStationNo(v *int) *MaterialRequestCr
return _c
}
// SetProcessCode sets the "processCode" field.
func (_c *MaterialRequestCreate) SetProcessCode(v int) *MaterialRequestCreate {
_c.mutation.SetProcessCode(v)
// SetFlowId sets the "flowId" field.
func (_c *MaterialRequestCreate) SetFlowId(v int) *MaterialRequestCreate {
_c.mutation.SetFlowId(v)
return _c
}
// SetNillableProcessCode sets the "processCode" field if the given value is not nil.
func (_c *MaterialRequestCreate) SetNillableProcessCode(v *int) *MaterialRequestCreate {
// SetNillableFlowId sets the "flowId" field if the given value is not nil.
func (_c *MaterialRequestCreate) SetNillableFlowId(v *int) *MaterialRequestCreate {
if v != nil {
_c.SetProcessCode(*v)
_c.SetFlowId(*v)
}
return _c
}
@@ -407,9 +407,9 @@ func (_c *MaterialRequestCreate) defaults() {
v := materialrequest.DefaultStationNo
_c.mutation.SetStationNo(v)
}
if _, ok := _c.mutation.ProcessCode(); !ok {
v := materialrequest.DefaultProcessCode
_c.mutation.SetProcessCode(v)
if _, ok := _c.mutation.FlowId(); !ok {
v := materialrequest.DefaultFlowId
_c.mutation.SetFlowId(v)
}
if _, ok := _c.mutation.SentQty(); !ok {
v := materialrequest.DefaultSentQty
@@ -545,8 +545,8 @@ func (_c *MaterialRequestCreate) check() error {
if _, ok := _c.mutation.StationNo(); !ok {
return &ValidationError{Name: "stationNo", err: errors.New(`ent: missing required field "MaterialRequest.stationNo"`)}
}
if _, ok := _c.mutation.ProcessCode(); !ok {
return &ValidationError{Name: "processCode", err: errors.New(`ent: missing required field "MaterialRequest.processCode"`)}
if _, ok := _c.mutation.FlowId(); !ok {
return &ValidationError{Name: "flowId", err: errors.New(`ent: missing required field "MaterialRequest.flowId"`)}
}
if _, ok := _c.mutation.SentQty(); !ok {
return &ValidationError{Name: "sentQty", err: errors.New(`ent: missing required field "MaterialRequest.sentQty"`)}
@@ -695,9 +695,9 @@ func (_c *MaterialRequestCreate) createSpec() (*MaterialRequest, *sqlgraph.Creat
_spec.SetField(materialrequest.FieldStationNo, field.TypeInt, value)
_node.StationNo = value
}
if value, ok := _c.mutation.ProcessCode(); ok {
_spec.SetField(materialrequest.FieldProcessCode, field.TypeInt, value)
_node.ProcessCode = value
if value, ok := _c.mutation.FlowId(); ok {
_spec.SetField(materialrequest.FieldFlowId, field.TypeInt, value)
_node.FlowId = value
}
if value, ok := _c.mutation.SentQty(); ok {
_spec.SetField(materialrequest.FieldSentQty, field.TypeFloat64, value)