chore: 批量完成项目多模块迭代优化

1. 废弃半成品库存表并统一库存主表
2. 修复列表排序与搜索大小写不敏感问题
3. 新增用户最近登录时间、工单BOM名称字段
4. 完善角色管理、工位选择器功能
5. 增加拧紧数据补录、成品自动回流WMS能力
6. 统一导出时间范围校验规则
7. 丰富物料/备料单筛选条件
8. 调整菜单与权限命名适配产品型号业务
This commit is contained in:
SunYF
2026-09-08 11:44:04 +08:00
parent 06689970e2
commit e852c7cd37
96 changed files with 4528 additions and 542 deletions
+12
View File
@@ -15,6 +15,8 @@ const (
FieldID = "id"
// FieldProductCode holds the string denoting the productcode field in the database.
FieldProductCode = "product_code"
// FieldBomName holds the string denoting the bomname field in the database.
FieldBomName = "bom_name"
// FieldMaterialCode holds the string denoting the materialcode field in the database.
FieldMaterialCode = "material_code"
// FieldMaterialName holds the string denoting the materialname field in the database.
@@ -45,6 +47,7 @@ const (
var Columns = []string{
FieldID,
FieldProductCode,
FieldBomName,
FieldMaterialCode,
FieldMaterialName,
FieldSpec,
@@ -73,6 +76,10 @@ var (
DefaultProductCode string
// ProductCodeValidator is a validator for the "productCode" field. It is called by the builders before save.
ProductCodeValidator func(string) error
// DefaultBomName holds the default value on creation for the "bomName" field.
DefaultBomName string
// BomNameValidator is a validator for the "bomName" field. It is called by the builders before save.
BomNameValidator func(string) error
// MaterialCodeValidator is a validator for the "materialCode" field. It is called by the builders before save.
MaterialCodeValidator func(string) error
// DefaultMaterialName holds the default value on creation for the "materialName" field.
@@ -118,6 +125,11 @@ func ByProductCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductCode, opts...).ToFunc()
}
// ByBomName orders the results by the bomName field.
func ByBomName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBomName, opts...).ToFunc()
}
// ByMaterialCode orders the results by the materialCode field.
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
+70
View File
@@ -59,6 +59,11 @@ func ProductCode(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldProductCode, v))
}
// BomName applies equality check predicate on the "bomName" field. It's identical to BomNameEQ.
func BomName(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldBomName, v))
}
// MaterialCode applies equality check predicate on the "materialCode" field. It's identical to MaterialCodeEQ.
func MaterialCode(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldMaterialCode, v))
@@ -174,6 +179,71 @@ func ProductCodeContainsFold(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldContainsFold(FieldProductCode, v))
}
// BomNameEQ applies the EQ predicate on the "bomName" field.
func BomNameEQ(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldBomName, v))
}
// BomNameNEQ applies the NEQ predicate on the "bomName" field.
func BomNameNEQ(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldNEQ(FieldBomName, v))
}
// BomNameIn applies the In predicate on the "bomName" field.
func BomNameIn(vs ...string) predicate.BomItem {
return predicate.BomItem(sql.FieldIn(FieldBomName, vs...))
}
// BomNameNotIn applies the NotIn predicate on the "bomName" field.
func BomNameNotIn(vs ...string) predicate.BomItem {
return predicate.BomItem(sql.FieldNotIn(FieldBomName, vs...))
}
// BomNameGT applies the GT predicate on the "bomName" field.
func BomNameGT(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldGT(FieldBomName, v))
}
// BomNameGTE applies the GTE predicate on the "bomName" field.
func BomNameGTE(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldGTE(FieldBomName, v))
}
// BomNameLT applies the LT predicate on the "bomName" field.
func BomNameLT(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldLT(FieldBomName, v))
}
// BomNameLTE applies the LTE predicate on the "bomName" field.
func BomNameLTE(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldLTE(FieldBomName, v))
}
// BomNameContains applies the Contains predicate on the "bomName" field.
func BomNameContains(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldContains(FieldBomName, v))
}
// BomNameHasPrefix applies the HasPrefix predicate on the "bomName" field.
func BomNameHasPrefix(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldHasPrefix(FieldBomName, v))
}
// BomNameHasSuffix applies the HasSuffix predicate on the "bomName" field.
func BomNameHasSuffix(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldHasSuffix(FieldBomName, v))
}
// BomNameEqualFold applies the EqualFold predicate on the "bomName" field.
func BomNameEqualFold(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEqualFold(FieldBomName, v))
}
// BomNameContainsFold applies the ContainsFold predicate on the "bomName" field.
func BomNameContainsFold(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldContainsFold(FieldBomName, v))
}
// MaterialCodeEQ applies the EQ predicate on the "materialCode" field.
func MaterialCodeEQ(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldMaterialCode, v))