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
+70
View File
@@ -104,6 +104,11 @@ func LossRate(v float64) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldLossRate, v))
}
// RelatedStandard applies equality check predicate on the "relatedStandard" field. It's identical to RelatedStandardEQ.
func RelatedStandard(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldRelatedStandard, v))
}
// RequiredQty applies equality check predicate on the "requiredQty" field. It's identical to RequiredQtyEQ.
func RequiredQty(v float64) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldRequiredQty, v))
@@ -689,6 +694,71 @@ func LossRateLTE(v float64) predicate.BomItem {
return predicate.BomItem(sql.FieldLTE(FieldLossRate, v))
}
// RelatedStandardEQ applies the EQ predicate on the "relatedStandard" field.
func RelatedStandardEQ(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldRelatedStandard, v))
}
// RelatedStandardNEQ applies the NEQ predicate on the "relatedStandard" field.
func RelatedStandardNEQ(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldNEQ(FieldRelatedStandard, v))
}
// RelatedStandardIn applies the In predicate on the "relatedStandard" field.
func RelatedStandardIn(vs ...string) predicate.BomItem {
return predicate.BomItem(sql.FieldIn(FieldRelatedStandard, vs...))
}
// RelatedStandardNotIn applies the NotIn predicate on the "relatedStandard" field.
func RelatedStandardNotIn(vs ...string) predicate.BomItem {
return predicate.BomItem(sql.FieldNotIn(FieldRelatedStandard, vs...))
}
// RelatedStandardGT applies the GT predicate on the "relatedStandard" field.
func RelatedStandardGT(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldGT(FieldRelatedStandard, v))
}
// RelatedStandardGTE applies the GTE predicate on the "relatedStandard" field.
func RelatedStandardGTE(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldGTE(FieldRelatedStandard, v))
}
// RelatedStandardLT applies the LT predicate on the "relatedStandard" field.
func RelatedStandardLT(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldLT(FieldRelatedStandard, v))
}
// RelatedStandardLTE applies the LTE predicate on the "relatedStandard" field.
func RelatedStandardLTE(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldLTE(FieldRelatedStandard, v))
}
// RelatedStandardContains applies the Contains predicate on the "relatedStandard" field.
func RelatedStandardContains(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldContains(FieldRelatedStandard, v))
}
// RelatedStandardHasPrefix applies the HasPrefix predicate on the "relatedStandard" field.
func RelatedStandardHasPrefix(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldHasPrefix(FieldRelatedStandard, v))
}
// RelatedStandardHasSuffix applies the HasSuffix predicate on the "relatedStandard" field.
func RelatedStandardHasSuffix(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldHasSuffix(FieldRelatedStandard, v))
}
// RelatedStandardEqualFold applies the EqualFold predicate on the "relatedStandard" field.
func RelatedStandardEqualFold(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldEqualFold(FieldRelatedStandard, v))
}
// RelatedStandardContainsFold applies the ContainsFold predicate on the "relatedStandard" field.
func RelatedStandardContainsFold(v string) predicate.BomItem {
return predicate.BomItem(sql.FieldContainsFold(FieldRelatedStandard, v))
}
// RequiredQtyEQ applies the EQ predicate on the "requiredQty" field.
func RequiredQtyEQ(v float64) predicate.BomItem {
return predicate.BomItem(sql.FieldEQ(FieldRequiredQty, v))