作者主页:编程指南针

作者简介:Java领域优质创作者、CSDN博客专家 、掘金特邀作者、多年架构师设计经验、腾讯课堂常驻讲师

主要内容:Java项目、毕业设计、简历模板、学习资料、面试题库、技术互助

收藏点赞不迷路  关注作者有好处

文末获取源码

项目编号:BS-XX-157

一,项目简介

这是一个生产管理ERP系统。依托科技计划重点项目“制造装备物联及生产管理系统研发”,主要包括:计划进度、设备管理、工艺监控、物料监控、人员监控、质量监控、系统管理7大模块。系统采用SSM框架开发实现,前端主要基于JQUERY-UI实现页面布局展示。

ERP(Enterprise Resource Planning,企业资源计划)系统,是进行物质资源、资金资源和信息资源集成一体化管理的企业信息管理系统,ERP统领企业全局,为管理层服务,重心在于企业决策,ERP对企业宏观管理,一个企业一套ERP,具有整合性、系统性、灵活性、实时控制性等显著特点。ERP 系统的供应链管理思想对企业提出了更高的要求,是企业在信息化社会、在知识经济时代繁荣发展的核心管理模式。

二,环境介绍

语言环境:Java:  jdk1.8

数据库:Mysql: mysql5.7

应用服务器:Tomcat:  tomcat8.5.31

开发工具:IDEA或eclipse

后台开发技术:SSM框架开发

前端开发技术:ajax+jquery+jquery-ui

三,系统展示

用户登陆:

计划进度管理:

计划进度管理-订单管理

计划进度管理-客户管理

计划进度管理-产品管理

计划进度管理-作业管理

计划进度管理-生产计划管理

计划进度管理-生产派工管理

设备管理—设备台账

设备管理—设备种类

设备管理—设备例检

设备管理—设备故障

设备管理—设备维修

工艺监控—工艺管理

物料监控—物料信息

系统管理—用户管理

系统管理—角色管理

四,核心代码展示

