feat(mes): 添加定时同步可生产数量到WMS及BOM项相关标准字段
- 在main.go中添加定时任务每10分钟同步可生产数量到WMS系统 - 为BomItem实体添加relatedStandard字段及相关CRUD方法 - 为InspectionRecord实体添加reportNo、materialCode、materialName等字段 - 更新ent schema确保新字段的验证和默认值设置 - 添加必要的数据库迁移和字段映射逻辑
This commit is contained in:
@@ -21,6 +21,12 @@ const (
|
||||
FieldMaterialCode = "material_code"
|
||||
// FieldZoneCode holds the string denoting the zone_code field in the database.
|
||||
FieldZoneCode = "zone_code"
|
||||
// FieldShelfNo holds the string denoting the shelf_no field in the database.
|
||||
FieldShelfNo = "shelf_no"
|
||||
// FieldLayerNo holds the string denoting the layer_no field in the database.
|
||||
FieldLayerNo = "layer_no"
|
||||
// FieldPositionNo holds the string denoting the position_no field in the database.
|
||||
FieldPositionNo = "position_no"
|
||||
// FieldBookQty holds the string denoting the book_qty field in the database.
|
||||
FieldBookQty = "book_qty"
|
||||
// FieldScannedQty holds the string denoting the scanned_qty field in the database.
|
||||
@@ -43,6 +49,9 @@ var Columns = []string{
|
||||
FieldTargetID,
|
||||
FieldMaterialCode,
|
||||
FieldZoneCode,
|
||||
FieldShelfNo,
|
||||
FieldLayerNo,
|
||||
FieldPositionNo,
|
||||
FieldBookQty,
|
||||
FieldScannedQty,
|
||||
FieldDiffQty,
|
||||
@@ -106,6 +115,21 @@ func ByZoneCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldZoneCode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByShelfNo orders the results by the shelf_no field.
|
||||
func ByShelfNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldShelfNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByLayerNo orders the results by the layer_no field.
|
||||
func ByLayerNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldLayerNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPositionNo orders the results by the position_no field.
|
||||
func ByPositionNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPositionNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByBookQty orders the results by the book_qty field.
|
||||
func ByBookQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldBookQty, opts...).ToFunc()
|
||||
|
||||
Reference in New Issue
Block a user