修复快捷工具无法显示

This commit is contained in:
hero920103 committed 2026-10-30 17:29:28 +08:00
1 parent 9898962836
commit 2e2b837a20
23 files changed
+1941 -38

No files matched your search

+37
View File
@@ -0,0 +1,37 @@
package models
import "time"
// BackendJobRank 职级表 yz_backend_job_rank
//
// 职级用于定义「职位等级」:每个部门可以各设一套职级阶梯,
// DepartmentID = 0 表示全公司通用职级,任何部门都能选用。
//
// 与既有模块的关系:
// - 职位通过 rank_id 挂到职级上(yz_backend_position.rank_id);
// - 薪酬方案通过 rank_id 挂到职级上(yz_backend_oa_compensation_schemes.rank_id),
// 并按职级的标准薪资区间(SalaryMin / SalaryMax)给出参考薪资;
// - DefaultRoleID 是为「职级 → 角色权限绑定」预留的字段,本期不启用,
// 后端不做任何自动授权,等权限方案确定后单独做。
type BackendJobRank struct {
ID uint64 `orm:"column(id);pk;auto" json:"id"`
Tid uint64 `orm:"column(tid)" json:"tid"`
RankCode string `orm:"column(rank_code);size(50)" json:"rank_code"`
RankName string `orm:"column(rank_name);size(100)" json:"rank_name"`
LevelNo int `orm:"column(level_no);default(0)" json:"level_no"` // 等级序号,数字越大职级越高
DepartmentID uint64 `orm:"column(department_id);default(0)" json:"department_id"` // 适用部门ID,0=全公司通用
SalaryMin float64 `orm:"column(salary_min);type(decimal);digits(12);decimals(2);default(0)" json:"salary_min"`
SalaryMax float64 `orm:"column(salary_max);type(decimal);digits(12);decimals(2);default(0)" json:"salary_max"`
DefaultRoleID uint64 `orm:"column(default_role_id);default(0)" json:"default_role_id"` // 预留:职级→角色权限绑定,本期不启用
Status int8 `orm:"column(status);default(1)" json:"status"` // 状态:0-禁用 1-启用
Sort int `orm:"column(sort);default(0)" json:"sort"`
Remark *string `orm:"column(remark);size(512);null" json:"remark"`
CreateTime time.Time `orm:"column(create_time);auto_now_add;type(datetime)" json:"create_time"`
UpdateTime time.Time `orm:"column(update_time);auto_now;type(datetime)" json:"update_time"`
DeleteTime *time.Time `orm:"column(delete_time);type(datetime);null" json:"delete_time"`
}
// TableName 自定义表名
func (m *BackendJobRank) TableName() string {
return "yz_backend_job_rank"
}
+3
View File
@@ -8,6 +8,9 @@ type BackendOaCompensationScheme struct {
ID uint64 `orm:"column(id);pk;auto" json:"id"`
Tid uint64 `orm:"column(tid)" json:"tid"`
EmployeeID uint64 `orm:"column(employee_id)" json:"employee_id"`
// RankID 职级ID(yz_backend_job_rank.id),0=未设置职级。
// 方案选定职级后,按职级的标准薪资区间(salary_min/salary_max)给出参考薪资。
RankID uint64 `orm:"column(rank_id);default(0)" json:"rank_id"`
SchemeName string `orm:"column(scheme_name);size(100)" json:"scheme_name"`
EffectiveDate time.Time `orm:"column(effective_date);type(date)" json:"effective_date"`
ExpiryDate *time.Time `orm:"column(expiry_date);null;type(date)" json:"expiry_date"`
+3
View File
@@ -61,6 +61,9 @@ type BackendPosition struct {
PositionCode string `orm:"column(position_code);size(50)" json:"position_code"`
PositionName string `orm:"column(position_name);size(100)" json:"position_name"`
PositionType int8 `orm:"column(position_type);default(0)" json:"position_type"`
// RankID 职级ID(yz_backend_job_rank.id),0=未设置职级。
// 职级定义了「职位等级」,薪酬与权限分级都沿 员工→职位→职级 取用。
RankID uint64 `orm:"column(rank_id);default(0)" json:"rank_id"`
Status int8 `orm:"column(status);default(1)" json:"status"`
Sort uint `orm:"column(sort);default(0)" json:"sort"`
Remark *string `orm:"column(remark);size(512);null" json:"remark"`
+2
View File
@@ -47,6 +47,8 @@ func Init(_ string) {
new(BackendOrganization),
new(BackendEmployee),
new(BackendPosition),
// 职级(职位等级):yz_backend_job_rank,按部门分设职级阶梯
new(BackendJobRank),
new(BackendErpContact),
new(BackendApprovalFlow),
new(BackendApprovalRecord),