174 lines
6.4 KiB
SQL
174 lines
6.4 KiB
SQL
create table hrsa_sub_table
|
|
(
|
|
id bigint primary key comment 'ID' ,
|
|
create_time datetime comment '创建时间' ,
|
|
update_time datetime comment '修改时间' ,
|
|
creator bigint comment '创建人id' ,
|
|
delete_type int default 0 comment '是否删除' ,
|
|
tenant_key varchar(10) comment '租户KEY' ,
|
|
sub_table_name varchar(100) not null comment '表名' ,
|
|
dimension varchar(20) not null comment '统计维度' ,
|
|
start_month varchar(10) comment '开始月' ,
|
|
end_month varchar(10) comment '终止月' ,
|
|
pay_org_string varchar(500) comment '个税扣缴义务人高级搜索' ,
|
|
pay_agency_string varchar(500) comment '缴纳组织高级搜索' ,
|
|
sub_company_string varchar(500) comment '分部高级搜索' ,
|
|
depart_string varchar(500) comment '部门高级搜索' ,
|
|
grade_string varchar(500) comment '职级高级搜索' ,
|
|
position_string varchar(500) comment '岗位高级搜索' ,
|
|
status_string varchar(500) comment '人员状态高级搜索' ,
|
|
employee_type varchar(500) comment '人员类型高级搜索' ,
|
|
employee_string varchar(500) comment '人员高级搜索' ,
|
|
payment_type_string varchar(100) comment '缴纳类型'
|
|
)
|
|
;
|
|
|
|
create table hrsa_sub_table_item
|
|
(
|
|
id bigint primary key comment 'ID' ,
|
|
create_time datetime comment '创建时间' ,
|
|
update_time datetime comment '修改时间' ,
|
|
creator bigint comment '创建人id' ,
|
|
delete_type int default 0 comment '是否删除' ,
|
|
tenant_key varchar(10) comment '租户KEY' ,
|
|
table_id bigint not null comment '数据表id' ,
|
|
item_name varchar(50) not null comment '统计项名称' ,
|
|
item_value varchar(500) not null comment '统计项集合' ,
|
|
index_value int not null comment '顺序' ,
|
|
total_rule varchar(500) comment '合计规则' ,
|
|
count_rule varchar(500) comment '计数规则' ,
|
|
unit_type int default 2 comment '统计单位'
|
|
)
|
|
;
|
|
|
|
alter table hrsa_sub_table add table_type int
|
|
;
|
|
|
|
alter table hrsa_sub_table modify column table_type int default 0
|
|
;
|
|
|
|
create table hrsa_salary_stats_dim
|
|
(
|
|
id bigint primary key comment 'ID' ,
|
|
create_time datetime comment '创建时间' ,
|
|
update_time datetime comment '修改时间' ,
|
|
creator bigint comment '创建人id' ,
|
|
delete_type int default 0 comment '是否删除' ,
|
|
tenant_key varchar(10) comment '租户KEY' ,
|
|
dim_name varchar(100) comment '统计维度名称' ,
|
|
dim_type varchar(20) comment '统计维度类型' ,
|
|
remark varchar(500) comment '描述' ,
|
|
setting varchar(2000) comment '设置内容',
|
|
is_default int comment '是否默认' ,
|
|
dim_code varchar(50) comment '统计维度编码'
|
|
)
|
|
;
|
|
|
|
create table hrsa_salary_stats_report
|
|
(
|
|
id bigint primary key comment 'ID' ,
|
|
create_time datetime comment '创建时间' ,
|
|
update_time datetime comment '修改时间' ,
|
|
creator bigint comment '创建人id' ,
|
|
delete_type int default 0 comment '是否删除' ,
|
|
tenant_key varchar(10) comment '租户KEY' ,
|
|
report_name varchar(100) comment '报表名称' ,
|
|
dimension varchar(1000) comment '统计维度(多个的话以逗号分隔)' ,
|
|
tax_agent_setting varchar(1000) comment '个税扣缴义务人配置' ,
|
|
income_category_setting varchar(20) comment '收入所得项目配置' ,
|
|
sub_company_setting varchar(1000) comment '分部配置' ,
|
|
depart_setting varchar(1000) comment '部门配置' ,
|
|
grade_setting varchar(1000) comment '职级配置' ,
|
|
position_setting varchar(1000) comment '岗位配置' ,
|
|
status_setting varchar(1000) comment '状态配置' ,
|
|
employee_setting varchar(1000) comment '人员配置' ,
|
|
hiredate_setting varchar(1000) comment '入职日期配置' ,
|
|
leavedate_setting varchar(1000) comment '离职日期配置' ,
|
|
salary_start_month datetime comment '薪资所属月份-起始' ,
|
|
salary_end_month datetime comment '薪资所属月份-截止'
|
|
)
|
|
;
|
|
|
|
create table hrsa_salary_statistics_item
|
|
(
|
|
id bigint primary key comment 'ID' ,
|
|
create_time datetime comment '创建时间' ,
|
|
update_time datetime comment '修改时间' ,
|
|
creator bigint comment '创建人id' ,
|
|
delete_type int default 0 comment '是否删除' ,
|
|
tenant_key varchar(10) comment '租户KEY' ,
|
|
item_name varchar(50) comment '统计项名称' ,
|
|
item_value varchar(1000) comment '统计项集合' ,
|
|
count_rule varchar(500) comment '计数规则' ,
|
|
sum_rule varchar(500) comment '求和规则' ,
|
|
avg_rule varchar(500) comment '平均值规则' ,
|
|
max_rule varchar(500) comment '最大值规则' ,
|
|
min_rule varchar(500) comment '最小值规则' ,
|
|
median_rule varchar(500) comment '中位数规则' ,
|
|
index_value int comment '顺序' ,
|
|
unit_type int comment '统计单位',
|
|
stat_report_id bigint comment '统计报表id'
|
|
)
|
|
;
|
|
|
|
create table hrsa_charts_setting
|
|
(
|
|
id bigint primary key comment 'ID' ,
|
|
create_time datetime comment '创建时间' ,
|
|
update_time datetime comment '修改时间' ,
|
|
creator bigint comment '创建人id' ,
|
|
delete_type int default 0 comment '是否删除' ,
|
|
tenant_key varchar(10) comment '租户KEY' ,
|
|
table_id bigint not null comment '报表id' ,
|
|
charts_type int not null comment '报表类型' ,
|
|
item_values varchar(500) comment '统计项目' ,
|
|
item_col_value varchar(50) not null comment '统计列' ,
|
|
dimension_range int not null comment '维度统计范围' ,
|
|
item_sort_value varchar(500) comment '排序统计项目' ,
|
|
item_col_sort_value varchar(50) comment '排序列' ,
|
|
sort_type int comment '排序类型' ,
|
|
sort_num int comment '排序取数值'
|
|
)
|
|
;
|
|
|
|
create table hrsa_salary_echarts_setting
|
|
(
|
|
id bigint primary key comment 'ID' ,
|
|
create_time datetime comment '创建时间' ,
|
|
update_time datetime comment '修改时间' ,
|
|
creator bigint comment '创建人id' ,
|
|
delete_type int default 0 comment '是否删除' ,
|
|
tenant_key varchar(10) comment '租户KEY' ,
|
|
report_id bigint not null comment '报表id' ,
|
|
charts_type int not null comment '报表类型' ,
|
|
item_values varchar(500) comment '统计项目' ,
|
|
item_col_value varchar(50) not null comment '统计列' ,
|
|
dimension_range int not null comment '维度统计范围' ,
|
|
item_sort_value varchar(500) comment '排序统计项目' ,
|
|
item_col_sort_value varchar(50) comment '排序列' ,
|
|
sort_type int comment '排序类型' ,
|
|
sort_num int comment '排序取数值'
|
|
)
|
|
;
|
|
|
|
alter table hrsa_salary_stats_dim modify column dim_type varchar(30)
|
|
;
|
|
|
|
alter table hrsa_salary_stats_report modify column income_category_setting varchar(1000)
|
|
;
|
|
|
|
|
|
alter table hrsa_salary_stats_report add remark varchar(100)
|
|
;
|
|
|
|
alter table hrsa_salary_stats_report add second_dimension varchar(100)
|
|
;
|
|
|
|
alter table hrsa_salary_stats_report add sort_index varchar(100)
|
|
;
|
|
|
|
alter table hrsa_salary_stats_report add sort_type varchar(100)
|
|
;
|
|
|
|
alter table hrsa_salary_stats_dim add label_id int
|
|
; |