feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段
- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统 - 为BomItem实体添加relatedStandard字段及相关CRUD方法 - 为InspectionRecord实体添加reportNo、materialCode、materialName等字段 - 更新ent schema确保新字段的验证和默认值设置 - 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
@@ -33,8 +33,6 @@ const (
|
||||
FieldIsSerialManaged = "is_serial_managed"
|
||||
// FieldTemplateCode holds the string denoting the template_code field in the database.
|
||||
FieldTemplateCode = "template_code"
|
||||
// FieldDrawingNo holds the string denoting the drawing_no field in the database.
|
||||
FieldDrawingNo = "drawing_no"
|
||||
// FieldSafetyStock holds the string denoting the safety_stock field in the database.
|
||||
FieldSafetyStock = "safety_stock"
|
||||
// FieldIsActive holds the string denoting the is_active field in the database.
|
||||
@@ -61,7 +59,6 @@ var Columns = []string{
|
||||
FieldIsBatchManaged,
|
||||
FieldIsSerialManaged,
|
||||
FieldTemplateCode,
|
||||
FieldDrawingNo,
|
||||
FieldSafetyStock,
|
||||
FieldIsActive,
|
||||
FieldCreatedAt,
|
||||
@@ -160,11 +157,6 @@ func ByTemplateCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTemplateCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByDrawingNo orders the results by the drawing_no field.
|
||||
func ByDrawingNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldDrawingNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// BySafetyStock orders the results by the safety_stock field.
|
||||
func BySafetyStock(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldSafetyStock, opts...).ToFunc()
|
||||
|
||||
@@ -108,11 +108,6 @@ func TemplateCode(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// DrawingNo applies equality check predicate on the "drawing_no" field. It's identical to DrawingNoEQ.
|
||||
func DrawingNo(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// SafetyStock applies equality check predicate on the "safety_stock" field. It's identical to SafetyStockEQ.
|
||||
func SafetyStock(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSafetyStock, v))
|
||||
@@ -738,81 +733,6 @@ func TemplateCodeContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldTemplateCode, v))
|
||||
}
|
||||
|
||||
// DrawingNoEQ applies the EQ predicate on the "drawing_no" field.
|
||||
func DrawingNoEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoNEQ applies the NEQ predicate on the "drawing_no" field.
|
||||
func DrawingNoNEQ(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoIn applies the In predicate on the "drawing_no" field.
|
||||
func DrawingNoIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldDrawingNo, vs...))
|
||||
}
|
||||
|
||||
// DrawingNoNotIn applies the NotIn predicate on the "drawing_no" field.
|
||||
func DrawingNoNotIn(vs ...string) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldDrawingNo, vs...))
|
||||
}
|
||||
|
||||
// DrawingNoGT applies the GT predicate on the "drawing_no" field.
|
||||
func DrawingNoGT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoGTE applies the GTE predicate on the "drawing_no" field.
|
||||
func DrawingNoGTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoLT applies the LT predicate on the "drawing_no" field.
|
||||
func DrawingNoLT(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoLTE applies the LTE predicate on the "drawing_no" field.
|
||||
func DrawingNoLTE(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoContains applies the Contains predicate on the "drawing_no" field.
|
||||
func DrawingNoContains(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContains(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoHasPrefix applies the HasPrefix predicate on the "drawing_no" field.
|
||||
func DrawingNoHasPrefix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasPrefix(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoHasSuffix applies the HasSuffix predicate on the "drawing_no" field.
|
||||
func DrawingNoHasSuffix(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldHasSuffix(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoIsNil applies the IsNil predicate on the "drawing_no" field.
|
||||
func DrawingNoIsNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldIsNull(FieldDrawingNo))
|
||||
}
|
||||
|
||||
// DrawingNoNotNil applies the NotNil predicate on the "drawing_no" field.
|
||||
func DrawingNoNotNil() predicate.Material {
|
||||
return predicate.Material(sql.FieldNotNull(FieldDrawingNo))
|
||||
}
|
||||
|
||||
// DrawingNoEqualFold applies the EqualFold predicate on the "drawing_no" field.
|
||||
func DrawingNoEqualFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldEqualFold(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// DrawingNoContainsFold applies the ContainsFold predicate on the "drawing_no" field.
|
||||
func DrawingNoContainsFold(v string) predicate.Material {
|
||||
return predicate.Material(sql.FieldContainsFold(FieldDrawingNo, v))
|
||||
}
|
||||
|
||||
// SafetyStockEQ applies the EQ predicate on the "safety_stock" field.
|
||||
func SafetyStockEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldSafetyStock, v))
|
||||
|
||||
Reference in New Issue
Block a user