[免费]SpringBoot+Vue新能源汽车充电桩管理系统【论文+源码+SQL脚本】

embedded/2025/1/14 14:31:22/

大家好,我是java1234_小锋老师,看到一个不错的SpringBoot+Vue新能源汽车充电桩管理系统,分享下哈。

项目视频演示

【免费】SpringBoot+Vue新能源汽车充电桩管理系统 Java毕业设计_哔哩哔哩_bilibili

项目介绍

随着信息化时代的到来,管理系统都趋向于智能化、系统化,车辆充电桩管理系统也不例外,但目前国内仍都使用人工管理,市场规模越来越大,同时信息量也越来越庞大,人工管理显然已无法应对时代的变化,而车辆充电桩管理系统能很好地解决这一问题,轻松应对车辆充电桩平时的工作,既能提高人力物力财力,又能加快工作的效率,取代人工管理是必然趋势。

本车辆充电桩管理系统以springboot作为框架,b/s模式以及MySql作为后台运行的数据库,同时使用Tomcat用为系统的服务器。本系统主要包括首页、个人中心、维修员管理、用户管理、电桩类别管理、充电桩管理、充电桩报修管理、维修回复管理、系统管理等功能,通过这些功能的实现基本能够满足日常车辆充电桩管理的操作。

本文着重阐述了车辆充电桩管理系统的分析、设计与实现,首先介绍开发系统和环境配置、数据库的设计,接着说明功能模块的详细实现,最后进行了总结。

系统展示

部分代码


