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
+70
View File
@@ -69,6 +69,11 @@ func ProductCode(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldEQ(FieldProductCode, v))
}
// BomName applies equality check predicate on the "bomName" field. It's identical to BomNameEQ.
func BomName(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldEQ(FieldBomName, v))
}
// ProductName applies equality check predicate on the "productName" field. It's identical to ProductNameEQ.
func ProductName(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldEQ(FieldProductName, v))
@@ -294,6 +299,71 @@ func ProductCodeContainsFold(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldContainsFold(FieldProductCode, v))
}
// BomNameEQ applies the EQ predicate on the "bomName" field.
func BomNameEQ(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldEQ(FieldBomName, v))
}
// BomNameNEQ applies the NEQ predicate on the "bomName" field.
func BomNameNEQ(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldNEQ(FieldBomName, v))
}
// BomNameIn applies the In predicate on the "bomName" field.
func BomNameIn(vs ...string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldIn(FieldBomName, vs...))
}
// BomNameNotIn applies the NotIn predicate on the "bomName" field.
func BomNameNotIn(vs ...string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldNotIn(FieldBomName, vs...))
}
// BomNameGT applies the GT predicate on the "bomName" field.
func BomNameGT(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldGT(FieldBomName, v))
}
// BomNameGTE applies the GTE predicate on the "bomName" field.
func BomNameGTE(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldGTE(FieldBomName, v))
}
// BomNameLT applies the LT predicate on the "bomName" field.
func BomNameLT(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldLT(FieldBomName, v))
}
// BomNameLTE applies the LTE predicate on the "bomName" field.
func BomNameLTE(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldLTE(FieldBomName, v))
}
// BomNameContains applies the Contains predicate on the "bomName" field.
func BomNameContains(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldContains(FieldBomName, v))
}
// BomNameHasPrefix applies the HasPrefix predicate on the "bomName" field.
func BomNameHasPrefix(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldHasPrefix(FieldBomName, v))
}
// BomNameHasSuffix applies the HasSuffix predicate on the "bomName" field.
func BomNameHasSuffix(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldHasSuffix(FieldBomName, v))
}
// BomNameEqualFold applies the EqualFold predicate on the "bomName" field.
func BomNameEqualFold(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldEqualFold(FieldBomName, v))
}
// BomNameContainsFold applies the ContainsFold predicate on the "bomName" field.
func BomNameContainsFold(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldContainsFold(FieldBomName, v))
}
// ProductNameEQ applies the EQ predicate on the "productName" field.
func ProductNameEQ(v string) predicate.WorkOrder {
return predicate.WorkOrder(sql.FieldEQ(FieldProductName, v))
+12
View File
@@ -19,6 +19,8 @@ const (
FieldProductTypeId = "product_type_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"
// FieldProductName holds the string denoting the productname field in the database.
FieldProductName = "product_name"
// FieldQuantity holds the string denoting the quantity field in the database.
@@ -53,6 +55,7 @@ var Columns = []string{
FieldWorkOrderNo,
FieldProductTypeId,
FieldProductCode,
FieldBomName,
FieldProductName,
FieldQuantity,
FieldFinishedNum,
@@ -84,6 +87,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
// DefaultProductName holds the default value on creation for the "productName" field.
DefaultProductName string
// ProductNameValidator is a validator for the "productName" field. It is called by the builders before save.
@@ -135,6 +142,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()
}
// ByProductName orders the results by the productName field.
func ByProductName(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldProductName, opts...).ToFunc()