feat: 完成WMS系统权限体系与业务功能迭代

本提交完成了WMS系统的多维度优化升级:
1. 新增RBAC权限系统,支持角色/菜单/按钮三级权限管控
2. 重构库存盘点、物料管理、区域维护等模块的查询筛选与展示逻辑
3. 优化入库/出库/质检等业务流程,完善数据冗余与业务闭环
4. 移除旧装箱表,将装箱逻辑合并到出库主表
5. 新增前端权限判断工具、导出工具与端到端测试用例
6. 补充完善各类注释与数据库字段说明
This commit is contained in:
SunYF
2026-09-03 14:20:37 +08:00
parent 665ff257dc
commit 572fa975bc
101 changed files with 14531 additions and 4692 deletions
@@ -37,6 +37,12 @@ const (
FieldTargetDock = "target_dock"
// FieldRemark holds the string denoting the remark field in the database.
FieldRemark = "remark"
// FieldBoxNo holds the string denoting the box_no field in the database.
FieldBoxNo = "box_no"
// FieldBoxSnList holds the string denoting the box_sn_list field in the database.
FieldBoxSnList = "box_sn_list"
// FieldContractNo holds the string denoting the contract_no field in the database.
FieldContractNo = "contract_no"
// FieldCreatedAt holds the string denoting the created_at field in the database.
FieldCreatedAt = "created_at"
// Table holds the table name of the outboundorder in the database.
@@ -59,6 +65,9 @@ var Columns = []string{
FieldReviewer,
FieldTargetDock,
FieldRemark,
FieldBoxNo,
FieldBoxSnList,
FieldContractNo,
FieldCreatedAt,
}
@@ -156,6 +165,21 @@ func ByRemark(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldRemark, opts...).ToFunc()
}
// ByBoxNo orders the results by the box_no field.
func ByBoxNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBoxNo, opts...).ToFunc()
}
// ByBoxSnList orders the results by the box_sn_list field.
func ByBoxSnList(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldBoxSnList, opts...).ToFunc()
}
// ByContractNo orders the results by the contract_no field.
func ByContractNo(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldContractNo, opts...).ToFunc()
}
// ByCreatedAt orders the results by the created_at field.
func ByCreatedAt(opts ...sql.OrderTermOption) OrderOption {
return sql.OrderByField(FieldCreatedAt, opts...).ToFunc()
+240
View File
@@ -118,6 +118,21 @@ func Remark(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldRemark, v))
}
// BoxNo applies equality check predicate on the "box_no" field. It's identical to BoxNoEQ.
func BoxNo(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldBoxNo, v))
}
// BoxSnList applies equality check predicate on the "box_sn_list" field. It's identical to BoxSnListEQ.
func BoxSnList(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldBoxSnList, v))
}
// ContractNo applies equality check predicate on the "contract_no" field. It's identical to ContractNoEQ.
func ContractNo(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldContractNo, v))
}
// CreatedAt applies equality check predicate on the "created_at" field. It's identical to CreatedAtEQ.
func CreatedAt(v int64) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldCreatedAt, v))
@@ -998,6 +1013,231 @@ func RemarkContainsFold(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldContainsFold(FieldRemark, v))
}
// BoxNoEQ applies the EQ predicate on the "box_no" field.
func BoxNoEQ(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldBoxNo, v))
}
// BoxNoNEQ applies the NEQ predicate on the "box_no" field.
func BoxNoNEQ(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNEQ(FieldBoxNo, v))
}
// BoxNoIn applies the In predicate on the "box_no" field.
func BoxNoIn(vs ...string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldIn(FieldBoxNo, vs...))
}
// BoxNoNotIn applies the NotIn predicate on the "box_no" field.
func BoxNoNotIn(vs ...string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNotIn(FieldBoxNo, vs...))
}
// BoxNoGT applies the GT predicate on the "box_no" field.
func BoxNoGT(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldGT(FieldBoxNo, v))
}
// BoxNoGTE applies the GTE predicate on the "box_no" field.
func BoxNoGTE(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldGTE(FieldBoxNo, v))
}
// BoxNoLT applies the LT predicate on the "box_no" field.
func BoxNoLT(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldLT(FieldBoxNo, v))
}
// BoxNoLTE applies the LTE predicate on the "box_no" field.
func BoxNoLTE(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldLTE(FieldBoxNo, v))
}
// BoxNoContains applies the Contains predicate on the "box_no" field.
func BoxNoContains(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldContains(FieldBoxNo, v))
}
// BoxNoHasPrefix applies the HasPrefix predicate on the "box_no" field.
func BoxNoHasPrefix(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldHasPrefix(FieldBoxNo, v))
}
// BoxNoHasSuffix applies the HasSuffix predicate on the "box_no" field.
func BoxNoHasSuffix(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldHasSuffix(FieldBoxNo, v))
}
// BoxNoIsNil applies the IsNil predicate on the "box_no" field.
func BoxNoIsNil() predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldIsNull(FieldBoxNo))
}
// BoxNoNotNil applies the NotNil predicate on the "box_no" field.
func BoxNoNotNil() predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNotNull(FieldBoxNo))
}
// BoxNoEqualFold applies the EqualFold predicate on the "box_no" field.
func BoxNoEqualFold(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEqualFold(FieldBoxNo, v))
}
// BoxNoContainsFold applies the ContainsFold predicate on the "box_no" field.
func BoxNoContainsFold(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldContainsFold(FieldBoxNo, v))
}
// BoxSnListEQ applies the EQ predicate on the "box_sn_list" field.
func BoxSnListEQ(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldBoxSnList, v))
}
// BoxSnListNEQ applies the NEQ predicate on the "box_sn_list" field.
func BoxSnListNEQ(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNEQ(FieldBoxSnList, v))
}
// BoxSnListIn applies the In predicate on the "box_sn_list" field.
func BoxSnListIn(vs ...string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldIn(FieldBoxSnList, vs...))
}
// BoxSnListNotIn applies the NotIn predicate on the "box_sn_list" field.
func BoxSnListNotIn(vs ...string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNotIn(FieldBoxSnList, vs...))
}
// BoxSnListGT applies the GT predicate on the "box_sn_list" field.
func BoxSnListGT(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldGT(FieldBoxSnList, v))
}
// BoxSnListGTE applies the GTE predicate on the "box_sn_list" field.
func BoxSnListGTE(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldGTE(FieldBoxSnList, v))
}
// BoxSnListLT applies the LT predicate on the "box_sn_list" field.
func BoxSnListLT(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldLT(FieldBoxSnList, v))
}
// BoxSnListLTE applies the LTE predicate on the "box_sn_list" field.
func BoxSnListLTE(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldLTE(FieldBoxSnList, v))
}
// BoxSnListContains applies the Contains predicate on the "box_sn_list" field.
func BoxSnListContains(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldContains(FieldBoxSnList, v))
}
// BoxSnListHasPrefix applies the HasPrefix predicate on the "box_sn_list" field.
func BoxSnListHasPrefix(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldHasPrefix(FieldBoxSnList, v))
}
// BoxSnListHasSuffix applies the HasSuffix predicate on the "box_sn_list" field.
func BoxSnListHasSuffix(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldHasSuffix(FieldBoxSnList, v))
}
// BoxSnListIsNil applies the IsNil predicate on the "box_sn_list" field.
func BoxSnListIsNil() predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldIsNull(FieldBoxSnList))
}
// BoxSnListNotNil applies the NotNil predicate on the "box_sn_list" field.
func BoxSnListNotNil() predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNotNull(FieldBoxSnList))
}
// BoxSnListEqualFold applies the EqualFold predicate on the "box_sn_list" field.
func BoxSnListEqualFold(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEqualFold(FieldBoxSnList, v))
}
// BoxSnListContainsFold applies the ContainsFold predicate on the "box_sn_list" field.
func BoxSnListContainsFold(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldContainsFold(FieldBoxSnList, v))
}
// ContractNoEQ applies the EQ predicate on the "contract_no" field.
func ContractNoEQ(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldContractNo, v))
}
// ContractNoNEQ applies the NEQ predicate on the "contract_no" field.
func ContractNoNEQ(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNEQ(FieldContractNo, v))
}
// ContractNoIn applies the In predicate on the "contract_no" field.
func ContractNoIn(vs ...string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldIn(FieldContractNo, vs...))
}
// ContractNoNotIn applies the NotIn predicate on the "contract_no" field.
func ContractNoNotIn(vs ...string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNotIn(FieldContractNo, vs...))
}
// ContractNoGT applies the GT predicate on the "contract_no" field.
func ContractNoGT(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldGT(FieldContractNo, v))
}
// ContractNoGTE applies the GTE predicate on the "contract_no" field.
func ContractNoGTE(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldGTE(FieldContractNo, v))
}
// ContractNoLT applies the LT predicate on the "contract_no" field.
func ContractNoLT(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldLT(FieldContractNo, v))
}
// ContractNoLTE applies the LTE predicate on the "contract_no" field.
func ContractNoLTE(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldLTE(FieldContractNo, v))
}
// ContractNoContains applies the Contains predicate on the "contract_no" field.
func ContractNoContains(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldContains(FieldContractNo, v))
}
// ContractNoHasPrefix applies the HasPrefix predicate on the "contract_no" field.
func ContractNoHasPrefix(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldHasPrefix(FieldContractNo, v))
}
// ContractNoHasSuffix applies the HasSuffix predicate on the "contract_no" field.
func ContractNoHasSuffix(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldHasSuffix(FieldContractNo, v))
}
// ContractNoIsNil applies the IsNil predicate on the "contract_no" field.
func ContractNoIsNil() predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldIsNull(FieldContractNo))
}
// ContractNoNotNil applies the NotNil predicate on the "contract_no" field.
func ContractNoNotNil() predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldNotNull(FieldContractNo))
}
// ContractNoEqualFold applies the EqualFold predicate on the "contract_no" field.
func ContractNoEqualFold(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEqualFold(FieldContractNo, v))
}
// ContractNoContainsFold applies the ContainsFold predicate on the "contract_no" field.
func ContractNoContainsFold(v string) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldContainsFold(FieldContractNo, v))
}
// CreatedAtEQ applies the EQ predicate on the "created_at" field.
func CreatedAtEQ(v int64) predicate.OutboundOrder {
return predicate.OutboundOrder(sql.FieldEQ(FieldCreatedAt, v))