当前位置:网站首页>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
边栏推荐
- Message queue fnd in Oracle EBS_ msg_ pub、fnd_ Application of message in pl/sql
- Laravel8中的find_in_set、upsert的使用方法
- Oracle 11g sysaux table space full processing and the difference between move and shrink
- CRP实施方法论
- Go package name
- Oracle apex Ajax process + dy verification
- parser.parse_args 布尔值类型将False解析为True
- 使用 Compose 实现可见 ScrollBar
- 叮咚,Redis OM对象映射框架来了
- Spark的原理解析
猜你喜欢
随机推荐
2021-07-05c /cad secondary development create arc (4)
【信息检索导论】第二章 词项词典与倒排记录表
Oracle段顾问、怎么处理行链接行迁移、降低高水位
优化方法:常用数学符号的含义
架构设计三原则
Conda 创建,复制,分享虚拟环境
DNS attack details
第一个快应用(quickapp)demo
2021-07-19c CAD secondary development creates multiple line segments
在php的开发环境中如何调取WebService?
离线数仓和bi开发的实践和思考
Explain in detail the process of realizing Chinese text classification by CNN
中年人的认知科普
Check log4j problems using stain analysis
使用Matlab实现:弦截法、二分法、CG法,求零点、解方程
CRP implementation methodology
php中计算树状结构数据中的合计
MySQL中的正则表达式
Oracle RMAN automatic recovery script (migration of production data to test)
Oracle 11.2.0.3 handles the problem of continuous growth of sysaux table space without downtime









