项目介绍
使用旧方法对仓储信息进行系统化管理已经不再让人们信赖了,把现在的网络信息技术运用在仓储信息的管理上面可以解决许多信息管理上面的难题,比如处理数据时间很长,数据存在错误不能及时纠正等问题。
这次开发的仓储管理系统有管理员和用户两个角色,有个人中心,员工管理,设备管理,商品管理,出入库管理,盘点管理,供应商管理,公告管理,基础数据管理。经过前面自己查阅的网络知识,加上自己在学校课堂上学习的知识,决定开发系统选择B/S模式这种高效率的模式完成系统功能开发。这种模式让操作员基于浏览器的方式进行网站访问,采用的主流的Java语言这种面向对象的语言进行仓储管理系统程序的开发,在数据库的选择上面,选择功能强大的MySQL数据库进行数据的存放操作。
仓储管理系统被人们投放于现在的生活中进行使用,该款管理类软件就可以让管理人员处理信息的时间介于十几秒之间。在这十几秒内就能完成信息的编辑等操作。有了这样的管理软件,仓储信息的管理就离无纸化办公的目标更贴近了。
开发环境
编程语言:Java
数据库 :Mysql
系统架构:B/S
后端框架:SSM
编译工具:idea或者eclipse,jdk1.8,maven
支持定做:java/php/python/android/小程序/vue/爬虫/c#/asp.net
系统实现
5.1员工管理
管理员管理员工用户,可以添加,修改,删除员工用户信息。下图就是员工用户管理页面。
图5.1 员工管理页面
5.2 设备管理
管理员管理设备,可以添加,修改,删除设备信息。下图就是设备管理页面。
图5.2设备管理页面
5.3 商品管理
管理员管理商品,可以添加,修改,删除商品信息。下图就是商品管理页面。
图5.3商品管理页面
5.4 出库管理
管理员对出入库信息进行添加,修改,删除,查询相关操作。下图就是出库管理页面。
图5.4出库管理页面
5.5 入库管理
管理员对出入库信息进行添加,修改,删除,查询相关操作。下图就是入库管理页面。
图5.5入库管理页面
5.6 盘点管理
管理员管理盘点信息,可以在盘点管理里面的盘点列表进行盘点操作,可以对盘点信息进行添加,修改,查询,删除操作。下图就是盘点管理页面。
图5.6盘点管理页面
5.7 公告管理
管理员管理公告,可以添加,修改,删除公告信息。下图就是公告管理页面。
图5.7 公告管理页面
5.8供应商管理
管理员可以对供应商信息进行添加,修改,查询,删除操作。下图就是供应商管理页面。
图5.8 供应商管理页面
5.9 基础数据管理
管理员对基础数据信息进行添加修改删除操作。下图就是基础数据管理里面的物资类型管理页面。
图5.9 物资类型管理页面
核心代码
package com.controller;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.StringUtil;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.GoodsInEntity;
import com.service.GoodsInService;
import com.entity.view.GoodsInView;
import com.service.GongyinghsangService;
import com.entity.GongyinghsangEntity;
import com.service.GoodsService;
import com.entity.GoodsEntity;
import com.service.YuangongService;
import com.entity.YuangongEntity;
import com.utils.PageUtils;
import com.utils.R;
/**
* 入库
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/goodsIn")
public class GoodsInController {
private static final Logger logger = LoggerFactory.getLogger(GoodsInController.class);
@Autowired
private GoodsInService goodsInService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
@Autowired
private GongyinghsangService gongyinghsangService;
@Autowired
private GoodsService goodsService;
@Autowired
private YuangongService yuangongService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(StringUtil.isEmpty(role)){
return R.error(511,"权限为空");
}
else if("员工".equals(role)){
params.put("yuangongId",request.getSession().getAttribute("userId"));
}
params.put("orderBy","id");
PageUtils page = goodsInService.queryPage(params);
//字典表数据转换
List<GoodsInView> list =(List<GoodsInView>)page.getList();
for(GoodsInView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c);
}
return R.ok().put("data", page);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
GoodsInEntity goodsIn = goodsInService.selectById(id);
if(goodsIn !=null){
//entity转view
GoodsInView view = new GoodsInView();
BeanUtils.copyProperties( goodsIn , view );//把实体数据重构到view中
//级联表
GongyinghsangEntity gongyinghsang = gongyinghsangService.selectById(goodsIn.getGongyinghsangId());
if(gongyinghsang != null){
BeanUtils.copyProperties( gongyinghsang , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setGongyinghsangId(gongyinghsang.getId());
}
//级联表
GoodsEntity goods = goodsService.selectById(goodsIn.getGoodsId());
if(goods != null){
BeanUtils.copyProperties( goods , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setGoodsId(goods.getId());
}
//级联表
YuangongEntity yuangong = yuangongService.selectById(goodsIn.getYuangongId());
if(yuangong != null){
BeanUtils.copyProperties( yuangong , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYuangongId(yuangong.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("ve")
public R save(@RequestBody GoodsInEntity goodsIn, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,goodsIn:{}",this.getClass().getName(),goodsIn.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(StringUtil.isEmpty(role)){
return R.error(511,"权限为空");
}
else if("员工".equals(role)){
goodsIn.setYuangongId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
}
GoodsEntity goodsEntity = goodsService.selectById(goodsIn.getGoodsId());
if(goodsEntity == null || goodsEntity.getGoodsNumber() == null){
return R.error(511,"商品为空或者商品数量为空");
}
goodsEntity.setGoodsNumber(goodsEntity.getGoodsNumber()+goodsIn.getGoodsInNumber());
goodsService.updateById(goodsEntity);
goodsIn.setInsertTime(new Date());
goodsIn.setCreateTime(new Date());
goodsInService.insert(goodsIn);
return R.ok();
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody GoodsInEntity goodsIn, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,goodsIn:{}",this.getClass().getName(),goodsIn.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(StringUtil.isEmpty(role)){
return R.error(511,"权限为空");
}
else if("员工".equals(role)){
goodsIn.setYuangongId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
}
GoodsInEntity oldGoodsInEntity = goodsInService.selectById(goodsIn.getId());
GoodsEntity oldGoodsEntity = goodsService.selectById(oldGoodsInEntity.getGoodsId());//老的
if(oldGoodsEntity == null || oldGoodsEntity.getGoodsNumber() == null){
return R.error(511,"修改前商品为空或者修改前商品数量为空");
}
oldGoodsEntity.setGoodsNumber(oldGoodsEntity.getGoodsNumber() - oldGoodsInEntity.getGoodsInNumber());// 老的数量
goodsService.updateById(oldGoodsEntity);// 更改老的数据
GoodsEntity newGoodsEntity = goodsService.selectById(goodsIn.getGoodsId());//新的
if(newGoodsEntity == null || newGoodsEntity.getGoodsNumber() == null){
return R.error(511,"修改后商品为空或者修改后商品数量为空");
}
newGoodsEntity.setGoodsNumber(newGoodsEntity.getGoodsNumber() + goodsIn.getGoodsInNumber());// 新的数量
goodsService.updateById(newGoodsEntity);// 更改新的数据
goodsInService.updateById(goodsIn);//根据id更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
goodsInService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}
论文参考
目 录
1 绪论 1
1.1 研究背景 1
1.2目的和意义 1
1.3 论文结构安排 2
2 相关技术 3
2.1 SSM框架介绍 3
2.2 B/S架构介绍 3
2.3 MySQL数据库介绍 4
2.4 JAVA语言介绍 5
3 系统分析 6
3.1系统可行性分析 6
3.1.1 技术可行性分析 6
3.1.2 经济可行性分析 6
3.1.3 运行可行性分析 6
3.2系统性能分析 7
3.2.1 系统安全性 7
3.2.2 数据完整性 7
3.2.3系统可扩展性 8
3.3系统流程分析 8
3.3.1系统登录流程 9
3.3.2信息添加流程 10
3.3.3信息删除流程 10
4 系统设计 12
4.1系统概要设计 12
4.2系统功能结构设计 12
4.3数据库设计 13
4.3.1数据库E-R图设计 13
4.3.2 数据库表结构设计 14
5 系统实现 18
5.1员工管理 18
5.2 设备管理 18
5.3 商品管理 19
5.4 出库管理 20
5.5 入库管理 20
5.6 盘点管理 21
5.7 公告管理 22
5.8供应商管理 22
5.9 基础数据管理 23
6系统测试 25
6.1 本系统测试 25
6.1.1登录功能测试 25
6.1.2修改密码功能测试 26
6.2测试结果分析 26
结 论 27
参考文献 29
致 谢 30