当前位置:网站首页>Implementation of purchase, sales and inventory system with ssm+mysql
Implementation of purchase, sales and inventory system with ssm+mysql
2022-07-02 07:19:00 【Night Weiyang 5788】
Author URI : In the middle of the night 5788
brief introduction :Java Quality creators in the field 、Java project 、 Learning materials 、 Technical assistance
Get the source code at the end of the article
Project introduction
Purchase, sales and inventory management system source code , Adopted ssm frame , The functional structure is very simple and clear , The interface is also fresh and atmospheric , Perfect for students and Java Novices learn to use .
This project is mainly divided into administrators 、 sales 、 There are three roles for purchasers ;
The main functions of the administrator include :
User information management : User query 、 Users add ;
Cargo information management : freight inquiry 、 Inventory query ;
Warehouse in document information management : Create a new receipt document 、 Receipt doc approval ;
Warehouse out information management : Create a new delivery order 、 Issue doc approval ;
The main functions of sales include :
Warehouse out information management : Create a new delivery order ;
The main functions of the Buyer include :
Cargo information management : Inventory query
Warehouse in document information management : Create a new receipt document ;
Environmental requirements :
1. Running environment : It is best to java jdk 1.8, We run on this platform . Other versions can, in theory .
2.IDE Environmental Science :IDEA,Eclipse,Myeclipse Fine . recommend IDEA;
3.tomcat Environmental Science :Tomcat 7.x,8.x,9.x All versions are available
4. Hardware environment :windows 7/8/10 1G Above memory ; perhaps Mac OS;
5. whether Maven project : no ;
6. database :MySql 5.7 edition ;
Technology stack
1. Back end :Spring SpringMVC MyBatis
2. front end :JSP+css+javascript+bootstrap+jQuery
Instructions
1. Use Navicat Or other tools , stay mysql Create a database with the corresponding name in , And import the sql file ;
2. Use IDEA/Eclipse/MyEclipse Import the project ,Eclipse/MyEclipse Import time , if maven Item, please select maven;
if maven project , After importing successfully, please execute maven clean;maven install command , To configure tomcat, And then run ;
3. In the project dbconfig.properties Change the database configuration in the configuration file to your own configuration ;
4. Run the project , Input localhost:8080/ERPSystem Sign in
Run a screenshot

Related codes
User controller
@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:/";
}
// validate logon
@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){ // Status not available
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"); // role
// model.addAttribute("list", u.findall());
if (qx == 0) { // Administrators
model.addAttribute("list", u.findall(user));
return "gly/yh";
} else if (qx == 1) { // Administrators
model.addAttribute("list", u.findall(user));
return "gly/yh";
} else if (qx == 2) { // sales
return "redirect:tzckxs";
} else if (qx == 3) { // buyer
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";
}
If you want to learn this system , Now get . reply :001ssm
边栏推荐
- 離線數倉和bi開發的實踐和思考
- 【信息检索导论】第七章搜索系统中的评分计算
- php中根据数字月份返回月份的英文缩写
- Practice and thinking of offline data warehouse and Bi development
- 解决万恶的open failed: ENOENT (No such file or directory)/(Operation not permitted)
- Sqli-labs customs clearance (less2-less5)
- 2021-07-17c /cad secondary development creation circle (5)
- 软件开发模式之敏捷开发(scrum)
- Oracle 11g uses ords+pljson to implement JSON_ Table effect
- Sqli Labs clearance summary - page 2
猜你喜欢

Changes in foreign currency bookkeeping and revaluation general ledger balance table (Part 2)

Cloud picture says | distributed transaction management DTM: the little helper behind "buy buy buy"

Proteus -- RS-232 dual computer communication

【信息检索导论】第七章搜索系统中的评分计算

Error in running test pyspark in idea2020

Yolov5 practice: teach object detection by hand

Oracle EBs and apex integrated login and principle analysis

Oracle apex Ajax process + dy verification

Spark SQL task performance optimization (basic)

Agile development of software development pattern (scrum)
随机推荐
pySpark构建临时表报错
腾讯机试题
ARP attack
【BERT,GPT+KG调研】Pretrain model融合knowledge的论文集锦
Ceaspectuss shipping company shipping artificial intelligence products, anytime, anywhere container inspection and reporting to achieve cloud yard, shipping company intelligent digital container contr
Sqli-labs customs clearance (less1)
Oracle segment advisor, how to deal with row link row migration, reduce high water level
Explain in detail the process of realizing Chinese text classification by CNN
Agile development of software development pattern (scrum)
Sqli-labs customs clearance (less2-less5)
MapReduce与YARN原理解析
【信息检索导论】第一章 布尔检索
@Transitional step pit
php中的二维数组去重
view的绘制机制(二)
JSP intelligent community property management system
MySQL composite index with or without ID
Use of interrupt()
php中判断版本号是否连续
Sqli labs customs clearance summary-page2