——————————DescriptionStart——————————
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明






基于javaweb的SSM+Maven图书进销存管理系统(java+ssm+bootstrap+jsp+jquery+mysql)
图书进销存管理系统
项目介绍
该项目主要分为管理员与普通员工两种角色;
管理员角色包含以下功能:
管理员登录,进货管理,图书信息管理,库存管理,销售管理,客户信息管理,供应商信息管理,员工信息管理等功能。
角色包含以下功能:
用户登录,进货管理,图书信息管理,库存管理,销售管理,客户信息管理,供应商管理,修改个人资料等功能。
由于本程序规模不大,可供课程设计,毕业设计学习演示之用
技术栈
- 后端:Spring+SpringMVC+Mybatis
- 前端:JSP+bootstrap+jQuery
1 2 3 4 5 6 7 8
| 管理员(manager表): 000 123456
普通员工(staff表): 001 123456 002 123456 003 123456 004 123456
|
——————————CodeStart——————————
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 53 54
| ){ PageHelper.startPage(pn, 100); List<Product> products= productServiceImp.getbyparams(proid, supname, pname, protype); PageInfo<Product> pageInfo=new PageInfo<Product>(products); model.addAttribute("pageInfo", pageInfo); return "getprobyparams"; } @RequestMapping("editpro") public String editProduct(Product pro,HttpServletRequest request,Model model){ model.addAttribute("product", productServiceImp.selectByPrimaryKey(pro.getProid())); return "editpro"; } @RequestMapping("updatepro") public String updatepro(Product product,HttpServletRequest request,Model model){ if(productServiceImp.updateByPrimaryKey(product)) { product=productServiceImp.selectByPrimaryKey(product.getProid()); model.addAttribute("product", product); return "redirect:getlist"; } return null; } @RequestMapping("/deletepro") public String deletetepro(String proid,HttpServletRequest request,Model model){ productServiceImp.deleteByPrimaryKey(proid); return "redirect:getlist"; }
@RequestMapping("/toaddpro") public String toaddpro(){ return "addpro";
} @RequestMapping("/insertpro")
public String insertpro(Product product,HttpServletRequest request,Model model){ if(null==productServiceImp.selectByPrimaryKey(product.getProid())) { productServiceImp.insert(product); return "redirect:getlist"; }else { request.setAttribute("msg", "新增失败,系统中存在该id的商品,请重新输入!"); return "addpro"; } } @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)); }
|
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
| }
}
@Controller @RequestMapping("/manager/flatform/product") public class MProductController { @Autowired ProductServiceImp productServiceImp;
@RequestMapping("getlist") public String getlist(ModelMap model, @RequestParam(defaultValue="1",required=true,value="pn") Integer pn ) { PageHelper.startPage(pn, 4); List<Product> products= productServiceImp.getlist(); PageInfo<Product> pageInfo=new PageInfo<Product>(products); model.addAttribute("pageInfo", pageInfo); return "manager/getlist"; }
@RequestMapping("/getpro") public String getpro(String proid,HttpServletRequest request,Model model){
|
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
| PageHelper.startPage(pn, 100); List<Custom> customs= customServiceImp.getbyparams(cusid, cusname); PageInfo<Custom> pageInfo=new PageInfo<Custom>(customs); model.addAttribute("pageInfo", pageInfo); return "manager/getcustombyparams"; } }
@Controller @RequestMapping("/staff/flatform/type") public class TypeController { @Autowired TypeServiceImp typeServiceImp;
@RequestMapping("/toadd") public String toaddtype(){ return "addtype";
}
|
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
| if(null==saleServiceImp.getbyid(sale.getSaleid())) { saleServiceImp.insert(sale); }else { saleServiceImp.update(sale); } return "redirect:getall";
}
@RequestMapping("/delete") public String delete(String saleid) { saleServiceImp.delete(saleid); return "redirect:getall"; }
@RequestMapping("/update") public String update(Sale sale,HttpServletRequest request,Model model){ if(saleServiceImp.update(sale)) { sale=saleServiceImp.getbyid(sale.getSaleid()); model.addAttribute("sale", sale); return "redirect:getall"; } return null; }
@RequestMapping("/getall") public String getall_cus(ModelMap model, @RequestParam(defaultValue="1",required=true,value="pn") Integer pn ) { PageHelper.startPage(pn, 4); List<Sale> sales= saleServiceImp.getall(); PageInfo<Sale> pageInfo=new PageInfo<Sale>(sales); model.addAttribute("pageInfo", pageInfo); return "manager/getall_sale"; }
@RequestMapping("/getbyid") public String getbyid(String saleid,HttpServletRequest request,Model model) { request.setAttribute("sale", saleServiceImp.getbyid(saleid)); model.addAttribute("sale",saleServiceImp.getbyid(saleid)); return "manager/getsale"; } @RequestMapping("getbyparams") public String getbyparams(HttpServletRequest request,Model model,@RequestParam(value="proid",required=false)String proid, @RequestParam(value="cusid",required=false)String cusid,@RequestParam(value="pname",required=false)String pname,
|
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
| @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; }
}
|
——————————PayStart——————————
项目链接:
https://javayms.github.io?id=201122522008200oh
https://javayms.pages.dev?id=201122522008200oh