当前位置:网站首页>ssm+mysql实现进销存系统
ssm+mysql实现进销存系统
2022-07-02 06:24:00 【夜未央5788】
作者主页:夜未央5788
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
进销存库存管理系统源码,采用了ssm框架,功能结构非常简单明了,界面也比较清爽大气,非常适合学生和Java新手拿来学习使用。
本项目主要分为管理员、销售、采购员三种角色;
管理员主要功能包括:
用户信息管理:用户查询、用户添加;
货物信息管理:货物查询、库存查询;
入库单信息管理:入库单新建、入库单审核;
出库信息管理:出库单新建、出库单审核;
销售主要功能包括:
出库信息管理:出库单新建;
采购员主要功能包括:
货物信息管理:库存查询
入库单信息管理:入库单新建;
环境要求:
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项目: 否;
6.数据库:MySql 5.7版本;
技术栈
1. 后端:Spring SpringMVC MyBatis
2. 前端:JSP+css+javascript+bootstrap+jQuery
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;
若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;
3. 将项目中dbconfig.properties配置文件中的数据库配置改为自己的配置;
4. 运行项目,输入localhost:8080/ERPSystem 登录
运行截图

相关代码
用户控制器
@Controller
@RequestMapping("/user/")
public class UserController {
@Autowired
private UserService u;
@Autowired
private HwService h;
@Autowired
private ShService s;
// login
@RequestMapping("tzlogin")
public String tzlogin() {
return "redirect:/";
}
// 登录验证
@ResponseBody
@RequestMapping("login")
public String login(User user, HttpSession session, String requestDate) {
Map map = new HashMap();
JSONObject requestJson = JSONObject.fromObject(requestDate);
map.put("name", requestJson.getString("name"));
map.put("password", requestJson.getString("password"));
user.setName(requestJson.getString("name"));
user.setPassword(requestJson.getString("password"));
User user2 = u.login(user);
if (user2 == null) {
Map reMap = new HashMap();
reMap.put("succ", "false");
JSONObject jsonObject = JSONObject.fromObject(reMap);
return jsonObject.toString();
} else {
if(user2.getT2() == 1){ // 状态不可用
Map reMap = new HashMap();
reMap.put("succ", "no_auth");
JSONObject jsonObject = JSONObject.fromObject(reMap);
return jsonObject.toString();
}
session.setAttribute("t2", user2.getT2());
session.setAttribute("id", user2.getId());
System.out.println("user2" + user2);
session.setAttribute("name", user2.getName());
session.setAttribute("user", user2);
session.setAttribute("t1", user2.getT1());
Map reMap = new HashMap();
reMap.put("succ", "true");
JSONObject jsonObject = JSONObject.fromObject(reMap);
return jsonObject.toString();
}
}
@RequestMapping("sy")
public String denglu(HttpSession session, String t2, Model model, String name, User user) {
int qx = (int) session.getAttribute("t1"); // 角色
// model.addAttribute("list", u.findall());
if (qx == 0) { // 管理员
model.addAttribute("list", u.findall(user));
return "gly/yh";
} else if (qx == 1) { // 管理员
model.addAttribute("list", u.findall(user));
return "gly/yh";
} else if (qx == 2) { // 销售
return "redirect:tzckxs";
} else if (qx == 3) { // 采购员
return "redirect:tzkccg";
}
return "redirect:/";
}
@RequestMapping("touser")
public String touser(User user) throws ParseException {
// SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH");
// String time = df.format(System.currentTimeMillis());
user.setDate(new Date(System.currentTimeMillis()));
user.setT1(2);
user.setT2(0);
u.touser(user);
return "redirect:tzlogin";
}
@RequestMapping("delete")
public String delete(int id) {
u.delete(id);
return "redirect:sy";
}
@RequestMapping("tjyh")
public String tzyh() {
return "gly/upyh";
}
@RequestMapping("insert")
public String insert(User user) throws ParseException {
//SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH");
//String time = df.format(new Date(System.currentTimeMillis()));
user.setDate(new Date(System.currentTimeMillis()));
u.touser(user);
return "redirect:sy";
}
如果也想学习本系统,下面领取。回复:001ssm
边栏推荐
- CRP实施方法论
- php中通过集合collect的方法来实现把某个值插入到数组中指定的位置
- Go package name
- The table component specifies the concatenation parallel method
- PHP Session原理简析
- Recursion (maze problem, Queen 8 problem)
- MapReduce与YARN原理解析
- CVE-2015-1635(MS15-034 )远程代码执行漏洞复现
- 外币记账及重估总账余额表变化(下)
- In depth study of JVM bottom layer (IV): class file structure
猜你喜欢

How to try catch statements that return promise objects in JS

Write a thread pool by hand, and take you to learn the implementation principle of ThreadPoolExecutor thread pool

MapReduce与YARN原理解析

Latex compilation error I found no \bibstyle &\bibdata &\citation command

ORACLE 11G利用 ORDS+pljson来实现json_table 效果

SQLI-LABS通關(less6-less14)

In depth study of JVM bottom layer (V): class loading mechanism

CVE-2015-1635(MS15-034 )遠程代碼執行漏洞複現

Build FRP for intranet penetration

DNS攻击详解
随机推荐
ORACLE EBS中消息队列fnd_msg_pub、fnd_message在PL/SQL中的应用
flex九宫格布局
[Zhang San learns C language] - deeply understand data storage
Explain in detail the process of realizing Chinese text classification by CNN
Sublime text configuring PHP compilation environment
js创建一个自定义json数组
Sqli-labs customs clearance (less1)
JS divides an array into groups of three
Self study table Au
pm2简单使用和守护进程
Linux MySQL 5.6.51 community generic installation tutorial
工具种草福利帖
图解Kubernetes中的etcd的访问
ORACLE EBS DATAGUARD 搭建
Oracle rman自动恢复脚本(生产数据向测试迁移)
[leetcode question brushing day 35] 1060 Missing element in ordered array, 1901 Find the peak element, 1380 Lucky number in matrix
The use of regular expressions in JS
Sqli labs customs clearance summary-page3
Laravel8中的find_in_set、upsert的使用方法
php中生成随机的6位邀请码