feat: 完成WMS系统权限体系与业务功能迭代
本提交完成了WMS系统的多维度优化升级: 1. 新增RBAC权限系统,支持角色/菜单/按钮三级权限管控 2. 重构库存盘点、物料管理、区域维护等模块的查询筛选与展示逻辑 3. 优化入库/出库/质检等业务流程,完善数据冗余与业务闭环 4. 移除旧装箱表,将装箱逻辑合并到出库主表 5. 新增前端权限判断工具、导出工具与端到端测试用例 6. 补充完善各类注释与数据库字段说明
This commit is contained in:
@@ -23,6 +23,14 @@ const (
|
||||
FieldStatus = "status"
|
||||
// FieldResultValue holds the string denoting the result_value field in the database.
|
||||
FieldResultValue = "result_value"
|
||||
// FieldInspectQty holds the string denoting the inspect_qty field in the database.
|
||||
FieldInspectQty = "inspect_qty"
|
||||
// FieldPassQty holds the string denoting the pass_qty field in the database.
|
||||
FieldPassQty = "pass_qty"
|
||||
// FieldCheckDesc holds the string denoting the check_desc field in the database.
|
||||
FieldCheckDesc = "check_desc"
|
||||
// FieldFailReason holds the string denoting the fail_reason field in the database.
|
||||
FieldFailReason = "fail_reason"
|
||||
// FieldInspector holds the string denoting the inspector field in the database.
|
||||
FieldInspector = "inspector"
|
||||
// FieldRemark holds the string denoting the remark field in the database.
|
||||
@@ -44,6 +52,10 @@ var Columns = []string{
|
||||
FieldInspectionType,
|
||||
FieldStatus,
|
||||
FieldResultValue,
|
||||
FieldInspectQty,
|
||||
FieldPassQty,
|
||||
FieldCheckDesc,
|
||||
FieldFailReason,
|
||||
FieldInspector,
|
||||
FieldRemark,
|
||||
FieldCreatedAt,
|
||||
@@ -65,6 +77,10 @@ var (
|
||||
DefaultInspectionType string
|
||||
// DefaultStatus holds the default value on creation for the "status" field.
|
||||
DefaultStatus string
|
||||
// DefaultInspectQty holds the default value on creation for the "inspect_qty" field.
|
||||
DefaultInspectQty int
|
||||
// DefaultPassQty holds the default value on creation for the "pass_qty" field.
|
||||
DefaultPassQty int
|
||||
// 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.
|
||||
@@ -109,6 +125,26 @@ func ByResultValue(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldResultValue, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByInspectQty orders the results by the inspect_qty field.
|
||||
func ByInspectQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInspectQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByPassQty orders the results by the pass_qty field.
|
||||
func ByPassQty(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldPassQty, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByCheckDesc orders the results by the check_desc field.
|
||||
func ByCheckDesc(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldCheckDesc, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByFailReason orders the results by the fail_reason field.
|
||||
func ByFailReason(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldFailReason, opts...).ToFunc()
|
||||
}
|
||||
|
||||
// ByInspector orders the results by the inspector field.
|
||||
func ByInspector(opts ...sql.OrderTermOption) OrderOption {
|
||||
return sql.OrderByField(FieldInspector, opts...).ToFunc()
|
||||
|
||||
@@ -83,6 +83,26 @@ func ResultValue(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldResultValue, v))
|
||||
}
|
||||
|
||||
// InspectQty applies equality check predicate on the "inspect_qty" field. It's identical to InspectQtyEQ.
|
||||
func InspectQty(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldInspectQty, v))
|
||||
}
|
||||
|
||||
// PassQty applies equality check predicate on the "pass_qty" field. It's identical to PassQtyEQ.
|
||||
func PassQty(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldPassQty, v))
|
||||
}
|
||||
|
||||
// CheckDesc applies equality check predicate on the "check_desc" field. It's identical to CheckDescEQ.
|
||||
func CheckDesc(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// FailReason applies equality check predicate on the "fail_reason" field. It's identical to FailReasonEQ.
|
||||
func FailReason(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// Inspector applies equality check predicate on the "inspector" field. It's identical to InspectorEQ.
|
||||
func Inspector(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldInspector, v))
|
||||
@@ -503,6 +523,236 @@ func ResultValueContainsFold(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldContainsFold(FieldResultValue, v))
|
||||
}
|
||||
|
||||
// InspectQtyEQ applies the EQ predicate on the "inspect_qty" field.
|
||||
func InspectQtyEQ(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldInspectQty, v))
|
||||
}
|
||||
|
||||
// InspectQtyNEQ applies the NEQ predicate on the "inspect_qty" field.
|
||||
func InspectQtyNEQ(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNEQ(FieldInspectQty, v))
|
||||
}
|
||||
|
||||
// InspectQtyIn applies the In predicate on the "inspect_qty" field.
|
||||
func InspectQtyIn(vs ...int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldIn(FieldInspectQty, vs...))
|
||||
}
|
||||
|
||||
// InspectQtyNotIn applies the NotIn predicate on the "inspect_qty" field.
|
||||
func InspectQtyNotIn(vs ...int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNotIn(FieldInspectQty, vs...))
|
||||
}
|
||||
|
||||
// InspectQtyGT applies the GT predicate on the "inspect_qty" field.
|
||||
func InspectQtyGT(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldGT(FieldInspectQty, v))
|
||||
}
|
||||
|
||||
// InspectQtyGTE applies the GTE predicate on the "inspect_qty" field.
|
||||
func InspectQtyGTE(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldGTE(FieldInspectQty, v))
|
||||
}
|
||||
|
||||
// InspectQtyLT applies the LT predicate on the "inspect_qty" field.
|
||||
func InspectQtyLT(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldLT(FieldInspectQty, v))
|
||||
}
|
||||
|
||||
// InspectQtyLTE applies the LTE predicate on the "inspect_qty" field.
|
||||
func InspectQtyLTE(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldLTE(FieldInspectQty, v))
|
||||
}
|
||||
|
||||
// PassQtyEQ applies the EQ predicate on the "pass_qty" field.
|
||||
func PassQtyEQ(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldPassQty, v))
|
||||
}
|
||||
|
||||
// PassQtyNEQ applies the NEQ predicate on the "pass_qty" field.
|
||||
func PassQtyNEQ(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNEQ(FieldPassQty, v))
|
||||
}
|
||||
|
||||
// PassQtyIn applies the In predicate on the "pass_qty" field.
|
||||
func PassQtyIn(vs ...int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldIn(FieldPassQty, vs...))
|
||||
}
|
||||
|
||||
// PassQtyNotIn applies the NotIn predicate on the "pass_qty" field.
|
||||
func PassQtyNotIn(vs ...int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNotIn(FieldPassQty, vs...))
|
||||
}
|
||||
|
||||
// PassQtyGT applies the GT predicate on the "pass_qty" field.
|
||||
func PassQtyGT(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldGT(FieldPassQty, v))
|
||||
}
|
||||
|
||||
// PassQtyGTE applies the GTE predicate on the "pass_qty" field.
|
||||
func PassQtyGTE(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldGTE(FieldPassQty, v))
|
||||
}
|
||||
|
||||
// PassQtyLT applies the LT predicate on the "pass_qty" field.
|
||||
func PassQtyLT(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldLT(FieldPassQty, v))
|
||||
}
|
||||
|
||||
// PassQtyLTE applies the LTE predicate on the "pass_qty" field.
|
||||
func PassQtyLTE(v int) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldLTE(FieldPassQty, v))
|
||||
}
|
||||
|
||||
// CheckDescEQ applies the EQ predicate on the "check_desc" field.
|
||||
func CheckDescEQ(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescNEQ applies the NEQ predicate on the "check_desc" field.
|
||||
func CheckDescNEQ(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNEQ(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescIn applies the In predicate on the "check_desc" field.
|
||||
func CheckDescIn(vs ...string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldIn(FieldCheckDesc, vs...))
|
||||
}
|
||||
|
||||
// CheckDescNotIn applies the NotIn predicate on the "check_desc" field.
|
||||
func CheckDescNotIn(vs ...string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNotIn(FieldCheckDesc, vs...))
|
||||
}
|
||||
|
||||
// CheckDescGT applies the GT predicate on the "check_desc" field.
|
||||
func CheckDescGT(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldGT(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescGTE applies the GTE predicate on the "check_desc" field.
|
||||
func CheckDescGTE(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldGTE(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescLT applies the LT predicate on the "check_desc" field.
|
||||
func CheckDescLT(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldLT(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescLTE applies the LTE predicate on the "check_desc" field.
|
||||
func CheckDescLTE(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldLTE(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescContains applies the Contains predicate on the "check_desc" field.
|
||||
func CheckDescContains(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldContains(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescHasPrefix applies the HasPrefix predicate on the "check_desc" field.
|
||||
func CheckDescHasPrefix(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldHasPrefix(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescHasSuffix applies the HasSuffix predicate on the "check_desc" field.
|
||||
func CheckDescHasSuffix(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldHasSuffix(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescIsNil applies the IsNil predicate on the "check_desc" field.
|
||||
func CheckDescIsNil() predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldIsNull(FieldCheckDesc))
|
||||
}
|
||||
|
||||
// CheckDescNotNil applies the NotNil predicate on the "check_desc" field.
|
||||
func CheckDescNotNil() predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNotNull(FieldCheckDesc))
|
||||
}
|
||||
|
||||
// CheckDescEqualFold applies the EqualFold predicate on the "check_desc" field.
|
||||
func CheckDescEqualFold(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEqualFold(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// CheckDescContainsFold applies the ContainsFold predicate on the "check_desc" field.
|
||||
func CheckDescContainsFold(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldContainsFold(FieldCheckDesc, v))
|
||||
}
|
||||
|
||||
// FailReasonEQ applies the EQ predicate on the "fail_reason" field.
|
||||
func FailReasonEQ(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonNEQ applies the NEQ predicate on the "fail_reason" field.
|
||||
func FailReasonNEQ(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNEQ(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonIn applies the In predicate on the "fail_reason" field.
|
||||
func FailReasonIn(vs ...string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldIn(FieldFailReason, vs...))
|
||||
}
|
||||
|
||||
// FailReasonNotIn applies the NotIn predicate on the "fail_reason" field.
|
||||
func FailReasonNotIn(vs ...string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNotIn(FieldFailReason, vs...))
|
||||
}
|
||||
|
||||
// FailReasonGT applies the GT predicate on the "fail_reason" field.
|
||||
func FailReasonGT(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldGT(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonGTE applies the GTE predicate on the "fail_reason" field.
|
||||
func FailReasonGTE(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldGTE(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonLT applies the LT predicate on the "fail_reason" field.
|
||||
func FailReasonLT(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldLT(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonLTE applies the LTE predicate on the "fail_reason" field.
|
||||
func FailReasonLTE(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldLTE(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonContains applies the Contains predicate on the "fail_reason" field.
|
||||
func FailReasonContains(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldContains(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonHasPrefix applies the HasPrefix predicate on the "fail_reason" field.
|
||||
func FailReasonHasPrefix(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldHasPrefix(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonHasSuffix applies the HasSuffix predicate on the "fail_reason" field.
|
||||
func FailReasonHasSuffix(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldHasSuffix(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonIsNil applies the IsNil predicate on the "fail_reason" field.
|
||||
func FailReasonIsNil() predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldIsNull(FieldFailReason))
|
||||
}
|
||||
|
||||
// FailReasonNotNil applies the NotNil predicate on the "fail_reason" field.
|
||||
func FailReasonNotNil() predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldNotNull(FieldFailReason))
|
||||
}
|
||||
|
||||
// FailReasonEqualFold applies the EqualFold predicate on the "fail_reason" field.
|
||||
func FailReasonEqualFold(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEqualFold(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// FailReasonContainsFold applies the ContainsFold predicate on the "fail_reason" field.
|
||||
func FailReasonContainsFold(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldContainsFold(FieldFailReason, v))
|
||||
}
|
||||
|
||||
// InspectorEQ applies the EQ predicate on the "inspector" field.
|
||||
func InspectorEQ(v string) predicate.InspectionRecord {
|
||||
return predicate.InspectionRecord(sql.FieldEQ(FieldInspector, v))
|
||||
|
||||
Reference in New Issue
Block a user