末尾获取源码
开发语言:Java
Java开发工具:JDK1.8
后端框架:SpringBoot
前端:HTML、Vue
数据库:MySQL5.7

数据库管理工具:Navicat 12
服务器:Tomcat8.5
开发软件:IDEA / Eclipse
是否Maven项目:是


目录

一、项目简介

二、系统功能

三、系统项目截图

3.1前台首页

3.2后台管理

四、核心代码

4.1登录相关

4.2文件上传

4.3封装


一、项目简介

基于SpringBoot的电子招标投标管理系统利用网络沟通、计算机信息存储管理,有着与传统的方式所无法替代的优点。比如计算检索速度特别快、可靠性特别高、存储容量特别大、保密性特别好、可保存时间特别长、成本特别低等。在工作效率上,能够得到极大地提高,延伸至服务水平也会有好的收获,有了网络,基于SpringBoot的电子招标投标管理系统的各方面的管理更加科学和系统,更加规范和简便。


二、系统功能

基于SpringBoot的电子招标投标管理系统主要包括三大功能模块,即管理员、责任单位和供应商。

(1)管理员模块:责任单位管理、供应商管理、招标分类管理、招标项目管理、在线投标管理、结果公示管理、中标公示管理、市场监督管理、帮助中心管理、新闻资讯管理、管理员管理、系统管理。

(2)责任单位:首页、个人中心、招标项目管理、在线投标管理、结果公示管理、中标公告管理。

(3)供应商:在线投标管理、中标公告管理等。


三、系统项目截图

3.1前台首页

前台有招标项目、结果公示、中标公告、市场监督、帮助中心、新闻资讯、业界资讯、个人中心、后台管理等相关功能模块。

招标项目中用户可以查看目前正在招标的项目

个人中心可以查看自己的个人信息,没有账号的可以在前台的注册页面进行注册

责任单位可以在后台发布招标项目。

发布招标项目完成以后可以对项目进行公示或者发布公告通知等操作。

3.2后台管理

管理员后台有责任单位管理、供应商管理、招标分类管理、招标项目管理、在线投标管理、结果公示管理、中标公示管理、市场监督管理、帮助中心管理、新闻资讯管理、管理员管理、系统管理。

管理员可以查看并且管理所以的招标项目。


四、核心代码

4.1登录相关


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.MD5Util;
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);userService.updateById(user);//全部更新return R.ok();}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Long[] ids){userService.deleteBatchIds(Arrays.asList(ids));return R.ok();}
}

4.2文件上传

package com.controller;import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.util.ResourceUtils;
import org.springframework.web.bind.annotation.PathVariable;
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.RestController;
import org.springframework.web.multipart.MultipartFile;import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;/*** 上传文件映射表*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{@Autowiredprivate ConfigService configService;/*** 上传文件*/@RequestMapping("/upload")public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {if (file.isEmpty()) {throw new EIException("上传文件不能为空");}String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}String fileName = new Date().getTime()+"."+fileExt;File dest = new File(upload.getAbsolutePath()+"/"+fileName);file.transferTo(dest);FileUtils.copyFile(dest, new File("C:\\Users\\Desktop\\jiadian\\springbootl7own\\src\\main\\resources\\static\\upload"+"/"+fileName));if(StringUtils.isNotBlank(type) && type.equals("1")) {ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));if(configEntity==null) {configEntity = new ConfigEntity();configEntity.setName("faceFile");configEntity.setValue(fileName);} else {configEntity.setValue(fileName);}configService.insertOrUpdate(configEntity);}return R.ok().put("file", fileName);}/*** 下载文件*/@IgnoreAuth@RequestMapping("/download")public ResponseEntity<byte[]> download(@RequestParam String fileName) {try {File path = new File(ResourceUtils.getURL("classpath:static").getPath());if(!path.exists()) {path = new File("");}File upload = new File(path.getAbsolutePath(),"/upload/");if(!upload.exists()) {upload.mkdirs();}File file = new File(upload.getAbsolutePath()+"/"+fileName);if(file.exists()){/*if(!fileService.canRead(file, SessionManager.getSessionUser())){getResponse().sendError(403);}*/HttpHeaders headers = new HttpHeaders();headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);    headers.setContentDispositionFormData("attachment", fileName);    return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);}} catch (IOException e) {e.printStackTrace();}return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);}}

4.3封装

package com.utils;import java.util.HashMap;
import java.util.Map;/*** 返回数据*/
public class R extends HashMap<String, Object> {private static final long serialVersionUID = 1L;public R() {put("code", 0);}public static R error() {return error(500, "未知异常,请联系管理员");}public static R error(String msg) {return error(500, msg);}public static R error(int code, String msg) {R r = new R();r.put("code", code);r.put("msg", msg);return r;}public static R ok(String msg) {R r = new R();r.put("msg", msg);return r;}public static R ok(Map<String, Object> map) {R r = new R();r.putAll(map);return r;}public static R ok() {return new R();}public R put(String key, Object value) {super.put(key, value);return this;}
}

