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
+38 -38
View File
@@ -84,30 +84,30 @@ func (_u *WorkpieceUpdate) ClearWorkOrderId() *WorkpieceUpdate {
return _u
}
// SetCurrentProcess sets the "currentProcess" field.
func (_u *WorkpieceUpdate) SetCurrentProcess(v int) *WorkpieceUpdate {
_u.mutation.ResetCurrentProcess()
_u.mutation.SetCurrentProcess(v)
// SetCurrentStationNo sets the "currentStationNo" field.
func (_u *WorkpieceUpdate) SetCurrentStationNo(v int) *WorkpieceUpdate {
_u.mutation.ResetCurrentStationNo()
_u.mutation.SetCurrentStationNo(v)
return _u
}
// SetNillableCurrentProcess sets the "currentProcess" field if the given value is not nil.
func (_u *WorkpieceUpdate) SetNillableCurrentProcess(v *int) *WorkpieceUpdate {
// SetNillableCurrentStationNo sets the "currentStationNo" field if the given value is not nil.
func (_u *WorkpieceUpdate) SetNillableCurrentStationNo(v *int) *WorkpieceUpdate {
if v != nil {
_u.SetCurrentProcess(*v)
_u.SetCurrentStationNo(*v)
}
return _u
}
// AddCurrentProcess adds value to the "currentProcess" field.
func (_u *WorkpieceUpdate) AddCurrentProcess(v int) *WorkpieceUpdate {
_u.mutation.AddCurrentProcess(v)
// AddCurrentStationNo adds value to the "currentStationNo" field.
func (_u *WorkpieceUpdate) AddCurrentStationNo(v int) *WorkpieceUpdate {
_u.mutation.AddCurrentStationNo(v)
return _u
}
// ClearCurrentProcess clears the value of the "currentProcess" field.
func (_u *WorkpieceUpdate) ClearCurrentProcess() *WorkpieceUpdate {
_u.mutation.ClearCurrentProcess()
// ClearCurrentStationNo clears the value of the "currentStationNo" field.
func (_u *WorkpieceUpdate) ClearCurrentStationNo() *WorkpieceUpdate {
_u.mutation.ClearCurrentStationNo()
return _u
}
@@ -271,14 +271,14 @@ func (_u *WorkpieceUpdate) sqlSave(ctx context.Context) (_node int, err error) {
if _u.mutation.WorkOrderIdCleared() {
_spec.ClearField(workpiece.FieldWorkOrderId, field.TypeInt)
}
if value, ok := _u.mutation.CurrentProcess(); ok {
_spec.SetField(workpiece.FieldCurrentProcess, field.TypeInt, value)
if value, ok := _u.mutation.CurrentStationNo(); ok {
_spec.SetField(workpiece.FieldCurrentStationNo, field.TypeInt, value)
}
if value, ok := _u.mutation.AddedCurrentProcess(); ok {
_spec.AddField(workpiece.FieldCurrentProcess, field.TypeInt, value)
if value, ok := _u.mutation.AddedCurrentStationNo(); ok {
_spec.AddField(workpiece.FieldCurrentStationNo, field.TypeInt, value)
}
if _u.mutation.CurrentProcessCleared() {
_spec.ClearField(workpiece.FieldCurrentProcess, field.TypeInt)
if _u.mutation.CurrentStationNoCleared() {
_spec.ClearField(workpiece.FieldCurrentStationNo, field.TypeInt)
}
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(workpiece.FieldStatus, field.TypeString, value)
@@ -378,30 +378,30 @@ func (_u *WorkpieceUpdateOne) ClearWorkOrderId() *WorkpieceUpdateOne {
return _u
}
// SetCurrentProcess sets the "currentProcess" field.
func (_u *WorkpieceUpdateOne) SetCurrentProcess(v int) *WorkpieceUpdateOne {
_u.mutation.ResetCurrentProcess()
_u.mutation.SetCurrentProcess(v)
// SetCurrentStationNo sets the "currentStationNo" field.
func (_u *WorkpieceUpdateOne) SetCurrentStationNo(v int) *WorkpieceUpdateOne {
_u.mutation.ResetCurrentStationNo()
_u.mutation.SetCurrentStationNo(v)
return _u
}
// SetNillableCurrentProcess sets the "currentProcess" field if the given value is not nil.
func (_u *WorkpieceUpdateOne) SetNillableCurrentProcess(v *int) *WorkpieceUpdateOne {
// SetNillableCurrentStationNo sets the "currentStationNo" field if the given value is not nil.
func (_u *WorkpieceUpdateOne) SetNillableCurrentStationNo(v *int) *WorkpieceUpdateOne {
if v != nil {
_u.SetCurrentProcess(*v)
_u.SetCurrentStationNo(*v)
}
return _u
}
// AddCurrentProcess adds value to the "currentProcess" field.
func (_u *WorkpieceUpdateOne) AddCurrentProcess(v int) *WorkpieceUpdateOne {
_u.mutation.AddCurrentProcess(v)
// AddCurrentStationNo adds value to the "currentStationNo" field.
func (_u *WorkpieceUpdateOne) AddCurrentStationNo(v int) *WorkpieceUpdateOne {
_u.mutation.AddCurrentStationNo(v)
return _u
}
// ClearCurrentProcess clears the value of the "currentProcess" field.
func (_u *WorkpieceUpdateOne) ClearCurrentProcess() *WorkpieceUpdateOne {
_u.mutation.ClearCurrentProcess()
// ClearCurrentStationNo clears the value of the "currentStationNo" field.
func (_u *WorkpieceUpdateOne) ClearCurrentStationNo() *WorkpieceUpdateOne {
_u.mutation.ClearCurrentStationNo()
return _u
}
@@ -595,14 +595,14 @@ func (_u *WorkpieceUpdateOne) sqlSave(ctx context.Context) (_node *Workpiece, er
if _u.mutation.WorkOrderIdCleared() {
_spec.ClearField(workpiece.FieldWorkOrderId, field.TypeInt)
}
if value, ok := _u.mutation.CurrentProcess(); ok {
_spec.SetField(workpiece.FieldCurrentProcess, field.TypeInt, value)
if value, ok := _u.mutation.CurrentStationNo(); ok {
_spec.SetField(workpiece.FieldCurrentStationNo, field.TypeInt, value)
}
if value, ok := _u.mutation.AddedCurrentProcess(); ok {
_spec.AddField(workpiece.FieldCurrentProcess, field.TypeInt, value)
if value, ok := _u.mutation.AddedCurrentStationNo(); ok {
_spec.AddField(workpiece.FieldCurrentStationNo, field.TypeInt, value)
}
if _u.mutation.CurrentProcessCleared() {
_spec.ClearField(workpiece.FieldCurrentProcess, field.TypeInt)
if _u.mutation.CurrentStationNoCleared() {
_spec.ClearField(workpiece.FieldCurrentStationNo, field.TypeInt)
}
if value, ok := _u.mutation.Status(); ok {
_spec.SetField(workpiece.FieldStatus, field.TypeString, value)