Java项目:ssm超市进销存管理系统

260 篇文章 9 订阅

作者主页:源码空间站2022

 简介:Java领域优质创作者、Java项目、学习资料、技术互助

文末获取源码

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,然后运行;

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

注意事项

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

运行截图

相关代码 

进货管理

package com.hbh.controller;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hbh.entity.Ckin;
import com.hbh.service.imp.CkinServiceImp;

/**
 * @Author Binvor
 * @Date 2019年3月27日下午3:28:51
 * @Des 进货管理
 */
@Controller
@RequestMapping("/staff/flatform/ckin")
public class CkinController {
	@Autowired
	CkinServiceImp ckinServiceImp;
//	获取所有进货信息
	@RequestMapping("getall")
	public String getlist(ModelMap model,
			@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
			) {
		PageHelper.startPage(pn, 4);
		List<Ckin> ckin= ckinServiceImp.getall();
		PageInfo<Ckin> pageInfo=new PageInfo<Ckin>(ckin);
		model.addAttribute("pageInfo", pageInfo);
		return "getall_ckin";
		
	}
//	根据id查询单个信息
    @RequestMapping("/getckin")  
    public String getbyid(String inid,HttpServletRequest request,Model model){  
        request.setAttribute("ckin", ckinServiceImp.getbyid(inid));
        model.addAttribute("ckin",ckinServiceImp.getbyid(inid));  
        return "getckin";  
    }
//    根据条件查询
   /* @RequestMapping("/getwhere")  
    public String getwhere(String  id,String pname,String  type ,HttpServletRequest request,Model model){  
        request.setAttribute(" duct", ckinServiceImp.getbywhere( id, pname,  type));
        model.addAttribute(" duct",ckinServiceImp.getbywhere( id, pname,  type));  
        return "getlist";  
    }*/
	@RequestMapping("edit")
	public String edit(Ckin ckin,HttpServletRequest request,Model model){
		model.addAttribute("ckin", ckinServiceImp.getbyid(ckin.getInid()));
		return "editckin";
	}	
	@RequestMapping("update")
	public String update(Ckin ckin,HttpServletRequest request,Model model){  
    	if(ckinServiceImp.update(ckin)) {
    		ckin=ckinServiceImp.getbyid(ckin.getInid());
    		model.addAttribute("ckin", ckin);
    		return "redirect:getall"; 
    	}
    	return null;
         
    } 
    @RequestMapping("/delete")  
    public String deletete(String inid,HttpServletRequest request,Model model){  
    	ckinServiceImp.delete(inid);
        return "redirect:getall";  
    } 
//  跳转到增加页面
    @RequestMapping("/toadd")  
  public String toadd (){  
  	return "addckin";

  } 
    
    @RequestMapping("/insert")  
//    先判断数据库有没有,有就更新,没有就新增
    public String insert (Ckin	ckin,HttpServletRequest request,Model model){  
    	if(null==ckinServiceImp.getbyid(ckin.getInid())) {
        	ckinServiceImp.insert(ckin);    		
    	}else {
    		ckinServiceImp.update(ckin);
    	}
    	return "redirect:getall";

    } 

    @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="inid",required=false)String inid,@RequestParam(value="pname",required=false)String pname,
    		@RequestParam(value="indate",required=false)String indate,@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
    		) {
		PageHelper.startPage(pn, 100);
		List<Ckin> ckin= ckinServiceImp.getbyparams(proid, inid, pname, indate);
		PageInfo<Ckin> pageInfo=new PageInfo<Ckin>(ckin);
		model.addAttribute("pageInfo", pageInfo);
		return "getckinbyparams";
		
	}

}

CkretireController

package com.hbh.controller;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.ServletRequestDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hbh.entity.Ckin;
import com.hbh.entity.Ckretire;
import com.hbh.service.imp.CkinServiceImp;
import com.hbh.service.imp.CkretireServiceImp;

/**
 * @Author Binvor
 * @Date 2019年3月28日上午9:42:09
 * @Des 
 */
@Controller
@RequestMapping("/staff/flatform/ckretire")
public class CkretireController {
	@Autowired
	CkretireServiceImp ckretireServiceImp;
	
