当前位置:网站首页>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
边栏推荐
- 第一个快应用(quickapp)demo
- Ingress Controller 0.47.0的Yaml文件
- 使用MAME32K进行联机游戏
- Oracle 11g uses ords+pljson to implement JSON_ Table effect
- Only the background of famous universities and factories can programmers have a way out? Netizen: two, big factory background is OK
- 图解Kubernetes中的etcd的访问
- Oracle 11.2.0.3 handles the problem of continuous growth of sysaux table space without downtime
- MySQL composite index with or without ID
- MapReduce concepts and cases (Shang Silicon Valley Learning Notes)
- JSP智能小区物业管理系统
猜你喜欢
Build FRP for intranet penetration
ssm超市订单管理系统
JSP intelligent community property management system
【信息检索导论】第一章 布尔检索
读《敏捷整洁之道:回归本源》后感
How to efficiently develop a wechat applet
Ding Dong, here comes the redis om object mapping framework
Agile development of software development pattern (scrum)
sparksql数据倾斜那些事儿
Oracle EBS数据库监控-Zabbix+zabbix-agent2+orabbix
随机推荐
Message queue fnd in Oracle EBS_ msg_ pub、fnd_ Application of message in pl/sql
php中判断版本号是否连续
Sqli labs customs clearance summary-page2
php中获取汉字拼音大写首字母
MapReduce concepts and cases (Shang Silicon Valley Learning Notes)
Oracle RMAN automatic recovery script (migration of production data to test)
CRP implementation methodology
SSM学生成绩信息管理系统
叮咚,Redis OM对象映射框架来了
parser.parse_args 布尔值类型将False解析为True
如何高效开发一款微信小程序
ORACLE EBS中消息队列fnd_msg_pub、fnd_message在PL/SQL中的应用
The first quickapp demo
Cloud picture says | distributed transaction management DTM: the little helper behind "buy buy buy"
ORACLE APEX 21.2安装及一键部署
Illustration of etcd access in kubernetes
view的绘制机制(二)
Oracle 11g uses ords+pljson to implement JSON_ Table effect
Oracle段顾问、怎么处理行链接行迁移、降低高水位
DNS attack details