自动售货机云平台的设计与实现

自动售货机云平台的设计与实现登录注册界面

自动售货机云平台的设计与实现mysql数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '超级管理员账号',
	password varchar(100) comment '超级管理员密码'
) comment '超级管理员';
insert into t_admin(username,password) values('admin','123456');

货道表创建语句如下:


create table t_hd(
	id int primary key auto_increment comment '主键',
	shjId int comment '售货机',
	hdName varchar(100) comment '货道编号',
	szh int comment '所在行',
	szl int comment '所在列',
	edsp int comment '额定商品数量',
	dqsp int comment '当前商品数量',
	qhsp int comment '缺货状态数量',
	ygId int comment '管理员',
	spId int comment '商品'
) comment '货道';

售货机表创建语句如下:


create table t_shj(
	id int primary key auto_increment comment '主键',
	shjName varchar(100) comment '售货机编号',
	v2 varchar(100) comment '铭牌号',
	v3 varchar(100) comment '地址',
	v4 varchar(100) comment '规格',
	hs int comment '货道行数',
	ls int comment '货道列数',
	ygId int comment '管理员',
	status int comment '状态'
) comment '售货机';

商品表创建语句如下:


create table t_sp(
	id int primary key auto_increment comment '主键',
	spbh varchar(100) comment '商品编号',
	spName varchar(100) comment '商品名称',
	spPic varchar(100) comment '商品图片',
	sl int comment '数量',
	scgs varchar(100) comment '生产公司',
	jhjg int comment '进货价格',
	xsjg int comment '销售价格',
	remark varchar(100) comment '描述',
	ygId int comment '管理员'
) comment '商品';

销售信息表创建语句如下:


create table t_xs(
	id int primary key auto_increment comment '主键',
	spId int comment '商品',
	shjId int comment '售货机',
	hdId int comment '货道',
	je int comment '金额',
	cb int comment '成本',
	lr int comment '利润',
	insertDate datetime comment '日期'
) comment '销售信息';

员工表创建语句如下:


create table t_yg(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	ygName varchar(100) comment '姓名',
	js varchar(100) comment '角色',
	qz varchar(100) comment '群组',
	status int comment '状态'
) comment '员工';

自动售货机云平台的设计与实现oracle数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id integer,
	username varchar(100),
	password varchar(100)
);
insert into t_admin(id,username,password) values(1,'admin','123456');
--超级管理员字段加注释
comment on column t_admin.id is '主键';
comment on column t_admin.username is '超级管理员账号';
comment on column t_admin.password is '超级管理员密码';
--超级管理员表加注释
comment on table t_admin is '超级管理员';

货道表创建语句如下:


create table t_hd(
	id integer,
	shjId int,
	hdName varchar(100),
	szh int,
	szl int,
	edsp int,
	dqsp int,
	qhsp int,
	ygId int,
	spId int
);
--货道字段加注释
comment on column t_hd.id is '主键';
comment on column t_hd.shjId is '售货机';
comment on column t_hd.hdName is '货道编号';
comment on column t_hd.szh is '所在行';
comment on column t_hd.szl is '所在列';
comment on column t_hd.edsp is '额定商品数量';
comment on column t_hd.dqsp is '当前商品数量';
comment on column t_hd.qhsp is '缺货状态数量';
comment on column t_hd.ygId is '管理员';
comment on column t_hd.spId is '商品';
--货道表加注释
comment on table t_hd is '货道';

售货机表创建语句如下:


create table t_shj(
	id integer,
	shjName varchar(100),
	v2 varchar(100),
	v3 varchar(100),
	v4 varchar(100),
	hs int,
	ls int,
	ygId int,
	status int
);
--售货机字段加注释
comment on column t_shj.id is '主键';
comment on column t_shj.shjName is '售货机编号';
comment on column t_shj.v2 is '铭牌号';
comment on column t_shj.v3 is '地址';
comment on column t_shj.v4 is '规格';
comment on column t_shj.hs is '货道行数';
comment on column t_shj.ls is '货道列数';
comment on column t_shj.ygId is '管理员';
comment on column t_shj.status is '状态';
--售货机表加注释
comment on table t_shj is '售货机';

商品表创建语句如下:


create table t_sp(
	id integer,
	spbh varchar(100),
	spName varchar(100),
	spPic varchar(100),
	sl int,
	scgs varchar(100),
	jhjg int,
	xsjg int,
	remark varchar(100),
	ygId int
);
--商品字段加注释
comment on column t_sp.id is '主键';
comment on column t_sp.spbh is '商品编号';
comment on column t_sp.spName is '商品名称';
comment on column t_sp.spPic is '商品图片';
comment on column t_sp.sl is '数量';
comment on column t_sp.scgs is '生产公司';
comment on column t_sp.jhjg is '进货价格';
comment on column t_sp.xsjg is '销售价格';
comment on column t_sp.remark is '描述';
comment on column t_sp.ygId is '管理员';
--商品表加注释
comment on table t_sp is '商品';

