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
-8
View File
@@ -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()