package com.megagao.production.ssm.controller;import java.util.HashMap;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import com.megagao.production.ssm.domain.customize.ActiveUser;
import com.megagao.production.ssm.util.CollectionsFactory;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import static com.megagao.production.ssm.common.Constants.NO_PERMISSION;/**** 权限判断controller**/
@RestController
public class AuthorityJudgeController {private static final Logger logger = LoggerFactory.getLogger(AuthorityJudgeController.class);@RequestMapping("*/*_judge")public Map<String,Object> authorityJudge(HttpServletRequest request) throws Exception{Subject subject = SecurityUtils.getSubject();ActiveUser activeUser = (ActiveUser) subject.getPrincipal();//根据uri,使用shiro判断相应权限String uri = request.getRequestURI();String[] names = uri.split("/");String featureName = names[2];String operateName = names[3].split("_")[0];Map<String,Object> map = CollectionsFactory.newHashMap();if(!activeUser.getUserStatus().equals("1")){if (logger.isDebugEnabled()) {logger.debug(NO_PERMISSION, "账户已被锁定!");}map.put("msg", "您的账户已被锁定,请切换账户登录!");}else if(!activeUser.getRoleStatus().equals("1")){if (logger.isDebugEnabled()) {logger.debug(NO_PERMISSION, "角色已被锁定!");}map.put("msg", "当前角色已被锁定,请切换账户登录!");}else{if (logger.isDebugEnabled()) {logger.debug(NO_PERMISSION, "没有权限!");}if(!subject.isPermitted(featureName+":"+operateName)){map.put("msg", "您没有权限,请切换用户登录!");}}return map;}
}
package com.megagao.production.ssm.controller;import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;import javax.servlet.http.HttpServletResponse;import com.megagao.production.ssm.service.FileService;
import com.megagao.production.ssm.util.DownloadUtil;
import com.megagao.production.ssm.util.JsonUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.MultipartHttpServletRequest;/**** 上传图片处理**/
@Controller
public class FileController {@Autowiredprivate FileService fileService;@RequestMapping(value="/file/upload", method=RequestMethod.POST)@ResponseBodypublic String handleFileUpload(MultipartHttpServletRequest request) throws Exception{Iterator<String> iterator = request.getFileNames();String json = null;while (iterator.hasNext()) {String fileName = iterator.next();MultipartFile multipartFile = request.getFile(fileName);Map<String,Object> result = fileService.uploadFile(multipartFile);json = JsonUtils.objectToJson(result);}return json;}@RequestMapping(value="/file/delete")@ResponseBodypublic String handleFileDelete(@RequestParam String fileName) throws Exception{fileService.deleteFile(fileName);Map<String,Object> result = new HashMap<String,Object>();  result.put("data", "success");String json = JsonUtils.objectToJson(result);return json;}@RequestMapping(value="/file/download")public void handleFileDownload(@RequestParam String fileName, HttpServletResponse response) throws Exception{fileName = fileName.substring(fileName.lastIndexOf("/")+1);String filePath = "D:\\upload\\temp\\file\\"+fileName;DownloadUtil du = new DownloadUtil();du.download(filePath, fileName, response, false);}
}
package com.megagao.production.ssm.controller;import com.megagao.production.ssm.util.CollectionsFactory;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.authc.AuthenticationException;
import org.apache.shiro.authc.IncorrectCredentialsException;
import org.apache.shiro.authc.UnknownAccountException;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;import javax.servlet.http.HttpSession;
import java.util.Map;import static com.megagao.production.ssm.common.Constants.VALIDATE_CODE;@Controller
public class LoginController {/*** shiro ajax登录 */@RequestMapping(value = "/ajaxLogin")@ResponseBodypublic Map<String,Object> ajaxLogin(@RequestParam String username,@RequestParam String password,@RequestParam(required=false) String randomcode,HttpSession session) throws Exception{Map<String,Object> map = CollectionsFactory.newHashMap();if(randomcode !=null && !randomcode.equals("")){//取出session的验证码(正确的验证码)String validateCode = (String)session.getAttribute(VALIDATE_CODE);//页面中输入的验证和session中的验证进行对比 if(validateCode!=null && !randomcode.equals(validateCode)){//如果校验失败,将验证码错误失败信息放入map中map.put("msg", "randomcode_error");//直接返回,不再校验账号和密码 return map; }}Subject currentUser = SecurityUtils.getSubject();if (!currentUser.isAuthenticated()) {UsernamePasswordToken token = new UsernamePasswordToken(username, password);try{currentUser.login(token);}catch(UnknownAccountException ex){map.put("msg", "account_error");}catch(IncorrectCredentialsException ex){map.put("msg", "password_error");}catch(AuthenticationException ex){map.put("msg", "authentication_error");}}//返回json数据return map;}
}
package com.megagao.production.ssm.controller.system;import java.util.List;import com.megagao.production.ssm.domain.customize.CustomResult;
import com.megagao.production.ssm.service.PermissionService;
import com.megagao.production.ssm.domain.authority.SysRolePermission;
import com.megagao.production.ssm.domain.customize.EUDataGridResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;@Controller
@RequestMapping("/permission")
public class PermissionController {@Autowiredprivate PermissionService permissionService;@RequestMapping("/get/{permissionId}")@ResponseBodypublic SysRolePermission getItemById(@PathVariable String permissionId) throws Exception{SysRolePermission sysRolePermission = permissionService.get(permissionId);return sysRolePermission;}@RequestMapping("/find")public String find() throws Exception{return "permission_list";}@RequestMapping("/get_data")@ResponseBodypublic List<SysRolePermission> getData() throws Exception{return permissionService.find();}@RequestMapping("/get_permission")@ResponseBodypublic SysRolePermission getPermission(String roleId) throws Exception{return permissionService.getByRoleId(roleId);}@RequestMapping("/add")public String add() throws Exception{return "permission_add";}@RequestMapping("/edit")public String edit() throws Exception{return "permission_edit";}@RequestMapping("/list")@ResponseBodypublic EUDataGridResult getItemList(Integer page, Integer rows, SysRolePermission sysRolePermission)throws Exception{EUDataGridResult result = permissionService.getList(page, rows, sysRolePermission);return result;}@RequestMapping(value="/insert", method=RequestMethod.POST)@ResponseBodyprivate CustomResult insert(SysRolePermission sysRolePermission) throws Exception {CustomResult result = permissionService.insert(sysRolePermission);return result;}@RequestMapping(value="/update")@ResponseBodyprivate CustomResult update(SysRolePermission sysRolePermission) throws Exception {CustomResult result = permissionService.update(sysRolePermission);return result;}@RequestMapping(value="/update_by_roleid")@ResponseBodyprivate CustomResult updateByRoleId(String roleId, String permission) throws Exception {CustomResult result = permissionService.updateByRoleId(roleId, permission);return result;}@RequestMapping(value="/update_all")@ResponseBodyprivate CustomResult updateAll(SysRolePermission sysRolePermission) throws Exception {CustomResult result = permissionService.updateAll(sysRolePermission);return result;}@RequestMapping(value="/delete")@ResponseBodyprivate CustomResult delete(String id) throws Exception {CustomResult result = permissionService.delete(id);return result;}}
package com.megagao.production.ssm.controller.system;import java.util.List;import com.megagao.production.ssm.domain.vo.RoleVO;
import com.megagao.production.ssm.domain.customize.CustomResult;
import com.megagao.production.ssm.domain.customize.EUDataGridResult;
import com.megagao.production.ssm.domain.authority.SysRole;
import com.megagao.production.ssm.service.RoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.validation.FieldError;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;import javax.validation.Valid;@Controller
@RequestMapping("/role")
public class RoleController {@Autowiredprivate RoleService roleService;@RequestMapping("/get/{roleId}")@ResponseBodypublic RoleVO getItemById(@PathVariable String roleId) throws Exception{RoleVO sysRole = roleService.get(roleId);return sysRole;}@RequestMapping("/find")public String find() throws Exception{return "role_list";}@RequestMapping("/permission")public String permission() throws Exception{return "role_permission";}@RequestMapping("/get_data")@ResponseBodypublic List<RoleVO> getData() throws Exception{return roleService.find();}@RequestMapping("/add")public String add() throws Exception{return "role_add";}@RequestMapping("/edit")public String edit() throws Exception{return "role_edit";}@RequestMapping("/list")@ResponseBodypublic EUDataGridResult getItemList(Integer page, Integer rows, RoleVO role) throws Exception{EUDataGridResult result = roleService.getList(page, rows, role);return result;}@RequestMapping(value="/insert", method=RequestMethod.POST)@ResponseBodyprivate CustomResult insert(@Valid SysRole role, BindingResult bindingResult) throws Exception {CustomResult result;if(bindingResult.hasErrors()){FieldError fieldError = bindingResult.getFieldError();return CustomResult.build(100, fieldError.getDefaultMessage());}if(roleService.findByRoleNameAndId(role.getRoleName(), role.getRoleId()).size()>0){result = new CustomResult(0, "该角色名已经存在,请更换角色名!", null);}else if(roleService.get(role.getRoleId()) != null){result = new CustomResult(0, "该角色编号已经存在,请更换角色编号!", null);}else{result = roleService.insert(role);}return result;}@RequestMapping(value="/update")@ResponseBodyprivate CustomResult update(SysRole role) throws Exception {CustomResult result = roleService.update(role);return result;}@RequestMapping(value="/update_all")@ResponseBodyprivate CustomResult updateAll(@Valid SysRole role, BindingResult bindingResult) throws Exception {CustomResult result;if(bindingResult.hasErrors()){FieldError fieldError = bindingResult.getFieldError();return CustomResult.build(100, fieldError.getDefaultMessage());}if(roleService.findByRoleNameAndId(role.getRoleName(), role.getRoleId()).size()>0){result = new CustomResult(0, "该角色名已经存在,请更换角色名!", null);}else if(roleService.get(role.getRoleId()) != null){result = new CustomResult(0, "该角色编号已经存在,请更换角色编号!", null);}else{result = roleService.updateAll(role);}return result;}@RequestMapping(value="/delete")@ResponseBodyprivate CustomResult delete(String id) throws Exception {CustomResult result = roleService.delete(id);return result;}@RequestMapping(value="/delete_batch")@ResponseBodyprivate CustomResult deleteBatch(String[] ids) throws Exception {CustomResult result = roleService.deleteBatch(ids);return result;}//根据角色id查找@RequestMapping("/search_role_by_roleId")@ResponseBodypublic EUDataGridResult searchRoleByRoleId(Integer page, Integer rows, String searchValue) throws Exception{EUDataGridResult result = roleService.searchRoleByRoleId(page, rows, searchValue);return result;}//根据角色名查找@RequestMapping("/search_role_by_roleName")@ResponseBodypublic EUDataGridResult searchRoleByRoleName(Integer page, Integer rows, String searchValue) throws Exception{EUDataGridResult result = roleService.searchRoleByRoleName(page, rows, searchValue);return result;}
}

五,项目总结

本项目功能齐全,前后端交互较好,完整的实现了一个企业ERP系统应用的相关模块。

基于SSM实现企业生资源管理系统-ERP系统相关推荐

