feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段
- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统 - 为BomItem实体添加relatedStandard字段及相关CRUD方法 - 为InspectionRecord实体添加reportNo、materialCode、materialName等字段 - 更新ent schema确保新字段的验证和默认值设置 - 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
@@ -15,6 +15,14 @@ const (
|
||||
FieldOutboundNo = "outbound_no"
|
||||
// FieldOutboundType holds the string denoting the outbound_type field in the database.
|
||||
FieldOutboundType = "outbound_type"
|
||||
// FieldOutboundCategory holds the string denoting the outbound_category field in the database.
|
||||
FieldOutboundCategory = "outbound_category"
|
||||
// FieldOwnershipType holds the string denoting the ownership_type field in the database.
|
||||
FieldOwnershipType = "ownership_type"
|
||||
// FieldOwnershipNo holds the string denoting the ownership_no field in the database.
|
||||
FieldOwnershipNo = "ownership_no"
|
||||
// FieldTargetStation holds the string denoting the target_station field in the database.
|
||||
FieldTargetStation = "target_station"
|
||||
// FieldOrderNo holds the string denoting the order_no field in the database.
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldMaterialCode holds the string denoting the material_code field in the database.
|
||||
@@ -54,6 +62,10 @@ var Columns = []string{
|
||||
FieldID,
|
||||
FieldOutboundNo,
|
||||
FieldOutboundType,
|
||||
FieldOutboundCategory,
|
||||
FieldOwnershipType,
|
||||
FieldOwnershipNo,
|
||||
FieldTargetStation,
|
||||
FieldOrderNo,
|
||||
FieldMaterialCode,
|
||||
FieldMaterialName,
|
||||
@@ -110,6 +122,26 @@ func ByOutboundType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOutboundType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOutboundCategory orders the results by the outbound_category field.
|
||||
func ByOutboundCategory(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOutboundCategory, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnershipType orders the results by the ownership_type field.
|
||||
func ByOwnershipType(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOwnershipType, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOwnershipNo orders the results by the ownership_no field.
|
||||
func ByOwnershipNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOwnershipNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByTargetStation orders the results by the target_station field.
|
||||
func ByTargetStation(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldTargetStation, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOrderNo orders the results by the order_no field.
|
||||
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
||||
|
||||
Reference in New Issue
Block a user