	@Autowired
	CkinServiceImp ckinServiceImp;
	
//	获取所有退货信息
	@RequestMapping("getall")
	public String getlist(ModelMap model,
			@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
			) {
		PageHelper.startPage(pn, 4);
		List<Ckretire> ckretire= ckretireServiceImp.getall();
		PageInfo<Ckretire> pageInfo=new PageInfo<Ckretire>(ckretire);
		model.addAttribute("pageInfo", pageInfo);
		return "getall_ckretire";
		
	}
//	根据id查询单个信息
    @RequestMapping("/getckretire")  
    public String getbyid(String inid,HttpServletRequest request,Model model){  
        request.setAttribute("ckretire", ckretireServiceImp.getbyid(inid));
        model.addAttribute("ckretire",ckretireServiceImp.getbyid(inid));  
        return "getckretire";  
    }
//    根据条件查询
   /* @RequestMapping("/getwhere")  
    public String getwhere(String  id,String pname,String  type ,HttpServletRequest request,Model model){  
        request.setAttribute(" duct", ckretireServiceImp.getbywhere( id, pname,  type));
        model.addAttribute(" duct",ckretireServiceImp.getbywhere( id, pname,  type));  
        return "getlist";  
    }*/
	@RequestMapping("edit")
	public String edit(Ckretire ckretire,HttpServletRequest request,Model model){
		model.addAttribute("ckretire", ckretireServiceImp.getbyid(ckretire.getInid()));
		return "editckretire";
	}	
	@RequestMapping("update")
	public String update(Ckretire ckretire,HttpServletRequest request,Model model){  
    	if(ckretireServiceImp.update(ckretire)) {
    		ckretire=ckretireServiceImp.getbyid(ckretire.getInid());
    		model.addAttribute("ckretire", ckretire);
    		return "redirect:getall"; 
    	}
    	return null;
         
    } 
    @RequestMapping("/delete")  
    public String deletete(String inid,HttpServletRequest request,Model model){  
    	ckretireServiceImp.delete(inid);
        return "redirect:getall";  
    } 
//  跳转到增加页面
    @RequestMapping("/toadd")  
  public String toadd (){  
  	return "addckretire";

  } 
    
    @RequestMapping("/insert")  
//    先判断数据库有没有,有就更新,没有就新增
    public String insert (Ckretire	ckretire,HttpServletRequest request,Model model){  
    	if(null==ckretireServiceImp.getbyid(ckretire.getInid())) {
        	ckretireServiceImp.insert(ckretire);    		
    	}else {
    		ckretireServiceImp.update(ckretire);
    	}
    	return "redirect:getall";

    } 

    @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="inid",required=false)String inid,@RequestParam(value="pname",required=false)String pname,
    		@RequestParam(value="retdate",required=false)String retdate,@RequestParam(defaultValue="1",required=true,value="pn") Integer pn
    		) {
		PageHelper.startPage(pn, 100);
		List<Ckretire> ckin= ckretireServiceImp.getbyparams(proid, inid, pname, retdate);
		PageInfo<Ckretire> pageInfo=new PageInfo<Ckretire>(ckin);
		model.addAttribute("pageInfo", pageInfo);
		return "getckretirebyparams";
		
	}

//	根据id查询单个信息
    @RequestMapping("/getckret")  
    @ResponseBody
    public Ckin ckretire(String inid,HttpServletRequest request,Model model){  
    	Ckin ckretire=new Ckin();
        ckretire= ckinServiceImp.getbyid(inid);
        return ckretire;  
    }

}

CustomController

package com.hbh.controller;



import java.util.List;

import javax.servlet.http.HttpServletRequest;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hbh.entity.Custom;
import com.hbh.entity.Product;
import com.hbh.entity.Type;
import com.hbh.entity.Custom;
import com.hbh.service.imp.CustomServiceImp;
import com.hbh.service.imp.CustomServiceImp;

/**
 * @Author Binvor
 * @Date 2019年3月25日下午2:30:11
 * @Des  客户类别控制器
 */
@Controller
@RequestMapping("/staff/flatform/custom")
public class CustomController {
	
	@Autowired
	CustomServiceImp customServiceImp;
	
//  跳转到增加页面
	
  @RequestMapping("/toadd")  
  public String toaddCustom(){  
  	return "addcus";

  } 
//  跳转到修改页面
    
    @RequestMapping("/toupdate")  
	public String editProduct(Custom custom,HttpServletRequest request,Model model){
		model.addAttribute("custom", customServiceImp.getByid(custom.getCusid()));
		return "editcus";
	}
//  先判断数据库有没有,有就更新,没有就新增
    
    @RequestMapping("/insert")  
    public String insert(Custom custom,HttpServletRequest request,Model model){  
    	if(null==customServiceImp.getByid(custom.getCusid())) {
    		customServiceImp.insert(custom);    		
    	}else {
    		customServiceImp.update(custom);
    	}
    	return "redirect:getall";

    } 
//    删除
    
    @RequestMapping("/delete")
    public String delete(String cusid) {
    	customServiceImp.delete(cusid);
    	return "redirect:getall";
    }
//    修改
    
