feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段
- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统 - 为BomItem实体添加relatedStandard字段及相关CRUD方法 - 为InspectionRecord实体添加reportNo、materialCode、materialName等字段 - 更新ent schema确保新字段的验证和默认值设置 - 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
@@ -30,6 +30,14 @@ func strPtr(s string) *string {
|
||||
return &s
|
||||
}
|
||||
|
||||
// int64Ptr 0 视为未传(nil),>0 才落库
|
||||
func int64Ptr(v int64) *int64 {
|
||||
if v <= 0 {
|
||||
return nil
|
||||
}
|
||||
return &v
|
||||
}
|
||||
|
||||
func atoi(s string, def int) int {
|
||||
if s == "" {
|
||||
return def
|
||||
|
||||
Reference in New Issue
Block a user