fix: rebuild MES as compilable go-zero+ent backend (renamed bj_power_mes), restore 3 workstation projects from pristine original, align naming; all Go projects go build clean

This commit is contained in:
SunYF
2026-08-27 10:56:41 +08:00
parent 380715f8a9
commit 371b494c54
523 changed files with 67923 additions and 24758 deletions
@@ -0,0 +1,19 @@
package tool
// extractWorkpieceType 从参数中提取工件类型 ID
func extractWorkpieceType(params map[string]any) int {
return extractIntParam(params, "workpieceType")
}
// extractIntParam 从参数 map 中提取 int 类型值,支持 int/float64 转换
func extractIntParam(params map[string]any, key string) int {
if v, ok := params[key]; ok {
if n, ok := v.(int); ok {
return n
}
if f, ok := v.(float64); ok {
return int(f)
}
}
return 0
}