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
@@ -59,6 +59,10 @@ const (
FieldDisposalRemark = "disposal_remark"
// FieldBatchSn holds the string denoting the batchsn field in the database.
FieldBatchSn = "batch_sn"
// FieldRelatedStandard holds the string denoting the relatedstandard field in the database.
FieldRelatedStandard = "related_standard"
// FieldTestRecordNo holds the string denoting the testrecordno field in the database.
FieldTestRecordNo = "test_record_no"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the inspectionrecord in the database.
@@ -91,6 +95,8 @@ var Columns = []string{
FieldDisposalType,
FieldDisposalRemark,
FieldBatchSn,
FieldRelatedStandard,
FieldTestRecordNo,
FieldCreatedAt,
}
@@ -185,6 +191,10 @@ var (
DisposalRemarkValidator func(string) error
// BatchSnValidator is a validator for the "batchSn" field. It is called by the builders before save.
BatchSnValidator func(string) error
// RelatedStandardValidator is a validator for the "relatedStandard" field. It is called by the builders before save.
RelatedStandardValidator func(string) error
// TestRecordNoValidator is a validator for the "testRecordNo" field. It is called by the builders before save.
TestRecordNoValidator func(string) error
// DefaultCreatedAt holds the default value on creation for the "createdAt" field.
DefaultCreatedAt func() time.Time
// IDValidator is a validator for the "id" field. It is called by the builders before save.
@@ -309,6 +319,16 @@ func ByBatchSn(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBatchSn, opts...).ToFunc()
}
// ByRelatedStandard orders the results by the relatedStandard field.
func ByRelatedStandard(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRelatedStandard, opts...).ToFunc()
}
// ByTestRecordNo orders the results by the testRecordNo field.
func ByTestRecordNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldTestRecordNo, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
+160
View File
@@ -164,6 +164,16 @@ func BatchSn(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEQ(FieldBatchSn, v))
}
// RelatedStandard applies equality check predicate on the "relatedStandard" field. It's identical to RelatedStandardEQ.
func RelatedStandard(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEQ(FieldRelatedStandard, v))
}
// TestRecordNo applies equality check predicate on the "testRecordNo" field. It's identical to TestRecordNoEQ.
func TestRecordNo(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEQ(FieldTestRecordNo, v))
}
// CreatedAt applies equality check predicate on the "createdAt" field. It's identical to CreatedAtEQ.
func CreatedAt(v time.Time) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEQ(FieldCreatedAt, v))
@@ -1569,6 +1579,156 @@ func BatchSnContainsFold(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldContainsFold(FieldBatchSn, v))
}
// RelatedStandardEQ applies the EQ predicate on the "relatedStandard" field.
func RelatedStandardEQ(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEQ(FieldRelatedStandard, v))
}
// RelatedStandardNEQ applies the NEQ predicate on the "relatedStandard" field.
func RelatedStandardNEQ(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldNEQ(FieldRelatedStandard, v))
}
// RelatedStandardIn applies the In predicate on the "relatedStandard" field.
func RelatedStandardIn(vs ...string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldIn(FieldRelatedStandard, vs...))
}
// RelatedStandardNotIn applies the NotIn predicate on the "relatedStandard" field.
func RelatedStandardNotIn(vs ...string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldNotIn(FieldRelatedStandard, vs...))
}
// RelatedStandardGT applies the GT predicate on the "relatedStandard" field.
func RelatedStandardGT(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldGT(FieldRelatedStandard, v))
}
// RelatedStandardGTE applies the GTE predicate on the "relatedStandard" field.
func RelatedStandardGTE(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldGTE(FieldRelatedStandard, v))
}
// RelatedStandardLT applies the LT predicate on the "relatedStandard" field.
func RelatedStandardLT(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldLT(FieldRelatedStandard, v))
}
// RelatedStandardLTE applies the LTE predicate on the "relatedStandard" field.
func RelatedStandardLTE(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldLTE(FieldRelatedStandard, v))
}
// RelatedStandardContains applies the Contains predicate on the "relatedStandard" field.
func RelatedStandardContains(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldContains(FieldRelatedStandard, v))
}
// RelatedStandardHasPrefix applies the HasPrefix predicate on the "relatedStandard" field.
func RelatedStandardHasPrefix(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldHasPrefix(FieldRelatedStandard, v))
}
// RelatedStandardHasSuffix applies the HasSuffix predicate on the "relatedStandard" field.
func RelatedStandardHasSuffix(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldHasSuffix(FieldRelatedStandard, v))
}
// RelatedStandardIsNil applies the IsNil predicate on the "relatedStandard" field.
func RelatedStandardIsNil() predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldIsNull(FieldRelatedStandard))
}
// RelatedStandardNotNil applies the NotNil predicate on the "relatedStandard" field.
func RelatedStandardNotNil() predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldNotNull(FieldRelatedStandard))
}
// RelatedStandardEqualFold applies the EqualFold predicate on the "relatedStandard" field.
func RelatedStandardEqualFold(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEqualFold(FieldRelatedStandard, v))
}
// RelatedStandardContainsFold applies the ContainsFold predicate on the "relatedStandard" field.
func RelatedStandardContainsFold(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldContainsFold(FieldRelatedStandard, v))
}
// TestRecordNoEQ applies the EQ predicate on the "testRecordNo" field.
func TestRecordNoEQ(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEQ(FieldTestRecordNo, v))
}
// TestRecordNoNEQ applies the NEQ predicate on the "testRecordNo" field.
func TestRecordNoNEQ(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldNEQ(FieldTestRecordNo, v))
}
// TestRecordNoIn applies the In predicate on the "testRecordNo" field.
func TestRecordNoIn(vs ...string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldIn(FieldTestRecordNo, vs...))
}
// TestRecordNoNotIn applies the NotIn predicate on the "testRecordNo" field.
func TestRecordNoNotIn(vs ...string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldNotIn(FieldTestRecordNo, vs...))
}
// TestRecordNoGT applies the GT predicate on the "testRecordNo" field.
func TestRecordNoGT(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldGT(FieldTestRecordNo, v))
}
// TestRecordNoGTE applies the GTE predicate on the "testRecordNo" field.
func TestRecordNoGTE(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldGTE(FieldTestRecordNo, v))
}
// TestRecordNoLT applies the LT predicate on the "testRecordNo" field.
func TestRecordNoLT(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldLT(FieldTestRecordNo, v))
}
// TestRecordNoLTE applies the LTE predicate on the "testRecordNo" field.
func TestRecordNoLTE(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldLTE(FieldTestRecordNo, v))
}
// TestRecordNoContains applies the Contains predicate on the "testRecordNo" field.
func TestRecordNoContains(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldContains(FieldTestRecordNo, v))
}
// TestRecordNoHasPrefix applies the HasPrefix predicate on the "testRecordNo" field.
func TestRecordNoHasPrefix(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldHasPrefix(FieldTestRecordNo, v))
}
// TestRecordNoHasSuffix applies the HasSuffix predicate on the "testRecordNo" field.
func TestRecordNoHasSuffix(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldHasSuffix(FieldTestRecordNo, v))
}
// TestRecordNoIsNil applies the IsNil predicate on the "testRecordNo" field.
func TestRecordNoIsNil() predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldIsNull(FieldTestRecordNo))
}
// TestRecordNoNotNil applies the NotNil predicate on the "testRecordNo" field.
func TestRecordNoNotNil() predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldNotNull(FieldTestRecordNo))
}
// TestRecordNoEqualFold applies the EqualFold predicate on the "testRecordNo" field.
func TestRecordNoEqualFold(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEqualFold(FieldTestRecordNo, v))
}
// TestRecordNoContainsFold applies the ContainsFold predicate on the "testRecordNo" field.
func TestRecordNoContainsFold(v string) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldContainsFold(FieldTestRecordNo, v))
}
// CreatedAtEQ applies the EQ predicate on the "createdAt" field.
func CreatedAtEQ(v time.Time) predicate.InspectionRecord {
return predicate.InspectionRecord(sql.FieldEQ(FieldCreatedAt, v))