我是靠谱客的博主 无情小虾米,最近开发中收集的这篇文章主要介绍基于Java+SSM+JSP+MySQL实验室计算机报修系统的设计和实现【Java毕业设计·安装调试·代码讲解·文档报告】,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

????作者:计算机编程-吉哥
????简介:专业从事JavaWeb程序开发,微信小程序开发,定制化项目、 源码、代码讲解、文档撰写、ppt制作。做自己喜欢的事,生活就是快乐的。
????心愿:点赞 ???? 收藏 ⭐评论 ????
???? 文末获取源码联系

???????? 精彩专栏推荐订阅 ???????? 不然下次找不到哟~
Java毕业设计项目《100套》

技术选型

spring、springmvc、mybatis、mybatisplus、jsp、jquery、html、css、mysql、jdk1.8

数据库表结构

10张

开发工具

idea或者eclipse、navicat

具体功能

【角色】管理员、用户

【用户端功能】

  • 登录

  • 注册

  • 首页

  • 设备信息

  • 公告资讯

  • 个人中心

  • 后台管理

  • 联系客服

【管理员端功能】

  • 登录

  • 个人中心

  • 用户管理

  • 设备类型管理

  • 设备信息管理

  • 设备报修管理

  • 故障排除管理

  • 系统管理

项目演示截图:

1、前台注册

2、前台登录

3、前台首页

4、前台设备信息

5、前台填写报修信息

6、前台公告资讯

7、前台个人信息

8、前台查看设备报修列表

9、后台登录

10、后台修改密码

11、后台设备类型

12、后台设备列表

13、后台添加设备信息

核心代码实现

  • 数据库表结构设计

CREATE DATABASE /*!32312 IF NOT EXISTS*/ `shiyanshi` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;

USE `shiyanshi`;

CREATE TABLE `chat` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `adminid` bigint(20) DEFAULT NULL COMMENT '管理员id',
  `ask` longtext COMMENT '提问',
  `reply` longtext COMMENT '回复',
  `isreply` int(11) DEFAULT NULL COMMENT '是否回复',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COMMENT='联系客服';


CREATE TABLE `config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(100) NOT NULL COMMENT '配置参数名称',
  `value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';

