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
@@ -0,0 +1,246 @@
// Code generated by ent, DO NOT EDIT.
package stepsignrecord
import (
"time"
"entgo.io/ent/dialect/sql"
)
const (
// Label holds the string label denoting the stepsignrecord type in the database.
Label = "step_sign_record"
// FieldID holds the string denoting the id field in the database.
FieldID = "id"
// FieldSn holds the string denoting the sn field in the database.
FieldSn = "sn"
// FieldOrderNo holds the string denoting the orderno field in the database.
FieldOrderNo = "order_no"
// FieldFlowId holds the string denoting the flowid field in the database.
FieldFlowId = "flow_id"
// FieldStationNo holds the string denoting the stationno field in the database.
FieldStationNo = "station_no"
// FieldStepId holds the string denoting the stepid field in the database.
FieldStepId = "step_id"
// FieldStepName holds the string denoting the stepname field in the database.
FieldStepName = "step_name"
// FieldSignRole holds the string denoting the signrole field in the database.
FieldSignRole = "sign_role"
// FieldResult holds the string denoting the result field in the database.
FieldResult = "result"
// FieldSignedBy holds the string denoting the signedby field in the database.
FieldSignedBy = "signed_by"
// FieldSignedAt holds the string denoting the signedat field in the database.
FieldSignedAt = "signed_at"
// FieldRound holds the string denoting the round field in the database.
FieldRound = "round"
// FieldSource holds the string denoting the source field in the database.
FieldSource = "source"
// FieldRemark holds the string denoting the remark field in the database.
FieldRemark = "remark"
// FieldRevoked holds the string denoting the revoked field in the database.
FieldRevoked = "revoked"
// FieldRevokedBy holds the string denoting the revokedby field in the database.
FieldRevokedBy = "revoked_by"
// FieldRevokedAt holds the string denoting the revokedat field in the database.
FieldRevokedAt = "revoked_at"
// FieldRevokeReason holds the string denoting the revokereason field in the database.
FieldRevokeReason = "revoke_reason"
// FieldCreatedAt holds the string denoting the createdat field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the stepsignrecord in the database.
Table = "step_sign_record"
)
// Columns holds all SQL columns for stepsignrecord fields.
var Columns = []string{
FieldID,
FieldSn,
FieldOrderNo,
FieldFlowId,
FieldStationNo,
FieldStepId,
FieldStepName,
FieldSignRole,
FieldResult,
FieldSignedBy,
FieldSignedAt,
FieldRound,
FieldSource,
FieldRemark,
FieldRevoked,
FieldRevokedBy,
FieldRevokedAt,
FieldRevokeReason,
FieldCreatedAt,
}
// ValidColumn reports if the column name is valid (part of the table columns).
func ValidColumn(column string) bool {
for i := range Columns {
if column == Columns[i] {
return true
}
}
return false
}
var (
// DefaultSn holds the default value on creation for the "sn" field.
DefaultSn string
// SnValidator is a validator for the "sn" field. It is called by the builders before save.
SnValidator func(string) error
// DefaultOrderNo holds the default value on creation for the "orderNo" field.
DefaultOrderNo string
// OrderNoValidator is a validator for the "orderNo" field. It is called by the builders before save.
OrderNoValidator func(string) error
// DefaultFlowId holds the default value on creation for the "flowId" field.
DefaultFlowId int
// DefaultStationNo holds the default value on creation for the "stationNo" field.
DefaultStationNo string
// StationNoValidator is a validator for the "stationNo" field. It is called by the builders before save.
StationNoValidator func(string) error
// DefaultStepId holds the default value on creation for the "stepId" field.
DefaultStepId int
// DefaultStepName holds the default value on creation for the "stepName" field.
DefaultStepName string
// StepNameValidator is a validator for the "stepName" field. It is called by the builders before save.
StepNameValidator func(string) error
// DefaultSignRole holds the default value on creation for the "signRole" field.
DefaultSignRole string
// SignRoleValidator is a validator for the "signRole" field. It is called by the builders before save.
SignRoleValidator func(string) error
// DefaultResult holds the default value on creation for the "result" field.
DefaultResult string
// ResultValidator is a validator for the "result" field. It is called by the builders before save.
ResultValidator func(string) error
// DefaultSignedBy holds the default value on creation for the "signedBy" field.
DefaultSignedBy string
// SignedByValidator is a validator for the "signedBy" field. It is called by the builders before save.
SignedByValidator func(string) error
// DefaultSignedAt holds the default value on creation for the "signedAt" field.
DefaultSignedAt func() time.Time
// DefaultRound holds the default value on creation for the "round" field.
DefaultRound int
// DefaultSource holds the default value on creation for the "source" field.
DefaultSource string
// SourceValidator is a validator for the "source" field. It is called by the builders before save.
SourceValidator func(string) error
// DefaultRemark holds the default value on creation for the "remark" field.
DefaultRemark string
// RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
RemarkValidator func(string) error
// DefaultRevoked holds the default value on creation for the "revoked" field.
DefaultRevoked bool
// DefaultRevokedBy holds the default value on creation for the "revokedBy" field.
DefaultRevokedBy string
// RevokedByValidator is a validator for the "revokedBy" field. It is called by the builders before save.
RevokedByValidator func(string) error
// DefaultRevokeReason holds the default value on creation for the "revokeReason" field.
DefaultRevokeReason string
// RevokeReasonValidator is a validator for the "revokeReason" field. It is called by the builders before save.
RevokeReasonValidator 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.
IDValidator func(int) error
)
// OrderOption defines the ordering options for the StepSignRecord queries.
type OrderOption func(*sql.Selector)
// ByID orders the results by the id field.
func ByID(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldID, opts...).ToFunc()
}
// BySn orders the results by the sn field.
func BySn(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSn, opts...).ToFunc()
}
// ByOrderNo orders the results by the orderNo field.
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
}
// ByFlowId orders the results by the flowId field.
func ByFlowId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldFlowId, opts...).ToFunc()
}
// ByStationNo orders the results by the stationNo field.
func ByStationNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStationNo, opts...).ToFunc()
}
// ByStepId orders the results by the stepId field.
func ByStepId(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStepId, opts...).ToFunc()
}
// ByStepName orders the results by the stepName field.
func ByStepName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldStepName, opts...).ToFunc()
}
// BySignRole orders the results by the signRole field.
func BySignRole(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSignRole, opts...).ToFunc()
}
// ByResult orders the results by the result field.
func ByResult(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldResult, opts...).ToFunc()
}
// BySignedBy orders the results by the signedBy field.
func BySignedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSignedBy, opts...).ToFunc()
}
// BySignedAt orders the results by the signedAt field.
func BySignedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSignedAt, opts...).ToFunc()
}
// ByRound orders the results by the round field.
func ByRound(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRound, opts...).ToFunc()
}
// BySource orders the results by the source field.
func BySource(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldSource, opts...).ToFunc()
}
// ByRemark orders the results by the remark field.
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRemark, opts...).ToFunc()
}
// ByRevoked orders the results by the revoked field.
func ByRevoked(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRevoked, opts...).ToFunc()
}
// ByRevokedBy orders the results by the revokedBy field.
func ByRevokedBy(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRevokedBy, opts...).ToFunc()
}
// ByRevokedAt orders the results by the revokedAt field.
func ByRevokedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRevokedAt, opts...).ToFunc()
}
// ByRevokeReason orders the results by the revokeReason field.
func ByRevokeReason(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRevokeReason, opts...).ToFunc()
}
// ByCreatedAt orders the results by the createdAt field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
}
File diff suppressed because it is too large Load Diff