基于javaweb的SpringBoot中小企业设备管理系统(java+springboot+mybaits+vue+elementui+mysql)

运行环境

Java≥8、MySQL≥5.7、Node.js≥14

开发工具

后端:eclipse/idea/myeclipse/sts等均可配置运行
前端:WebStorm/VSCode/HBuilderX等均可

❗没学过node.js的不要搞前后端分离项目

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

242225572508

252225572508

262225572508

272225572508

282225572508

302225572508

312225572508

322225572508

332225572508

342225572508

基于javaweb的SpringBoot中小企业设备管理系统(java+springboot+mybaits+vue+elementui+mysql)

环境需要

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/springbootrpj39/front/index.html

后台地址:http://localhost:8080/springbootrpj39/admin/dist/index.html

管理员 abo 密码 abo

用户:用户1 密码: 123456

注意项目文件路径中不能含有中文、空格、特殊字符等,否则图片会上传不成功。

组织机构控制器:

/**

  • 组织机构控制器

*/

@Controller

@RequestMapping(“/organization”)

public class OrgController {

@Autowired

private OrganizationService organizationService;

/**

  • 根据条件动态查询组织,数据加载到表格

*/

@PostMapping(“/list”)

public String listOrganizationByLevel(Organization example, ModelMap map){

List list = organizationService.listOrganizationByExample(example);

int sublevel = example.getOrgLevel();

map.put(“dtoList”,list);

String pageName = null;

switch (sublevel) { //根据参数确定返回页面目标

case 1: pageName= “friDepartments” ;break;

case 2: pageName= “secDepartments” ;break;

case 3: pageName= “macAddress” ;break;

return pageName+”::table-refresh”;

/**

  • 根据条件动态查询子级组织

*/

@PostMapping(“/sub/list”)

@ResponseBody

public List listOrganization(Organization example){

List list = organizationService.listOrganizationByExample(example);

return list;

/**

  • 根据一级部门和二级部门id查询物理位置

*/

@PostMapping(“/macAddress/list”)

public String listMacaddress(String fristId,String secondId,ModelMap map){

List list = organizationService.listMacaddressByRootID(fristId,secondId);

map.put(“dtoList”,list);

return “macAddress::table-refresh”;

/**

  • 添加组织

  • @param organization

  • @return

*/

@PostMapping

@ResponseBody

public int addOrganization(Organization organization){

return organizationService.insertOrganization(organization);

/**

  • 删除组织

  • @param orgId

  • @return

*/

@DeleteMapping(“/{orgId}”)

@ResponseBody

public int delteOrganizationByid(@PathVariable(“orgId”) String orgId){

return organizationService.deleteOrganizationById(orgId);

/**

  • 修改组织名称

  • @param organization

  • @return

*/

@PutMapping

@ResponseBody

public int updateDeviceType(Organization organization){

return organizationService.updateOrganizationName(organization);

/**

  • 获取组织树

  • @return

*/

@GetMapping(“/tree”)

@ResponseBody

public OrganizationDTO getOrganizationTree(){

return organizationService.getOrgTree();

登录控制层:

@Controller

public class LoginController {

@RequestMapping(“/login”)

public String login(HttpServletRequest request, Model mv) {

String e = (String) request.getAttribute(“shiroLoginFailure”);

if (e != null) {

if (e.contains(“org.apache.shiro.authc.UnknownAccountException”)) {

mv.addAttribute(“msg”, “账号不存在”);

} else if (e.contains(“org.apache.shiro.authc.IncorrectCredentialsException”)) {

mv.addAttribute(“msg”, “密码错误”);

} else if (e.contains(“org.apache.shiro.authc.LockedAccountException”)) {

mv.addAttribute(“msg”, “账户已停用”);

return “login”;

设备类型信息控制层:

@Controller

@RequestMapping(“/baseInfos”)

public class BaseInfoController {

@Autowired

private BaseInfoService baseInfoService;

@Autowired

private LogService logService;

/**

  • 获取所有设备类型信息

  • @param map

  • @return

*/

@RequestMapping(“/type/list”)

public String listDeviceType(ModelMap map){

List typeList = baseInfoService.listDeviceType();

map.put(“typeList”,typeList);

return “deviceTypes::table-refresh”;

/**

  • 添加设备类型

  • @param deviceType

  • @return

*/

@PostMapping(“/type”)

@ResponseBody

public int addtDeviceType(DeviceType deviceType){

return baseInfoService.addtDeviceType(deviceType);

/**

  • 删除设备类型

  • @param typeId

  • @return

*/

@DeleteMapping(“/type/{typeId}”)

@ResponseBody

public int delteDeviceTypByid(@PathVariable(“typeId”) String typeId){

return baseInfoService.deleteDeviceTypeById(typeId);

/**

  • 修改设备类型

  • @param deviceType

  • @return

*/

@PutMapping(“/type”)

@ResponseBody

public int updateDeviceType(DeviceType deviceType){

return baseInfoService.updateDeviceType(deviceType);

/**

  • 获取所有设备品牌信息

  • @param map

  • @return

*/

@RequestMapping(“/brand/list”)

public String listDeviceBrand(ModelMap map){

List brandList = baseInfoService.listDeviceBrand();

map.put(“brandList”,brandList);

return “deviceBrands::table-refresh”;

/**

  • 添加设备品牌

  • @param deviceBrand

  • @return

*/

@PostMapping(“/brand”)

@ResponseBody

public int addtDeviceBrand(DeviceBrand deviceBrand){

return baseInfoService.addtDeviceBrand(deviceBrand);

/**

  • 删除设备品牌

  • @param brandId

  • @return

*/

@DeleteMapping(“/brand/{brandId}”)

@ResponseBody

public int delteDeviceBrandByid(@PathVariable(“brandId”) String brandId){

return baseInfoService.deleteDeviceBrandById(brandId);

/**

  • 修改品牌

  • @param deviceBrand

  • @return

*/

@PutMapping(“/brand”)

@ResponseBody

public int updateDeviceBrand(DeviceBrand deviceBrand){

return baseInfoService.updateDeviceBrand(deviceBrand);

/**

  • 获取系统日志

  • @param map

  • @return

*/

@RequestMapping(“/log”)

public String listLog(ModelMap map, HttpServletRequest request){

String startTime = request.getParameter(“startTime”);

String endTime = request.getParameter(“endTime”);

List logs = logService.listLogsByDate(startTime,endTime);

map.put(“logList”,logs);

return “system::logList-refresh”;


项目链接:
https://javayms.github.io?id=092325042508201sz
https://javayms.pages.dev?id=092325042508201sz