CREATE TABLE `guzhangpaichu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `paichubianhao` varchar(200) DEFAULT NULL COMMENT '排除编号',
  `shebeimingcheng` varchar(200) NOT NULL COMMENT '设备名称',
  `shebeileixing` varchar(200) DEFAULT NULL COMMENT '设备类型',
  `paichushijian` date NOT NULL COMMENT '排除时间',
  `paichujingguo` longtext COMMENT '排除经过',
  `paichuxiangqing` longtext COMMENT '排除详情',
  `yonghuzhanghao` varchar(200) DEFAULT NULL COMMENT '用户账号',
  `yonghuxingming` varchar(200) DEFAULT NULL COMMENT '用户姓名',
  `sfsh` varchar(200) DEFAULT '否' COMMENT '是否审核',
  `shhf` longtext COMMENT '审核回复',
  PRIMARY KEY (`id`),
  UNIQUE KEY `paichubianhao` (`paichubianhao`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8 COMMENT='故障排除';

CREATE TABLE `news` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `title` varchar(200) NOT NULL COMMENT '标题',
  `introduction` longtext COMMENT '简介',
  `picture` varchar(200) NOT NULL COMMENT '图片',
  `content` longtext NOT NULL COMMENT '内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=77 DEFAULT CHARSET=utf8 COMMENT='公告资讯';

CREATE TABLE `shebeileixing` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `shebeileixing` varchar(200) DEFAULT NULL COMMENT '设备类型',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COMMENT='设备类型';

CREATE TABLE `shebeixinxi` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `shebeibianhao` varchar(200) DEFAULT NULL COMMENT '设备编号',
  `shebeimingcheng` varchar(200) NOT NULL COMMENT '设备名称',
  `shebeileixing` varchar(200) DEFAULT NULL COMMENT '设备类型',
  `tupian` varchar(200) NOT NULL COMMENT '图片',
  `yongtu` varchar(200) NOT NULL COMMENT '用途',
  `zhuyishixiang` varchar(200) DEFAULT NULL COMMENT '注意事项',
  `weizhi` varchar(200) DEFAULT NULL COMMENT '位置',
  `shebeixiangqing` longtext COMMENT '设备详情',
  PRIMARY KEY (`id`),
  UNIQUE KEY `shebeibianhao` (`shebeibianhao`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COMMENT='设备信息';

CREATE TABLE `token` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` bigint(20) NOT NULL COMMENT '用户id',
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `tablename` varchar(100) DEFAULT NULL COMMENT '表名',
  `role` varchar(100) DEFAULT NULL COMMENT '角色',
  `token` varchar(200) NOT NULL COMMENT '密码',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
  `expiratedtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '过期时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='token表';

CREATE TABLE `users` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(100) NOT NULL COMMENT '用户名',
  `password` varchar(100) NOT NULL COMMENT '密码',
  `role` varchar(100) DEFAULT '管理员' COMMENT '角色',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='用户表';

CREATE TABLE `yonghu` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `yonghuzhanghao` varchar(200) NOT NULL COMMENT '用户账号',
  `mima` varchar(200) NOT NULL COMMENT '密码',
  `yonghuxingming` varchar(200) NOT NULL COMMENT '用户姓名',
  `xingbie` varchar(200) DEFAULT NULL COMMENT '性别',
  `yonghudianhua` varchar(200) DEFAULT NULL COMMENT '用户电话',
  `touxiang` varchar(200) DEFAULT NULL COMMENT '头像',
  PRIMARY KEY (`id`),
  UNIQUE KEY `yonghuzhanghao` (`yonghuzhanghao`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='用户';
  • 设备报修Controller

package com.controller;

import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ShebeibaoxiuEntity;
import com.entity.view.ShebeibaoxiuView;
import com.service.ShebeibaoxiuService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.Arrays;
import java.util.Date;
import java.util.Map;

/**
 * 设备报修
 * 后端接口
 * @author 计算机编程-吉哥
 */
@RestController
@RequestMapping("/shebeibaoxiu")
public class ShebeibaoxiuController {
    
    @Autowired
    private ShebeibaoxiuService shebeibaoxiuService;
    
    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,ShebeibaoxiuEntity shebeibaoxiu, 
        HttpServletRequest request){

        String tableName = request.getSession().getAttribute("tableName").toString();
        if(tableName.equals("yonghu")) {
            shebeibaoxiu.setYonghuzhanghao((String)request.getSession().getAttribute("username"));
        }
        EntityWrapper<ShebeibaoxiuEntity> ew = new EntityWrapper<ShebeibaoxiuEntity>();
        PageUtils page = shebeibaoxiuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shebeibaoxiu), params), params));
        request.setAttribute("data", page);
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
    @IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,ShebeibaoxiuEntity shebeibaoxiu, 
        HttpServletRequest request){
        EntityWrapper<ShebeibaoxiuEntity> ew = new EntityWrapper<ShebeibaoxiuEntity>();
        PageUtils page = shebeibaoxiuService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, shebeibaoxiu), params), params));
        request.setAttribute("data", page);
        return R.ok().put("data", page);
    }

    /**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( ShebeibaoxiuEntity shebeibaoxiu){
           EntityWrapper<ShebeibaoxiuEntity> ew = new EntityWrapper<ShebeibaoxiuEntity>();
          ew.allEq(MPUtil.allEQMapPre( shebeibaoxiu, "shebeibaoxiu")); 
        return R.ok().put("data", shebeibaoxiuService.selectListView(ew));
    }

     /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(ShebeibaoxiuEntity shebeibaoxiu){
        EntityWrapper< ShebeibaoxiuEntity> ew = new EntityWrapper< ShebeibaoxiuEntity>();
         ew.allEq(MPUtil.allEQMapPre( shebeibaoxiu, "shebeibaoxiu")); 
        ShebeibaoxiuView shebeibaoxiuView =  shebeibaoxiuService.selectView(ew);
        return R.ok("查询设备报修成功").put("data", shebeibaoxiuView);
    }
    
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        ShebeibaoxiuEntity shebeibaoxiu = shebeibaoxiuService.selectById(id);
        return R.ok().put("data", shebeibaoxiu);
    }

    /**
     * 前端详情
     */
    @IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        ShebeibaoxiuEntity shebeibaoxiu = shebeibaoxiuService.selectById(id);
        return R.ok().put("data", shebeibaoxiu);
    }
    
    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody ShebeibaoxiuEntity shebeibaoxiu, HttpServletRequest request){
        shebeibaoxiu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
        shebeibaoxiuService.insert(shebeibaoxiu);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody ShebeibaoxiuEntity shebeibaoxiu, HttpServletRequest request){
        shebeibaoxiu.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
        shebeibaoxiuService.insert(shebeibaoxiu);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    public R update(@RequestBody ShebeibaoxiuEntity shebeibaoxiu, HttpServletRequest request){
        shebeibaoxiuService.updateById(shebeibaoxiu);
        return R.ok();
    }
    
    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        shebeibaoxiuService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }

}
  • 设备报修Service

package com.service;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.ShebeibaoxiuEntity;
import java.util.List;
import java.util.Map;
import com.entity.vo.ShebeibaoxiuVO;
import org.apache.ibatis.annotations.Param;
import com.entity.view.ShebeibaoxiuView;

/**
 * 设备报修
 *
 * @author 计算机编程-吉哥
 */
public interface ShebeibaoxiuService extends IService<ShebeibaoxiuEntity> {

    PageUtils queryPage(Map<String, Object> params);
    
       List<ShebeibaoxiuVO> selectListVO(Wrapper<ShebeibaoxiuEntity> wrapper);
       
       ShebeibaoxiuVO selectVO(@Param("ew") Wrapper<ShebeibaoxiuEntity> wrapper);
       
       List<ShebeibaoxiuView> selectListView(Wrapper<ShebeibaoxiuEntity> wrapper);
       
       ShebeibaoxiuView selectView(@Param("ew") Wrapper<ShebeibaoxiuEntity> wrapper);
       
       PageUtils queryPage(Map<String, Object> params,Wrapper<ShebeibaoxiuEntity> wrapper); 

}

  • 设备报修ServiceImpl

package com.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.utils.PageUtils;
import com.utils.Query;
import com.dao.ShebeibaoxiuDao;
import com.entity.ShebeibaoxiuEntity;
import com.service.ShebeibaoxiuService;
import com.entity.vo.ShebeibaoxiuVO;
import com.entity.view.ShebeibaoxiuView;

/**
 * 设备报修服务实现类
 *
 * @author 计算机编程-吉哥
 */
@Service("shebeibaoxiuService")
public class ShebeibaoxiuServiceImpl extends ServiceImpl<ShebeibaoxiuDao, ShebeibaoxiuEntity> implements ShebeibaoxiuService {


    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        Page<ShebeibaoxiuEntity> page = this.selectPage(
                new Query<ShebeibaoxiuEntity>(params).getPage(),
                new EntityWrapper<ShebeibaoxiuEntity>()
        );
        return new PageUtils(page);
    }
    
    @Override
    public PageUtils queryPage(Map<String, Object> params, Wrapper<ShebeibaoxiuEntity> wrapper) {
          Page<ShebeibaoxiuView> page =new Query<ShebeibaoxiuView>(params).getPage();
            page.setRecords(baseMapper.selectListView(page,wrapper));
            PageUtils pageUtil = new PageUtils(page);
            return pageUtil;
     }
    
    @Override
    public List<ShebeibaoxiuVO> selectListVO(Wrapper<ShebeibaoxiuEntity> wrapper) {
         return baseMapper.selectListVO(wrapper);
    }
    
    @Override
    public ShebeibaoxiuVO selectVO(Wrapper<ShebeibaoxiuEntity> wrapper) {
         return baseMapper.selectVO(wrapper);
    }
    
    @Override
    public List<ShebeibaoxiuView> selectListView(Wrapper<ShebeibaoxiuEntity> wrapper) {
        return baseMapper.selectListView(wrapper);
    }

    @Override
    public ShebeibaoxiuView selectView(Wrapper<ShebeibaoxiuEntity> wrapper) {
        return baseMapper.selectView(wrapper);
    }
}
  • 设备报修Dao

package com.dao;

import com.entity.ShebeibaoxiuEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import org.apache.ibatis.annotations.Param;
import com.entity.vo.ShebeibaoxiuVO;
import com.entity.view.ShebeibaoxiuView;


/**
 * 设备报修
 * 
 * @author 计算机编程-吉哥
 */
public interface ShebeibaoxiuDao extends BaseMapper<ShebeibaoxiuEntity> {
    
    List<ShebeibaoxiuVO> selectListVO(@Param("ew") Wrapper<ShebeibaoxiuEntity> wrapper);
    
    ShebeibaoxiuVO selectVO(@Param("ew") Wrapper<ShebeibaoxiuEntity> wrapper);
    
    List<ShebeibaoxiuView> selectListView(@Param("ew") Wrapper<ShebeibaoxiuEntity> wrapper);

    List<ShebeibaoxiuView> selectListView(Pagination page,@Param("ew") Wrapper<ShebeibaoxiuEntity> wrapper);
    
    ShebeibaoxiuView selectView(@Param("ew") Wrapper<ShebeibaoxiuEntity> wrapper);
    
}
  • 设备报修Dao.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.dao.ShebeibaoxiuDao">

    <select id="selectListVO"
        resultType="com.entity.vo.ShebeibaoxiuVO" >
        SELECT * FROM shebeibaoxiu  shebeibaoxiu         
        <where> 1=1 ${ew.sqlSegment}</where>
    </select>
    
    <select id="selectVO"
        resultType="com.entity.vo.ShebeibaoxiuVO" >
        SELECT  shebeibaoxiu.* FROM shebeibaoxiu  shebeibaoxiu     
         <where> 1=1 ${ew.sqlSegment}</where>
    </select>

    <select id="selectListView"
        resultType="com.entity.view.ShebeibaoxiuView" >

        SELECT  shebeibaoxiu.* FROM shebeibaoxiu  shebeibaoxiu             
        <where> 1=1 ${ew.sqlSegment}</where>
    </select>
    
    <select id="selectView"
        resultType="com.entity.view.ShebeibaoxiuView" >
        SELECT * FROM shebeibaoxiu  shebeibaoxiu <where> 1=1 ${ew.sqlSegment}</where>
    </select>
    
</mapper>
更多项目推荐: 计算机毕业设计项目 《100套》

大家 点赞、收藏、关注、评论啦 、 查看 ???????? 获取联系方式 ????????

最后

以上就是无情小虾米为你收集整理的基于Java+SSM+JSP+MySQL实验室计算机报修系统的设计和实现【Java毕业设计·安装调试·代码讲解·文档报告】的全部内容,希望文章能够帮你解决基于Java+SSM+JSP+MySQL实验室计算机报修系统的设计和实现【Java毕业设计·安装调试·代码讲解·文档报告】所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(46)

评论列表共有 0 条评论

立即
投稿
返回
顶部