package com.controller;import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.Map;import javax.servlet.http.HttpServletRequest;import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.TokenEntity;
import com.entity.UserEntity;
import com.service.TokenService;
import com.service.UserService;
import com.utils.CommonUtil;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;/*** 登录相关*/
@RequestMapping("users")
@RestController
public class UserController{@Autowiredprivate UserService userService;@Autowiredprivate TokenService tokenService;/*** 登录*/@IgnoreAuth@PostMapping(value = "/login")public R login(String username, String password, String captcha, HttpServletRequest request) {UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null || !user.getPassword().equals(password)) {return R.error("账号或密码不正确");}String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());return R.ok().put("token", token);}/*** 注册*/@IgnoreAuth@PostMapping(value = "/register")public R register(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 退出*/@GetMapping(value = "logout")public R logout(HttpServletRequest request) {request.getSession().invalidate();return R.ok("退出成功");}/*** 密码重置*/@IgnoreAuth@RequestMapping(value = "/resetPass")public R resetPass(String username, HttpServletRequest request){UserEntity user = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", username));if(user==null) {return R.error("账号不存在");}user.setPassword("123456");userService.update(user,null);return R.ok("密码已重置为:123456");}/*** 列表*/@RequestMapping("/page")public R page(@RequestParam Map<String, Object> params,UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));return R.ok().put("data", page);}/*** 列表*/@RequestMapping("/list")public R list( UserEntity user){EntityWrapper<UserEntity> ew = new EntityWrapper<UserEntity>();ew.allEq(MPUtil.allEQMapPre( user, "user")); return R.ok().put("data", userService.selectListView(ew));}/*** 信息*/@RequestMapping("/info/{id}")public R info(@PathVariable("id") String id){UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 获取用户的session用户信息*/@RequestMapping("/session")public R getCurrUser(HttpServletRequest request){Long id = (Long)request.getSession().getAttribute("userId");UserEntity user = userService.selectById(id);return R.ok().put("data", user);}/*** 保存*/@PostMapping("/save")public R save(@RequestBody UserEntity user){
//    	ValidatorUtils.validateEntity(user);if(userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername())) !=null) {return R.error("用户已存在");}userService.insert(user);return R.ok();}/*** 修改*/@RequestMapping("/update")public R update(@RequestBody UserEntity user){
//        ValidatorUtils.validateEntity(user);UserEntity u = userService.selectOne(new EntityWrapper<UserEntity>().eq("username", user.getUsername()));if(u!=null && u.getId()!=user.getId() && u.getUsername().equals(user.getUsername())) {return R.error("用户名已存在。");}userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}
<template><div><canvas id="canvas"  style="background:#336699"></canvas><div class="container loginIn"><div :class="3 == 1 ? 'left' : 3 == 2 ? 'left center' : 'left right'"><el-form class="login-form" label-position="left" :label-width="1 == 3 || 1 == 2 ? '30px': '0px'"><div class="title-container"><h3 class="title">车辆充电桩登录</h3></div><el-form-item :style='{"padding":"0","boxShadow":"0 0 6px rgba(0,0,0,0)","margin":"0 auto 15px","borderColor":"rgba(0,0,0,0)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"8px","borderWidth":"0","width":"60%","borderStyle":"solid","height":"auto"}' :label="1 == 3 ? '用户名' : ''" :class="'style'+1"><span v-if="1 != 3" class="svg-container" style="color:rgba(130, 130, 130, 1);line-height:30px;font-size:14px;width:30px;padding:0;margin:0;radius:0;border-width:0;border-style:solid;border-color:rgba(0,0,0,0);background-color:rgba(0,0,0,0);box-shadow:0 0 6px rgba(0,0,0,0);}"><svg-icon icon-class="user" /></span><el-input placeholder="请输入用户名" name="username" type="text" v-model="rulesForm.username" /></el-form-item><el-form-item :style='{"padding":"0","boxShadow":"0 0 6px rgba(0,0,0,0)","margin":"0 auto 15px","borderColor":"rgba(0,0,0,0)","backgroundColor":"rgba(255, 255, 255, 1)","borderRadius":"8px","borderWidth":"0","width":"60%","borderStyle":"solid","height":"auto"}' :label="1 == 3 ? '密码' : ''" :class="'style'+1"><span v-if="1 != 3" class="svg-container" style="color:rgba(130, 130, 130, 1);line-height:30px;font-size:14px;width:30px;padding:0;margin:0;radius:0;border-width:0;border-style:solid;border-color:rgba(0,0,0,0);background-color:rgba(0,0,0,0);box-shadow:0 0 6px rgba(0,0,0,0);"><svg-icon icon-class="password" /></span><el-input placeholder="请输入密码" name="password" type="password" v-model="rulesForm.password" /></el-form-item><el-form-item label="角色" prop="loginInRole" class="role" style="display: flex;align-items: center;"><el-radiov-for="item in menus"v-if="item.hasBackLogin=='是'"v-bind:key="item.roleName"v-model="rulesForm.role":label="item.roleName">{{item.roleName}}</el-radio></el-form-item><el-button type="primary" @click="login()" class="loginInBt">{{'1' == '1' ? '登录' : 'login'}}</el-button><el-form-item class="setting"><!-- <div style="color:${template2.back.login.loginInSettingFontColor}" class="reset">修改密码</div> --></el-form-item></el-form></div></div></div>
</template>
<script>import menu from "@/utils/menu";
import canvasBg from "@/assets/js/canvas-bg-2.js";
import "@/assets/css/canvas-bg-2.css"export default {data() {return {rulesForm: {username: "",password: "",role: "",code: '',},menus: [],tableName: "",codes: [{num: 1,color: '#000',rotate: '10deg',size: '16px'},{num: 2,color: '#000',rotate: '10deg',size: '16px'},{num: 3,color: '#000',rotate: '10deg',size: '16px'},{num: 4,color: '#000',rotate: '10deg',size: '16px'}],};},mounted() {let menus = menu.list();this.menus = menus;this.$nextTick(() => {canvasBg()})},created() {this.getRandCode()},methods: {register(tableName){this.$storage.set("loginTable", tableName);this.$router.push({path:'/register'})},// 登陆login() {if (!this.rulesForm.username) {this.$message.error("请输入用户名");return;}if (!this.rulesForm.password) {this.$message.error("请输入密码");return;}if (!this.rulesForm.role) {this.$message.error("请选择角色");return;}let menus = this.menus;for (let i = 0; i < menus.length; i++) {if (menus[i].roleName == this.rulesForm.role) {this.tableName = menus[i].tableName;}}this.$http({url: `${this.tableName}/login?username=${this.rulesForm.username}&password=${this.rulesForm.password}`,method: "post"}).then(({ data }) => {if (data && data.code === 0) {this.$storage.set("Token", data.token);this.$storage.set("role", this.rulesForm.role);this.$storage.set("sessionTable", this.tableName);this.$storage.set("adminName", this.rulesForm.username);this.$router.replace({ path: "/index/" });} else {this.$message.error(data.msg);}});},getRandCode(len = 4){this.randomString(len)},randomString(len = 4) {let chars = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k","l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v","w", "x", "y", "z", "A", "B", "C", "D", "E", "F", "G","H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R","S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2","3", "4", "5", "6", "7", "8", "9"]let colors = ["0", "1", "2","3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"]let sizes = ['14', '15', '16', '17', '18']let output = [];for (let i = 0; i < len; i++) {// 随机验证码let key = Math.floor(Math.random()*chars.length)this.codes[i].num = chars[key]// 随机验证码颜色let code = '#'for (let j = 0; j < 6; j++) {let key = Math.floor(Math.random()*colors.length)code += colors[key]}this.codes[i].color = code// 随机验证码方向let rotate = Math.floor(Math.random()*60)let plus = Math.floor(Math.random()*2)if(plus == 1) rotate = '-'+rotatethis.codes[i].rotate = 'rotate('+rotate+'deg)'// 随机验证码字体大小let size = Math.floor(Math.random()*sizes.length)this.codes[i].size = sizes[size]+'px'}},}
};
</script>
<style lang="scss" scoped>
.loginIn {min-height: 100vh;position: relative;background-repeat: no-repeat;background-position: center center;background-size: cover;.loginInBt {width: 600px;height: 150px;line-height: 150px;margin: 20px 0 0 -42px;padding: 0;color: rgba(112, 111, 67, 1);font-size: 40px;border-radius: 160px 0 0 160px;border-width: 0;border-style: solid;border-color: rgba(112, 111, 67, 1);background-color: rgba(255, 255, 255, 1);box-shadow: 0px 0px 0px 30px #706f43 inset;}.register {width: 330px;height: 24px;line-height: 24px;margin: -190px 0 0 0;padding: 0;color: rgba(24, 24, 24, 1);font-size: 12px;border-radius: 0;border-width: 0;border-style: solid;border-color: rgba(64, 158, 255, 1);background-color: rgba(112, 111, 67, 0);box-shadow: 0 0 6px rgba(255,0,0,0);cursor: pointer;}.reset {width: auto;height: 24px;line-height: 24px;margin: 0;padding: 0;color: rgba(214, 214, 214, 1);font-size: 12px;border-radius: 0;border-width: 0;border-style: solid;border-color: rgba(64, 158, 255, 1);background-color: rgba(255, 255, 255, 0);box-shadow: 0 0 6px rgba(255,0,0,0);}.left {position: absolute;left: 0;top: 0;box-sizing: border-box;width: 600px;height: 500px;margin: 200px 150px 0 0;padding: 0 12px;border-radius: 160px 0 0 30px;border-width: 30px 30px 0 30px;border-style: solid;border-color: rgba(112, 111, 67, 1);background-color: rgba(255, 255, 255, 0.59);box-shadow: 0 0 0px rgba(30, 144, 255, .8);.login-form {background-color: transparent;width: 100%;right: inherit;padding: 0;box-sizing: border-box;display: flex;position: initial;justify-content: center;flex-direction: column;}.title-container {text-align: center;font-size: 24px;.title {width: 80%;line-height: auto;margin: 150px auto 20px;padding: 15px;color: rgba(255, 255, 255, 1);font-size: 24px;border-radius: 100px;border-width: 0;border-style: solid;border-color: rgba(72, 54, 42, 1);background-color: rgba(112, 111, 67, 1);box-shadow: 0 0 6px rgba(0,0,0,0);}}.el-form-item {position: relative;& /deep/ .el-form-item__content {line-height: initial;}& /deep/ .el-radio__label {width: auto;height: 14px;line-height: 14px;margin: 0;padding: 0 0 0 10px;color: rgba(0, 0, 0, 1);font-size: 14px;border-radius: 0;border-width: 0;border-style: solid;border-color: rgba(255, 255, 255, 0);background-color: rgba(255, 255, 255, 0);box-shadow: 0 0 6px rgba(255,0,0,0);text-align: left;}& /deep/ .el-radio.is-checked .el-radio__label {width: auto;height: 14px;line-height: 14px;margin: 0;padding: 0 0 0 10px;color: rgba(112, 111, 67, 1);font-size: 14px;border-radius: 0;border-width: 0;border-style: solid;border-color: rgba(255, 255, 255, 0);background-color: rgba(255, 255, 255, 0);box-shadow: 0 0 6px rgba(255,0,0,0);text-align: left;}& /deep/ .el-radio__inner {width: 14px;height: 14px;margin: 0;padding: 0;border-radius: 100%;border-width: 1px;border-style: solid;border-color: rgba(72, 54, 42, 1);background-color: rgba(255, 255, 255, 1);box-shadow: 0 0 6px rgba(255,0,0,0);}& /deep/ .el-radio.is-checked .el-radio__inner {width: 14px;height: 14px;margin: 0;padding: 0;border-radius: 100%;border-width: 1px;border-style: solid;border-color: rgba(112, 111, 67, 1);background-color: rgba(112, 111, 67, 1);box-shadow: 0 0 6px rgba(255,0,0,0);}.svg-container {padding: 6px 5px 6px 15px;color: #889aa4;vertical-align: middle;display: inline-block;position: absolute;left: 0;top: 0;z-index: 1;padding: 0;line-height: 40px;width: 30px;text-align: center;}.el-input {display: inline-block;// height: 40px;width: 100%;& /deep/ input {background: transparent;border: 0px;-webkit-appearance: none;padding: 0 15px 0 30px;color: #fff;height: 40px;width: 100%;height: 30px;line-height: 30px;margin: 0;padding: 0 30px;color: rgba(0, 0, 0, 1);font-size: 16px;border-radius: 0;border-width: 0;border-style: solid;border-color: rgba(0,0,0,0);background-color: rgba(0,0,0,0);box-shadow: 0 0 6px rgba(255,0,0,0);}}}}.center {position: absolute;left: 50%;top: 50%;transform: translate3d(-50%,-50%,0);}.right {position: absolute;left: inherit;right: 0;top: 0;}.code {.el-form-item__content {position: relative;.getCodeBt {position: absolute;right: 0;top: 50%;transform: translate3d(0, -50%, 0);line-height: 40px;width: 100px;background-color: rgba(51,51,51,0.4);color: #fff;text-align: center;border-radius: 0 4px 4px 0;height: 40px;overflow: hidden;padding: 0;margin: 0;width: 100px;height: 30px;line-height: 30px;border-radius: 0;border-width: 0;border-style: solid;border-color: rgba(64, 158, 255, 1);background-color: rgba(51, 51, 51, 0.4);box-shadow: 0 0 6px rgba(255,0,0,0);span {padding: 0 5px;display: inline-block;font-size: 16px;font-weight: 600;}}.el-input {& /deep/ input {padding: 0 130px 0 30px;}}}}.setting {& /deep/ .el-form-item__content {// padding: 0 15px;box-sizing: border-box;line-height: 32px;height: 32px;font-size: 14px;color: #999;margin: 0 !important;display: flex;.register {// float: left;// width: 50%;text-align: center;}.reset {float: right;width: 50%;text-align: right;}}}.style2 {padding-left: 30px;.svg-container {left: -30px !important;}.el-input {& /deep/ input {padding: 0 15px !important;}}}.code.style2, .code.style3 {.el-input {& /deep/ input {padding: 0 115px 0 15px;}}}.style3 {& /deep/ .el-form-item__label {padding-right: 6px;height: 30px;line-height: 30px;}.el-input {& /deep/ input {padding: 0 15px !important;}}}& /deep/ .el-form-item__label {width: 30px;height: 30px;line-height: 30px;margin: 0;padding: 0;color: rgba(130, 130, 130, 1);font-size: 14px;border-radius: 0;border-width: 0;border-style: solid;border-color: rgba(0,0,0,0);background-color: rgba(0,0,0,0);box-shadow: 0 0 6px rgba(0,0,0,0);}.role {& /deep/ .el-form-item__label {width: 56px !important;height: 38px;line-height: 38px;margin: 0 0 0 20%;padding: 0;color: rgba(72, 54, 42, 1);font-size: 14px;border-radius: 0;border-width: 0;border-style: solid;border-color: rgba(64, 158, 255, 1);background-color: rgba(255, 255, 255, 0);box-shadow: 0 0 6px rgba(255,0,0,0);text-align: left;}& /deep/ .el-radio {margin-right: 12px;}}
}
</style>

源码代码

链接:https://pan.baidu.com/s/17UhBzcogjV_RZW6MH9ZNVg
提取码:1234


http://www.ppmy.cn/embedded/153859.html

相关文章

相机小孔成像模型与透视变换

0 背景 本文用于记录小孔相机成像的数学模型推导&#xff0c;并讨论特定条件下两个相机之间看到图像的变换关系。 1 小孔成像模型 小孔成像模型如上图所示。物理世界发光点P&#xff0c;经过小孔O投影到物理成像平面&#xff0c;形成像点I’。 简易起见&#xff0c;构造虚拟成…

leetcode39.组合总和

给你一个 无重复元素 的整数数组 candidates 和一个目标整数 target &#xff0c;找出 candidates 中可以使数字和为目标数 target 的 所有 不同组合 &#xff0c;并以列表形式返回。你可以按 任意顺序 返回这些组合。candidates 中的 同一个 数字可以 无限制重复被选取 。如果…

Debian之Maven安装

本地压缩包安装&#xff08;推荐&#xff09; 下载地址&#xff1a;https://maven.apache.org/download.cgi # 将安装包移动到当前目录 cd /usr/local # && mkdir maven && cd maven # 在线下载&#xff08;https://dlcdn.apache.org/maven/&#xff09; wg…

【pycharm】远程部署失败,查看日志

pycharm 远程部署失败,查看日志 远程一直失败,gateway超时会还知道拉取一份日志: 在./root 下 发现了崩溃日志,启动崩溃了,导致backend一直无法启动。win11就是一直在connect到ubuntu的后端pycharm。。gateway 拉取的日志 我上传的linux版本的pycharm暂时存在dist目录下,…

【Git】分支管理

git 分支管理 在 Git 中&#xff0c;分支合并是一个常见的操作&#xff0c;用于将一个分支的更改集成到另一个分支中。合并后会生成一个新的提交记录&#xff0c;这个过程可以通过多种方式实现。下面详细介绍几种常用的合并方法及其命令。 1. 快进合并 (Fast-Forward Merge) …

麦田物语学习笔记:实现根据物品详情显示

基本流程 1.代码思路 (1)新建ItemTooltip.cs用于控制ItemTooltip(这个是在Hierarchy里的)中的文本内容 回顾一下:对于物品描述(ItemTooltip)的UI有三个部分,第一部分是名字和类型,第二部分是物品详解,第三部分是金币图标以及价值的文本 (2)获取UI中的所有部分,因为item分为可出…

在 Alpine Linux 下通过 Docker 部署 PostgreSQL 服务器

简要介绍 Docker 是一个开源的容器化平台&#xff0c;它使得开发者能够轻松创建、部署和运行应用程序。通过使用 Docker&#xff0c;程序员可以把应用及其所有依赖打包在一个轻量级的容器中&#xff0c;这样可以确保在不同环境中的一致性。PostgreSQL&#xff08;简称 psql&am…

MySQL:内置函数

1.时间函数 获取当前日期 年月日 获取当前的时间 时分秒 获取当前时间戳 自动转化为年月日时分秒 从时间戳截取日期部分 1990-10-1 10天 1990-10-1 - 10分钟 2025-1-11 - 1949-10-1相差多少天 现在的日期和时间 ‘ 案例 创建一个留言表 插入两条数据 查询一下 显示所有留言…