作者主页:源码空间站2022
简介:Java领域优质创作者、Java项目、学习资料、技术互助
文末获取源码
项目介绍
库存管理系统。主要功能包括:
货品出入库:货品入库、货品出库、库存查询;
基础资料:货品信息、供货商信息、分公司信息;
系统管理:用户管理、角色管理、数据字典、菜单管理、国标管理、部门管理;
系统监控:系统日志;
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
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. 后端:jeecg
使用说明
1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
2. 将项目中dbconfig.properties配置文件中的数据库配置改为自己的配置
3. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行
注意事项
1.maven配置文件settings.xml中,进行如下配置:
nexus-aliyun
*,!jeecg,!jeecg-snapshots
Nexus aliyun
http://maven.aliyun.com/nexus/content/groups/public
2.若还是下载不成功,则可能为jar包版本不匹配,首先在.m2中查看存在的jar包版本,然后在pom.xml中修改jar包版本即可;
运行截图
相关代码
货品控制管理器
/**
* @Title: Controller
* @Description: 货品表
* @author onlineGenerator
* @date 2014-03-19 17:21:13
* @version V1.0
*
*/
@Controller
@RequestMapping("/tBGoodsController")
public class TBGoodsController extends BaseController {
/**
* Logger for this class
*/
private static final Logger logger = Logger.getLogger(TBGoodsController.class);
@Autowired
private TBGoodsServiceI tBGoodsService;
@Autowired
private SystemService systemService;
private String message;
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
/**
* 货品表列表 页面跳转
*
* @return
*/
@RequestMapping(params = "tBGoods")
public ModelAndView tBGoods(HttpServletRequest request) {
return new ModelAndView("buss/goods/tBGoodsList");
}
/**
* 选择货品
*
* @return
*/
@RequestMapping(params = "tBGoodsSelect")
public String goods() {
return "buss/goods/tBGoodsSelect";
}
/**
* 货品显示列表
*
* @param request
* @param response
* @param dataGrid
*/
@RequestMapping(params = "datagridGoods")
public void datagridGoods(HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(TBGoodsEntity.class, dataGrid);
this.systemService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
}
/**
* easyui AJAX请求数据
*
* @param request
* @param response
* @param dataGrid
* @param user
*/
@RequestMapping(params = "datagrid")
public void datagrid(TBGoodsEntity tBGoods,HttpServletRequest request, HttpServletResponse response, DataGrid dataGrid) {
CriteriaQuery cq = new CriteriaQuery(TBGoodsEntity.class, dataGrid);
//查询条件组装器
com.bjpowernode.core.extend.hqlsearch.HqlGenerateUtil.installHql(cq, tBGoods, request.getParameterMap());
try{
//自定义追加查询条件
}catch (Exception e) {
throw new BusinessException(e.getMessage());
}
cq.add();
this.tBGoodsService.getDataGridReturn(cq, true);
TagUtil.datagrid(response, dataGrid);
}
/**
* 删除货品表
*
* @return
*/
@RequestMapping(params = "doDel")
@ResponseBody
public AjaxJson doDel(TBGoodsEntity tBGoods, HttpServletRequest request) {
AjaxJson j = new AjaxJson();
tBGoods = systemService.getEntity(TBGoodsEntity.class, tBGoods.getId());
message = "货品表删除成功";
try{
tBGoodsService.delete(tBGoods);
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}catch(Exception e){
e.printStackTrace();
message = "货品表删除失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
* 批量删除货品表
*
* @return
*/
@RequestMapping(params = "doBatchDel")
@ResponseBody
public AjaxJson doBatchDel(String ids,HttpServletRequest request){
AjaxJson j = new AjaxJson();
message = "货品表删除成功";
try{
for(String id:ids.split(",")){
TBGoodsEntity tBGoods = systemService.getEntity(TBGoodsEntity.class,
id
);
tBGoodsService.delete(tBGoods);
systemService.addLog(message, Globals.Log_Type_DEL, Globals.Log_Leavel_INFO);
}
}catch(Exception e){
e.printStackTrace();
message = "货品表删除失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
* 添加货品表
*
* @param ids
* @return
*/
@RequestMapping(params = "doAdd")
@ResponseBody
public AjaxJson doAdd(TBGoodsEntity tBGoods,TBStockEntity tBStock, HttpServletRequest request) {
AjaxJson j = new AjaxJson();
message = "货品表添加成功";
try{
tBStock.setTotalcount("0");
tBGoodsService.save(tBGoods, tBStock);
systemService.addLog(message, Globals.Log_Type_INSERT, Globals.Log_Leavel_INFO);
}catch(Exception e){
e.printStackTrace();
message = "货品表添加失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
* 更新货品表
*
* @param ids
* @return
*/
@RequestMapping(params = "doUpdate")
@ResponseBody
public AjaxJson doUpdate(TBGoodsEntity tBGoods, HttpServletRequest request) {
AjaxJson j = new AjaxJson();
message = "货品表更新成功";
TBGoodsEntity t = tBGoodsService.get(TBGoodsEntity.class, tBGoods.getId());
try {
MyBeanUtils.copyBeanNotNull2Bean(tBGoods, t);
tBGoodsService.saveOrUpdate(t);
systemService.addLog(message, Globals.Log_Type_UPDATE, Globals.Log_Leavel_INFO);
} catch (Exception e) {
e.printStackTrace();
message = "货品表更新失败";
throw new BusinessException(e.getMessage());
}
j.setMsg(message);
return j;
}
/**
* 货品表新增页面跳转
*
* @return
*/
@RequestMapping(params = "goAdd")
public ModelAndView goAdd(TBGoodsEntity tBGoods, HttpServletRequest req) {
if (StringUtil.isNotEmpty(tBGoods.getId())) {
tBGoods = tBGoodsService.getEntity(TBGoodsEntity.class, tBGoods.getId());
req.setAttribute("tBGoodsPage", tBGoods);
}
return new ModelAndView("buss/goods/tBGoods-add");
}
/**
* 货品表编辑页面跳转
*
* @return
*/
@RequestMapping(params = "goUpdate")
public ModelAndView goUpdate(TBGoodsEntity tBGoods, HttpServletRequest req) {
if (StringUtil.isNotEmpty(tBGoods.getId())) {
tBGoods = tBGoodsService.getEntity(TBGoodsEntity.class, tBGoods.getId());
req.setAttribute("tBGoodsPage", tBGoods);
}
return new ModelAndView("buss/goods/tBGoods-update");
}
}
如果也想学习本系统,下面领取。回复:005ssh