人员工资、退场,巡检工单

This commit is contained in:
lcj
2025-09-04 17:05:00 +08:00
parent 43d249d68a
commit 4e61a4afe9
58 changed files with 2085 additions and 71 deletions

View File

@ -1811,3 +1811,67 @@ create table mat_materials_use_record
index `idx_project_id` (`project_id` asc) using btree comment '项目ID',
index `idx_inventory_id` (`inventory_id` asc) using btree comment '库存ID'
) comment '材料使用登记' collate = utf8mb4_unicode_ci;
drop table if exists sub_user_salary_detail;
create table sub_user_salary_detail
(
`id` bigint not null auto_increment comment '主键id',
`project_id` bigint not null comment '项目id',
`team_id` bigint null comment '班组id',
`user_id` bigint not null comment '用户id',
`user_name` varchar(50) not null comment '用户名字',
`report_date` date not null comment '日报日期',
`daily_salary` decimal(10, 2) default 0.00 not null comment '当日工资',
`remark` varchar(255) null comment '备注',
`create_by` bigint null comment '创建者',
`update_by` bigint null comment '更新者',
`create_dept` bigint null comment '创建部门',
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
primary key (`id`) using btree,
index `idx_project_id` (`project_id` asc) using btree comment '项目ID',
index `idx_team_id` (`team_id` asc) using btree comment '班组ID',
index `idx_user_id` (`user_id` asc) using btree comment '用户ID'
) comment '员工每日工资' collate = utf8mb4_unicode_ci;
drop table if exists sub_salary_period;
create table sub_salary_period
(
`id` bigint not null auto_increment comment '主键id',
`project_id` bigint not null comment '项目id',
`team_id` bigint null comment '班组id',
`start_date` date not null comment '开始日期',
`end_date` date not null comment '结束日期',
`total_days` int default 0 not null comment '总天数',
`total_wage` decimal(12, 2) default 0.00 not null comment '总工资',
`status` char(1) default '0' not null comment '状态 0-未开始 1-进行中 2-已完成',
`remark` varchar(255) null comment '备注',
`create_by` bigint null comment '创建者',
`update_by` bigint null comment '更新者',
`create_dept` bigint null comment '创建部门',
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
primary key (`id`) using btree,
index `idx_project_id` (`project_id` asc) using btree comment '项目ID',
index `idx_team_id` (`team_id` asc) using btree comment '班组ID'
) comment '工资结算周期' collate = utf8mb4_unicode_ci;
drop table if exists sub_user_salary_period;
create table sub_user_salary_period
(
`id` bigint not null auto_increment comment '主键id',
`project_id` bigint not null comment '项目id',
`period_id` bigint not null comment '工资周期id',
`user_id` bigint not null comment '用户id',
`work_days` int default 0 not null comment '出勤天数',
`total_wage` decimal(12, 2) default 0.00 not null comment '总工资',
`remark` varchar(255) null comment '备注',
`create_by` bigint null comment '创建者',
`update_by` bigint null comment '更新者',
`create_dept` bigint null comment '创建部门',
`create_time` datetime default CURRENT_TIMESTAMP null comment '创建时间',
`update_time` datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间',
primary key (`id`) using btree,
index `idx_project_id` (`project_id` asc) using btree comment '项目ID',
index `idx_period_id` (`period_id` asc) using btree comment '工资周期ID'
) comment '员工工资周期表' collate = utf8mb4_unicode_ci;