销售信息表创建语句如下:


create table t_xs(
	id integer,
	spId int,
	shjId int,
	hdId int,
	je int,
	cb int,
	lr int,
	insertDate datetime
);
--销售信息字段加注释
comment on column t_xs.id is '主键';
comment on column t_xs.spId is '商品';
comment on column t_xs.shjId is '售货机';
comment on column t_xs.hdId is '货道';
comment on column t_xs.je is '金额';
comment on column t_xs.cb is '成本';
comment on column t_xs.lr is '利润';
comment on column t_xs.insertDate is '日期';
--销售信息表加注释
comment on table t_xs is '销售信息';

员工表创建语句如下:


create table t_yg(
	id integer,
	username varchar(100),
	password varchar(100),
	ygName varchar(100),
	js varchar(100),
	qz varchar(100),
	status int
);
--员工字段加注释
comment on column t_yg.id is '主键';
comment on column t_yg.username is '账号';
comment on column t_yg.password is '密码';
comment on column t_yg.ygName is '姓名';
comment on column t_yg.js is '角色';
comment on column t_yg.qz is '群组';
comment on column t_yg.status is '状态';
--员工表加注释
comment on table t_yg is '员工';

oracle特有,对应序列如下:


create sequence s_t_hd;
create sequence s_t_shj;
create sequence s_t_sp;
create sequence s_t_xs;
create sequence s_t_yg;

自动售货机云平台的设计与实现sqlserver数据库版本源码:

超级管理员表创建语句如下:


--超级管理员
create table t_admin(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--超级管理员账号
	password varchar(100)--超级管理员密码
);
insert into t_admin(username,password) values('admin','123456');

货道表创建语句如下:


--货道表注释
create table t_hd(
	id int identity(1,1) primary key not null,--主键
	shjId int,--售货机
	hdName varchar(100),--货道编号
	szh int,--所在行
	szl int,--所在列
	edsp int,--额定商品数量
	dqsp int,--当前商品数量
	qhsp int,--缺货状态数量
	ygId int,--管理员
	spId int--商品
);

售货机表创建语句如下:


--售货机表注释
create table t_shj(
	id int identity(1,1) primary key not null,--主键
	shjName varchar(100),--售货机编号
	v2 varchar(100),--铭牌号
	v3 varchar(100),--地址
	v4 varchar(100),--规格
	hs int,--货道行数
	ls int,--货道列数
	ygId int,--管理员
	status int--状态
);

商品表创建语句如下:


--商品表注释
create table t_sp(
	id int identity(1,1) primary key not null,--主键
	spbh varchar(100),--商品编号
	spName varchar(100),--商品名称
	spPic varchar(100),--商品图片
	sl int,--数量
	scgs varchar(100),--生产公司
	jhjg int,--进货价格
	xsjg int,--销售价格
	remark varchar(100),--描述
	ygId int--管理员
);

销售信息表创建语句如下:


--销售信息表注释
create table t_xs(
	id int identity(1,1) primary key not null,--主键
	spId int,--商品
	shjId int,--售货机
	hdId int,--货道
	je int,--金额
	cb int,--成本
	lr int,--利润
	insertDate datetime--日期
);

员工表创建语句如下:


--员工表注释
create table t_yg(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--账号
	password varchar(100),--密码
	ygName varchar(100),--姓名
	js varchar(100),--角色
	qz varchar(100),--群组
	status int--状态
);

自动售货机云平台的设计与实现登录后主页

自动售货机云平台的设计与实现spring+springMVC+hibernate框架对象(javaBean,pojo)设计:

货道javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//货道
@Table(name = "t_hd")
public class Hd {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//售货机
private Integer shjId;
//货道编号
private String hdName;
//所在行
private Integer szh;
//所在列
private Integer szl;
//额定商品数量
private Integer edsp;
//当前商品数量
private Integer dqsp;
//缺货状态数量
private Integer qhsp;
//管理员
private Integer ygId;
//商品
private Integer spId;
public Integer getShjId() {return shjId;}
public void setShjId(Integer shjId) {this.shjId = shjId;}
public String getHdName() {return hdName;}
public void setHdName(String hdName) {this.hdName = hdName;}
public Integer getSzh() {return szh;}
public void setSzh(Integer szh) {this.szh = szh;}
public Integer getSzl() {return szl;}
public void setSzl(Integer szl) {this.szl = szl;}
public Integer getEdsp() {return edsp;}
public void setEdsp(Integer edsp) {this.edsp = edsp;}
public Integer getDqsp() {return dqsp;}
public void setDqsp(Integer dqsp) {this.dqsp = dqsp;}
public Integer getQhsp() {return qhsp;}
public void setQhsp(Integer qhsp) {this.qhsp = qhsp;}
public Integer getYgId() {return ygId;}
public void setYgId(Integer ygId) {this.ygId = ygId;}
public Integer getSpId() {return spId;}
public void setSpId(Integer spId) {this.spId = spId;}
}

