feat: 新增装机绑定功能与权限、BOM工序配置
1. 新增装机绑定实体与相关CRUD逻辑,支持工件工序物料绑定/解绑 2. 为BOM物料新增装配工序字段,支持按工序校验绑定 3. 扩展权限表,新增父权限码字段支持菜单按钮关联 4. 统一各页面帮助弹窗参数,新增角色管理帮助文档 5. 新增公共格式化工具函数,优化侧边栏菜单展开逻辑 6. 新增工位终端绑定代理接口与MES内部绑定API 7. 修复主入口数据库连接与schema初始化逻辑,新增一键迁移工具
This commit is contained in:
@@ -25,6 +25,8 @@ const (
|
||||
FieldUnit = "unit"
|
||||
// FieldManageMode holds the string denoting the managemode field in the database.
|
||||
FieldManageMode = "manage_mode"
|
||||
// FieldProcessCode holds the string denoting the processcode field in the database.
|
||||
FieldProcessCode = "process_code"
|
||||
// FieldUnitQty holds the string denoting the unitqty field in the database.
|
||||
FieldUnitQty = "unit_qty"
|
||||
// FieldLossRate holds the string denoting the lossrate field in the database.
|
||||
@@ -48,6 +50,7 @@ var Columns = []string{
|
||||
FieldSpec,
|
||||
FieldUnit,
|
||||
FieldManageMode,
|
||||
FieldProcessCode,
|
||||
FieldUnitQty,
|
||||
FieldLossRate,
|
||||
FieldRequiredQty,
|
||||
@@ -88,6 +91,8 @@ var (
|
||||
DefaultManageMode string
|
||||
// ManageModeValidator is a validator for the "manageMode" field. It is called by the builders before save.
|
||||
ManageModeValidator func(string) error
|
||||
// DefaultProcessCode holds the default value on creation for the "processCode" field.
|
||||
DefaultProcessCode int
|
||||
// DefaultUnitQty holds the default value on creation for the "unitQty" field.
|
||||
DefaultUnitQty float64
|
||||
// DefaultLossRate holds the default value on creation for the "lossRate" field.
|
||||
@@ -138,6 +143,11 @@ func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByProcessCode orders the results by the processCode field.
|
||||
func ByProcessCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldProcessCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByUnitQty orders the results by the unitQty field.
|
||||
func ByUnitQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldUnitQty, opts...).ToFunc()
|
||||
|
||||
@@ -84,6 +84,11 @@ func ManageMode(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ProcessCode applies equality check predicate on the "processCode" field. It's identical to ProcessCodeEQ.
|
||||
func ProcessCode(v int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// UnitQty applies equality check predicate on the "unitQty" field. It's identical to UnitQtyEQ.
|
||||
func UnitQty(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldUnitQty, v))
|
||||
@@ -494,6 +499,46 @@ func ManageModeContainsFold(v string) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldContainsFold(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeEQ applies the EQ predicate on the "processCode" field.
|
||||
func ProcessCodeEQ(v int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeNEQ applies the NEQ predicate on the "processCode" field.
|
||||
func ProcessCodeNEQ(v int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNEQ(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeIn applies the In predicate on the "processCode" field.
|
||||
func ProcessCodeIn(vs ...int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldIn(FieldProcessCode, vs...))
|
||||
}
|
||||
|
||||
// ProcessCodeNotIn applies the NotIn predicate on the "processCode" field.
|
||||
func ProcessCodeNotIn(vs ...int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldNotIn(FieldProcessCode, vs...))
|
||||
}
|
||||
|
||||
// ProcessCodeGT applies the GT predicate on the "processCode" field.
|
||||
func ProcessCodeGT(v int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGT(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeGTE applies the GTE predicate on the "processCode" field.
|
||||
func ProcessCodeGTE(v int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldGTE(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeLT applies the LT predicate on the "processCode" field.
|
||||
func ProcessCodeLT(v int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLT(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// ProcessCodeLTE applies the LTE predicate on the "processCode" field.
|
||||
func ProcessCodeLTE(v int) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldLTE(FieldProcessCode, v))
|
||||
}
|
||||
|
||||
// UnitQtyEQ applies the EQ predicate on the "unitQty" field.
|
||||
func UnitQtyEQ(v float64) predicate.BomItem {
|
||||
return predicate.BomItem(sql.FieldEQ(FieldUnitQty, v))
|
||||
|
||||
Reference in New Issue
Block a user