源码获取:俺的博客首页 "资源" 里下载!
项目介绍
基于Springboot + vue实现的智能无人仓库管理
本系统包含管理员、员工两个个角色。
管理员:创建管理员账户、编辑管理员账户、删除管理员账户、分配管理权限、记录员工出勤、分配工作任务、监控员工工作效率、进行绩效评估、查看补货提醒、审批补货申请、维护基础数据。
员工:查看个人操作记录、完成任务、提交补货提醒。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。
2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA;
3.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS;
4.数据库:MySql 5.7/8.0版本均可;
5.是否Maven项目:是;
技术栈
后端:SpringBoot+Mybaits
前端:Vue+elementui
使用说明
项目运行:
1. 使用Navicat或者其它工具,在mysql中创建对应sql文件名称的数据库,并导入项目的sql文件;
2. 使用IDEA/Eclipse/MyEclipse导入项目,导入成功后请执行maven clean;maven install命令;
3. 将项目中application.yml配置文件中的数据库配置改为自己的配置;
4.运行项目,在浏览器中输入地址:
地址:http://localhost:8080/wurenchangku/admin/dist/index.html
管理员:admin/admin
员工账户:a1 密码:123456
文档介绍展示:
补货提醒展示页面:
员工管理展示页面:
补货申请展示页面:
取货申请展示页面:
物品类型管理展示:
修改密码展示页面:
仓库管理员管理请求:
/**
* 仓库管理员管理请求 Handler
*
* @author yy
*/
@Controller
@RequestMapping(value = "/**/repositoryAdminManage")
public class RepositoryAdminManageHandler {
@Autowired
private RepositoryAdminManageService repositoryAdminManageService;
// 查询类型
private static final String SEARCH_BY_ID = "searchByID";
private static final String SEARCH_BY_NAME = "searchByName";
private static final String SEARCH_BY_REPOSITORY_ID = "searchByRepositoryID";
private static final String SEARCH_ALL = "searchAll";
/**
* 通用记录查询
*
* @param keyWord 查询关键字
* @param searchType 查询类型
* @param offset 分页偏移值
* @param limit 分页大小
* @return 返回所有符合条件的记录
*/
private Map<String, Object> query(String keyWord, String searchType, int offset, int limit) throws RepositoryAdminManageServiceException {
Map<String, Object> queryResult = null;
// query
switch (searchType) {
case SEARCH_ALL:
queryResult = repositoryAdminManageService.selectAll(offset, limit);
break;
case SEARCH_BY_ID:
if (StringUtils.isNumeric(keyWord))
queryResult = repositoryAdminManageService.selectByID(Integer.valueOf(keyWord));
break;
case SEARCH_BY_NAME:
queryResult = repositoryAdminManageService.selectByName(offset, limit, keyWord);
break;
case SEARCH_BY_REPOSITORY_ID:
if (StringUtils.isNumeric(keyWord))
queryResult = repositoryAdminManageService.selectByRepositoryID(Integer.valueOf(keyWord));
break;
default:
// do other things
break;
}
return queryResult;
}
/**
* 查询仓库管理员信息
*
* @param searchType 查询类型
* @param offset 分页偏移值
* @param limit 分页大小
* @param keyWord 查询关键字
* @return 返回一个Map,其中key=rows,表示查询出来的记录;key=total,表示记录的总条数
*/
@SuppressWarnings("unchecked")
@RequestMapping(value = "getRepositoryAdminList", method = RequestMethod.GET)
public
@ResponseBody
Map<String, Object> getRepositoryAdmin(@RequestParam("searchType") String searchType,
@RequestParam("keyWord") String keyWord, @RequestParam("offset") int offset,
@RequestParam("limit") int limit) throws RepositoryAdminManageServiceException {
// 初始化 Response
Response responseContent = ResponseFactory.newInstance();
List<RepositoryAdmin> rows = null;
long total = 0;
// 查询
Map<String, Object> queryResult = query(keyWord, searchType, offset, limit);
if (queryResult != null) {
rows = (List<RepositoryAdmin>) queryResult.get("data");
total = (long) queryResult.get("total");
}
// 设置 Response
responseContent.setCustomerInfo("rows", rows);
responseContent.setResponseTotal(total);
return responseContent.generateResponse();
}
/**
* 添加一条仓库管理员信息
*
* @param repositoryAdmin 仓库管理员信息
* @return 返回一个map,其中:key 为 result表示操作的结果,包括:success 与 error
*/
@RequestMapping(value = "addRepositoryAdmin", method = RequestMethod.POST)
public
@ResponseBody
Map<String, Object> addRepositoryAdmin(@RequestBody RepositoryAdmin repositoryAdmin) throws RepositoryAdminManageServiceException {
// 初始化 Response
Response responseContent = ResponseFactory.newInstance();
// 添加结果
String result = repositoryAdminManageService.addRepositoryAdmin(repositoryAdmin)
? Response.RESPONSE_RESULT_SUCCESS : Response.RESPONSE_RESULT_ERROR;
// 设置 Response
responseContent.setResponseResult(result);
return responseContent.generateResponse();
}
/**
* 查询指定 ID 的仓库管理员信息
*
* @param repositoryAdminID 仓库管理员ID
* @return 返回一个map,其中:key 为 result 的值为操作的结果,包括:success 与 error;key 为 data
* 的值为仓库管理员信息
*/
@RequestMapping(value = "getRepositoryAdminInfo", method = RequestMethod.GET)
public
@ResponseBody
Map<String, Object> getRepositoryAdminInfo(Integer repositoryAdminID) throws RepositoryAdminManageServiceException {
// 初始化 Response
Response responseContent = ResponseFactory.newInstance();
String result = Response.RESPONSE_RESULT_ERROR;
// 查询
RepositoryAdmin repositoryAdmin = null;
Map<String, Object> queryResult = repositoryAdminManageService.selectByID(repositoryAdminID);
if (queryResult != null) {
if ((repositoryAdmin = (RepositoryAdmin) queryResult.get("data")) != null)
result = Response.RESPONSE_RESULT_SUCCESS;
}
// 设置 Response
responseContent.setResponseResult(result);
responseContent.setResponseData(repositoryAdmin);
return responseContent.generateResponse();
}
/**
* 更新仓库管理员信息
*
* @param repositoryAdmin 仓库管理员信息
* @return 返回一个map,其中:key 为 result 的值为操作的结果,包括:success 与 error;key 为 data