You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
159 lines
5.8 KiB
159 lines
5.8 KiB
CREATE TABLE `t_pro_clocking_in` (
|
|
`id` bigint(20) NOT NULL,
|
|
`member_id` bigint(20) DEFAULT 0 COMMENT '打卡成员id',
|
|
`checker_id` bigint(20) DEFAULT 0 COMMENT '检查人成员id',
|
|
`morning` bigint(20) DEFAULT 0 COMMENT '早打卡时间',
|
|
`morning_status` tinyint(1) DEFAULT 0 COMMENT '早打卡状态(0未打卡,1已打卡,2驳回,3审核通过)',
|
|
`night` bigint(20) DEFAULT 0 COMMENT '晚打卡时间',
|
|
`night_status` tinyint(1) DEFAULT 0 COMMENT '晚打卡状态(0未打卡,1已打卡,2驳回,3审核通过)',
|
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
`rec_status` tinyint(1) unsigned DEFAULT 0,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `checker_index` (`checker_id`) USING BTREE,
|
|
KEY `member_index` (`member_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='打卡记录表';
|
|
|
|
|
|
CREATE TABLE `t_pro_deliver` (
|
|
`id` bigint(20) NOT NULL,
|
|
`task_sub_id` bigint(20) DEFAULT 0 COMMENT '任务分解id',
|
|
`member_id` bigint(20) DEFAULT 0 COMMENT '上传成员id',
|
|
`file_id` bigint(20) DEFAULT 0 COMMENT '文件id',
|
|
`file_path` varchar(255) DEFAULT '' COMMENT '文件观看路径',
|
|
`content` varchar(255) DEFAULT '' COMMENT '文本内容(可以是链接)',
|
|
`project_id` bigint(20) DEFAULT 0 COMMENT '项目id',
|
|
`time` bigint(20) DEFAULT 0 COMMENT '上传时间',
|
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
`rec_status` tinyint(1) unsigned DEFAULT 0,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `member_index` (`member_id`) USING BTREE,
|
|
KEY `task_sub_id_index` (`task_sub_id`) USING BTREE,
|
|
KEY `file_index` (`file_id`) USING BTREE,
|
|
KEY `project_index` (`project_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物表';
|
|
|
|
|
|
CREATE TABLE `t_pro_deliver_checker` (
|
|
`id` bigint(20) NOT NULL,
|
|
`deliver_id` bigint(20) DEFAULT 0 COMMENT '交付物id',
|
|
`member_id` bigint(20) DEFAULT 0 COMMENT '检查人成员id',
|
|
`score` varchar(10) DEFAULT '' COMMENT '分数',
|
|
`remark` varchar(255) DEFAULT '' COMMENT '备注',
|
|
`status` tinyint(1) DEFAULT 0 COMMENT '检查状态(0-未审核,1-合格,2-驳回)',
|
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
`rec_status` tinyint(1) unsigned DEFAULT 0,
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `deliver_index` (`deliver_id`) USING BTREE,
|
|
KEY `member_index` (`member_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='交付物检查表';
|
|
|
|
|
|
|
|
-- 工资表
|
|
DROP TABLE IF EXISTS `t_pro_member_salary`;
|
|
CREATE TABLE `t_pro_member_salary` (
|
|
`id` bigint(20) NOT NULL,
|
|
`member_id` bigint(20) DEFAULT 0 COMMENT '成员id',
|
|
`basic_wage` bigint(20) DEFAULT 0 COMMENT '基本工资',
|
|
`position` varchar(64) DEFAULT '' COMMENT '职位',
|
|
`working_time` int(11) DEFAULT 0 COMMENT '工作时间',
|
|
`share_option` bigint(20) DEFAULT 0 COMMENT '期权置换',
|
|
-- `should_salary` bigint(20) DEFAULT 0 COMMENT '应发工资',
|
|
`receive_dividends` bigint(20) DEFAULT 0 COMMENT '分红',
|
|
`medical_insurance` bigint(20) DEFAULT 0 COMMENT '医疗保险',
|
|
`maternity_insurance` bigint(20) DEFAULT 0 COMMENT '生育保险',
|
|
`employment_injury_insurance` bigint(20) DEFAULT 0 COMMENT '工伤保险',
|
|
`endowment_insurance` bigint(20) DEFAULT 0 COMMENT '养老保险',
|
|
`unemployment_insurance` bigint(20) DEFAULT 0 COMMENT '失业保险',
|
|
`housing_fund` bigint(20) DEFAULT 0 COMMENT '住房公积金',
|
|
|
|
`operator` bigint(20) DEFAULT 0 COMMENT '操作人id',
|
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
`updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
|
|
`rec_status` tinyint(1) unsigned DEFAULT 0 COMMENT '状态,0正常 1禁用 2删除',
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
KEY `salary_member_index` (`member_id`) USING BTREE
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='成员工资表';
|
|
|
|
|
|
{
|
|
//成员id
|
|
"memberId":2222222222,
|
|
//成员名
|
|
"memberName":"张三",
|
|
//固定工资
|
|
"fixedSalaryNum": 5000,
|
|
//固定工资分项
|
|
"fixedSalary": {
|
|
//基本工资
|
|
"basicWage":5,
|
|
"basic":{
|
|
//应出勤天数
|
|
"shouldAttendanceDay":20,
|
|
//实际出勤天数
|
|
"realAttendanceDay":10,
|
|
//弹性天数
|
|
"elasticityDay":2,
|
|
//请假天数
|
|
"askForLeaveDay":3
|
|
}
|
|
//岗位工资
|
|
"positionWage":5,
|
|
"position":{
|
|
Map<String,Integer>
|
|
}
|
|
//工龄工资
|
|
"workingTimeWage":5
|
|
"workingTime":{
|
|
Map<String,Integer>
|
|
}
|
|
},
|
|
//绩效工资
|
|
"performanceNum":5000,
|
|
//绩效工资分项
|
|
"performance":{
|
|
//项目奖金
|
|
"projectBonus":10,
|
|
//补助
|
|
"subsidy":10,
|
|
//提成
|
|
"push_money":10,
|
|
//考核
|
|
"assess":10
|
|
},
|
|
//主人翁收入
|
|
"stockRightsNum": 5000,
|
|
//主人翁收入分项
|
|
"stockRightsNum": {
|
|
//期权置换
|
|
"sharePtion":10,
|
|
//分红
|
|
"shareOutBonus":10
|
|
},
|
|
//应发工资
|
|
"shouldSalaryNum": 5000,
|
|
//社保支出
|
|
"socialSecurityNum":5000,
|
|
//社保支出分项
|
|
"socialSecurity":{
|
|
//医疗保险
|
|
"medicalInsurance":15,
|
|
//生育保险
|
|
"maternityInsurance":15,
|
|
//工伤保险
|
|
"employmentInjuryInsurance":15,
|
|
//养老保险
|
|
"endowmentInsurance":15,
|
|
//失业保险
|
|
"unemploymentInsurance":15,
|
|
//住房公积金
|
|
"housingFund":15
|
|
},
|
|
//扣税
|
|
"personalTaxNum":5000,
|
|
//实发工资
|
|
"realSalaryNum": 0
|
|
}
|