### 后端配置 ###
##### Java版本:11 #####
##### 数据库:MySQL80 #####
##### 端口:`8083` #####
#### ⚠ 注意 ####
```
1.在建表时应避免将任何column命名为诸如dName这样驼峰命名法的形式
因为BaseMapper会将Pojo层的dName视为表中的d_name.
```
建立Employee表:
```
create table employee
(
id int primary key identity(1,1), --员工编号
did int references department(did) not null, --部门(引用外键)
status varchar(20) null, --职位
level int null, --等级(L1-L5)
name varchar(20) not null, --姓名
gender varchar(5) not null, --性别
photo varchar(1000) null, --大头照
ethnicity varchar(20) null, --民族
birthday date null, --生日
political_face varchar(20) null, --政治面貌
education varchar(20) null, --文化程度
id_card varchar(30) not null, --身份证
phone_number varchar(12) not null, --电话号码
e_mail varchar(30) not null, --电子邮箱
incumbency varchar(2) default('是') check(incumbency='是' or incumbency='否'),
--在职情况
user_name varchar(10) not null, --用户名
account varchar(20) not null, --账号
password varchar(200) not null, --密码
regist_time smalldatetime default(getdate()), --注册时间
constraint employee_id_uindex unique (id)
);
```
建立Department表
```
create table department
(
did int primary key identity(1,1), --部门编号
d_name nvarchar(50) not null, --部门名称
d_level int null, --部门等级
d_remark text --部门描述
);
```
建立Attendance表
```
create table employee_attendance
(
id int references employer(id) not null, --员工编号(引用外键)
attendance int not null, --出勤天数
late int not null, --迟到次数
leave_early int not null, --早退天数
absence int not null, --缺勤天数
overtime int not null, --加班次数
update_time date null, --最近一次更新的时间
);
```
建立Wages表
```
create table employee_wages
(
id int references employer(id) not null, --员工编号(引用外键)
base_salary money not null, --底薪
bonus money not null, --奖金
deduct_wages text money not null, --扣除工资
deduct_reason text --扣除原因
net_salary money not null, --实发工资
time smalldatetime not null, --发工资时间
);
```
### 接口文档 ###
##### ⚠说明 #####
```
接口名称包含‘列表’的,返回值为List类型,其他的为Map类型
```
```
对于需要验证token的接口,需要添加Authorization参数的请求头(Header)
```
#### 登录 ####
说明:请求后端进行登录,然后返回一个token,用来进行除登录和注册外的权限验证
http请求方式: POST
URL: http://localhost:8083/employee/token/
| 参数 | 说明 |
| :---:| :---: |
| name | 姓名 |
| password | 密码 |
返回参数
| 参数 | 说明 |
| :---:| :---: |
| error_message | 报错信息 |
| token | token数据 |
error_message的可能返回值
```
success
您已离职,无权访问此系统
```
#### 添加雇员(注册) ####
http请求方式: POST
URL: http://localhost:8083/employee/register/
| 参数 | 说明 |
| :---:| :---: |
| name | 姓名 |
| level | 级别 |
| status | 职位 |
| gender | 性别 |
| photo | 照片的URL |
| ethnicity | 民族 |
| birthday | 生日(yyyy-MM-dd) |
| politicalFace | 政治面貌 |
| education | 文化程度 |
| id_card | 身份证号 |
| phone_number | 手机号 |
| e_mail | 电子邮箱 |
| username | 用户名 |
| account | 账户 |
| did | 部门编号 |
| password | 密码 |
| confirmedPassword | 确认密码 |
返回参数
| 参数 | 说明 |
| :---:| :---: |
| error_message | 报错信息 |
error_message的可能返回值
```
success
姓名不能为空
level不能为空
level只能是1-5之间的数字
level不符合规则
姓名不能为空
姓名长度不能大于10
密码不能为空
密码长度不能大于100
两次输入的密码不一致
职位不能为空
职位超出字数限制
性别只能为男或女
照片的URL不能为空
照片URL超出字数限制
民族不能为空
民族超出字数限制
政治面貌不能为空
政治面貌超出字数限制
受教育程度不能为空
受教育程度超出字数限制
身份证号不能为空
身份证号长度超出字数限制
手机号不能为空
手机号长度超出限制
E-mail不能为空
E-mail长度超出限制
用户名不能为空
用户名长度超出字数限制
部门编号不能为空
部门编号不存在
部门编号不符合规则
出生日期不符合规则
用户名已存在
```
#### 验证用户Token并获取登录用户信息 ####
http请求方式: GET
URL: http://localhost:8083/employee/info/
| 参数 | 说明 |
| :---:| :---: |
| header | 格式"Bearer " + token |
返回参数
| 参数 | 说明 |
| :---:| :---: |
| error_message | 报错信息 |
| id | 唯一ID |
| name | 姓名 |
| photo | 照片 |部门 |
| status | 在职状态 |
error_message的可能返回值
```
success
```
#### 开除职员(撤销登陆系统的权限) ####
http请求方式: POST
URL: http://localhost:8083/employee/remove/
| 参数 | 说明 |
| :---:| :---: |
| id | 要开除职员的Id |
返回参数
| 参数 | 说明 |
| :---:| :---: |
| error_message | 报错信息 |
error_message的可能返回值
```
success
该员工已离职
您没有该权限
```
#### 更新职员信息 ####
http请求方式: POST
URL: http://localhost:8083/employee/update/
| 参数 | 说明 |
| :---:| :---: |
| employee_id | 对象的id |
| name | 姓名 |
| level | 级别 |
| status | 职位 |
| gender | 性别 |
| photo | 照片的URL |
| ethnicity | 民族 |
| birthday | 生日(yyyy-MM-dd) |
| politicalFace | 政治面貌 |
| education | 文化程度 |
| id_card | 身份证号 |
| phone_number | 手机号 |
| e_mail | 电子邮箱 |
| username | 用户名 |
| account | 账户 |
| did | 部门编号 |
| 参数 | 说明 |
| :---:| :---: |
| header | 格式"Bearer " + token |
返回参数
| 参数 | 说明 |
| :---:| :---: |
| error_message | 报错信息 |
error_message的可能返回值
```
success
您没有该权限
该成员级别不明,无法更新
您无法将此人level改为同级或更高
```
` 其他同注册接口的可能返回值 `
#### 获得手下职员的列表信息 ####
说明:获取比当前用户级别低的所有职员的列表
http请求方式: GET
URL: http://localhost:8083/employee/getlist/
| 参数 | 说明 |
| :---:| :---: |
| header | 格式"Bearer " + token |
返回参数
| 参数 | 说明 |
| :---:| :---: |
| id | id |
| name | 姓名 |
| level | 级别 |
| status | 职位 |
| gender | 性别 |
| photo | 照片的URL |
| ethnicity | 民族 |
| birthday | 生日(yyyy-MM-dd) |
| politicalFace | 政治面貌 |
| education | 文化程度 |
| id_card | 身份证号 |
| phone_number | 手机号 |
| e_mail | 电子邮箱 |
| username | 用户名 |
| account | 账户 |
| password | 密码(隐藏) |
| registTime | 注册时间(yyyy-MM-dd HH:mm:ss) |
| did | 部门编号 |
#### 忘记密码 ####
说明:修改更新用户密码
http请求方式: POST
URL: http://localhost:8083/update/password/
| 参数 | 说明 |
| :---:| :---: |
| id | 被更新密码的对象的id |
| password | 密码 |
| confirmedPassword | 确认密码 |
| 参数 | 说明 |
| :---:| :---: |
| header | 格式"Bearer " + token |
返回参数
| 参数 | 说明 |
| :---:| :---: |
| error_message | 报错
没有合适的资源?快使用搜索试试~ 我知道了~
Java大作业:基于Vue+SpringBoot的企业管理系统源码.zip
共92个文件
java:51个
vue:11个
js:8个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 135 浏览量
2022-12-01
11:52:24
上传
评论
收藏 868KB ZIP 举报
温馨提示
Java大作业:基于Vue+SpringBoot的企业管理系统源码.zip
资源推荐
资源详情
资源评论
收起资源包目录
Java大作业:基于Vue+SpringBoot的企业管理系统源码.zip (92个子文件)
enterprise-management-system-master
frontend
jsconfig.json 279B
vue.config.js 139B
package.json 952B
package-lock.json 344KB
src
App.vue 549B
assets
index_big.jpg 205KB
success.png 2KB
hires_big.jpeg 87KB
login_container_bg_07.jpg 359KB
error.png 2KB
api
index.js 164B
request.js 399B
pages
Hire
index.vue 7KB
system
systemannouce
index.vue 2KB
systemuser
index.vue 13KB
systemcomplain
index.vue 2KB
systemindex
index.vue 795B
systemactivity
index.vue 6KB
Home
index.vue 6KB
Login
index.vue 3KB
main.js 249B
components
Header
index.vue 1KB
Nav
index.vue 2KB
router
index.js 2KB
store
index.js 187B
user
index.js 162B
.gitignore 231B
public
index.html 611B
favicon.ico 4KB
README.md 320B
babel.config.js 73B
LICENSE 850B
README.md 10KB
backend
pom.xml 5KB
mvnw 10KB
src
test
java
com
ems
backend
BackendApplicationTests.java 217B
main
resources
application.properties 316B
java
com
ems
backend
config
filter
JwtAuthenticationTokenFilter.java 2KB
SecurityConfig.java 2KB
CorsConfig.java 1KB
BackendApplication.java 322B
pojo
Wages.java 536B
Employee.java 1KB
Department.java 436B
Attendance.java 548B
mapper
DepartmentMapper.java 252B
EmployeeMapper.java 246B
AttendanceMapper.java 252B
WagesMapper.java 237B
controller
account
ForgetPasswordController.java 888B
LoginController.java 767B
RegisterController.java 2KB
GetInfoController.java 543B
employee
GetListController.java 624B
UpdateController.java 741B
RemoveController.java 618B
attendance
NewAttendanceController.java 747B
GetAttendanceController.java 823B
department
GetThisEmployeeController.java 779B
GetDepartmentListController.java 643B
service
account
RegisterService.java 985B
LoginService.java 159B
GetInfoService.java 135B
ForgetPasswordService.java 202B
employee
UpdateEmployeeService.java 229B
RemoveEmployeeService.java 174B
GetEmployeeListService.java 210B
attendance
GetAttendanceService.java 160B
NewAttendance.java 168B
impl
UserDetailsServiceImpl.java 1KB
account
GetInfoServiceImpl.java 1KB
LoginServiceImpl.java 2KB
ForgetPasswordImpl.java 2KB
RegisterServiceImpl.java 8KB
employee
UpdateEmployeeImpl.java 7KB
GetEmployeeListImpl.java 1KB
RemoveEmployeeImpl.java 1KB
attendance
NewAttendanceImpl.java 4KB
GetAttendanceImpl.java 2KB
utils
UserDetailsImpl.java 1KB
department
GetThisEmployeeImpl.java 2KB
GetDepartmentListImpl.java 978B
department
GetThisEmployeeService.java 193B
GetDepartmentListService.java 188B
utils
AuthorizationUtil.java 671B
JwtUtil.java 2KB
.gitignore 333B
.mvn
wrapper
maven-wrapper.jar 50KB
MavenWrapperDownloader.java 5KB
maven-wrapper.properties 218B
README.md 34B
mvnw.cmd 6KB
共 92 条
- 1
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 6224
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 202304910142原道明(1).pbix
- 文本.txt
- 基于Lua的聊天过滤修改版设计源码
- A1_SSE_123090177.py
- Uibot6.0 (RPA财务机器人师资培训第5天 ) 报销汇总机器人案例实战
- 基于Vue的西安美食攻略应用程序设计源码
- tensorflow-2.6.2-cp38-cp38-win-amd64.whl
- 2023-04-06-项目笔记 - 第八十六阶段 - 4.4.2.84全局变量的作用域-84 -2024.03.28
- 基于C语言解决九宫重排问题(源码+剖析)
- 考研分数计算神器(通过考研分数计算规则制作出来的计算工具,结果精准,操作简单,并且还可以与第二个人进行比较)
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功