基于javaweb的SSM+Maven超市进销存管理系统(java+ssm+jsp+bootstrap+jquery+mysql)

运行环境

Java≥8、MySQL≥5.7、Tomcat≥8

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

480023202402

490023202402

500023202402

510023202402

520023202402

540023202402

基于javaweb的SSM+Maven超市进销存管理系统(java+ssm+jsp+bootstrap+jquery+mysql)

ssm超市进销存管理系统

项目介绍

超市进销存管理系统,主要分为管理员与员工两种角色:管理员主要功能模块有: 进货管理:进货信息、退货信息; 商品信息管理:商品信息、商品类别; 库存管理:库存信息、库存预警、临期产品; 销售管理:销售信息、销售统计、顾客退货办理; 客户信息管理:客户信息; 供应商信息管理:供应商信息; 员工信息管理:员工信息;员工主要功能有: 进货管理:进货信息、退货信息; 商品信息管理:商品信息、商品类别; 库存管理:库存信息、库存预警、临期产品; 销售管理:销售信息、顾客退货办理; 客户信息管理:客户信息; 供应商信息管理:供应商信息;

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。

2.IDE环境:IDEA。注:该项目暂不支持Eclipse或者MyEclipse; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 是;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目

6.数据库:MySql 5.7版本;

技术栈

  1. 后端:Spring SpringMVC MyBatis

  2. 前端:JSP+bootstrap+jQuery

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;

  2. 将项目中db.properties与spring-mybatis.xml配置文件中的数据库配置改为自己的配置

  3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;

若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行;

  1. 运行项目,在浏览器中输入localhost:8080/chaoshi 登录

注意事项

项目路径必须为localhost:8080/chaoshi,前端代码中已写死,否则会报错;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
    	Kcxx kcxx=kcxxServiceImp.kcxxWithPro(proid);
request.setAttribute("kcxx", kcxx);
model.addAttribute("kcxx",kcxx);
return "manager/getkcxx";

}
// 库存预警
@RequestMapping("/kcxxWithPronum")
public String kcxxWithPronum(ModelMap model,
@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
) {
PageHelper.startPage(pn, 4);
List<Kcxx> kcxxs= kcxxServiceImp.kcxxWithPronum();
PageInfo<Kcxx> pageInfo=new PageInfo<Kcxx>(kcxxs);
model.addAttribute("pageInfo", pageInfo);
return "manager/getkcxx_num";

}
// 临期产品
@RequestMapping("/kcxxWithProdata")
public String kcxxWithProdata(ModelMap model,
@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
) {
PageHelper.startPage(pn, 4);
List<Kcxx> kcxxs= kcxxServiceImp.kcxxWithProdata();
PageInfo<Kcxx> pageInfo=new PageInfo<Kcxx>(kcxxs);
model.addAttribute("pageInfo", pageInfo);
return "manager/getkcxx_data";

}
@InitBinder
protected void init(HttpServletRequest request, ServletRequestDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));
}
// 按条件获取所有进货信息
@RequestMapping("getbyparams")
public String getbyparams(HttpServletRequest request,Model model,@RequestParam(value="proid",required=false)String proid,
@RequestParam(value="pname",required=false)String pname,@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
) {
PageHelper.startPage(pn, 100);
List<Kcxx> ckin= kcxxServiceImp.getbyparams(proid,pname);
PageInfo<Kcxx> pageInfo=new PageInfo<Kcxx>(ckin);
model.addAttribute("pageInfo", pageInfo);
return "manager/getkcxxbyparams";

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40


/**
* @Date 2019年4月19日下午1:53:19
* @Des
*/
@Controller
@RequestMapping("/manager/flatform/kcxx")
public class MKcxxController {
@Autowired
KcxxServiceImp kcxxServiceImp;

// 跳转到增加页面

@RequestMapping("/toadd")
public String toadd(){
return "manager/addkcxx";

}
// 跳转到修改页面

@RequestMapping("/toupdate")
public String editProduct(Kcxx kcxx,HttpServletRequest request,Model model){
model.addAttribute("kcxx", kcxxServiceImp.getbyid(kcxx.getProid()));
return "manager/editkcxx";
}
// 先判断数据库有没有,有就更新,没有就新增

@RequestMapping("/insert")
public String insert(Kcxx kcxx,HttpServletRequest request,Model model){
if(null==kcxxServiceImp.getbyid(kcxx.getProid())) {
kcxxServiceImp.insert(kcxx);
}else {
kcxxServiceImp.update(kcxx);
}
return "redirect:getall";

}
// 删除

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
		
}
// 查询单个

@RequestMapping("/getbyid")
public String getbyid(String supid,HttpServletRequest request,Model model) {
request.setAttribute("supply", supplyMapperServiceImp.getbyid(supid));
model.addAttribute("supply",supplyMapperServiceImp.getbyid(supid));
return "getall";

}
// 按条件查询
@RequestMapping("/getbyparams")
public String getbyparams(@RequestParam(value="supid",required=false)String supid,@RequestParam(value="suppname",required=false)String suppname,
@RequestParam(defaultValue="1",required=true,value="pn") Integer pn,HttpServletRequest request,Model model) {
PageHelper.startPage(pn, 100);
List<Supply> supplys= supplyMapperServiceImp.getbyparams(supid, suppname);
PageInfo<Supply> pageInfo=new PageInfo<Supply>(supplys);
model.addAttribute("pageInfo", pageInfo);
return "getsupplybyparams";

}

}