售货机javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//售货机
@Table(name = "t_shj")
public class Shj {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//售货机编号
private String shjName;
//铭牌号
private String v2;
//地址
private String v3;
//规格
private String v4;
//货道行数
private Integer hs;
//货道列数
private Integer ls;
//管理员
private Integer ygId;
//状态
private Integer status;
public String getShjName() {return shjName;}
public void setShjName(String shjName) {this.shjName = shjName;}
public String getV2() {return v2;}
public void setV2(String v2) {this.v2 = v2;}
public String getV3() {return v3;}
public void setV3(String v3) {this.v3 = v3;}
public String getV4() {return v4;}
public void setV4(String v4) {this.v4 = v4;}
public Integer getHs() {return hs;}
public void setHs(Integer hs) {this.hs = hs;}
public Integer getLs() {return ls;}
public void setLs(Integer ls) {this.ls = ls;}
public Integer getYgId() {return ygId;}
public void setYgId(Integer ygId) {this.ygId = ygId;}
public Integer getStatus() {return status;}
public void setStatus(Integer status) {this.status = status;}
}

商品javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//商品
@Table(name = "t_sp")
public class Sp {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//商品编号
private String spbh;
//商品名称
private String spName;
//商品图片
private String spPic;
//数量
private Integer sl;
//生产公司
private String scgs;
//进货价格
private Integer jhjg;
//销售价格
private Integer xsjg;
//描述
private String remark;
//管理员
private Integer ygId;
public String getSpbh() {return spbh;}
public void setSpbh(String spbh) {this.spbh = spbh;}
public String getSpName() {return spName;}
public void setSpName(String spName) {this.spName = spName;}
public String getSpPic() {return spPic;}
public void setSpPic(String spPic) {this.spPic = spPic;}
public Integer getSl() {return sl;}
public void setSl(Integer sl) {this.sl = sl;}
public String getScgs() {return scgs;}
public void setScgs(String scgs) {this.scgs = scgs;}
public Integer getJhjg() {return jhjg;}
public void setJhjg(Integer jhjg) {this.jhjg = jhjg;}
public Integer getXsjg() {return xsjg;}
public void setXsjg(Integer xsjg) {this.xsjg = xsjg;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
public Integer getYgId() {return ygId;}
public void setYgId(Integer ygId) {this.ygId = ygId;}
}

销售信息javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//销售信息
@Table(name = "t_xs")
public class Xs {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//商品
private Integer spId;
//售货机
private Integer shjId;
//货道
private Integer hdId;
//金额
private Integer je;
//成本
private Integer cb;
//利润
private Integer lr;
//日期
private Date insertDate;
public Integer getSpId() {return spId;}
public void setSpId(Integer spId) {this.spId = spId;}
public Integer getShjId() {return shjId;}
public void setShjId(Integer shjId) {this.shjId = shjId;}
public Integer getHdId() {return hdId;}
public void setHdId(Integer hdId) {this.hdId = hdId;}
public Integer getJe() {return je;}
public void setJe(Integer je) {this.je = je;}
public Integer getCb() {return cb;}
public void setCb(Integer cb) {this.cb = cb;}
public Integer getLr() {return lr;}
public void setLr(Integer lr) {this.lr = lr;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
}

员工javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//员工
@Table(name = "t_yg")
public class Yg {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String ygName;
//角色
private String js;
//群组
private String qz;
//状态
private Integer status;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getYgName() {return ygName;}
public void setYgName(String ygName) {this.ygName = ygName;}
public String getJs() {return js;}
public void setJs(String js) {this.js = js;}
public String getQz() {return qz;}
public void setQz(String qz) {this.qz = qz;}
public Integer getStatus() {return status;}
public void setStatus(Integer status) {this.status = status;}
}

自动售货机云平台的设计与实现spring+springMVC+mybatis框架对象(javaBean,pojo)设计:

货道javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//货道
public class Hd  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//售货机
private Integer shjId;
//货道编号
private String hdName;
//所在行
private Integer szh;
//所在列
private Integer szl;
//额定商品数量
private Integer edsp;
//当前商品数量
private Integer dqsp;
//缺货状态数量
private Integer qhsp;
//管理员
private Integer ygId;
//商品
private Integer spId;
public Integer getShjId() {return shjId;}
public void setShjId(Integer shjId) {this.shjId = shjId;}
public String getHdName() {return hdName;}
public void setHdName(String hdName) {this.hdName = hdName;}
public Integer getSzh() {return szh;}
public void setSzh(Integer szh) {this.szh = szh;}
public Integer getSzl() {return szl;}
public void setSzl(Integer szl) {this.szl = szl;}
public Integer getEdsp() {return edsp;}
public void setEdsp(Integer edsp) {this.edsp = edsp;}
public Integer getDqsp() {return dqsp;}
public void setDqsp(Integer dqsp) {this.dqsp = dqsp;}
public Integer getQhsp() {return qhsp;}
public void setQhsp(Integer qhsp) {this.qhsp = qhsp;}
public Integer getYgId() {return ygId;}
public void setYgId(Integer ygId) {this.ygId = ygId;}
public Integer getSpId() {return spId;}
public void setSpId(Integer spId) {this.spId = spId;}
}

售货机javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//售货机
public class Shj  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//售货机编号
private String shjName;
//铭牌号
private String v2;
//地址
private String v3;
//规格
private String v4;
//货道行数
private Integer hs;
//货道列数
private Integer ls;
//管理员
private Integer ygId;
//状态
private Integer status;
public String getShjName() {return shjName;}
public void setShjName(String shjName) {this.shjName = shjName;}
public String getV2() {return v2;}
public void setV2(String v2) {this.v2 = v2;}
public String getV3() {return v3;}
public void setV3(String v3) {this.v3 = v3;}
public String getV4() {return v4;}
public void setV4(String v4) {this.v4 = v4;}
public Integer getHs() {return hs;}
public void setHs(Integer hs) {this.hs = hs;}
public Integer getLs() {return ls;}
public void setLs(Integer ls) {this.ls = ls;}
public Integer getYgId() {return ygId;}
public void setYgId(Integer ygId) {this.ygId = ygId;}
public Integer getStatus() {return status;}
public void setStatus(Integer status) {this.status = status;}
}

