物资捐赠管理系统

2024-02-10 12:20
文章标签 管理系统 捐赠 物资

本文主要是介绍物资捐赠管理系统,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文章目录

  • 物资捐赠管理系统
    • 一、项目演示
    • 二、项目介绍
    • 三、系统部分功能截图
    • 四、部分代码展示
    • 五、底部获取项目(9.9¥带走)

物资捐赠管理系统

一、项目演示

爱心捐赠系统

二、项目介绍

基于springboot的爱心捐赠管理系统

开发语言:java

运行环境:idea或eclipse 数据库:mysql

技术:springboot+mybatis+html+layui+echarts

爱心捐赠系统(用户端+管理端)

用户端功能模块:登录+注册+衣物捐赠+捐赠浏览+论坛交流+帖子留言+爱心许愿+个人主页

管理端功能模块:登录+用户管理+捐赠记录管理+论坛管理+留言管理+心愿管理

三、系统部分功能截图

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

在这里插入图片描述

四、部分代码展示

package com.lc.controller;import cn.hutool.core.util.StrUtil;
import com.alibaba.fastjson.JSON;
import com.lc.entity.Article;
import com.lc.entity.User;
import com.lc.service.ArticleService;
import com.lc.utils.UserContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.*;/*** 文章信息控制层*/
@RestController
@RequestMapping("/article")
public class ArticleController {@AutowiredArticleService articleService;/*** 文章信息数据表格接口*/@RequestMapping(value = "/getTableData", produces = "application/json; charset=utf-8")public String getTableData(@RequestBody Article article) {Map<String, Object> pageDataMap = new HashMap<>(3);//默认分页参数if(article.getCurrentPage() == null || article.getLimitCount() == null){article.setCurrentPage(1);article.setLimitCount(10);}List<Article> dataList = articleService.selectList(article);for(Article a : dataList){if(!StrUtil.isBlank(a.getPicStr())){a.setCoverImg(a.getPicStr().split(",")[0]);}}Integer totalCount = articleService.selectCount(article);pageDataMap.put("code", 0);pageDataMap.put("data", dataList);pageDataMap.put("count", totalCount);return JSON.toJSONString(pageDataMap);}/*** 文章信息保存*/@RequestMapping("/saveArticle")public String saveArticle(@RequestBody Article article) {return articleService.saveArticle(article);}/*** 文章信息删除(物理删除)*/@RequestMapping("/deleteArticle")public String deleteArticle(String id) {return articleService.deletePhysical(id);}/*** 我的文章数据获取*/@RequestMapping("/selfArticle")public List<Article> selfArticle() {User currentUser = UserContext.getCurrentUser();List<Article> articleList = articleService.selectByUserId(currentUser.getId());return articleList;}/*** 根据id获取*/@RequestMapping("/getById")public Article getById(String id) {Article article = articleService.selectEntity(id);if(!StrUtil.isBlank(article.getPicStr())){List<String> picList = new ArrayList<>(Arrays.asList(article.getPicStr().split(",")));article.setPicList(picList);}return article;}}
package com.lc.controller;import cn.hutool.core.date.DateField;
import cn.hutool.core.date.DateUtil;
import com.alibaba.fastjson.JSON;
import com.lc.entity.Donation;
import com.lc.entity.User;
import com.lc.service.DonationService;
import com.lc.utils.UserContext;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.*;
import java.util.stream.Collectors;/*** 捐赠信息控制层*/
@RestController
@RequestMapping("/donation")
public class DonationController {@AutowiredDonationService donationService;/*** 捐赠信息数据表格接口*/@RequestMapping(value="/getTableData", produces="application/json; charset=utf-8")public String getTableData(@RequestBody Donation donation) {Map<String, Object> map = donationService.selectPage(donation);return JSON.toJSONString(map);}/*** 后台捐赠信息保存*/@RequestMapping("/saveDonation")public String saveDonation(@RequestBody Donation donation) {return donationService.save(donation);}/*** 前台捐赠信息保存*/@RequestMapping("/insertDonationList")public String insertDonationList(@RequestBody List<Donation> list) {return donationService.insertDonationList(list);}/*** 捐赠信息删除(物理删除)*/@RequestMapping("/deleteDonation")public String deleteDonation(String id) {return donationService.deletePhysical(id);}/*** 我的捐赠记录数据获取*/@RequestMapping("/selfDonation")public List<Map<String, Object>> selfDonation(){User currentUser = UserContext.getCurrentUser();List<Map<String, Object>> listMap = donationService.countSelfDonation(currentUser.getId());return listMap;}/*** 后台修改捐赠记录状态*/@RequestMapping("/updateVerify")public String updateVerify(String id, Integer verify){return donationService.updateVerifyById(id, verify);}/*** 前台页面第一个饼状图数据接口*/@RequestMapping("/echartsDataOne")public List<Map<String, String>> echartsDataOne(){List<Donation> allList = donationService.selectAllList();Map<String, List<Donation>> allMap = allList.stream().peek(o -> {if(o.getKind() == 0){o.setKindName("上衣");}else if(o.getKind() == 1){o.setKindName("裤子");}else if(o.getKind() == 2){o.setKindName("袜子");}else if(o.getKind() == 3){o.setKindName("手套");}else if(o.getKind() == 4){o.setKindName("帽子");}else if(o.getKind() == 5){o.setKindName("其他");}}).collect(Collectors.groupingBy(Donation::getKindName));List<Map<String, String>> listMap = new ArrayList<>();for(Map.Entry<String, List<Donation>> map : allMap.entrySet()){Double sum = map.getValue().stream().mapToDouble(Donation::getNumber).sum();Map<String, String> itemMap = new HashMap<String, String>();itemMap.put("value", String.valueOf(sum));itemMap.put("name", map.getKey());listMap.add(itemMap);}return listMap;}/*** 前台页面第二个柱状图数据接口*/@RequestMapping("/echartsDataTwo")public Map<String, List<String>> echartsDataTwo(){Map<String, List<String>> resultMap = new HashMap<>();//获取最近七天的时间段(往前找3天+往后找三天+今天一天)List<String> dateList = new ArrayList<>();String today= DateUtil.today();Date date = DateUtil.parse(today);for(int i=0; i<7; i++){String d = DateUtil.format(DateUtil.offset(date, DateField.DAY_OF_MONTH, -6 + i), "yyyy-MM-dd");dateList.add(d);}//根据日期获取数据List<String> dataList = new ArrayList<>();List<Donation> allList = donationService.selectAllList();for(String currentDate : dateList){List<Donation> list = allList.stream().filter(o -> currentDate.equals(o.getCreateDate().split(" ")[0])).collect(Collectors.toList());if(list.isEmpty()){dataList.add(String.valueOf(0));}else{dataList.add(String.valueOf(list.stream().mapToDouble(Donation::getNumber).sum()));}}resultMap.put("dateList", dateList);resultMap.put("dataList", dataList);return resultMap;}/*** 前台页面第三个折现图数据接口*/@RequestMapping("/echartsDataThree")public Map<String, List<String>> echartsDataThree(){Map<String, List<String>> resultMap = new HashMap<>();//获取最近七天的时间段(往前找6天+今天一天)List<String> dateList = new ArrayList<>();String today= DateUtil.today();Date date = DateUtil.parse(today);for(int i=0; i<7; i++){String d = DateUtil.format(DateUtil.offset(date, DateField.DAY_OF_MONTH, -6 + i), "yyyy-MM-dd");dateList.add(d);}//根据日期获取数据List<Donation> allList = donationService.selectAllList();List<String> agreeList = new ArrayList<>();List<String> refuseList = new ArrayList<>();List<String> waitList = new ArrayList<>();for(String currentDate : dateList){List<Donation> list = allList.stream().filter(o -> currentDate.equals(o.getCreateDate().split(" ")[0])).collect(Collectors.toList());agreeList.add(String.valueOf(list.stream().filter(o -> o.getVerify() == 1).count()));refuseList.add(String.valueOf(list.stream().filter(o -> o.getVerify() == 2).count()));waitList.add(String.valueOf(list.stream().filter(o -> o.getVerify() == 0).count()));}resultMap.put("dateList", dateList);resultMap.put("agreeList", agreeList);resultMap.put("refuseList", refuseList);resultMap.put("waitList", waitList);return resultMap;}}
package com.lc.controller;import com.alibaba.fastjson.JSON;
import com.lc.entity.Article;
import com.lc.entity.Message;
import com.lc.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;import java.util.List;
import java.util.Map;/*** 留言信息控制层*/
@RestController
@RequestMapping("/message")
public class MessageController {@AutowiredMessageService messageService;/*** 留言信息数据表格接口*/@RequestMapping(value = "/getTableData", produces = "application/json; charset=utf-8")public String getTableData(@RequestBody Message message) {Map<String, Object> map = messageService.selectPage(message);return JSON.toJSONString(map);}/*** 留言信息保存*/@RequestMapping("/saveMessage")public String saveMessage(@RequestBody Message message) {return messageService.saveMessage(message);}/*** 留言信息删除(物理删除)*/@RequestMapping("/deleteMessage")public String deleteMessage(String id) {return messageService.deletePhysical(id);}/*** 根据文章id获取留言*/@RequestMapping("/getByArticleId")public List<Message> getByArticleId(String articleId) {List<Message> messageList = messageService.selectByArticleId(articleId);return messageList;}}

五、底部获取项目(9.9¥带走)

有问题,或者需要协助调试运行项目的也可以

这篇关于物资捐赠管理系统的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/697097

相关文章

Vue3项目开发——新闻发布管理系统(六)

文章目录 八、首页设计开发1、页面设计2、登录访问拦截实现3、用户基本信息显示①封装用户基本信息获取接口②用户基本信息存储③用户基本信息调用④用户基本信息动态渲染 4、退出功能实现①注册点击事件②添加退出功能③数据清理 5、代码下载 八、首页设计开发 登录成功后,系统就进入了首页。接下来,也就进行首页的开发了。 1、页面设计 系统页面主要分为三部分,左侧为系统的菜单栏,右侧

工厂ERP管理系统实现源码(JAVA)

工厂进销存管理系统是一个集采购管理、仓库管理、生产管理和销售管理于一体的综合解决方案。该系统旨在帮助企业优化流程、提高效率、降低成本,并实时掌握各环节的运营状况。 在采购管理方面,系统能够处理采购订单、供应商管理和采购入库等流程,确保采购过程的透明和高效。仓库管理方面,实现库存的精准管理,包括入库、出库、盘点等操作,确保库存数据的准确性和实时性。 生产管理模块则涵盖了生产计划制定、物料需求计划、

STL经典案例(四)——实验室预约综合管理系统(项目涉及知识点很全面,内容有点多,耐心看完会有收获的!)

项目干货满满,内容有点过多,看起来可能会有点卡。系统提示读完超过俩小时,建议分多篇发布,我觉得分篇就不完整了,失去了这个项目的灵魂 一、需求分析 高校实验室预约管理系统包括三种不同身份:管理员、实验室教师、学生 管理员:给学生和实验室教师创建账号并分发 实验室教师:审核学生的预约申请 学生:申请使用实验室 高校实验室包括:超景深实验室(可容纳10人)、大数据实验室(可容纳20人)、物联网实验

使用Spring Boot集成Spring Data JPA和单例模式构建库存管理系统

引言 在企业级应用开发中,数据库操作是非常重要的一环。Spring Data JPA提供了一种简化的方式来进行数据库交互,它使得开发者无需编写复杂的JPA代码就可以完成常见的CRUD操作。此外,设计模式如单例模式可以帮助我们更好地管理和控制对象的创建过程,从而提高系统的性能和可维护性。本文将展示如何结合Spring Boot、Spring Data JPA以及单例模式来构建一个基本的库存管理系统

【干货分享】基于SSM的体育场管理系统的开题报告(附源码下载地址)

中秋送好礼 中秋佳节将至,祝福大家中秋快乐,阖家幸福。本期免费分享毕业设计作品:《基于SSM的体育场管理系统》。 基于SSM的体育场管理系统的开题报告 一、课题背景与意义 随着全民健身理念的深入人心,体育场已成为广大师生和社区居民进行体育锻炼的重要场所。然而,传统的体育场管理方式存在诸多问题,如资源分配不均、预约流程繁琐、数据统计不准确等,严重影响了体育场的使用效率和用户体验。

基于SSM+Vue+MySQL的可视化高校公寓管理系统

系统展示 管理员界面 宿管界面 学生界面 系统背景   当前社会各行业领域竞争压力非常大,随着当前时代的信息化,科学化发展,让社会各行业领域都争相使用新的信息技术,对行业内的各种相关数据进行科学化,规范化管理。这样的大环境让那些止步不前,不接受信息改革带来的信息技术的企业随时面临被淘汰,被取代的风险。所以当今,各个行业领域,不管是传统的教育行业

图书管理系统系统分享

分享一个图书管理系统,Java、SpringBoot、Vue和MySQL开发的图书馆管理系统 gitee项目地址:https://gitee.com/yuanmomoya/open-source-project/tree/master/books-management-system GitHub项目地址:https://github.com/yuanmomoya/open-source-pro

基于springboot+vue+uniapp的“共享书角”图书借还管理系统小程序

开发语言:Java框架:springboot+uniappJDK版本:JDK1.8服务器:tomcat7数据库:mysql 5.7(一定要5.7版本)数据库工具:Navicat11开发软件:eclipse/myeclipse/ideaMaven包:Maven3.3.9 系统展示 后台登录界面 管理员功能界面 出借者管理 图书信息管理 图书归还管理 出租收入管理

2025届计算机毕业设计:如何构建Java SpringBoot+Vue个人健康档案管理系统?

✍✍计算机编程指导师 ⭐⭐个人介绍:自己非常喜欢研究技术问题!专业做Java、Python、微信小程序、安卓、大数据、爬虫、Golang、大屏等实战项目。 ⛽⛽实战项目:有源码或者技术上的问题欢迎在评论区一起讨论交流! ⚡⚡ Java实战 | SpringBoot/SSM Python实战项目 | Django 微信小程序/安卓实战项目 大数据实战项目 ⚡⚡文末获取源码 文章目录

基于JSP的实验室管理系统

你好呀,我是计算机学姐码农小野!如果有相关需求,可以私信联系我。 开发语言:Java 数据库:MySQL 技术:JSP技术 + Spring Boot框架 工具:IDEA/Eclipse、Navicat、Tomcat 系统展示 首页 用户个人中心 实验室管理 设备报备管理 摘要 随着社会的发展和科学技术的进步,互联网技术越来越受欢迎。网络计算机