package com.hbh.controller;







/**
* @Date 2019年3月25日下午2:30:11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
        return "getkcxx"; 

}
// 库存预警
@RequestMapping("/kcxxWithPronum")
public String kcxxWithPronum(ModelMap model,
@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
) {
PageHelper.startPage(pn, 4);
List<Kcxx> kcxxs= kcxxServiceImp.kcxxWithPronum();
PageInfo<Kcxx> pageInfo=new PageInfo<Kcxx>(kcxxs);
model.addAttribute("pageInfo", pageInfo);
return "getkcxx_num";

}
// 临期产品
@RequestMapping("/kcxxWithProdata")
public String kcxxWithProdata(ModelMap model,
@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
) {
PageHelper.startPage(pn, 4);
List<Kcxx> kcxxs= kcxxServiceImp.kcxxWithProdata();
PageInfo<Kcxx> pageInfo=new PageInfo<Kcxx>(kcxxs);
model.addAttribute("pageInfo", pageInfo);
return "getkcxx_data";

}
@InitBinder
protected void init(HttpServletRequest request, ServletRequestDataBinder binder) {
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
dateFormat.setLenient(false);
binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, false));
}
// 按条件获取所有进货信息
@RequestMapping("getbyparams")
public String getbyparams(HttpServletRequest request,Model model,@RequestParam(value="proid",required=false)String proid,
@RequestParam(value="pname",required=false)String pname,@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
) {
PageHelper.startPage(pn, 100);
List<Kcxx> ckin= kcxxServiceImp.getbyparams(proid,pname);
PageInfo<Kcxx> pageInfo=new PageInfo<Kcxx>(ckin);
model.addAttribute("pageInfo", pageInfo);
return "getkcxxbyparams";

}
@RequestMapping("getkcxx")
@ResponseBody
public Kcxx getkcxx(String proid,HttpServletRequest request,Model model) {
Kcxx kcxx=new Kcxx();
kcxx=kcxxServiceImp.getbyid(proid);
return kcxx;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
 * @Des 退货控制器
*/
@Controller
@RequestMapping("/staff/flatform/cusretire")
public class CusRetireController {

@Autowired
CusRetireServiceImp cusRetireServiceImp;

@Autowired
SaleServiceImp saleServiceImp;

// 获取所有退货信息
@RequestMapping("getall")
public String getlist(ModelMap model,
@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
) {
PageHelper.startPage(pn, 4);
List<CusRetire> CusRetire= cusRetireServiceImp.getall();
PageInfo<CusRetire> pageInfo=new PageInfo<CusRetire>(CusRetire);
model.addAttribute("pageInfo", pageInfo);
return "getall_CusRetire";

}
// 根据id查询单个信息
@RequestMapping("/getCusRetire")
public String getbyid(String saleid,HttpServletRequest request,Model model){
request.setAttribute("CusRetire", cusRetireServiceImp.getbyid(saleid));
model.addAttribute("CusRetire",cusRetireServiceImp.getbyid(saleid));
return "getCusRetire";
}

@RequestMapping("edit")
public String edit(CusRetire CusRetire,HttpServletRequest request,Model model){
model.addAttribute("CusRetire", cusRetireServiceImp.getbyid(CusRetire.getSaleid()));
return "editcusretire";
}
@RequestMapping("update")
public String update(CusRetire CusRetire,HttpServletRequest request,Model model){
if(cusRetireServiceImp.update(CusRetire)) {
CusRetire=cusRetireServiceImp.getbyid(CusRetire.getSaleid());
model.addAttribute("CusRetire", CusRetire);
return "redirect:getall";
}
return null;

}


项目链接:
https://javayms.github.io?id=521422322105200ld
https://javayms.pages.dev?id=521422322105200ld