chore: 批量完成项目多模块迭代优化
1. 废弃半成品库存表并统一库存主表 2. 修复列表排序与搜索大小写不敏感问题 3. 新增用户最近登录时间、工单BOM名称字段 4. 完善角色管理、工位选择器功能 5. 增加拧紧数据补录、成品自动回流WMS能力 6. 统一导出时间范围校验规则 7. 丰富物料/备料单筛选条件 8. 调整菜单与权限命名适配产品型号业务
This commit is contained in:
@@ -23,6 +23,8 @@ const (
|
||||
FieldUnit = "unit"
|
||||
// FieldDescription holds the string denoting the description field in the database.
|
||||
FieldDescription = "description"
|
||||
// FieldItemType holds the string denoting the item_type field in the database.
|
||||
FieldItemType = "item_type"
|
||||
// FieldManageMode holds the string denoting the manage_mode field in the database.
|
||||
FieldManageMode = "manage_mode"
|
||||
// FieldIsBatchManaged holds the string denoting the is_batch_managed field in the database.
|
||||
@@ -31,6 +33,8 @@ const (
|
||||
FieldIsSerialManaged = "is_serial_managed"
|
||||
// FieldTemplateCode holds the string denoting the template_code field in the database.
|
||||
FieldTemplateCode = "template_code"
|
||||
// FieldIsActive holds the string denoting the is_active field in the database.
|
||||
FieldIsActive = "is_active"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
FieldCreatedAt = "created_at"
|
||||
// FieldUpdatedAt holds the string denoting the updated_at field in the database.
|
||||
@@ -48,10 +52,12 @@ var Columns = []string{
|
||||
FieldSpec,
|
||||
FieldUnit,
|
||||
FieldDescription,
|
||||
FieldItemType,
|
||||
FieldManageMode,
|
||||
FieldIsBatchManaged,
|
||||
FieldIsSerialManaged,
|
||||
FieldTemplateCode,
|
||||
FieldIsActive,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
}
|
||||
@@ -67,12 +73,16 @@ func ValidColumn(column string) bool {
|
||||
}
|
||||
|
||||
var (
|
||||
// DefaultItemType holds the default value on creation for the "item_type" field.
|
||||
DefaultItemType int
|
||||
// DefaultManageMode holds the default value on creation for the "manage_mode" field.
|
||||
DefaultManageMode int
|
||||
// DefaultIsBatchManaged holds the default value on creation for the "is_batch_managed" field.
|
||||
DefaultIsBatchManaged bool
|
||||
// DefaultIsSerialManaged holds the default value on creation for the "is_serial_managed" field.
|
||||
DefaultIsSerialManaged bool
|
||||
// DefaultIsActive holds the default value on creation for the "is_active" field.
|
||||
DefaultIsActive bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
@@ -117,6 +127,11 @@ func ByDescription(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDescription, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByItemType orders the results by the item_type field.
|
||||
func ByItemType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldItemType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByManageMode orders the results by the manage_mode field.
|
||||
func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
|
||||
@@ -137,6 +152,11 @@ func ByTemplateCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTemplateCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByIsActive orders the results by the is_active field.
|
||||
func ByIsActive(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsActive, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCreatedAt orders the results by the created_at field.
|
||||
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
|
||||
|
||||
@@ -83,6 +83,11 @@ func Description(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldDescription, v))
|
||||
}
|
||||
|
||||
// ItemType applies equality check predicate on the "item_type" field. It's identical to ItemTypeEQ.
|
||||
func ItemType(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ManageMode applies equality check predicate on the "manage_mode" field. It's identical to ManageModeEQ.
|
||||
func ManageMode(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldManageMode, v))
|
||||
@@ -103,6 +108,11 @@ func TemplateCode(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// IsActive applies equality check predicate on the "is_active" field. It's identical to IsActiveEQ.
|
||||
func IsActive(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
|
||||
func CreatedAt(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCreatedAt, v))
|
||||
@@ -543,6 +553,46 @@ func DescriptionContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldDescription, v))
|
||||
}
|
||||
|
||||
// ItemTypeEQ applies the EQ predicate on the "item_type" field.
|
||||
func ItemTypeEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeNEQ applies the NEQ predicate on the "item_type" field.
|
||||
func ItemTypeNEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeIn applies the In predicate on the "item_type" field.
|
||||
func ItemTypeIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldItemType, vs...))
|
||||
}
|
||||
|
||||
// ItemTypeNotIn applies the NotIn predicate on the "item_type" field.
|
||||
func ItemTypeNotIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldItemType, vs...))
|
||||
}
|
||||
|
||||
// ItemTypeGT applies the GT predicate on the "item_type" field.
|
||||
func ItemTypeGT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeGTE applies the GTE predicate on the "item_type" field.
|
||||
func ItemTypeGTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeLT applies the LT predicate on the "item_type" field.
|
||||
func ItemTypeLT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ItemTypeLTE applies the LTE predicate on the "item_type" field.
|
||||
func ItemTypeLTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldItemType, v))
|
||||
}
|
||||
|
||||
// ManageModeEQ applies the EQ predicate on the "manage_mode" field.
|
||||
func ManageModeEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldManageMode, v))
|
||||
@@ -678,6 +728,16 @@ func TemplateCodeContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// IsActiveEQ applies the EQ predicate on the "is_active" field.
|
||||
func IsActiveEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// IsActiveNEQ applies the NEQ predicate on the "is_active" field.
|
||||
func IsActiveNEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldIsActive, v))
|
||||
}
|
||||
|
||||
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
|
||||
func CreatedAtEQ(v int64) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldCreatedAt, v))
|
||||
|
||||
Reference in New Issue
Block a user