Java 实战范例之员工管理系统的实现
程序员文章站
2022-06-25 22:26:49
一、项目简述本系统功能包括:分为前端翻后端部分,包括用户,区分晋通用户以及誉里员用户,包括首页展示,部门管理,人事管理,员工管理三个模块等等。二、项目运行环境配置: jdkl . 8 + tomcat...
一、项目简述
本系统功能包括:分为前端翻后端部分,包括用户,区分晋通用户以及誉里员用户,包括首页展示,部门管理,人事管理,员工管理三个模块等等。
二、项目运行
环境配置: jdkl . 8 + tomcats . 5 + mysql + hbuilderx ( webstorm 也行)+ eclispe ( intellij idea,eclispe , myeclispe , sts 都支持)。
项目技术: html + css +js + vue + v 一 charts + electron + springboot + mybatis + mysql + maven 等等。
员工操作代码:
/** * @author yy */ @restcontroller @requestmapping("/employee") @crossorigin @slf4j public class employeecontroller { @autowired private employeeservice employeeservice; @autowired private departmentservice departmentservice; @autowired private jobservice jobservice; @autowired private edulevelmapper edulevelmapper; @autowired private employeemapper employeemapper; /** * 搜索接口 */ @getmapping("/search") public result search(@requestparam(name = "name", required = false,defaultvalue = "") string name, @requestparam(name = "current", required = false, defaultvalue = "1") integer current, @requestparam(name = "size", required = false, defaultvalue = "10") integer size) { return employeeservice.list(current, size, name); } /** * 分页查询接口 * * @param current * @param size * @return */ @getmapping("/list") public result list(@requestparam(name = "current", required = false, defaultvalue = "1") integer current, @requestparam(name = "size", required = false, defaultvalue = "10") integer size) { return employeeservice.list(current, size, null); } /** * 根据id获取员工具体信息 * @param id * @return */ @getmapping("/getuserbyid") public employeedto getuserallinfobyid(@requestparam(name = "id") integer id) { return employeeservice.getuserbyid(id); } /** * 根据员工获取信息 * @param id * @return */ @getmapping("/getemployeebyid") public employee getuserbyid(@requestparam(name = "id") integer id) { return employeemapper.selectbyid(id); } /** * 增加员工接口 * * @param employee * @return */ @postmapping("/add") public map<string, object> adduser(@requestbody employee employee) { log.info(employee.tostring()); return employeeservice.add(employee); } /** * 更新用户 * @param employee * @return */ @postmapping("/update") public map<string, object> updateuser(@requestbody employee employee) { log.info(employee.tostring()); return employeeservice.update(employee); } /** * 删除用户 * @param id * @return */ @getmapping("/delete") public result deleteemployeebyid(@requestparam(name = "id") integer id) { return employeeservice.deleteemployeebyid(id); } /** * 辞退员工 * * @param id * @return */ @getmapping("/dismiss") public map<string, object> dismissemployeebyid(@requestparam(name = "id") integer id) { return employeeservice.dismissemployeebyid(id); } /** * 得到所以工作,部门,学历信息 * * @return */ @getmapping("/otherinfo") public result getallotherinfo() { map<string, object> info = new hashmap<>(); info.put("departments", departmentservice.selectall()); info.put("jobs", jobservice.selectall()); info.put("edulevels", edulevelmapper.selectlist(null)); return result.success(info); } @getmapping("/map") public result getmap() { return employeeservice.getmap(); } }
以上就是java 实战范例之员工管理系统的实现的详细内容,更多关于java 员工管理系统的资料请关注其它相关文章!
下一篇: 钵钵鸡要泡多长时间才好吃