• SpringBoot+Vue项目电子招投标系统


    文末获取源码

    开发语言:Java
    开发工具:IDEA /Eclipse
    数据库:MYSQL5.7/8.0
    应用服务:Tomcat7/Tomcat8
    是否Maven项目:是
    后端框架:SpringBoot
    前端框架:vue+element等
    JDK版本:jdk1.8
    项目架构:B/S架构

    前言介绍

    本系统主要包括管理员,责任单位和供应商三个角色组成,主要包括以下功能: 

    (1)前台:首页、招标项目、结果公示、中标公告、市场监督、帮助中心、新闻公告、个人中心、后台管理。

    (2)管理员:首页、个人中心、责任单位管理、供应商管理、招标分类管理、招标项目管理、在线投标管理、结果公示管理、中标公告管理、市场监督管理、帮助中心管理、新闻公告管理、管理员管理、系统管理。

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

    (4)供应商:首页、个人中心、在线投标管理、中标公告管理。

    系统展示 

    前台

    招标项目

    管理员 

    供应商管理 

    招标分类管理

    帮助中心管理 

    责任单位

    招标项目管理

    供应商

     部分核心代码

    1. /**
    2. * 登录相关
    3. */
    4. @RequestMapping("config")
    5. @RestController
    6. public class ConfigController{
    7. @Autowired
    8. private ConfigService configService;
    9. /**
    10. * 列表
    11. */
    12. @RequestMapping("/page")
    13. public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
    14. EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
    15. PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params));
    16. return R.ok().put("data", page);
    17. }
    18. /**
    19. * 列表
    20. */
    21. @IgnoreAuth
    22. @RequestMapping("/list")
    23. public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
    24. EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
    25. PageUtils page = configService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, config), params), params));
    26. return R.ok().put("data", page);
    27. }
    28. /**
    29. * 信息
    30. */
    31. @RequestMapping("/info/{id}")
    32. public R info(@PathVariable("id") String id){
    33. ConfigEntity config = configService.selectById(id);
    34. return R.ok().put("data", config);
    35. }
    36. /**
    37. * 详情
    38. */
    39. @IgnoreAuth
    40. @RequestMapping("/detail/{id}")
    41. public R detail(@PathVariable("id") String id){
    42. ConfigEntity config = configService.selectById(id);
    43. return R.ok().put("data", config);
    44. }
    45. /**
    46. * 根据name获取信息
    47. */
    48. @RequestMapping("/info")
    49. public R infoByName(@RequestParam String name){
    50. ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
    51. return R.ok().put("data", config);
    52. }
    53. /**
    54. * 保存
    55. */
    56. @PostMapping("/save")
    57. public R save(@RequestBody ConfigEntity config){
    58. // ValidatorUtils.validateEntity(config);
    59. configService.insert(config);
    60. return R.ok();
    61. }
    62. /**
    63. * 修改
    64. */
    65. @RequestMapping("/update")
    66. public R update(@RequestBody ConfigEntity config){
    67. // ValidatorUtils.validateEntity(config);
    68. configService.updateById(config);//全部更新
    69. return R.ok();
    70. }
    71. /**
    72. * 删除
    73. */
    74. @RequestMapping("/delete")
    75. public R delete(@RequestBody Long[] ids){
    76. configService.deleteBatchIds(Arrays.asList(ids));
    77. return R.ok();
    78. }
    79. }
    1. /**
    2. * 供应商
    3. * 后端接口
    4. * @author
    5. * @email
    6. * @date 2022-05-18 09:48:23
    7. */
    8. @RestController
    9. @RequestMapping("/gongyingshang")
    10. public class GongyingshangController {
    11. @Autowired
    12. private GongyingshangService gongyingshangService;
    13. @Autowired
    14. private TokenService tokenService;
    15. /**
    16. * 登录
    17. */
    18. @IgnoreAuth
    19. @RequestMapping(value = "/login")
    20. public R login(String username, String password, String captcha, HttpServletRequest request) {
    21. GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper().eq("gongyingshangmingcheng", username));
    22. if(user==null || !user.getMima().equals(password)) {
    23. return R.error("账号或密码不正确");
    24. }
    25. if("否".equals(user.getSfsh())) return R.error("账号已锁定,请联系管理员审核。");
    26. String token = tokenService.generateToken(user.getId(), username,"gongyingshang", "供应商" );
    27. return R.ok().put("token", token);
    28. }
    29. /**
    30. * 注册
    31. */
    32. @IgnoreAuth
    33. @RequestMapping("/register")
    34. public R register(@RequestBody GongyingshangEntity gongyingshang){
    35. //ValidatorUtils.validateEntity(gongyingshang);
    36. GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper().eq("gongyingshangmingcheng", gongyingshang.getGongyingshangmingcheng()));
    37. if(user!=null) {
    38. return R.error("注册用户已存在");
    39. }
    40. Long uId = new Date().getTime();
    41. gongyingshang.setId(uId);
    42. gongyingshangService.insert(gongyingshang);
    43. return R.ok();
    44. }
    45. /**
    46. * 退出
    47. */
    48. @RequestMapping("/logout")
    49. public R logout(HttpServletRequest request) {
    50. request.getSession().invalidate();
    51. return R.ok("退出成功");
    52. }
    53. /**
    54. * 获取用户的session用户信息
    55. */
    56. @RequestMapping("/session")
    57. public R getCurrUser(HttpServletRequest request){
    58. Long id = (Long)request.getSession().getAttribute("userId");
    59. GongyingshangEntity user = gongyingshangService.selectById(id);
    60. return R.ok().put("data", user);
    61. }
    62. /**
    63. * 密码重置
    64. */
    65. @IgnoreAuth
    66. @RequestMapping(value = "/resetPass")
    67. public R resetPass(String username, HttpServletRequest request){
    68. GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper().eq("gongyingshangmingcheng", username));
    69. if(user==null) {
    70. return R.error("账号不存在");
    71. }
    72. user.setMima("123456");
    73. gongyingshangService.updateById(user);
    74. return R.ok("密码已重置为:123456");
    75. }
    76. /**
    77. * 后端列表
    78. */
    79. @RequestMapping("/page")
    80. public R page(@RequestParam Map params,GongyingshangEntity gongyingshang,
    81. HttpServletRequest request){
    82. EntityWrapper ew = new EntityWrapper();
    83. PageUtils page = gongyingshangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gongyingshang), params), params));
    84. return R.ok().put("data", page);
    85. }
    86. /**
    87. * 前端列表
    88. */
    89. @IgnoreAuth
    90. @RequestMapping("/list")
    91. public R list(@RequestParam Map params,GongyingshangEntity gongyingshang,
    92. HttpServletRequest request){
    93. EntityWrapper ew = new EntityWrapper();
    94. PageUtils page = gongyingshangService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, gongyingshang), params), params));
    95. return R.ok().put("data", page);
    96. }
    97. /**
    98. * 列表
    99. */
    100. @RequestMapping("/lists")
    101. public R list( GongyingshangEntity gongyingshang){
    102. EntityWrapper ew = new EntityWrapper();
    103. ew.allEq(MPUtil.allEQMapPre( gongyingshang, "gongyingshang"));
    104. return R.ok().put("data", gongyingshangService.selectListView(ew));
    105. }
    106. /**
    107. * 查询
    108. */
    109. @RequestMapping("/query")
    110. public R query(GongyingshangEntity gongyingshang){
    111. EntityWrapper< GongyingshangEntity> ew = new EntityWrapper< GongyingshangEntity>();
    112. ew.allEq(MPUtil.allEQMapPre( gongyingshang, "gongyingshang"));
    113. GongyingshangView gongyingshangView = gongyingshangService.selectView(ew);
    114. return R.ok("查询供应商成功").put("data", gongyingshangView);
    115. }
    116. /**
    117. * 后端详情
    118. */
    119. @RequestMapping("/info/{id}")
    120. public R info(@PathVariable("id") Long id){
    121. GongyingshangEntity gongyingshang = gongyingshangService.selectById(id);
    122. return R.ok().put("data", gongyingshang);
    123. }
    124. /**
    125. * 前端详情
    126. */
    127. @IgnoreAuth
    128. @RequestMapping("/detail/{id}")
    129. public R detail(@PathVariable("id") Long id){
    130. GongyingshangEntity gongyingshang = gongyingshangService.selectById(id);
    131. return R.ok().put("data", gongyingshang);
    132. }
    133. /**
    134. * 后端保存
    135. */
    136. @RequestMapping("/save")
    137. public R save(@RequestBody GongyingshangEntity gongyingshang, HttpServletRequest request){
    138. gongyingshang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    139. //ValidatorUtils.validateEntity(gongyingshang);
    140. GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper().eq("gongyingshangmingcheng", gongyingshang.getGongyingshangmingcheng()));
    141. if(user!=null) {
    142. return R.error("用户已存在");
    143. }
    144. gongyingshang.setId(new Date().getTime());
    145. gongyingshangService.insert(gongyingshang);
    146. return R.ok();
    147. }
    148. /**
    149. * 前端保存
    150. */
    151. @RequestMapping("/add")
    152. public R add(@RequestBody GongyingshangEntity gongyingshang, HttpServletRequest request){
    153. gongyingshang.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    154. //ValidatorUtils.validateEntity(gongyingshang);
    155. GongyingshangEntity user = gongyingshangService.selectOne(new EntityWrapper().eq("gongyingshangmingcheng", gongyingshang.getGongyingshangmingcheng()));
    156. if(user!=null) {
    157. return R.error("用户已存在");
    158. }
    159. gongyingshang.setId(new Date().getTime());
    160. gongyingshangService.insert(gongyingshang);
    161. return R.ok();
    162. }
    163. /**
    164. * 修改
    165. */
    166. @RequestMapping("/update")
    167. @Transactional
    168. public R update(@RequestBody GongyingshangEntity gongyingshang, HttpServletRequest request){
    169. //ValidatorUtils.validateEntity(gongyingshang);
    170. gongyingshangService.updateById(gongyingshang);//全部更新
    171. return R.ok();
    172. }
    173. /**
    174. * 删除
    175. */
    176. @RequestMapping("/delete")
    177. public R delete(@RequestBody Long[] ids){
    178. gongyingshangService.deleteBatchIds(Arrays.asList(ids));
    179. return R.ok();
    180. }
    181. /**
    182. * 提醒接口
    183. */
    184. @RequestMapping("/remind/{columnName}/{type}")
    185. public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
    186. @PathVariable("type") String type,@RequestParam Map map) {
    187. map.put("column", columnName);
    188. map.put("type", type);
    189. if(type.equals("2")) {
    190. SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
    191. Calendar c = Calendar.getInstance();
    192. Date remindStartDate = null;
    193. Date remindEndDate = null;
    194. if(map.get("remindstart")!=null) {
    195. Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
    196. c.setTime(new Date());
    197. c.add(Calendar.DAY_OF_MONTH,remindStart);
    198. remindStartDate = c.getTime();
    199. map.put("remindstart", sdf.format(remindStartDate));
    200. }
    201. if(map.get("remindend")!=null) {
    202. Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
    203. c.setTime(new Date());
    204. c.add(Calendar.DAY_OF_MONTH,remindEnd);
    205. remindEndDate = c.getTime();
    206. map.put("remindend", sdf.format(remindEndDate));
    207. }
    208. }
    209. Wrapper wrapper = new EntityWrapper();
    210. if(map.get("remindstart")!=null) {
    211. wrapper.ge(columnName, map.get("remindstart"));
    212. }
    213. if(map.get("remindend")!=null) {
    214. wrapper.le(columnName, map.get("remindend"));
    215. }
    216. int count = gongyingshangService.selectCount(wrapper);
    217. return R.ok().put("count", count);
    218. }
    219. }

  • 相关阅读:
    二进制安装k8s
    怎么制作gif动态图,静态图片转成动态图的方法分享!
    vue引入jQuery
    javaweb JAVA JSP电车租赁系统jsp租赁系统 jsp汽车租赁 电车租赁网站案例源码
    AI机器学习 | 基于librosa库和使用scikit-learn库中的分类器进行语音识别
    006:vue使用lottie-web实现web动画
    Java项目:眼镜商城系统(java+SSM+JSP+jQuery+Mysql)
    在使用lac时macos错误NameError: name 'libpaddle' is not defined
    2022 年全年 Java 岗面试题总结 + 一线互联网大厂 Java 岗面经 / 面试题总结!
    4.7拆解复杂问题-实现计算器
  • 原文地址:https://blog.csdn.net/m0_49113107/article/details/126059355