当前位置:网站首页>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
边栏推荐
- Explain in detail the process of realizing Chinese text classification by CNN
- Eslint configuration code auto format
- Common prototype methods of JS array
- Recursion (maze problem, Queen 8 problem)
- Review of reflection topics
- ORACLE 11G SYSAUX表空间满处理及move和shrink区别
- User login function: simple but difficult
- Take you to master the formatter of visual studio code
- [daily question] - Huawei machine test 01
- Vscode installation, latex environment, parameter configuration, common problem solving
猜你喜欢

Sqli - Labs Clearance (less6 - less14)

Brief analysis of PHP session principle

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

Sublime text configuring PHP compilation environment

How to debug wechat built-in browser applications (enterprise number, official account, subscription number)

SQLI-LABS通关(less1)

A preliminary study on ant group G6

PHP Session原理简析

The boss said: whoever wants to use double to define the amount of goods, just pack up and go

Build FRP for intranet penetration
随机推荐
Latex error: the font size command \normalsize is not defined problem solved
Sqli labs customs clearance summary-page4
微信小程序基础
Linux MySQL 5.6.51 community generic installation tutorial
mapreduce概念和案例(尚硅谷学习笔记)
uniapp引入本地字体
Brief analysis of PHP session principle
sqli-labs通关汇总-page3
SQLI-LABS通关(less1)
Oracle rman半自动恢复脚本-restore阶段
Stack (linear structure)
Usage of map and foreach in JS
Sentry搭建和使用
PgSQL learning notes
Sqli labs customs clearance summary-page1
Go common compilation fails
Underlying mechanism mvcc
sqli-labs通關匯總-page2
php中生成随机的6位邀请码
[leetcode question brushing day 35] 1060 Missing element in ordered array, 1901 Find the peak element, 1380 Lucky number in matrix