feat: 新增工序签字功能,移除移料指令模块

新增操作工/检验员工序签字功能,支持工艺步骤配置签字要求;删除移料指令相关代码,将移料页签重命名为产线点位(上料/下料);新增成品入库功能及相关权限;优化备料单状态、质量状态逻辑,新增批次序号字段;修复AGV取消后备料单回退状态问题。
This commit is contained in:
SunYF
2026-10-05 20:15:38 +08:00
parent c33acab9c8
commit f1cf57e9b2
181 changed files with 9785 additions and 9699 deletions
+50
View File
@@ -96,6 +96,34 @@ func (_c *ProcessStepCreate) SetNillableNeedCheck(v *bool) *ProcessStepCreate {
return _c
}
// SetNeedOperatorSign sets the "needOperatorSign" field.
func (_c *ProcessStepCreate) SetNeedOperatorSign(v bool) *ProcessStepCreate {
_c.mutation.SetNeedOperatorSign(v)
return _c
}
// SetNillableNeedOperatorSign sets the "needOperatorSign" field if the given value is not nil.
func (_c *ProcessStepCreate) SetNillableNeedOperatorSign(v *bool) *ProcessStepCreate {
if v != nil {
_c.SetNeedOperatorSign(*v)
}
return _c
}
// SetNeedInspectorSign sets the "needInspectorSign" field.
func (_c *ProcessStepCreate) SetNeedInspectorSign(v bool) *ProcessStepCreate {
_c.mutation.SetNeedInspectorSign(v)
return _c
}
// SetNillableNeedInspectorSign sets the "needInspectorSign" field if the given value is not nil.
func (_c *ProcessStepCreate) SetNillableNeedInspectorSign(v *bool) *ProcessStepCreate {
if v != nil {
_c.SetNeedInspectorSign(*v)
}
return _c
}
// SetAttachment sets the "attachment" field.
func (_c *ProcessStepCreate) SetAttachment(v []map[string]string) *ProcessStepCreate {
_c.mutation.SetAttachment(v)
@@ -187,6 +215,14 @@ func (_c *ProcessStepCreate) defaults() {
v := processstep.DefaultNeedCheck
_c.mutation.SetNeedCheck(v)
}
if _, ok := _c.mutation.NeedOperatorSign(); !ok {
v := processstep.DefaultNeedOperatorSign
_c.mutation.SetNeedOperatorSign(v)
}
if _, ok := _c.mutation.NeedInspectorSign(); !ok {
v := processstep.DefaultNeedInspectorSign
_c.mutation.SetNeedInspectorSign(v)
}
if _, ok := _c.mutation.Remark(); !ok {
v := processstep.DefaultRemark
_c.mutation.SetRemark(v)
@@ -224,6 +260,12 @@ func (_c *ProcessStepCreate) check() error {
if _, ok := _c.mutation.NeedCheck(); !ok {
return &ValidationError{Name: "needCheck", err: errors.New(`ent: missing required field "ProcessStep.needCheck"`)}
}
if _, ok := _c.mutation.NeedOperatorSign(); !ok {
return &ValidationError{Name: "needOperatorSign", err: errors.New(`ent: missing required field "ProcessStep.needOperatorSign"`)}
}
if _, ok := _c.mutation.NeedInspectorSign(); !ok {
return &ValidationError{Name: "needInspectorSign", err: errors.New(`ent: missing required field "ProcessStep.needInspectorSign"`)}
}
if _, ok := _c.mutation.Remark(); !ok {
return &ValidationError{Name: "remark", err: errors.New(`ent: missing required field "ProcessStep.remark"`)}
}
@@ -296,6 +338,14 @@ func (_c *ProcessStepCreate) createSpec() (*ProcessStep, *sqlgraph.CreateSpec) {
_spec.SetField(processstep.FieldNeedCheck, field.TypeBool, value)
_node.NeedCheck = value
}
if value, ok := _c.mutation.NeedOperatorSign(); ok {
_spec.SetField(processstep.FieldNeedOperatorSign, field.TypeBool, value)
_node.NeedOperatorSign = value
}
if value, ok := _c.mutation.NeedInspectorSign(); ok {
_spec.SetField(processstep.FieldNeedInspectorSign, field.TypeBool, value)
_node.NeedInspectorSign = value
}
if value, ok := _c.mutation.Attachment(); ok {
_spec.SetField(processstep.FieldAttachment, field.TypeJSON, value)
_node.Attachment = value