  1. 基于SSM中小型企业手机配件销售管理系统

    开发工具(eclipse/idea): eclipse4.5/4.8或者idea2018,jdk1.8 数据库:mysql 功能模块: 管理员: 用户管理(客户.管理员信息的增加删除修改), 采购管理 ...

  2. 基于SSM城乡基层土地资源管理系统

    开发工具(eclipse/idea): eclipse4.5/4.8或者idea2018,jdk1.8 数据库:mysql 功能模块: 首先该系统的管理员是城乡的支部书记,只有他们可以登陆查看,他们可 ...

  3. java基于ssm的企业员工报销费用审批系统

    本系统分为管理员和员工两部分,具体功能如下 管理员部分功能 1.  部门信息管理,管理员可以管理公司内的所有的部门信息 2. 员工信息管理,管理员可以对公司内员工的基本信息进行增删改查等操作 3.   ...

  4. SSM+基于java的企业任务流程管理系统开发 毕业设计-附源码221533

    ssm企业任务流程管理 摘  要 随着互联网大趋势的到来,社会的方方面面,各行各业都在考虑利用互联网作为媒介将自己的信息更及时有效地推广出去,而其中最好的方式就是建立网络管理系统,并对其进行信息管理. ...

  5. 计算机毕业设计ssm基于web的教学资源管理系统01jkz系统+程序+源码+lw+远程部署