    @RequestMapping("/update")
    public String update(Custom custom,HttpServletRequest request,Model model){
    	if(customServiceImp.update(custom)) {
    		custom=customServiceImp.getByid(custom.getCusid());
    		model.addAttribute("custom", custom);
    		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<Custom> Customs= customServiceImp.getlist();
		PageInfo<Custom> pageInfo=new PageInfo<Custom>(Customs);
		model.addAttribute("pageInfo", pageInfo);
		return "getall_cus";
		
	}
//  查询单个
    
    @RequestMapping("/getbyid")
    public String getbyid(String cusid,HttpServletRequest request,Model model) {
        request.setAttribute("custom", customServiceImp.getByid(cusid));
        model.addAttribute("custom",customServiceImp.getByid(cusid));  
        return "getall"; 
  		
  	}
  //根据条件查询
    @RequestMapping("getbyparams")
    public String getbyparams(@RequestParam(value="cusid",required=false)String cusid,@RequestParam(value="cusname",required=false)String cusname,
  	@RequestParam(defaultValue="1",required=true,value="pn") Integer pn,HttpServletRequest request,Model model
  		) {
  	PageHelper.startPage(pn, 100);
  	List<Custom> customs= customServiceImp.getbyparams(cusid, cusname);
  	PageInfo<Custom> pageInfo=new PageInfo<Custom>(customs);
  	model.addAttribute("pageInfo", pageInfo);
  	return "getcustombyparams";
   
    }
}

如果也想学习本系统,下面领取。关注并回复:009ssm 

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
完成于12-24号,数据数据库实验课小作品。功能简单清晰,有详尽的注释,有使用说明和文档,完全原创,VC++6.0下可直接运行。 超市系统使用说明 功能特点:售方面,输入商品编号的前几个字母,系统行模糊查询在左侧表中显示相关商品,选中后会自动将商品的详细信息返回到输入框中,然后只需要输入要售的数量,下面的总价会自动根据数量计算价格,如果要继续添加商品,点击按钮即可将商品添加到下方的表格中,最后点击结算,会提示总价格。 商品入库特点:可以对相同商品入库,输入商品完整编号后,系统行查询,如果此商品在库表有,则执行更新库操作,否则会新建一条记录。最后会将入库信息及操作员编号和日期插入到入库记录表中,管理员可以随时查看。 主要功能模块:登陆,注册,售,入库,查看入库信息,查看售信息 解压后在根目录有可执行程序可以直接运行,数据库保在文件根目录,不需要任何配置,可以直接编译运行。 数据库主要结构:一张商品总库表,一张管理员信息表,一张售员信息表,一张采购员信息表,一张入库记录表,一张售记录表 权限:管理员所有功能均可使用 售员:可以使用售 采购员:可以使用入库 售员登陆:工号001密码001 采购员登陆:工号001密码001 老板登陆:工号:admin密码admin
"SSM服装出租服装店租赁服装管理系统" 是一个基于Java项目。该系统旨在帮助服装店有效管理其库、租赁流程和顾客信息,以提升运营效率。 该系统的主要功能包括库管理,租赁管理和顾客管理。首先,库管理模块允许店主添加、删除和更新服装的详细信息,包括服装名称、类型、尺码和价格等。店主可以通过该模块随时了解实时库情况,并及时补充库。其次,租赁管理模块允许店主记录租赁订单,包括租赁日期、租赁时长和顾客信息等。系统可以自动计算租赁费用并生成相应的发票。最后,顾客管理模块允许店主维护顾客的基本信息,并记录顾客的租赁历史以及积累的租赁次数和会员等级。 为了提高系统的稳定性和安全性,该项目采用SSM(Spring+Spring MVC+MyBatis)框架行开发。Spring作为业务层框架,负责处理系统的业务逻辑;Spring MVC作为视图层框架,负责接收用户请求和展示数据;MyBatis作为持久层框架,负责与数据库行交互。此外,项目还使用MySQL作为数据库,保证数据的可靠储和快速检索。 该项目的优势在于提高了服装店的管理效率。通过系统化的库管理和租赁管理,店主可以实时掌握库情况和租赁订单,避免了重复和遗漏,提高了工作效率。而顾客管理模块的引入,使店主能够更好地了解顾客的需求和偏好,从而提供个性化的服务,增加顾客的满意度和忠诚度。 综上所述,SSM服装出租服装店租赁服装管理系统是一个基于Java开发的项目,旨在提高服装店的库管理、租赁管理和顾客管理效率。该系统通过SSM框架和MySQL数据库的应用,保证了系统的稳定性和安全性。它的优势在于提高了店主的工作效率和顾客满意度,帮助服装店实现更好的运营表现。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值