SSM+mysql实现的汽车销售管理系统(角色权限分离,功能:采购申请、仓储入库、车辆出库、车辆入库、登录、客户管理、汽车销售柱状统计、销售统计、组织结构管理)

SSM汽车销售管理系统

本系统是解决了汽车销售领域品类针对性管理的问题,通过组织角色权限分离,采购入库出库等业务设计,很好的满足了企业销售的场景需求。

实现功能截图

登录
在这里插入图片描述
主页
在这里插入图片描述

可视化图表统计
请添加图片描述

采购申请
在这里插入图片描述
仓储仓库
在这里插入图片描述
车辆入库出库
请添加图片描述
请添加图片描述
客户管理
在这里插入图片描述
汽车品牌赠品管理
请添加图片描述

请添加图片描述
请添加图片描述
请添加图片描述
组织权限管理
请添加图片描述
请添加图片描述
请添加图片描述

系统功能

本汽车销售管理系统实现了以下功能:
1、登录注册
2、仓储管理
3、汽车出入库管理
4、汽车品牌管理
5、赠品管理
6、客户管理
7、可视化图表统计
8、组织权限管理

使用技术

数据库:mysql
开发工具:Eclipse(Myeclispe、Idea也可以)
知识点:SSM

本系统采用MVC的思想:将项目包分为entity/dao/service/control层,代码结构清晰

代码

实体类层
CardetailEntity.java

package com.svse.entity;

import java.io.Serializable;

public class CardetailEntity implements Serializable {
	private int detailid;
	private String detailname;
	private int sortid;
	private String detailguige;
	private String detailtime;
	private String detailremark;
	private int detailflag;
	
	private String flag;
	
	
	public String getFlag() {
		return flag;
	}

	public void setFlag(String flag) {
		this.flag = flag;
	}

	private CarsortEntity sort=new CarsortEntity();

	public int getDetailid() {
		return detailid;
	}

	public void setDetailid(int detailid) {
		this.detailid = detailid;
	}

	public String getDetailname() {
		return detailname;
	}

	public void setDetailname(String detailname) {
		this.detailname = detailname;
	}

	public int getSortid() {
		return sortid;
	}

	public void setSortid(int sortid) {
		this.sortid = sortid;
	}

	public String getDetailguige() {
		return detailguige;
	}

	public void setDetailguige(String detailguige) {
		this.detailguige = detailguige;
	}

	public String getDetailtime() {
		return detailtime;
	}

	public void setDetailtime(String detailtime) {
		this.detailtime = detailtime;
	}

	public String getDetailremark() {
		return detailremark;
	}

	public void setDetailremark(String detailremark) {
		this.detailremark = detailremark;
	}

	public int getDetailflag() {
		return detailflag;
	}

	public void setDetailflag(int detailflag) {
		this.detailflag = detailflag;
	}

	public CarsortEntity getSort() {
		return sort;
	}

	public void setSort(CarsortEntity sort) {
		this.sort = sort;
	}
	
	
	
}

CustomEntity.java

package com.svse.entity;

import java.io.Serializable;

public class CustomEntity implements Serializable {
	
	private int customid;
	private int mid;
	private String customname;
	private String customtel;
	private String mname;
	private String mrealname;
	
	
	
	public String getMrealname() {
		return mrealname;
	}
	public void setMrealname(String mrealname) {
		this.mrealname = mrealname;
	}
	public String getMname() {
		return mname;
	}
	public void setMname(String mname) {
		this.mname = mname;
	}
	public int getCustomid() {
		return customid;
	}
	public void setCustomid(int customid) {
		this.customid = customid;
	}
	public int getMid() {
		return mid;
	}
	public void setMid(int mid) {
		this.mid = mid;
	}
	public String getCustomname() {
		return customname;
	}
	public void setCustomname(String customname) {
		this.customname = customname;
	}
	public String getCustomtel() {
		return customtel;
	}
	public void setCustomtel(String customtel) {
		this.customtel = customtel;
	}
	
	
	
}

dao层
CardetailDAOI.java

package com.svse.dao;

import java.util.List;

import com.svse.entity.CardetailEntity;

public interface CardetailDAOI {

	// 添加
	public void add(CardetailEntity cardetail);

	// 修改
	public void upp(CardetailEntity cardetail);

	// 全查询
	public List<CardetailEntity> alldetail(int begin,int pages);
	public List<CardetailEntity> all();
	// 查询单个
	public CardetailEntity one(int detailid);
	
	//所有记录
	public int count();

	public List<CardetailEntity> allbysort(int sortid);
}

CustomDAOI.java

package com.svse.dao;

import java.util.List;

