900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > 基于javaweb+mysql的ERP报销系统(java+SSM+JSP+LayUI+jQuery+mysql)

基于javaweb+mysql的ERP报销系统(java+SSM+JSP+LayUI+jQuery+mysql)

时间:2022-09-18 07:24:15

相关推荐

基于javaweb+mysql的ERP报销系统(java+SSM+JSP+LayUI+jQuery+mysql)

项目介绍

ssm ERP报销系统。主要分4个角色,总经理、部门经理、财务、普通员工,普通员工填写报销单后需要提交给部门经理审核,再由财务支付,如果金额大于5000,还需要总经理审核。

总经理拥有 部门管理 和 员工管理 功能

部门经理拥有 员工管理 功能

其他职务没有

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;

3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可

4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;

5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目

6.数据库:MySql 5.7版本;

技术栈

后端:Spring SpringMVC MyBatis前端:JSP+LayUI+jQuery

主要技术

Spring IocMybatis+Spring整合声明式事务Spring标签库Spring拦截器

软件架构

三层架构

持久层–Mybatis表现层–Spring MVC控制器–Spring Controller

基于MVC模式

视图–Jsp模型–JavaBean业务层–JavaBean

使用说明

使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;

若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;将项目中spring-dao.xml配置文件中的数据库配置改为自己的配置运行项目,在浏览器中输入http://localhost:8080/ 登录

账户说明

系统默认用户里有四个,分别对应10001(总经理),10002(部门经理),10003(财务),10004(普通员工)

密码为000000

员工填写报销单后需要提交给部门经理审核,再由财务支付,

如果金额大于5000,还需要总经理审核。

总经理拥有 部门管理 和 员工管理 功能

部门经理拥有 员工管理 功能

其他职务没有

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

public class RoleController {@Autowiredprivate RoleService roleService;/*** 页面跳转** @param request* @return*/@RequestMapping("/toPage")public String toPage(HttpServletRequest request) {String url = "sys/role/role";String page = request.getParameter("page");if (page != null) {url = page;}return url;}/*** 添加角色*

}return json;}/*** 删除部门* @param request* @return*/@RequestMapping("/deleteDepartment")@ResponseBodypublic JSONObject deleteDepartment(HttpServletRequest request){JSONObject json = new JSONObject();try{String departmentId = request.getParameter("departmentId");if(departmentService.verifyDepartmentByEmployee(Integer.parseInt(departmentId)) > 0){json.put("type","error");json.put("msg","该部门还含有雇员存在,无法删除");return json;}if(departmentService.deleteDepartment(Integer.parseInt(departmentId)) > 0){json.put("type","success");json.put("msg","删除成功");return json;

public Employee getEmployeeInformation(HttpServletRequest request){String employeeNumber = SecurityUtils.getSubject().getPrincipal().toString(); //获取自身工号return employeeService.getEmployeeNumber(employeeNumber);}/*** 个人信息修改* @param request* @return*/@RequestMapping("/personageUpdateEmployee")@ResponseBodypublic JSONObject personageUpdateEmployee(HttpServletRequest request){return employeeService.personageUpdateEmployee(request);}/*** 修改密码* @param request* @return*/@RequestMapping("/updateEmployeePassword")@ResponseBodypublic JSONObject updateEmployeePassword(HttpServletRequest request){

} catch (Exception e) {json.put("type", "error");json.put("msg", e.getMessage());return json;}json.put("type", "error");json.put("msg", "添加角色失败!");return json;}/*** 修改角色** @param request* @return*/@RequestMapping("/updateRole")@ResponseBodypublic JSONObject updateRole(HttpServletRequest request) {JSONObject json = new JSONObject();try {Role role = JSONObject.parseObject(request.getParameter("role"), Role.class);

return json;}if(departmentService.deleteDepartment(Integer.parseInt(departmentId)) > 0){json.put("type","success");json.put("msg","删除成功");return json;}}catch (Exception e){json.put("type","success");json.put("msg",MessageError.SYSTEM_ERROR);System.out.println(e.getMessage());}return json;}@RequestMapping("/updateDepartmentPrincipal")@ResponseBodypublic JSONObject updateDepartmentPrincipal(HttpServletRequest request){return departmentService.updateDepartmentPrincipal(request);}}员工管理控制层:@Controller@RequestMapping("/employee")public class EmployeeController {@Autowiredprivate EmployeeService employeeService;/**

@RequestMapping("/updateRole")@ResponseBodypublic JSONObject updateRole(HttpServletRequest request) {JSONObject json = new JSONObject();try {Role role = JSONObject.parseObject(request.getParameter("role"), Role.class);if (roleService.verifyRoleTitle(role) > 0) {json.put("type", "error");json.put("msg", "角色名称已重复,请使用别的角色名称");return json;}if (roleService.updateRole(role) > 0) {json.put("type", "success");json.put("msg", "修改角色成功!");return json;}} catch (Exception e) {json.put("type", "error");json.put("msg", e.getMessage());return json;}json.put("type", "error");json.put("msg", "修改角色失败!");

** @param request* @return*/@RequestMapping("/setRolePermissions")@ResponseBodypublic JSONObject setRolePermissions(HttpServletRequest request) {return roleService.setPermissions(request);}}部门管理控制层:@Controller@RequestMapping("/department")public class DepartmentController {@Autowiredprivate DepartmentService departmentService;/*** 获取部门全部数据* @return*/@RequestMapping("/getDepartmentAll")

json.put("msg", "添加角色失败!");return json;}/*** 修改角色** @param request* @return*/@RequestMapping("/updateRole")@ResponseBodypublic JSONObject updateRole(HttpServletRequest request) {JSONObject json = new JSONObject();try {Role role = JSONObject.parseObject(request.getParameter("role"), Role.class);if (roleService.verifyRoleTitle(role) > 0) {json.put("type", "error");json.put("msg", "角色名称已重复,请使用别的角色名称");return json;}if (roleService.updateRole(role) > 0) {json.put("type", "success");

}if(departmentService.deleteDepartment(Integer.parseInt(departmentId)) > 0){json.put("type","success");json.put("msg","删除成功");return json;}}catch (Exception e){json.put("type","success");json.put("msg",MessageError.SYSTEM_ERROR);System.out.println(e.getMessage());}return json;}@RequestMapping("/updateDepartmentPrincipal")@ResponseBodypublic JSONObject updateDepartmentPrincipal(HttpServletRequest request){return departmentService.updateDepartmentPrincipal(request);}}员工管理控制层:@Controller@RequestMapping("/employee")public class EmployeeController {@Autowired

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。