• Java项目:SSM汽车维修中心管理系统


    作者主页:夜未央5788

     简介: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.数据库:MySql 5.7/8.0版本均可;

    6.是否Maven项目:否;

    技术栈

    1. 后端:Spring+SpringMVC+Mybatis

    2. 前端:HTML+CSS+JavaScript+jQuery

    使用说明

    1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件;
    2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven;若为maven项目,导入成功后请执行maven clean;maven install命令,然后运行;
    3. 将项目中spring-mybatis.xml配置文件中的数据库配置改为自己的配置;

    4. 运行项目,输入localhost:8080/ 登录;

    运行截图

     

     

     

     

     

     

     

     

    相关代码

    汽车信息控制器

    1. package com.controller;
    2. import java.util.List;
    3. import javax.annotation.Resource;
    4. import javax.servlet.http.HttpSession;
    5. import org.springframework.stereotype.Controller;
    6. import org.springframework.web.bind.annotation.RequestMapping;
    7. import org.springframework.web.bind.annotation.ResponseBody;
    8. import com.dao.CarInfoDao;
    9. import com.entity.CarInfo;
    10. import com.service.CarInfoService;
    11. import com.service.PersonalInfoService;
    12. import com.util.Result;
    13. @Controller
    14. @RequestMapping("/carinfo")
    15. public class CarInfoController {
    16. @Resource
    17. private CarInfoService cs;
    18. @RequestMapping("/add.do")
    19. @ResponseBody
    20. public Result execute(String user_id,
    21. String plate,
    22. String brand,
    23. String model,
    24. String color,
    25. String price,
    26. String date,
    27. String remark){
    28. System.out.println("进入controller");
    29. Result rs=cs.addCarInfo(user_id, plate, brand, model, color, price, date, remark);
    30. System.out.println(rs.toString());
    31. return rs;
    32. }
    33. @RequestMapping("/show.do")
    34. @ResponseBody
    35. public Result show(String user_id){
    36. System.out.println("user_id="+user_id);
    37. Result rs=cs.showCarInfo(user_id);
    38. System.out.println(rs.toString());
    39. return rs;
    40. }
    41. @RequestMapping("/showone.do")
    42. @ResponseBody
    43. public Result showOneCar(String id){
    44. System.out.println("进入controller");
    45. Result rs=cs.showOneCar(id);
    46. System.out.println(rs.toString());
    47. return rs;
    48. }
    49. @RequestMapping("/showAll.do")
    50. @ResponseBody
    51. public Result showAllCar() {
    52. Result rs=cs.showAllCar();
    53. System.out.println(rs.toString());
    54. return rs;
    55. }
    56. @RequestMapping("/search.do")
    57. @ResponseBody
    58. public Result searchCar(String type,String keywords){
    59. System.out.println("进入controller/search.do");
    60. Result rs=cs.searchCar(type, keywords);
    61. return rs;
    62. }
    63. @RequestMapping("/delete.do")
    64. @ResponseBody
    65. public Result delete(String id){
    66. System.out.println("进入controller");
    67. Result rs=cs.delCarInfo(id);
    68. System.out.println(rs.toString());
    69. return rs;
    70. }
    71. @RequestMapping("/update.do")
    72. @ResponseBody
    73. public Result update(String id, String plate, String brand, String model, String color, String price,
    74. String date, String remark) {
    75. System.out.println("进入controller");
    76. Result rs=cs.updateCarInfo(id, plate, brand, model, color, price, date, remark);
    77. System.out.println(rs.toString());
    78. return rs;
    79. }
    80. }

    订单模块

    1. package com.controller;
    2. import javax.annotation.Resource;
    3. import org.springframework.stereotype.Controller;
    4. import org.springframework.web.bind.annotation.RequestMapping;
    5. import org.springframework.web.bind.annotation.ResponseBody;
    6. import com.service.CarInfoService;
    7. import com.service.OrderInfoService;
    8. import com.util.Result;
    9. @Controller
    10. @RequestMapping("/orderinfo")
    11. public class OrderInfoController {
    12. @Resource
    13. private OrderInfoService os;
    14. @RequestMapping("/add.do")
    15. @ResponseBody
    16. public Result addOrderInfo(String user_id, String user_name, String plate, String trouble_code,String trouble_name, String contact,
    17. String contact_way, String remark) {
    18. System.out.println("进入OrderInfoController/add.do");
    19. Result rs=os.addOrderInfo(user_id, user_name, plate, trouble_code,trouble_name, contact, contact_way, remark);
    20. System.out.println(rs);
    21. return rs;
    22. }
    23. @RequestMapping("/showAll.do")
    24. @ResponseBody
    25. public Result findAllOrder() {
    26. System.out.println("进入OrderInfoController/showAll.do");
    27. Result rs=os.findAllOrder();
    28. System.out.println(rs);
    29. return rs;
    30. }
    31. @RequestMapping("/delete.do")
    32. @ResponseBody
    33. public Result delOrderInfo(String id) {
    34. System.out.println("进入OrderInfoController/delete.do");
    35. Result rs=os.delOrderInfo(id);
    36. System.out.println(rs);
    37. return rs;
    38. }
    39. @RequestMapping("/change.do")
    40. @ResponseBody
    41. public Result changStatus(String id) {
    42. System.out.println("进入OrderInfoController/change.do");
    43. Result rs=os.changStatus(id);
    44. System.out.println(rs);
    45. return rs;
    46. }
    47. @RequestMapping("/show.do")
    48. @ResponseBody
    49. public Result findOrder(String user_id) {
    50. System.out.println("进入OrderInfoController/show.do");
    51. Result rs=os.findOrder(user_id);
    52. System.out.println(rs);
    53. return rs;
    54. }
    55. @RequestMapping("/sort.do")
    56. @ResponseBody
    57. public Result findBySort() {
    58. System.out.println("进入OrderInfoController/sort.do");
    59. Result rs=os.findBySort();
    60. System.out.println(rs);
    61. return rs;
    62. }
    63. @RequestMapping("/deal.do")
    64. @ResponseBody
    65. public Result findDealOrder(){
    66. System.out.println("进入OrderInfoController/deal.do");
    67. Result rs=os.findDealOrder();
    68. System.out.println(rs);
    69. return rs;
    70. }
    71. @RequestMapping("/undeal.do")
    72. @ResponseBody
    73. public Result findUndealOrder(){
    74. System.out.println("进入OrderInfoController/undeal.do");
    75. Result rs=os.findUndealOrder();
    76. System.out.println(rs);
    77. return rs;
    78. }
    79. @RequestMapping("/searchorder.do")
    80. @ResponseBody
    81. public Result searchOrderInfo(String type, String keywords) {
    82. System.out.println("进入OrderInfoController/search.do");
    83. Result rs=os.searchOrderInfo(type, keywords);
    84. System.out.println(rs);
    85. return rs;
    86. }
    87. }

    用户控制器

    1. package com.controller;
    2. import javax.annotation.Resource;
    3. import org.springframework.stereotype.Controller;
    4. import org.springframework.web.bind.annotation.RequestMapping;
    5. import org.springframework.web.bind.annotation.ResponseBody;
    6. import com.entity.User;
    7. import com.service.UserService;
    8. import com.util.Result;
    9. @Controller
    10. @RequestMapping("/user")
    11. public class UserController {
    12. @Resource
    13. private UserService us;
    14. @RequestMapping("/login.do")
    15. @ResponseBody
    16. public Result execute(String name,String password){
    17. Result rs=us.login(name, password);
    18. System.out.println(name);
    19. System.out.println(rs.toString());
    20. return rs;
    21. }
    22. @RequestMapping("/changepwd.do")
    23. @ResponseBody
    24. public Result changePwd(String user_id, String mpass, String newpass) {
    25. Result rs=us.changePwd(user_id, mpass, newpass);
    26. System.out.println(rs);
    27. return rs;
    28. }
    29. @RequestMapping("/show.do")
    30. @ResponseBody
    31. public Result userList() {
    32. Result rs=us.userList();
    33. System.out.println(rs);
    34. return rs;
    35. }
    36. @RequestMapping("/add.do")
    37. @ResponseBody
    38. public Result addUser(String name, String password, Integer type){
    39. Result rs=us.addUser(name, password, type);
    40. System.out.println(rs);
    41. return rs;
    42. }
    43. @RequestMapping("/change.do")
    44. @ResponseBody
    45. public Result changeStatus(String id){
    46. Result rs=us.changeStatus(id);
    47. System.out.println(rs);
    48. return rs;
    49. }
    50. }

    访客控制器

    1. package com.controller;
    2. import javax.annotation.Resource;
    3. import org.springframework.stereotype.Controller;
    4. import org.springframework.web.bind.annotation.RequestMapping;
    5. import org.springframework.web.bind.annotation.ResponseBody;
    6. import com.service.OrderInfoService;
    7. import com.service.VisitorService;
    8. import com.util.Result;
    9. @Controller
    10. @RequestMapping("/visitor")
    11. public class VisitorController {
    12. @Resource
    13. private VisitorService vs;
    14. @RequestMapping("/show.do")
    15. @ResponseBody
    16. public Result visitorList() {
    17. System.out.println("进入VisitorController/show.do");
    18. Result rs=vs.visitorList();
    19. System.out.println(rs);
    20. return rs;
    21. }
    22. }

    TroubleInfoController

    1. package com.controller;
    2. import javax.annotation.Resource;
    3. import org.springframework.stereotype.Controller;
    4. import org.springframework.web.bind.annotation.RequestMapping;
    5. import org.springframework.web.bind.annotation.ResponseBody;
    6. import com.service.CarInfoService;
    7. import com.service.TroubleInfoService;
    8. import com.util.Result;
    9. @Controller
    10. @RequestMapping("/troubleinfo")
    11. public class TroubleInfoController {
    12. @Resource
    13. private TroubleInfoService ts;
    14. @RequestMapping("/add.do")
    15. @ResponseBody
    16. public Result addTroubleInfo(String trouble_code, String trouble_name, String trouble_remark) {
    17. System.out.println("进入TroubleInfoController/add.do");
    18. Result rs= ts.addTroubleInfo(trouble_code, trouble_name, trouble_remark);
    19. System.out.println(rs.toString());
    20. return rs;
    21. }
    22. @RequestMapping("/show.do")
    23. @ResponseBody
    24. public Result troubleList() {
    25. System.out.println("进入TroubleInfoController/show.do");
    26. Result rs=ts.troubleList();
    27. System.out.println(rs.toString());
    28. return rs;
    29. }
    30. @RequestMapping("/change.do")
    31. @ResponseBody
    32. public Result changStatus(String id) {
    33. System.out.println("进入TroubleInfoController/change.do");
    34. Result rs=ts.changStatus(id);
    35. System.out.println(rs.toString());
    36. return rs;
    37. }
    38. }

    如果也想学习本系统,下面领取。关注并回复:150ssm  

  • 相关阅读:
    解决uniapp软键盘弹起导致页面fixed定位元素被顶上去
    AQS之LimitLatch分析 (十)
    以字节跳动内部 Data Catalog 架构升级为例聊业务系统的性能优化
    WPF学习笔记:给文字添加线性渐变效果
    Kubernetes容器状态探测的艺术
    C# 定时器定时不准确问题
    SQL语句中 left join 后用 on 还是 where
    C和指针 第15章 输入/输出函数 15.2 终止执行
    Java:软件开发中最流行的Java框架是什么?
    在报酬与体验之间触碰到玩家“G”点才是元宇宙链游发展之道
  • 原文地址:https://blog.csdn.net/hanyunlong1989/article/details/126496810