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
+23 -1
View File
@@ -30,6 +30,10 @@ type ProcessStep struct {
IsTorque bool `json:"isTorque,omitempty"`
// 是否需要检测确认(报工前须检验通过)
NeedCheck bool `json:"needCheck,omitempty"`
// 是否需要操作工签字(报工前须签字确认)
NeedOperatorSign bool `json:"needOperatorSign,omitempty"`
// 是否需要检验员签字(审核通过并签字后放行)
NeedInspectorSign bool `json:"needInspectorSign,omitempty"`
// 本步骤图纸/附件列表 [{name,url}]
Attachment []map[string]string `json:"attachment,omitempty"`
// Remark holds the value of the "remark" field.
@@ -46,7 +50,7 @@ func (*ProcessStep) scanValues(columns []string) ([]any, error) {
switch columns[i] {
case processstep.FieldAttachment:
values[i] = new([]byte)
case processstep.FieldIsTorque, processstep.FieldNeedCheck:
case processstep.FieldIsTorque, processstep.FieldNeedCheck, processstep.FieldNeedOperatorSign, processstep.FieldNeedInspectorSign:
values[i] = new(sql.NullBool)
case processstep.FieldID, processstep.FieldFlowId, processstep.FieldSeq:
values[i] = new(sql.NullInt64)
@@ -111,6 +115,18 @@ func (_m *ProcessStep) assignValues(columns []string, values []any) error {
} else if value.Valid {
_m.NeedCheck = value.Bool
}
case processstep.FieldNeedOperatorSign:
if value, ok := values[i].(*sql.NullBool); !ok {
return fmt.Errorf("unexpected type %T for field needOperatorSign", values[i])
} else if value.Valid {
_m.NeedOperatorSign = value.Bool
}
case processstep.FieldNeedInspectorSign:
if value, ok := values[i].(*sql.NullBool); !ok {
return fmt.Errorf("unexpected type %T for field needInspectorSign", values[i])
} else if value.Valid {
_m.NeedInspectorSign = value.Bool
}
case processstep.FieldAttachment:
if value, ok := values[i].(*[]byte); !ok {
return fmt.Errorf("unexpected type %T for field attachment", values[i])
@@ -185,6 +201,12 @@ func (_m *ProcessStep) String() string {
builder.WriteString("needCheck=")
builder.WriteString(fmt.Sprintf("%v", _m.NeedCheck))
builder.WriteString(", ")
builder.WriteString("needOperatorSign=")
builder.WriteString(fmt.Sprintf("%v", _m.NeedOperatorSign))
builder.WriteString(", ")
builder.WriteString("needInspectorSign=")
builder.WriteString(fmt.Sprintf("%v", _m.NeedInspectorSign))
builder.WriteString(", ")
builder.WriteString("attachment=")
builder.WriteString(fmt.Sprintf("%v", _m.Attachment))
builder.WriteString(", ")