feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段

- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统
- 为BomItem实体添加relatedStandard字段及相关CRUD方法
- 为InspectionRecord实体添加reportNo、materialCode、materialName等字段
- 更新ent schema确保新字段的验证和默认值设置
- 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
SunYF
2026-09-17 12:49:07 +08:00
parent b4b274301d
commit 1cc93795ce
191 changed files with 24504 additions and 1250 deletions
@@ -21,11 +21,6 @@ type InternalConfig struct {
Token string `json:",default=Hardman_2026"`
}
// SimConfig 内置模拟拧紧枪数据源开关
type SimConfig struct {
Enable bool `json:",default=true"`
}
// SqliteConfig 本地 SQLite 缓存库
type SqliteConfig struct {
Path string `json:",default=workstation.db"`
@@ -34,8 +29,7 @@ type SqliteConfig struct {
// StationConfig 工位配置:启动时由 yaml 加载到内存,固定本终端工位号。
// 一个工位一个终端,终端不允许修改工位;变更工位只能改配置并重启服务。
type StationConfig struct {
StationNo int `json:",default=1"` // 固定工位号,启动时校验范围
ScrewCount int `json:",default=10"` // 本工位需拧紧的螺丝颗数(进度 9/10 用)
StationNo int `json:",default=1"` // 固定工位号,启动时校验范围
}
// PdfCacheConfig 工艺文件 PDF 本地预缓存目录
@@ -48,7 +42,6 @@ type Config struct {
Auth AuthConfig `json:",optional"`
Mes MesConfig `json:",optional"`
Internal InternalConfig `json:",optional"`
Sim SimConfig `json:",optional"`
Sqlite SqliteConfig `json:",optional"`
Station StationConfig `json:",optional"`
PdfCache PdfCacheConfig `json:",optional"`