import com.svse.entity.CustomEntity;

public interface CustomDAOI {

	//添加
	public void add(CustomEntity custom);
	
	//全查询
	public List<CustomEntity> all(int mid);

	public List<CustomEntity> all1(int offset, int limit);
	
	//所有记录
	public int count();

	//判断重复
	public int repeat(CustomEntity custom);

	public List<CustomEntity> limit1(int offset, int limit, int pid);

	public int count1(int pid);

	//权限
	public List<CustomEntity> limit2(int offset, int limit, int mid);
	public List<CustomEntity> alllimit(int mid);
	public int count2(int mid);

	public List<CustomEntity> getall();
	
}

service层
CardetailImpl.java

package com.svse.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.svse.dao.CardetailDAOI;
import com.svse.entity.CardetailEntity;
import com.svse.service.CardetailService;

@Service
public class CardetailImpl implements CardetailService{
	
	@Autowired
	private CardetailDAOI daoi;
	@Override
	public void addCardetail(CardetailEntity cardetail) {
		
		this.daoi.add(cardetail);
	}

	@Override
	public void uppCardetail(CardetailEntity cardetail) {
		
		this.daoi.upp(cardetail);
	}


	@Override
	public List<CardetailEntity> getAllCardetail(int begin, int pages) {
		List<CardetailEntity> ar=this.daoi.alldetail(begin, pages);
		for (CardetailEntity d : ar) {
			if(d.getDetailflag()==1){
				d.setFlag("正常");
			}else{
				d.setFlag("停产");
			}
		}
		return ar;
	}

	@Override
	public CardetailEntity getOneCardetail(int detailid) {
		
		return this.daoi.one(detailid);
	}


	@Override
	public int Count() {
		
		return this.daoi.count();
	}

	@Override
	public List<CardetailEntity> getAllCardetail() {

		return this.daoi.all();
	}

	@Override
	public List<CardetailEntity> getAllBySort(int sortid) {

		return this.daoi.allbysort(sortid);
	}

	
}

CustomImpl.java

package com.svse.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.svse.dao.CustomDAOI;
import com.svse.entity.CustomEntity;
import com.svse.service.CustomService;
@Service
public class CustomImpl implements CustomService {
	@Autowired
	private CustomDAOI daoi;
		
	@Override
	public void addCustom(CustomEntity custom) {
		
		this.daoi.add(custom);
	}

	@Override
	public List<CustomEntity> getAlls(int mid) {
		
		return this.daoi.all(mid);
	}

	@Override
	public List<CustomEntity> getAll(int offset, int limit) {
		
		return this.daoi.all1(offset,limit);
	}

	@Override
	public int count() {
		
		return this.daoi.count();
	}

	@Override
	public int repeat(CustomEntity custom) {
		
		return this.daoi.repeat(custom);
	}

	@Override
	public List<CustomEntity> getLimit1(int offset, int limit, int pid) {
		
		return this.daoi.limit1(offset,limit,pid);
	}

	@Override
	public List<CustomEntity> getLimit2(int offset, int limit, int mid) {
		
		return this.daoi.limit2(offset,limit,mid);
	}

	@Override
	public int count1(int pid) {
		
		return this.daoi.count1(pid);
	}

	@Override
	public int count2(int mid) {
		
		return this.daoi.count2(mid);
	}

	@Override
	public List<CustomEntity> getAll(int mid) {

		return this.daoi.alllimit(mid);
	}

	@Override
	public List<CustomEntity> getAll() {

		return this.daoi.getall();
	}

}

controller层
CardetailControl.java

package com.svse.control;

import java.util.ArrayList;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.svse.entity.CardetailEntity;
import com.svse.entity.CarsortEntity;
import com.svse.service.CardetailService;
import com.svse.service.CarsortService;

import net.sf.json.JSONObject;

@Controller
@RequestMapping("cardetail.do")
public class CardetailControl {

	@Autowired
	private CardetailService cdserv;
	@Autowired
	private CarsortService sserv;

	// 添加
	@RequestMapping(params = "method=add")
	@ResponseBody
	public int addsort(CardetailEntity detail) {
		this.cdserv.addCardetail(detail);
		return 1;
	}

	// 弹窗修改
	@RequestMapping(params = "method=upp")
	@ResponseBody
	public int uppsort(CardetailEntity detail) {
		this.cdserv.uppCardetail(detail);
		return 1;
	}


