feat: 新增工件生命周期状态流水表及工单状态流转逻辑
新增工件生命周期状态流水表,记录所有工件状态变更动作,替代原半成品质检计数源 调整工单状态流转,将「下发工单」与「开始执行」合并为「下发并开工」,自动启用关联排产 新增工件物理位置字段,区分业务位置与实际物理工位,解决工位对账滞后问题 统一物料类别处理,避免 WMS 同步时覆盖合法值或错误设置为 0 移除已废弃的返修状态,更新相关显示与逻辑
This commit is contained in:
@@ -404,6 +404,18 @@ func (f WorkpieceBindFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Valu
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.WorkpieceBindMutation", m)
|
||||
}
|
||||
|
||||
// The WorkpieceLifecycleLogFunc type is an adapter to allow the use of ordinary
|
||||
// function as WorkpieceLifecycleLog mutator.
|
||||
type WorkpieceLifecycleLogFunc func(context.Context, *ent.WorkpieceLifecycleLogMutation) (ent.Value, error)
|
||||
|
||||
// Mutate calls f(ctx, m).
|
||||
func (f WorkpieceLifecycleLogFunc) Mutate(ctx context.Context, m ent.Mutation) (ent.Value, error) {
|
||||
if mv, ok := m.(*ent.WorkpieceLifecycleLogMutation); ok {
|
||||
return f(ctx, mv)
|
||||
}
|
||||
return nil, fmt.Errorf("unexpected mutation type %T. expect *ent.WorkpieceLifecycleLogMutation", m)
|
||||
}
|
||||
|
||||
// The WorkpieceProcessFunc type is an adapter to allow the use of ordinary
|
||||
// function as WorkpieceProcess mutator.
|
||||
type WorkpieceProcessFunc func(context.Context, *ent.WorkpieceProcessMutation) (ent.Value, error)
|
||||
|
||||
Reference in New Issue
Block a user