feat: 新增装机绑定功能与权限、BOM工序配置

1.  新增装机绑定实体与相关CRUD逻辑,支持工件工序物料绑定/解绑
2.  为BOM物料新增装配工序字段,支持按工序校验绑定
3.  扩展权限表,新增父权限码字段支持菜单按钮关联
4.  统一各页面帮助弹窗参数,新增角色管理帮助文档
5.  新增公共格式化工具函数,优化侧边栏菜单展开逻辑
6.  新增工位终端绑定代理接口与MES内部绑定API
7.  修复主入口数据库连接与schema初始化逻辑,新增一键迁移工具
This commit is contained in:
SunYF
2026-09-07 11:58:19 +08:00
parent 92f0439d89
commit 6ee131a4bd
70 changed files with 6966 additions and 365 deletions
+12
View File
@@ -19,6 +19,8 @@ const (
FieldName = "name"
// FieldType holds the string denoting the type field in the database.
FieldType = "type"
// FieldParentCode holds the string denoting the parentcode field in the database.
FieldParentCode = "parent_code"
// FieldPath holds the string denoting the path field in the database.
FieldPath = "path"
// FieldIcon holds the string denoting the icon field in the database.
@@ -39,6 +41,7 @@ var Columns = []string{
FieldCode,
FieldName,
FieldType,
FieldParentCode,
FieldPath,
FieldIcon,
FieldSort,
@@ -65,6 +68,10 @@ var (
DefaultType string
// TypeValidator is a validator for the "type" field. It is called by the builders before save.
TypeValidator func(string) error
// DefaultParentCode holds the default value on creation for the "parentCode" field.
DefaultParentCode string
// ParentCodeValidator is a validator for the "parentCode" field. It is called by the builders before save.
ParentCodeValidator func(string) error
// DefaultPath holds the default value on creation for the "path" field.
DefaultPath string
// PathValidator is a validator for the "path" field. It is called by the builders before save.
@@ -108,6 +115,11 @@ func ByType(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldType, opts...).ToFunc()
}
// ByParentCode orders the results by the parentCode field.
func ByParentCode(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldParentCode, opts...).ToFunc()
}
// ByPath orders the results by the path field.
func ByPath(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldPath, opts...).ToFunc()