feat: 完成WMS系统权限体系与业务功能迭代
本提交完成了WMS系统的多维度优化升级: 1. 新增RBAC权限系统,支持角色/菜单/按钮三级权限管控 2. 重构库存盘点、物料管理、区域维护等模块的查询筛选与展示逻辑 3. 优化入库/出库/质检等业务流程,完善数据冗余与业务闭环 4. 移除旧装箱表,将装箱逻辑合并到出库主表 5. 新增前端权限判断工具、导出工具与端到端测试用例 6. 补充完善各类注释与数据库字段说明
This commit is contained in:
+86
-21
@@ -12,7 +12,8 @@ import (
|
||||
"bj_power_wms/ent/ordermaterialledger"
|
||||
"bj_power_wms/ent/outbounddetail"
|
||||
"bj_power_wms/ent/outboundorder"
|
||||
"bj_power_wms/ent/packagebox"
|
||||
"bj_power_wms/ent/permission"
|
||||
"bj_power_wms/ent/role"
|
||||
"bj_power_wms/ent/semifinished"
|
||||
"bj_power_wms/ent/stocktakeitem"
|
||||
"bj_power_wms/ent/stocktakeorder"
|
||||
@@ -63,12 +64,20 @@ func init() {
|
||||
inspectionrecordDescStatus := inspectionrecordFields[4].Descriptor()
|
||||
// inspectionrecord.DefaultStatus holds the default value on creation for the status field.
|
||||
inspectionrecord.DefaultStatus = inspectionrecordDescStatus.Default.(string)
|
||||
// inspectionrecordDescInspectQty is the schema descriptor for inspect_qty field.
|
||||
inspectionrecordDescInspectQty := inspectionrecordFields[6].Descriptor()
|
||||
// inspectionrecord.DefaultInspectQty holds the default value on creation for the inspect_qty field.
|
||||
inspectionrecord.DefaultInspectQty = inspectionrecordDescInspectQty.Default.(int)
|
||||
// inspectionrecordDescPassQty is the schema descriptor for pass_qty field.
|
||||
inspectionrecordDescPassQty := inspectionrecordFields[7].Descriptor()
|
||||
// inspectionrecord.DefaultPassQty holds the default value on creation for the pass_qty field.
|
||||
inspectionrecord.DefaultPassQty = inspectionrecordDescPassQty.Default.(int)
|
||||
// inspectionrecordDescCreatedAt is the schema descriptor for created_at field.
|
||||
inspectionrecordDescCreatedAt := inspectionrecordFields[8].Descriptor()
|
||||
inspectionrecordDescCreatedAt := inspectionrecordFields[12].Descriptor()
|
||||
// inspectionrecord.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
inspectionrecord.DefaultCreatedAt = inspectionrecordDescCreatedAt.Default.(func() int64)
|
||||
// inspectionrecordDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
inspectionrecordDescUpdatedAt := inspectionrecordFields[9].Descriptor()
|
||||
inspectionrecordDescUpdatedAt := inspectionrecordFields[13].Descriptor()
|
||||
// inspectionrecord.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
inspectionrecord.DefaultUpdatedAt = inspectionrecordDescUpdatedAt.Default.(func() int64)
|
||||
inventoryFields := schema.Inventory{}.Fields()
|
||||
@@ -184,23 +193,79 @@ func init() {
|
||||
// outboundorder.DefaultQuantity holds the default value on creation for the quantity field.
|
||||
outboundorder.DefaultQuantity = outboundorderDescQuantity.Default.(int)
|
||||
// outboundorderDescCreatedAt is the schema descriptor for created_at field.
|
||||
outboundorderDescCreatedAt := outboundorderFields[13].Descriptor()
|
||||
outboundorderDescCreatedAt := outboundorderFields[16].Descriptor()
|
||||
// outboundorder.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
outboundorder.DefaultCreatedAt = outboundorderDescCreatedAt.Default.(func() int64)
|
||||
packageboxFields := schema.PackageBox{}.Fields()
|
||||
_ = packageboxFields
|
||||
// packageboxDescQuantity is the schema descriptor for quantity field.
|
||||
packageboxDescQuantity := packageboxFields[3].Descriptor()
|
||||
// packagebox.DefaultQuantity holds the default value on creation for the quantity field.
|
||||
packagebox.DefaultQuantity = packageboxDescQuantity.Default.(int)
|
||||
// packageboxDescCreatedAt is the schema descriptor for created_at field.
|
||||
packageboxDescCreatedAt := packageboxFields[7].Descriptor()
|
||||
// packagebox.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
packagebox.DefaultCreatedAt = packageboxDescCreatedAt.Default.(func() int64)
|
||||
// packageboxDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
packageboxDescUpdatedAt := packageboxFields[8].Descriptor()
|
||||
// packagebox.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
packagebox.DefaultUpdatedAt = packageboxDescUpdatedAt.Default.(func() int64)
|
||||
permissionFields := schema.Permission{}.Fields()
|
||||
_ = permissionFields
|
||||
// permissionDescCode is the schema descriptor for code field.
|
||||
permissionDescCode := permissionFields[0].Descriptor()
|
||||
// permission.CodeValidator is a validator for the "code" field. It is called by the builders before save.
|
||||
permission.CodeValidator = permissionDescCode.Validators[0].(func(string) error)
|
||||
// permissionDescName is the schema descriptor for name field.
|
||||
permissionDescName := permissionFields[1].Descriptor()
|
||||
// permission.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
permission.NameValidator = permissionDescName.Validators[0].(func(string) error)
|
||||
// permissionDescType is the schema descriptor for type field.
|
||||
permissionDescType := permissionFields[2].Descriptor()
|
||||
// permission.DefaultType holds the default value on creation for the type field.
|
||||
permission.DefaultType = permissionDescType.Default.(string)
|
||||
// permission.TypeValidator is a validator for the "type" field. It is called by the builders before save.
|
||||
permission.TypeValidator = permissionDescType.Validators[0].(func(string) error)
|
||||
// permissionDescPath is the schema descriptor for path field.
|
||||
permissionDescPath := permissionFields[3].Descriptor()
|
||||
// permission.DefaultPath holds the default value on creation for the path field.
|
||||
permission.DefaultPath = permissionDescPath.Default.(string)
|
||||
// permission.PathValidator is a validator for the "path" field. It is called by the builders before save.
|
||||
permission.PathValidator = permissionDescPath.Validators[0].(func(string) error)
|
||||
// permissionDescIcon is the schema descriptor for icon field.
|
||||
permissionDescIcon := permissionFields[4].Descriptor()
|
||||
// permission.DefaultIcon holds the default value on creation for the icon field.
|
||||
permission.DefaultIcon = permissionDescIcon.Default.(string)
|
||||
// permission.IconValidator is a validator for the "icon" field. It is called by the builders before save.
|
||||
permission.IconValidator = permissionDescIcon.Validators[0].(func(string) error)
|
||||
// permissionDescSort is the schema descriptor for sort field.
|
||||
permissionDescSort := permissionFields[5].Descriptor()
|
||||
// permission.DefaultSort holds the default value on creation for the sort field.
|
||||
permission.DefaultSort = permissionDescSort.Default.(int)
|
||||
// permissionDescRemark is the schema descriptor for remark field.
|
||||
permissionDescRemark := permissionFields[6].Descriptor()
|
||||
// permission.DefaultRemark holds the default value on creation for the remark field.
|
||||
permission.DefaultRemark = permissionDescRemark.Default.(string)
|
||||
// permission.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
permission.RemarkValidator = permissionDescRemark.Validators[0].(func(string) error)
|
||||
// permissionDescCreatedAt is the schema descriptor for created_at field.
|
||||
permissionDescCreatedAt := permissionFields[7].Descriptor()
|
||||
// permission.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
permission.DefaultCreatedAt = permissionDescCreatedAt.Default.(func() int64)
|
||||
// permissionDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
permissionDescUpdatedAt := permissionFields[8].Descriptor()
|
||||
// permission.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
permission.DefaultUpdatedAt = permissionDescUpdatedAt.Default.(func() int64)
|
||||
roleFields := schema.Role{}.Fields()
|
||||
_ = roleFields
|
||||
// roleDescName is the schema descriptor for name field.
|
||||
roleDescName := roleFields[0].Descriptor()
|
||||
// role.NameValidator is a validator for the "name" field. It is called by the builders before save.
|
||||
role.NameValidator = roleDescName.Validators[0].(func(string) error)
|
||||
// roleDescCode is the schema descriptor for code field.
|
||||
roleDescCode := roleFields[1].Descriptor()
|
||||
// role.CodeValidator is a validator for the "code" field. It is called by the builders before save.
|
||||
role.CodeValidator = roleDescCode.Validators[0].(func(string) error)
|
||||
// roleDescRemark is the schema descriptor for remark field.
|
||||
roleDescRemark := roleFields[2].Descriptor()
|
||||
// role.DefaultRemark holds the default value on creation for the remark field.
|
||||
role.DefaultRemark = roleDescRemark.Default.(string)
|
||||
// role.RemarkValidator is a validator for the "remark" field. It is called by the builders before save.
|
||||
role.RemarkValidator = roleDescRemark.Validators[0].(func(string) error)
|
||||
// roleDescCreatedAt is the schema descriptor for created_at field.
|
||||
roleDescCreatedAt := roleFields[4].Descriptor()
|
||||
// role.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
role.DefaultCreatedAt = roleDescCreatedAt.Default.(func() int64)
|
||||
// roleDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
roleDescUpdatedAt := roleFields[5].Descriptor()
|
||||
// role.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
role.DefaultUpdatedAt = roleDescUpdatedAt.Default.(func() int64)
|
||||
semifinishedFields := schema.SemiFinished{}.Fields()
|
||||
_ = semifinishedFields
|
||||
// semifinishedDescQuantity is the schema descriptor for quantity field.
|
||||
@@ -262,15 +327,15 @@ func init() {
|
||||
// user.DefaultRole holds the default value on creation for the role field.
|
||||
user.DefaultRole = userDescRole.Default.(string)
|
||||
// userDescIsActive is the schema descriptor for is_active field.
|
||||
userDescIsActive := userFields[6].Descriptor()
|
||||
userDescIsActive := userFields[7].Descriptor()
|
||||
// user.DefaultIsActive holds the default value on creation for the is_active field.
|
||||
user.DefaultIsActive = userDescIsActive.Default.(bool)
|
||||
// userDescCreatedAt is the schema descriptor for created_at field.
|
||||
userDescCreatedAt := userFields[8].Descriptor()
|
||||
userDescCreatedAt := userFields[9].Descriptor()
|
||||
// user.DefaultCreatedAt holds the default value on creation for the created_at field.
|
||||
user.DefaultCreatedAt = userDescCreatedAt.Default.(func() int64)
|
||||
// userDescUpdatedAt is the schema descriptor for updated_at field.
|
||||
userDescUpdatedAt := userFields[9].Descriptor()
|
||||
userDescUpdatedAt := userFields[10].Descriptor()
|
||||
// user.DefaultUpdatedAt holds the default value on creation for the updated_at field.
|
||||
user.DefaultUpdatedAt = userDescUpdatedAt.Default.(func() int64)
|
||||
zoneFields := schema.Zone{}.Fields()
|
||||
|
||||
Reference in New Issue
Block a user