feat: 解耦管理类型与SN管理方式,新增sn_mode字段实现全链路SN管理标准化
本次重构将原manage_mode字段拆分为独立的分类维度(manage_mode)和SN管理维度(sn_mode),实现全链路(MES/WMS/工位终端)的SN管理行为统一依据: 1. 新增sn_mode字段,定义1=序列号件、2=批次件、0=未选择,替代原manage_mode的SN判断逻辑 2. 移除冗余的manage_mode字段在多个实体中的使用,统一使用sn_mode决定业务行为 3. 新增工位接驳台配置,服务端固定接驳台,前端不可修改,确保AGV送达准确性 4. 优化检验记录导出,新增装配物料绑定明细,满足客户追溯需求 5. 修正前端提示文本,统一使用序列号件/批次件表述,与后端逻辑对齐
This commit is contained in:
@@ -94,6 +94,11 @@ func ContractNo(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// OwnershipType applies equality check predicate on the "ownershipType" field. It's identical to OwnershipTypeEQ.
|
||||
func OwnershipType(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// ProjectNo applies equality check predicate on the "projectNo" field. It's identical to ProjectNoEQ.
|
||||
func ProjectNo(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldProjectNo, v))
|
||||
@@ -564,6 +569,71 @@ func ContractNoContainsFold(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldContainsFold(FieldContractNo, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeEQ applies the EQ predicate on the "ownershipType" field.
|
||||
func OwnershipTypeEQ(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeNEQ applies the NEQ predicate on the "ownershipType" field.
|
||||
func OwnershipTypeNEQ(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNEQ(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeIn applies the In predicate on the "ownershipType" field.
|
||||
func OwnershipTypeIn(vs ...string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldIn(FieldOwnershipType, vs...))
|
||||
}
|
||||
|
||||
// OwnershipTypeNotIn applies the NotIn predicate on the "ownershipType" field.
|
||||
func OwnershipTypeNotIn(vs ...string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldNotIn(FieldOwnershipType, vs...))
|
||||
}
|
||||
|
||||
// OwnershipTypeGT applies the GT predicate on the "ownershipType" field.
|
||||
func OwnershipTypeGT(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldGT(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeGTE applies the GTE predicate on the "ownershipType" field.
|
||||
func OwnershipTypeGTE(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldGTE(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeLT applies the LT predicate on the "ownershipType" field.
|
||||
func OwnershipTypeLT(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldLT(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeLTE applies the LTE predicate on the "ownershipType" field.
|
||||
func OwnershipTypeLTE(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldLTE(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeContains applies the Contains predicate on the "ownershipType" field.
|
||||
func OwnershipTypeContains(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldContains(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeHasPrefix applies the HasPrefix predicate on the "ownershipType" field.
|
||||
func OwnershipTypeHasPrefix(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldHasPrefix(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeHasSuffix applies the HasSuffix predicate on the "ownershipType" field.
|
||||
func OwnershipTypeHasSuffix(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldHasSuffix(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeEqualFold applies the EqualFold predicate on the "ownershipType" field.
|
||||
func OwnershipTypeEqualFold(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEqualFold(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// OwnershipTypeContainsFold applies the ContainsFold predicate on the "ownershipType" field.
|
||||
func OwnershipTypeContainsFold(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldContainsFold(FieldOwnershipType, v))
|
||||
}
|
||||
|
||||
// ProjectNoEQ applies the EQ predicate on the "projectNo" field.
|
||||
func ProjectNoEQ(v string) predicate.WorkOrder {
|
||||
return predicate.WorkOrder(sql.FieldEQ(FieldProjectNo, v))
|
||||
|
||||
@@ -29,6 +29,8 @@ const (
|
||||
FieldFailNum = "fail_num"
|
||||
// FieldContractNo holds the string denoting the contractno field in the database.
|
||||
FieldContractNo = "contract_no"
|
||||
// FieldOwnershipType holds the string denoting the ownershiptype field in the database.
|
||||
FieldOwnershipType = "ownership_type"
|
||||
// FieldProjectNo holds the string denoting the projectno field in the database.
|
||||
FieldProjectNo = "project_no"
|
||||
// FieldProductSerial holds the string denoting the productserial field in the database.
|
||||
@@ -68,6 +70,7 @@ var Columns = []string{
|
||||
FieldFinishedNum,
|
||||
FieldFailNum,
|
||||
FieldContractNo,
|
||||
FieldOwnershipType,
|
||||
FieldProjectNo,
|
||||
FieldProductSerial,
|
||||
FieldCreatedBy,
|
||||
@@ -113,6 +116,10 @@ var (
|
||||
DefaultContractNo string
|
||||
// ContractNoValidator is a validator for the "contractNo" field. It is called by the builders before save.
|
||||
ContractNoValidator func(string) error
|
||||
// DefaultOwnershipType holds the default value on creation for the "ownershipType" field.
|
||||
DefaultOwnershipType string
|
||||
// OwnershipTypeValidator is a validator for the "ownershipType" field. It is called by the builders before save.
|
||||
OwnershipTypeValidator func(string) error
|
||||
// DefaultProjectNo holds the default value on creation for the "projectNo" field.
|
||||
DefaultProjectNo string
|
||||
// ProjectNoValidator is a validator for the "projectNo" field. It is called by the builders before save.
|
||||
@@ -187,6 +194,11 @@ func ByContractNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldContractNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnershipType orders the results by the ownershipType field.
|
||||
func ByOwnershipType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOwnershipType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProjectNo orders the results by the projectNo field.
|
||||
func ByProjectNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProjectNo, opts...).ToFunc()
|
||||
|
||||
Reference in New Issue
Block a user