商品javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//商品
public class Sp  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//商品编号
private String spbh;
//商品名称
private String spName;
//商品图片
private String spPic;
//数量
private Integer sl;
//生产公司
private String scgs;
//进货价格
private Integer jhjg;
//销售价格
private Integer xsjg;
//描述
private String remark;
//管理员
private Integer ygId;
public String getSpbh() {return spbh;}
public void setSpbh(String spbh) {this.spbh = spbh;}
public String getSpName() {return spName;}
public void setSpName(String spName) {this.spName = spName;}
public String getSpPic() {return spPic;}
public void setSpPic(String spPic) {this.spPic = spPic;}
public Integer getSl() {return sl;}
public void setSl(Integer sl) {this.sl = sl;}
public String getScgs() {return scgs;}
public void setScgs(String scgs) {this.scgs = scgs;}
public Integer getJhjg() {return jhjg;}
public void setJhjg(Integer jhjg) {this.jhjg = jhjg;}
public Integer getXsjg() {return xsjg;}
public void setXsjg(Integer xsjg) {this.xsjg = xsjg;}
public String getRemark() {return remark;}
public void setRemark(String remark) {this.remark = remark;}
public Integer getYgId() {return ygId;}
public void setYgId(Integer ygId) {this.ygId = ygId;}
}

销售信息javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//销售信息
public class Xs  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//商品
private Integer spId;
//售货机
private Integer shjId;
//货道
private Integer hdId;
//金额
private Integer je;
//成本
private Integer cb;
//利润
private Integer lr;
//日期
private Date insertDate;
public Integer getSpId() {return spId;}
public void setSpId(Integer spId) {this.spId = spId;}
public Integer getShjId() {return shjId;}
public void setShjId(Integer shjId) {this.shjId = shjId;}
public Integer getHdId() {return hdId;}
public void setHdId(Integer hdId) {this.hdId = hdId;}
public Integer getJe() {return je;}
public void setJe(Integer je) {this.je = je;}
public Integer getCb() {return cb;}
public void setCb(Integer cb) {this.cb = cb;}
public Integer getLr() {return lr;}
public void setLr(Integer lr) {this.lr = lr;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
}

员工javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//员工
public class Yg  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String ygName;
//角色
private String js;
//群组
private String qz;
//状态
private Integer status;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getYgName() {return ygName;}
public void setYgName(String ygName) {this.ygName = ygName;}
public String getJs() {return js;}
public void setJs(String js) {this.js = js;}
public String getQz() {return qz;}
public void setQz(String qz) {this.qz = qz;}
public Integer getStatus() {return status;}
public void setStatus(Integer status) {this.status = status;}
}

评论