chore: 批量完成项目多模块迭代优化
1. 废弃半成品库存表并统一库存主表 2. 修复列表排序与搜索大小写不敏感问题 3. 新增用户最近登录时间、工单BOM名称字段 4. 完善角色管理、工位选择器功能 5. 增加拧紧数据补录、成品自动回流WMS能力 6. 统一导出时间范围校验规则 7. 丰富物料/备料单筛选条件 8. 调整菜单与权限命名适配产品型号业务
This commit is contained in:
@@ -13,6 +13,8 @@ const (
|
||||
FieldID = "id"
|
||||
// FieldManageMode holds the string denoting the manage_mode field in the database.
|
||||
FieldManageMode = "manage_mode"
|
||||
// FieldCategory holds the string denoting the category field in the database.
|
||||
FieldCategory = "category"
|
||||
// FieldMaterialCode holds the string denoting the material_code field in the database.
|
||||
FieldMaterialCode = "material_code"
|
||||
// FieldMaterialName holds the string denoting the material_name field in the database.
|
||||
@@ -37,6 +39,10 @@ const (
|
||||
FieldSupplier = "supplier"
|
||||
// FieldInboundNo holds the string denoting the inbound_no field in the database.
|
||||
FieldInboundNo = "inbound_no"
|
||||
// FieldOrderNo holds the string denoting the order_no field in the database.
|
||||
FieldOrderNo = "order_no"
|
||||
// FieldCompletedProcess holds the string denoting the completed_process field in the database.
|
||||
FieldCompletedProcess = "completed_process"
|
||||
// FieldRemark holds the string denoting the remark field in the database.
|
||||
FieldRemark = "remark"
|
||||
// FieldCreatedAt holds the string denoting the created_at field in the database.
|
||||
@@ -51,6 +57,7 @@ const (
|
||||
var Columns = []string{
|
||||
FieldID,
|
||||
FieldManageMode,
|
||||
FieldCategory,
|
||||
FieldMaterialCode,
|
||||
FieldMaterialName,
|
||||
FieldBatchNo,
|
||||
@@ -63,6 +70,8 @@ var Columns = []string{
|
||||
FieldProductionDate,
|
||||
FieldSupplier,
|
||||
FieldInboundNo,
|
||||
FieldOrderNo,
|
||||
FieldCompletedProcess,
|
||||
FieldRemark,
|
||||
FieldCreatedAt,
|
||||
FieldUpdatedAt,
|
||||
@@ -79,6 +88,8 @@ func ValidColumn(column string) bool {
|
||||
}
|
||||
|
||||
var (
|
||||
// DefaultCategory holds the default value on creation for the "category" field.
|
||||
DefaultCategory int
|
||||
// DefaultQuantity holds the default value on creation for the "quantity" field.
|
||||
DefaultQuantity int
|
||||
// DefaultLockedQty holds the default value on creation for the "locked_qty" field.
|
||||
@@ -87,6 +98,14 @@ var (
|
||||
DefaultQualityStatus string
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// DefaultOrderNo holds the default value on creation for the "order_no" field.
|
||||
DefaultOrderNo string
|
||||
// OrderNoValidator is a validator for the "order_no" field. It is called by the builders before save.
|
||||
OrderNoValidator func(string) error
|
||||
// DefaultCompletedProcess holds the default value on creation for the "completed_process" field.
|
||||
DefaultCompletedProcess string
|
||||
// CompletedProcessValidator is a validator for the "completed_process" field. It is called by the builders before save.
|
||||
CompletedProcessValidator func(string) error
|
||||
// DefaultCreatedAt holds the default value on creation for the "created_at" field.
|
||||
DefaultCreatedAt func() int64
|
||||
// DefaultUpdatedAt holds the default value on creation for the "updated_at" field.
|
||||
@@ -106,6 +125,11 @@ func ByManageMode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldManageMode, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCategory orders the results by the category field.
|
||||
func ByCategory(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCategory, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByMaterialCode orders the results by the material_code field.
|
||||
func ByMaterialCode(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldMaterialCode, opts...).ToFunc()
|
||||
@@ -166,6 +190,16 @@ func ByInboundNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInboundNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByOrderNo orders the results by the order_no field.
|
||||
func ByOrderNo(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldOrderNo, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCompletedProcess orders the results by the completed_process field.
|
||||
func ByCompletedProcess(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCompletedProcess, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByRemark orders the results by the remark field.
|
||||
func ByRemark(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldRemark, opts...).ToFunc()
|
||||
|
||||
@@ -58,6 +58,11 @@ func ManageMode(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// Category applies equality check predicate on the "category" field. It's identical to CategoryEQ.
|
||||
func Category(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldCategory, v))
|
||||
}
|
||||
|
||||
// MaterialCode applies equality check predicate on the "material_code" field. It's identical to MaterialCodeEQ.
|
||||
func MaterialCode(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldMaterialCode, v))
|
||||
@@ -118,6 +123,16 @@ func InboundNo(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldInboundNo, v))
|
||||
}
|
||||
|
||||
// OrderNo applies equality check predicate on the "order_no" field. It's identical to OrderNoEQ.
|
||||
func OrderNo(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// CompletedProcess applies equality check predicate on the "completed_process" field. It's identical to CompletedProcessEQ.
|
||||
func CompletedProcess(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// Remark applies equality check predicate on the "remark" field. It's identical to RemarkEQ.
|
||||
func Remark(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldRemark, v))
|
||||
@@ -173,6 +188,46 @@ func ManageModeLTE(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldLTE(FieldManageMode, v))
|
||||
}
|
||||
|
||||
// CategoryEQ applies the EQ predicate on the "category" field.
|
||||
func CategoryEQ(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldCategory, v))
|
||||
}
|
||||
|
||||
// CategoryNEQ applies the NEQ predicate on the "category" field.
|
||||
func CategoryNEQ(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldNEQ(FieldCategory, v))
|
||||
}
|
||||
|
||||
// CategoryIn applies the In predicate on the "category" field.
|
||||
func CategoryIn(vs ...int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldIn(FieldCategory, vs...))
|
||||
}
|
||||
|
||||
// CategoryNotIn applies the NotIn predicate on the "category" field.
|
||||
func CategoryNotIn(vs ...int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldNotIn(FieldCategory, vs...))
|
||||
}
|
||||
|
||||
// CategoryGT applies the GT predicate on the "category" field.
|
||||
func CategoryGT(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldGT(FieldCategory, v))
|
||||
}
|
||||
|
||||
// CategoryGTE applies the GTE predicate on the "category" field.
|
||||
func CategoryGTE(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldGTE(FieldCategory, v))
|
||||
}
|
||||
|
||||
// CategoryLT applies the LT predicate on the "category" field.
|
||||
func CategoryLT(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldLT(FieldCategory, v))
|
||||
}
|
||||
|
||||
// CategoryLTE applies the LTE predicate on the "category" field.
|
||||
func CategoryLTE(v int) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldLTE(FieldCategory, v))
|
||||
}
|
||||
|
||||
// MaterialCodeEQ applies the EQ predicate on the "material_code" field.
|
||||
func MaterialCodeEQ(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldMaterialCode, v))
|
||||
@@ -973,6 +1028,136 @@ func InboundNoContainsFold(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldContainsFold(FieldInboundNo, v))
|
||||
}
|
||||
|
||||
// OrderNoEQ applies the EQ predicate on the "order_no" field.
|
||||
func OrderNoEQ(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoNEQ applies the NEQ predicate on the "order_no" field.
|
||||
func OrderNoNEQ(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldNEQ(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoIn applies the In predicate on the "order_no" field.
|
||||
func OrderNoIn(vs ...string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldIn(FieldOrderNo, vs...))
|
||||
}
|
||||
|
||||
// OrderNoNotIn applies the NotIn predicate on the "order_no" field.
|
||||
func OrderNoNotIn(vs ...string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldNotIn(FieldOrderNo, vs...))
|
||||
}
|
||||
|
||||
// OrderNoGT applies the GT predicate on the "order_no" field.
|
||||
func OrderNoGT(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldGT(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoGTE applies the GTE predicate on the "order_no" field.
|
||||
func OrderNoGTE(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldGTE(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoLT applies the LT predicate on the "order_no" field.
|
||||
func OrderNoLT(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldLT(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoLTE applies the LTE predicate on the "order_no" field.
|
||||
func OrderNoLTE(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldLTE(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoContains applies the Contains predicate on the "order_no" field.
|
||||
func OrderNoContains(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldContains(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoHasPrefix applies the HasPrefix predicate on the "order_no" field.
|
||||
func OrderNoHasPrefix(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldHasPrefix(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoHasSuffix applies the HasSuffix predicate on the "order_no" field.
|
||||
func OrderNoHasSuffix(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldHasSuffix(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoEqualFold applies the EqualFold predicate on the "order_no" field.
|
||||
func OrderNoEqualFold(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEqualFold(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// OrderNoContainsFold applies the ContainsFold predicate on the "order_no" field.
|
||||
func OrderNoContainsFold(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldContainsFold(FieldOrderNo, v))
|
||||
}
|
||||
|
||||
// CompletedProcessEQ applies the EQ predicate on the "completed_process" field.
|
||||
func CompletedProcessEQ(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessNEQ applies the NEQ predicate on the "completed_process" field.
|
||||
func CompletedProcessNEQ(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldNEQ(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessIn applies the In predicate on the "completed_process" field.
|
||||
func CompletedProcessIn(vs ...string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldIn(FieldCompletedProcess, vs...))
|
||||
}
|
||||
|
||||
// CompletedProcessNotIn applies the NotIn predicate on the "completed_process" field.
|
||||
func CompletedProcessNotIn(vs ...string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldNotIn(FieldCompletedProcess, vs...))
|
||||
}
|
||||
|
||||
// CompletedProcessGT applies the GT predicate on the "completed_process" field.
|
||||
func CompletedProcessGT(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldGT(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessGTE applies the GTE predicate on the "completed_process" field.
|
||||
func CompletedProcessGTE(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldGTE(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessLT applies the LT predicate on the "completed_process" field.
|
||||
func CompletedProcessLT(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldLT(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessLTE applies the LTE predicate on the "completed_process" field.
|
||||
func CompletedProcessLTE(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldLTE(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessContains applies the Contains predicate on the "completed_process" field.
|
||||
func CompletedProcessContains(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldContains(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessHasPrefix applies the HasPrefix predicate on the "completed_process" field.
|
||||
func CompletedProcessHasPrefix(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldHasPrefix(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessHasSuffix applies the HasSuffix predicate on the "completed_process" field.
|
||||
func CompletedProcessHasSuffix(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldHasSuffix(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessEqualFold applies the EqualFold predicate on the "completed_process" field.
|
||||
func CompletedProcessEqualFold(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEqualFold(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// CompletedProcessContainsFold applies the ContainsFold predicate on the "completed_process" field.
|
||||
func CompletedProcessContainsFold(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldContainsFold(FieldCompletedProcess, v))
|
||||
}
|
||||
|
||||
// RemarkEQ applies the EQ predicate on the "remark" field.
|
||||
func RemarkEQ(v string) predicate.Inventory {
|
||||
return predicate.Inventory(sql.FieldEQ(FieldRemark, v))
|
||||
|
||||
Reference in New Issue
Block a user