feat: 新增装机绑定功能与权限、BOM工序配置
1. 新增装机绑定实体与相关CRUD逻辑,支持工件工序物料绑定/解绑 2. 为BOM物料新增装配工序字段,支持按工序校验绑定 3. 扩展权限表,新增父权限码字段支持菜单按钮关联 4. 统一各页面帮助弹窗参数,新增角色管理帮助文档 5. 新增公共格式化工具函数,优化侧边栏菜单展开逻辑 6. 新增工位终端绑定代理接口与MES内部绑定API 7. 修复主入口数据库连接与schema初始化逻辑,新增一键迁移工具
This commit is contained in:
@@ -42,6 +42,7 @@ var (
|
||||
{Name: "spec", Type: field.TypeString, Size: 128, Default: ""},
|
||||
{Name: "unit", Type: field.TypeString, Size: 16, Default: ""},
|
||||
{Name: "manage_mode", Type: field.TypeString, Size: 10, Default: "2"},
|
||||
{Name: "process_code", Type: field.TypeInt, Default: 0},
|
||||
{Name: "unit_qty", Type: field.TypeFloat64, Default: 0},
|
||||
{Name: "loss_rate", Type: field.TypeFloat64, Default: 0},
|
||||
{Name: "required_qty", Type: field.TypeFloat64, Default: 0},
|
||||
@@ -231,6 +232,7 @@ var (
|
||||
{Name: "code", Type: field.TypeString, Unique: true, Size: 64},
|
||||
{Name: "name", Type: field.TypeString, Size: 64},
|
||||
{Name: "type", Type: field.TypeString, Size: 20, Default: "MENU"},
|
||||
{Name: "parent_code", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "path", Type: field.TypeString, Size: 128, Default: ""},
|
||||
{Name: "icon", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "sort", Type: field.TypeInt, Nullable: true, Default: 0},
|
||||
@@ -775,6 +777,56 @@ var (
|
||||
},
|
||||
},
|
||||
}
|
||||
// WorkpieceBindColumns holds the columns for the "workpiece_bind" table.
|
||||
WorkpieceBindColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
{Name: "sn", Type: field.TypeString, Size: 64},
|
||||
{Name: "order_no", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "process_code", Type: field.TypeInt},
|
||||
{Name: "station_no", Type: field.TypeString, Size: 32, Default: ""},
|
||||
{Name: "material_code", Type: field.TypeString, Size: 64},
|
||||
{Name: "material_name", Type: field.TypeString, Size: 128, Default: ""},
|
||||
{Name: "spec", Type: field.TypeString, Size: 128, Default: ""},
|
||||
{Name: "unit", Type: field.TypeString, Size: 16, Default: ""},
|
||||
{Name: "manage_mode", Type: field.TypeString, Size: 10, Default: "2"},
|
||||
{Name: "bind_value", Type: field.TypeString, Size: 128},
|
||||
{Name: "bind_type", Type: field.TypeString, Size: 10, Default: "SN"},
|
||||
{Name: "operator", Type: field.TypeString, Size: 64, Default: ""},
|
||||
{Name: "created_at", Type: field.TypeTime},
|
||||
}
|
||||
// WorkpieceBindTable holds the schema information for the "workpiece_bind" table.
|
||||
WorkpieceBindTable = &schema.Table{
|
||||
Name: "workpiece_bind",
|
||||
Columns: WorkpieceBindColumns,
|
||||
PrimaryKey: []*schema.Column{WorkpieceBindColumns[0]},
|
||||
Indexes: []*schema.Index{
|
||||
{
|
||||
Name: "workpiecebind_sn",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{WorkpieceBindColumns[1]},
|
||||
},
|
||||
{
|
||||
Name: "workpiecebind_sn_process_code",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{WorkpieceBindColumns[1], WorkpieceBindColumns[3]},
|
||||
},
|
||||
{
|
||||
Name: "workpiecebind_sn_material_code",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{WorkpieceBindColumns[1], WorkpieceBindColumns[5]},
|
||||
},
|
||||
{
|
||||
Name: "workpiecebind_order_no",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{WorkpieceBindColumns[2]},
|
||||
},
|
||||
{
|
||||
Name: "workpiecebind_material_code_bind_value",
|
||||
Unique: false,
|
||||
Columns: []*schema.Column{WorkpieceBindColumns[5], WorkpieceBindColumns[10]},
|
||||
},
|
||||
},
|
||||
}
|
||||
// WorkpieceProcessColumns holds the columns for the "workpiece_process" table.
|
||||
WorkpieceProcessColumns = []*schema.Column{
|
||||
{Name: "id", Type: field.TypeInt, Increment: true},
|
||||
@@ -844,6 +896,7 @@ var (
|
||||
UserStationTable,
|
||||
WorkOrderTable,
|
||||
WorkpieceTable,
|
||||
WorkpieceBindTable,
|
||||
WorkpieceProcessTable,
|
||||
}
|
||||
)
|
||||
@@ -918,6 +971,9 @@ func init() {
|
||||
WorkpieceTable.Annotation = &entsql.Annotation{
|
||||
Table: "workpiece",
|
||||
}
|
||||
WorkpieceBindTable.Annotation = &entsql.Annotation{
|
||||
Table: "workpiece_bind",
|
||||
}
|
||||
WorkpieceProcessTable.Annotation = &entsql.Annotation{
|
||||
Table: "workpiece_process",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user