    计算机毕业设计ssm基于web的教学资源管理系统01jkz系统+程序+源码+lw+远程部署 计算机毕业设计ssm基于web的教学资源管理系统01jkz系统+程序+源码+lw+远程部署 本源码技术栈: ...

  6. SSM毕设项目 - 基于SSM的企业公寓宿舍后勤管理系统(含源码+论文)

    文章目录 1 项目简介 2 实现效果 2.1 界面展示 3 设计方案 3.1 概述 3.2 系统流程 3.2.1 系统开发流程 3.2.2 系统操作流程 3.3 系统结构设计 4 项目获取 1 项目简 ...

  7. 基于javaweb的企业绩效考核管理系统(java+ssm+jsp+bootstrap+jquery+mysql)

    基于javaweb的企业绩效考核管理系统(java+ssm+jsp+bootstrap+jquery+mysql) 运行环境 Java≥8.MySQL≥5.7.Tomcat≥8 开发工具 eclips ...

  8. 基于SSM的企业管理系统

    项目描述 临近学期结束,还是毕业设计,你还在做java程序网络编程,期末作业,老师的作业要求觉得大了吗?不知道毕业设计该怎么办?网页功能的数量是否太多?没有合适的类型或系统?等等.这里根据疫情当下,你 ...

  9. 帮忙写基于SSM框架的购物商城管理系统

    SSM(Spring+SpringMVC+MyBatis)框架集由Spring.MyBatis两个开源框架整合而成(SpringMVC是Spring中的部分内容).常作为数据源较简单的web项目的框架 ...

最新文章

  1. 构建RESTful风格的WCF服务
  2. dataframe groupby_PySpark SQL——SQL和pd.DataFrame的结合体
  3. 匿名内部类的使用实例
  4. Three.js中使用requestAnimationFrame方法实现立方体转动和小球跳动的动画
  5. Python自然语言处理中文版-学习笔记
  6. Java开发环境搭建详细步骤
  7. 基于JAVA+Servlet+JSP+MYSQL的高校后勤管理系统
  8. export `=' not a valid identifier的一般原因
  9. Json本地校验工具--HiJson
  10. JPEG 图像压缩原理
  11. FreeBSD搭建Nginx+Apache24+php56+mysql56手把手一步步的笔记
  12. SPARC架构下的反汇编(三)——SPARC汇编语言
  13. ztree树与列表名字获取
  14. haproxy+rabbitmq镜像集群
  15. 2022年二级建造师报名需要准备什么
  16. 音频视频播放无法拖动快进
  17. 轮廓图编程-自定义QChartView
  18. 大数据量10道面试题及解析
  19. 利用openssl生成X509证书
  20. 如何快速查看你的笔记本电池健康报告

热门文章

  1. Android传感器的使用开发、简易指南针
  2. 防抄板加密芯片ALPU笔记
  3. 软件体系结构--《Software.architecture.perspectives.on.an.emerging.discipline》
  4. 物种多样性学习之Beta多样性
  5. python3.6安卓版-一些不错的文档网址--笔记【原创】
  6. Excel如何快速合并相同内容单元格
  7. 我投资失败的 7 个项目,都是这样死掉的!|徐小平
  8. Lake Shore—CRX-EM-HF 型低温探针台
  9. 第二十八节:Java基础-进阶继承,抽象类,接口
  10. 采用轻型MiWi协议,Microchip发起进军WPAN首轮