feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段
- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统 - 为BomItem实体添加relatedStandard字段及相关CRUD方法 - 为InspectionRecord实体添加reportNo、materialCode、materialName等字段 - 更新ent schema确保新字段的验证和默认值设置 - 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
@@ -35,6 +35,7 @@ func (BomItem) Fields() []ent.Field {
|
||||
field.Int("processCode").Default(0).Comment("装配工序 1~12,0=不参与工位绑定"),
|
||||
field.Float("unitQty").Default(0).Comment("单台用量"),
|
||||
field.Float("lossRate").Default(0).Comment("损耗率%"),
|
||||
field.String("relatedStandard").Default("").MaxLen(255).Comment("相关标准(检验细则)"),
|
||||
field.Float("requiredQty").Default(0).Comment("需求总量=总台数*单台*(1+损耗)"),
|
||||
field.JSON("serialSns", []string{}).Optional().SchemaType(map[string]string{
|
||||
dialect.Postgres: "jsonb",
|
||||
|
||||
Reference in New Issue
Block a user