基于SpringBoot的电子招标投标管理系统相关推荐

  1. 基于SpringBoot的城市建设用地管理系统的设计与实现

    作者主页:Designer 小郑 作者简介:Java全栈软件工程师一枚,来自浙江宁波,负责开发管理公司OA项目,专注软件前后端开发(Vue.SpringBoot和微信小程序).系统定制.远程技术指导. ...

  2. Springboot门诊电子处方管理系统3kqta计算机毕业设计-课程设计-期末作业-毕设程序代做

    Springboot门诊电子处方管理系统3kqta计算机毕业设计-课程设计-期末作业-毕设程序代做 [免费赠送源码]Springboot门诊电子处方管理系统3kqta计算机毕业设计-课程设计-期末作业 ...

  3. java-net-php-python-springboot基于SpringBoot的OA办公管理系统计算机毕业设计程序

    java-net-php-python-springboot基于SpringBoot的OA办公管理系统计算机毕业设计程序 java-net-php-python-springboot基于SpringB ...

  4. 计算机毕业设计springboot基于springboot的智能ERP管理系统r8w04源码+系统+程序+lw文档+部署

    计算机毕业设计springboot基于springboot的智能ERP管理系统r8w04源码+系统+程序+lw文档+部署 计算机毕业设计springboot基于springboot的智能ERP管理系统 ...

  5. 基于SpringBoot的家庭记账管理系统的设计与实现

    摘  要 随着社会的发展,社会的方方面面都在利用信息化时代的优势.互联网的优势和普及使得各种系统的开发成为必需. 本文以实际运用为开发背景,运用软件工程原理和开发方法,它主要是采用java语言技术和m ...

  6. 计算机毕业设计springboot基于springboot高校毕业生信息管理系统y775m源码+系统+程序+lw文档+部署

    计算机毕业设计springboot基于springboot高校毕业生信息管理系统y775m源码+系统+程序+lw文档+部署 计算机毕业设计springboot基于springboot高校毕业生信息管理 ...

  7. 基于springboot的会员后台管理系统

    一.基于springboot的会员后台管理系统 本系统通过普通用户的会员框架,做出一系列拓展: 会员卡管理:成员列表.充值.消费.补卡.充值记录.消费记录.挂失管理等等 积分管理:积分管理,积分兑换 ...

  8. java基于springboot班级同学录网站管理系统附源码

    班级同学录管理系统是基于java编程语言,springboot框架,mysql数据库开发的,本设计主要分为用户,管理员两个角色,其中用户注册登陆后可以查看系统公告,校园校友风采,在线交流,在线报名聚会 ...

  9. 计算机毕业设计-基于springboot的会员积分管理系统-会员等级管理系统java代码

    计算机毕业设计-基于springboot的会员积分管理系统-会员等级管理系统java代码 注意:该项目只展示部分功能,如需了解,评论区咨询即可. 1.开发环境 开发语言:Java 后台框架:Sprin ...

最新文章

  1. 如何在页面调用JS函数的代码
  2. Vector的使用方法和自我理解
  3. 用小括号表达一个长字符串
  4. Java程序员应知道的十条Java优化策略,让你的系统健步如飞
  5. 律师坚称技术无罪:“钉钉打卡神器”开发者二审被改判四年
  6. [原创] 在XP/2K 下实现 Win+Ctrl+Del 等键的屏蔽的方法,附源码与演示程序下载。...
  7. O - Can you find it?
  8. 一个back propagation的例子
  9. php在线售卡系统,云尚在线发卡系统PHP源码|专门为个人或小型企业提供在线售卡,订单处理系统...
  10. 大泥王怎么调时区_卡西欧大泥王功能教学及怎么调时间
  11. 硬件设计之一——电源设计02:DCDC设计
  12. 通配符 或 怎么浓_浓咖啡的咖啡渣新鲜度
  13. 仿微信二维码极速扫描(MLKit及CameraX初体验),面试宝典
  14. 【资源帖】漏洞平台(国内外)+企业SRC整理-持续更新
  15. 大数据技术之Hive 第4章 DDL数据定义语言
  16. 市面上U盘便宜种类多 如何鉴别便宜U盘好坏呢
  17. 基于马尔可夫过程的一种新型混合PSO粒子群算法(SCI二区高被引文献)介绍及算法复现(使用chatgpt)
  18. 8通道同步并行数据采集PCI模块的设计
  19. 壹职行帮助学生做好职业规划
  20. Symbian OS应用编程图形篇之字体(1)

热门文章

  1. Java从入门到放弃第2天
  2. 大数据专业毕业论文选题推荐
  3. java简单密码校验工具类及弱密码说明
  4. Matlab绘图图层调节
  5. pycharm python解释器找不到,pycharm找不到解释器怎么办
  6. 微信小程序轮播图设计
  7. php jquery实现弹窗,jquery+video实现点击播弹窗放视频功能
  8. 显示屏播放服务器S3的前身,道可视S3+高端音乐车机略胜一筹
  9. SpringBoot实现多数据源(二)【Mybatis插件】
  10. c# 控制音量大小 CoreAudioApi