feat: 完成多模块迭代更新
- 新增过程巡检按步骤上报、数量不符上报、工位退料功能 - 增加工单工程编号三级归属字段 - 新增物料安全库存与缺货预警 - 新增附件管理、退库单管理模块 - 优化生产看板展示逻辑与前端页面文案 - 清理冗余的工艺路线相关代码与备份文件
This commit is contained in:
@@ -35,6 +35,8 @@ const (
|
||||
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.
|
||||
FieldIsActive = "is_active"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
@@ -60,6 +62,7 @@ var Columns = []string{
|
||||
FieldIsSerialManaged,
|
||||
FieldTemplateCode,
|
||||
FieldDrawingNo,
|
||||
FieldSafetyStock,
|
||||
FieldIsActive,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
@@ -84,6 +87,8 @@ var (
|
||||
DefaultIsBatchManaged bool
|
||||
// DefaultIsSerialManaged holds the default value on creation for the "is_serial_managed" field.
|
||||
DefaultIsSerialManaged bool
|
||||
// DefaultSafetyStock holds the default value on creation for the "safety_stock" field.
|
||||
DefaultSafetyStock int
|
||||
// DefaultIsActive holds the default value on creation for the "is_active" field.
|
||||
DefaultIsActive bool
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
@@ -160,6 +165,11 @@ 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()
|
||||
}
|
||||
|
||||
// ByIsActive orders the results by the is_active field.
|
||||
func ByIsActive(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldIsActive, opts...).ToFunc()
|
||||
|
||||
@@ -113,6 +113,11 @@ 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))
|
||||
}
|
||||
|
||||
// IsActive applies equality check predicate on the "is_active" field. It's identical to IsActiveEQ.
|
||||
func IsActive(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsActive, v))
|
||||
@@ -808,6 +813,46 @@ 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))
|
||||
}
|
||||
|
||||
// SafetyStockNEQ applies the NEQ predicate on the "safety_stock" field.
|
||||
func SafetyStockNEQ(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNEQ(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockIn applies the In predicate on the "safety_stock" field.
|
||||
func SafetyStockIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldIn(FieldSafetyStock, vs...))
|
||||
}
|
||||
|
||||
// SafetyStockNotIn applies the NotIn predicate on the "safety_stock" field.
|
||||
func SafetyStockNotIn(vs ...int) predicate.Material {
|
||||
return predicate.Material(sql.FieldNotIn(FieldSafetyStock, vs...))
|
||||
}
|
||||
|
||||
// SafetyStockGT applies the GT predicate on the "safety_stock" field.
|
||||
func SafetyStockGT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGT(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockGTE applies the GTE predicate on the "safety_stock" field.
|
||||
func SafetyStockGTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldGTE(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockLT applies the LT predicate on the "safety_stock" field.
|
||||
func SafetyStockLT(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLT(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// SafetyStockLTE applies the LTE predicate on the "safety_stock" field.
|
||||
func SafetyStockLTE(v int) predicate.Material {
|
||||
return predicate.Material(sql.FieldLTE(FieldSafetyStock, v))
|
||||
}
|
||||
|
||||
// IsActiveEQ applies the EQ predicate on the "is_active" field.
|
||||
func IsActiveEQ(v bool) predicate.Material {
|
||||
return predicate.Material(sql.FieldEQ(FieldIsActive, v))
|
||||
|
||||
Reference in New Issue
Block a user