	// 全查询
	@RequestMapping(params="method=all")
	@ResponseBody
	public JSONObject all(int limit,int offset)
	{
		//共有多少条
		int count=this.cdserv.Count();
		//分页查询
		List<CardetailEntity> ar=this.cdserv.getAllCardetail(offset, limit);
		
		JSONObject obj=new JSONObject();
		
		obj.put("rows", ar);
		obj.put("total", count);
		
		return obj;
	}
	//全查询
	@RequestMapping(params="method=alls")
	@ResponseBody
	public List<CardetailEntity> all()
	{
		List<CardetailEntity> ar=this.cdserv.getAllCardetail();
		return ar;
	}
	
	//根据品牌查询系列
	@RequestMapping(params="method=allsort")
	@ResponseBody
	public List<CardetailEntity> all(int sortid)
	{
		List<CardetailEntity> ar=this.cdserv.getAllBySort(sortid);
//		if(ar.size()==0){
//			CardetailEntity car=new CardetailEntity();
//			car.setDetailid(0);
//			car.setDetailname("--该品牌下无产品--");
//			car.setDetailguige("");
//			ar.add(car);
//		}
		return ar;
	}
	
	// 查询单个
	@RequestMapping(params = "method=one")
	@ResponseBody
	public List getOnesort(int detailid) {
		List ar = new ArrayList();
		CardetailEntity detail = this.cdserv.getOneCardetail(detailid);
		detail.setSortid(detail.getSort().getSortid());
		List<CarsortEntity> ars=this.sserv.getAllCarsort();
		ar.add(detail);
		for (CarsortEntity c : ars) {
			ar.add(c);
		}
		return ar;
	}


}

CustomControl.java

package com.svse.control;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.svse.entity.ActionsEntity;
import com.svse.entity.CustomEntity;
import com.svse.entity.MasterEntity;
import com.svse.service.CustomService;
import com.svse.util.MyPages;

import net.sf.json.JSONObject;

@Controller
@RequestMapping("custom.do")
public class CustomControl {

	@Autowired
	private CustomService cserv;

	// 添加
	@RequestMapping(params = "method=add")
	@ResponseBody
	public int addcustom(CustomEntity custom, HttpSession session) {
		MasterEntity m = (MasterEntity) session.getAttribute("master");
		custom.setMid(m.getMid());
		this.cserv.addCustom(custom);
		return 1;
	}

	// 全查询
	@RequestMapping(params = "method=all")
	@ResponseBody
	public JSONObject all(int limit, int offset) {
		// 共有多少条
		int count = this.cserv.count();
		// 分页查询
		List<CustomEntity> ar = this.cserv.getAll(offset, limit);

		JSONObject obj = new JSONObject();

		obj.put("rows", ar);
		obj.put("total", count);

		return obj;
	}

	// 全查询
	@RequestMapping(params = "method=limit1")
	@ResponseBody
	public JSONObject limit1(int limit, int offset, int pid) {
		// 共有多少条
		int count = this.cserv.count1(pid);
		// 分页查询
		List<CustomEntity> ar = this.cserv.getLimit1(offset, limit, pid);

		JSONObject obj = new JSONObject();

		obj.put("rows", ar);
		obj.put("total", count);

		return obj;
	}

	// 全查询
	@RequestMapping(params = "method=limit2")
	@ResponseBody
	public JSONObject limit2(int limit, int offset, int mid) {
		// 共有多少条
		int count = this.cserv.count2(mid);
		// 分页查询
		List<CustomEntity> ar = this.cserv.getLimit2(offset, limit, mid);

		JSONObject obj = new JSONObject();

		obj.put("rows", ar);
		obj.put("total", count);

		return obj;
	}

	@RequestMapping(params = "method=allcustom")
	@ResponseBody
	public List<CustomEntity> getAll(HttpSession session,int gid) {
		MasterEntity m = (MasterEntity) session.getAttribute("master");
		List<CustomEntity> ar;
		if(gid==1){
			ar = this.cserv.getAll();
		}else{
			ar = this.cserv.getAlls(m.getMid());
		}
		return ar;
	}
	
	@RequestMapping(params = "method=limitcustom")
	@ResponseBody
	public List<CustomEntity> getAll(int mid) {
		List<CustomEntity> ar = this.cserv.getAll(mid);
		return ar;
	}

	// 判断重复
	@RequestMapping(params = "method=repeat")
	@ResponseBody
	public int repeat(String customtel) {
		CustomEntity custom = new CustomEntity();
		custom.setCustomtel(customtel);
		int t = this.cserv.repeat(custom);
		if (t > 0) {
			// 重复
			return 1;
		} else {
			return 2;
		}
	}

}

写在最后

如果运行代码中遇到问题,或者需要完整源码和报告,可以加博主V交流:Code2Life2

觉得有用,别忘了一键三连哈!

  • 4
    点赞
  • 29
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

anmu4200

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值