计算机毕业设计 基于SpringBoot的大学生创新创业项目管理系统的设计与实现 Java实战项目 附源码+文档+视频讲解

2023-12-19 00:19:46

博主介绍:?从事软件开发10年之余,专注于Java技术领域、Python人工智能及数据挖掘、小程序项目开发和Android项目开发等。CSDN、掘金、华为云、InfoQ、阿里云等平台优质作者?
🍅文末获取源码联系🍅
👇🏻 精彩专栏推荐订阅👇🏻 不然下次找不到哟
————————————————
计算机毕业设计《1000套》?

目录

1、项目介绍及开发技术

1.1 项目介绍

1.2 开发技术

2、系统功能设计结构图

3、功能截图

4、数据库表结构设计

5、关键代码

5.1 项目申报Controller模块?

5.2 项目申报Service模块?

5.3 项目申报ServiceImpl模块

5.4?项目申报Dao模块

6、论文目录结构

7、源码获取


1、项目介绍及开发技术

1.1 项目介绍

传统办法管理信息首先需要花费的时间比较多,其次数据出错率比较高,而且对错误的数据进行更改也比较困难,最后,检索数据费事费力。因此,在计算机上安装大学生创新创业项目管理系统软件来发挥其高效地信息处理的作用,可以规范信息管理流程,让管理工作可以系统化和程序化,同时,大学生创新创业项目管理系统的有效运用可以帮助管理人员准确快速地处理信息。

大学生创新创业项目管理系统在对开发工具的选择上也很慎重,为了便于开发实现,选择的开发工具为Eclipse,选择的数据库工具为Mysql。以此搭建开发环境实现大学生创新创业项目管理系统的功能。其中管理员管理用户,新闻公告。大学生创新创业项目管理系统是一款运用软件开发技术设计实现的应用系统,在信息处理上可以达到快速的目的,不管是针对数据添加,数据维护和统计,以及数据查询等处理要求,大学生创新创业项目管理系统都可以轻松应对。

1.2 开发技术

Java开发语言、SpringBoot、MyBatisPlus、MySQL数据库、Maven、IDEA开发工具、JDK1.8+、Vue、HTML、CSS、JS。

2、系统功能设计结构图

3、功能截图

登录

首页?

个人中心

?指导老师管理

学生管理

项目申报管理

选题审核管理

项目进度管理

?基础数据管理

公告信息管理

4、数据库表结构设计

CREATE TABLE `config` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(100) DEFAULT NULL COMMENT '配置参数名称',
  `value` varchar(100) DEFAULT NULL COMMENT '配置参数值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='配置文件';

/*Data for the table `config` */

/*Table structure for table `dictionary` */

DROP TABLE IF EXISTS `dictionary`;

CREATE TABLE `dictionary` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `dic_code` varchar(200) DEFAULT NULL COMMENT '字段',
  `dic_name` varchar(200) DEFAULT NULL COMMENT '字段名',
  `code_index` int(11) DEFAULT NULL COMMENT '编码',
  `index_name` varchar(200) DEFAULT NULL COMMENT '编码名字  Search111 ',
  `super_id` int(11) DEFAULT NULL COMMENT '父字段id',
  `beizhu` varchar(200) DEFAULT NULL COMMENT '备注',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COMMENT='字典';

/*Data for the table `dictionary` */

insert  into `dictionary`(`id`,`dic_code`,`dic_name`,`code_index`,`index_name`,`super_id`,`beizhu`,`create_time`) values (1,'news_types','公告类型',1,'公告类型1',NULL,NULL,'2023-04-21 16:19:33'),(2,'news_types','公告类型',2,'公告类型2',NULL,NULL,'2023-04-21 16:19:33'),(3,'news_types','公告类型',3,'公告类型3',NULL,NULL,'2023-04-21 16:19:33'),(4,'xiangmu_types','项目类型',1,'项目类型1',NULL,NULL,'2023-04-21 16:19:33'),(5,'xiangmu_types','项目类型',2,'项目类型2',NULL,NULL,'2023-04-21 16:19:33'),(6,'xiangmu_types','项目类型',3,'项目类型3',NULL,NULL,'2023-04-21 16:19:33'),(7,'xiangmu_yesno_types','申报状态',1,'申报中',NULL,NULL,'2023-04-21 16:19:33'),(8,'xiangmu_yesno_types','申报状态',2,'同意',NULL,NULL,'2023-04-21 16:19:33'),(9,'xiangmu_yesno_types','申报状态',3,'拒绝',NULL,NULL,'2023-04-21 16:19:33'),(10,'xiangmu_yesno_types','申报状态',4,'已选',NULL,NULL,'2023-04-21 16:19:33'),(11,'xuantishenhe_yesno_types','选题申请',1,'申报中',NULL,NULL,'2023-04-21 16:19:33'),(12,'xuantishenhe_yesno_types','选题申请',2,'同意',NULL,NULL,'2023-04-21 16:19:34'),(13,'xuantishenhe_yesno_types','选题申请',3,'拒绝',NULL,NULL,'2023-04-21 16:19:34'),(14,'xuantishenhe_yesno_types','选题申请',4,'中期审核',NULL,NULL,'2023-04-21 16:19:34'),(15,'xuantishenhe_yesno_types','选题申请',5,'结题审核',NULL,NULL,'2023-04-21 16:19:34'),(16,'xiangmujindu_yesno_types','进度审核',1,'待审核',NULL,NULL,'2023-04-21 16:19:34'),(17,'xiangmujindu_yesno_types','选题申请',2,'通过',NULL,NULL,'2023-04-21 16:19:34'),(18,'xiangmujindu_yesno_types','选题申请',3,'拒绝',NULL,NULL,'2023-04-21 16:19:34'),(19,'sex_types','性别',1,'男',NULL,NULL,'2023-04-21 16:19:34'),(20,'sex_types','性别',2,'女',NULL,NULL,'2023-04-21 16:19:34'),(21,'xuantishenhe_yesno_types','选题申请',6,'已完成',NULL,NULL,'2023-04-21 16:19:34');

/*Table structure for table `jiaoshi` */

DROP TABLE IF EXISTS `jiaoshi`;

CREATE TABLE `jiaoshi` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(200) DEFAULT NULL COMMENT '账户',
  `password` varchar(200) DEFAULT NULL COMMENT '密码',
  `jiaoshi_name` varchar(200) DEFAULT NULL COMMENT '教师名称 Search111 ',
  `jiaoshi_phone` varchar(200) DEFAULT NULL COMMENT '教师手机号',
  `jiaoshi_photo` varchar(200) DEFAULT NULL COMMENT '教师头像',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别 Search111',
  `jiaoshi_email` varchar(200) DEFAULT NULL COMMENT '教师邮箱',
  `jiaoshi_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `jiaoshi_time` date DEFAULT NULL COMMENT '入职时间',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='指导教师';

/*Data for the table `jiaoshi` */

insert  into `jiaoshi`(`id`,`username`,`password`,`jiaoshi_name`,`jiaoshi_phone`,`jiaoshi_photo`,`sex_types`,`jiaoshi_email`,`jiaoshi_delete`,`jiaoshi_time`,`insert_time`,`create_time`) values (1,'a1','123456','教师名称1','17703786901','upload/jiaoshi1.jpg',1,'1@qq.com',1,'2023-04-21','2023-04-21 16:19:43','2023-04-21 16:19:43'),(2,'a2','123456','教师名称2','17703786902','upload/jiaoshi2.jpg',2,'2@qq.com',1,'2023-04-21','2023-04-21 16:19:43','2023-04-21 16:19:43'),(3,'a3','123456','教师名称3','17703786903','upload/jiaoshi3.jpg',1,'3@qq.com',1,'2023-04-21','2023-04-21 16:19:43','2023-04-21 16:19:43');

/*Table structure for table `news` */

DROP TABLE IF EXISTS `news`;

CREATE TABLE `news` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `news_name` varchar(200) DEFAULT NULL COMMENT '公告标题  Search111 ',
  `news_types` int(11) DEFAULT NULL COMMENT '公告类型  Search111 ',
  `news_photo` varchar(200) DEFAULT NULL COMMENT '公告图片',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',
  `news_content` longtext COMMENT '公告详情',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='公告信息';

/*Data for the table `news` */

insert  into `news`(`id`,`news_name`,`news_types`,`news_photo`,`insert_time`,`news_content`,`create_time`) values (1,'公告标题1',3,'upload/news1.jpg','2023-04-21 16:19:43','公告详情1','2023-04-21 16:19:43'),(2,'公告标题2',2,'upload/news2.jpg','2023-04-21 16:19:43','公告详情2','2023-04-21 16:19:43'),(3,'公告标题3',2,'upload/news3.jpg','2023-04-21 16:19:43','公告详情3','2023-04-21 16:19:43'),(4,'公告标题4',2,'upload/news4.jpg','2023-04-21 16:19:43','公告详情4','2023-04-21 16:19:43'),(5,'公告标题5',2,'upload/news5.jpg','2023-04-21 16:19:43','公告详情5','2023-04-21 16:19:43'),(6,'公告标题6',3,'upload/news6.jpg','2023-04-21 16:19:43','公告详情6','2023-04-21 16:19:43'),(7,'公告标题7',3,'upload/news7.jpg','2023-04-21 16:19:43','公告详情7','2023-04-21 16:19:43'),(8,'公告标题8',1,'upload/news8.jpg','2023-04-21 16:19:43','公告详情8','2023-04-21 16:19:43'),(9,'公告标题9',3,'upload/news9.jpg','2023-04-21 16:19:43','公告详情9','2023-04-21 16:19:43'),(10,'公告标题10',2,'upload/news10.jpg','2023-04-21 16:19:43','公告详情10','2023-04-21 16:19:43'),(11,'公告标题11',2,'upload/news11.jpg','2023-04-21 16:19:43','公告详情11','2023-04-21 16:19:43'),(12,'公告标题12',1,'upload/news12.jpg','2023-04-21 16:19:43','公告详情12','2023-04-21 16:19:43'),(13,'公告标题13',2,'upload/news13.jpg','2023-04-21 16:19:43','公告详情13','2023-04-21 16:19:43'),(14,'公告标题14',2,'upload/news14.jpg','2023-04-21 16:19:43','公告详情14','2023-04-21 16:19:43');

/*Table structure for table `token` */

DROP TABLE IF EXISTS `token`;

CREATE TABLE `token` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `userid` bigint(20) NOT NULL COMMENT '管理id',
  `username` varchar(100) NOT NULL COMMENT '管理名',
  `tablename` varchar(100) DEFAULT NULL COMMENT '表名',
  `role` varchar(100) DEFAULT NULL COMMENT '角色',
  `token` varchar(200) NOT NULL COMMENT '密码',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
  `expiratedtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '过期时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='token表';

/*Data for the table `token` */

insert  into `token`(`id`,`userid`,`username`,`tablename`,`role`,`token`,`addtime`,`expiratedtime`) values (1,1,'admin','users','管理员','5hacaa6ggue9pr9lnaw6ke0oq2k5h5mo','2023-04-21 16:28:21','2023-04-21 18:43:35'),(2,1,'a1','yonghu','学生','2m3md9td5hpsae5hfp9zchka0tne7okm','2023-04-21 16:28:45','2023-04-21 18:41:49'),(3,1,'a1','jiaoshi','指导教师','4kgx30umq8sv06ipub32ois2l21bkntg','2023-04-21 16:32:29','2023-04-21 18:41:36'),(4,2,'a2','jiaoshi','指导教师','x59v6pvg73npu139f4m66ncb5k3b7r2y','2023-04-21 16:32:36','2023-04-21 18:40:46');

/*Table structure for table `users` */

DROP TABLE IF EXISTS `users`;

CREATE TABLE `users` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `username` varchar(100) NOT NULL COMMENT '医院名',
  `password` varchar(100) NOT NULL COMMENT '密码',
  `role` varchar(100) DEFAULT '管理员' COMMENT '角色',
  `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='管理员';

/*Data for the table `users` */

insert  into `users`(`id`,`username`,`password`,`role`,`addtime`) values (1,'admin','admin','管理员','2023-04-21 16:19:33');

/*Table structure for table `xiangmu` */

DROP TABLE IF EXISTS `xiangmu`;

CREATE TABLE `xiangmu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `xiangmu_uuid_number` varchar(200) DEFAULT NULL COMMENT '项目编号',
  `xiangmu_name` varchar(200) DEFAULT NULL COMMENT '项目名称  Search111 ',
  `xiangmu_types` int(11) DEFAULT NULL COMMENT '项目类型 Search111',
  `xiangmu_jingfei` decimal(10,2) DEFAULT NULL COMMENT '项目经费',
  `xiangmu_file` varchar(200) DEFAULT NULL COMMENT '项目文件',
  `jiaoshi_id` int(11) DEFAULT NULL COMMENT '教师',
  `xiangmu_chuangxin` varchar(200) DEFAULT NULL COMMENT '项目创新点',
  `xiangmu_text` longtext COMMENT '项目实施方案',
  `xiangmu_content` longtext COMMENT '项目详情',
  `xiangmu_yesno_types` int(11) DEFAULT NULL COMMENT '申报状态 Search111',
  `xiangmu_yesno_text` longtext COMMENT '申报结果',
  `xiangmu_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COMMENT='项目申报';

/*Data for the table `xiangmu` */

insert  into `xiangmu`(`id`,`xiangmu_uuid_number`,`xiangmu_name`,`xiangmu_types`,`xiangmu_jingfei`,`xiangmu_file`,`jiaoshi_id`,`xiangmu_chuangxin`,`xiangmu_text`,`xiangmu_content`,`xiangmu_yesno_types`,`xiangmu_yesno_text`,`xiangmu_delete`,`insert_time`,`create_time`) values (1,'1682065183974','项目名称1',2,'818.65','upload/file.rar',1,'项目创新点1','项目实施方案1','项目详情1',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(2,'1682065184045','项目名称2',2,'912.44','upload/file.rar',3,'项目创新点2','项目实施方案2','项目详情2',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(3,'1682065184033','项目名称3',2,'36.45','upload/file.rar',2,'项目创新点3','项目实施方案3','项目详情3',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(4,'1682065183996','项目名称4',3,'191.41','upload/file.rar',2,'项目创新点4','项目实施方案4','项目详情4',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(5,'1682065184058','项目名称5',3,'667.06','upload/file.rar',1,'项目创新点5','项目实施方案5','项目详情5',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(6,'1682065184010','项目名称6',3,'888.60','upload/file.rar',1,'项目创新点6','项目实施方案6','项目详情6',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(7,'1682065184028','项目名称7',3,'985.18','upload/file.rar',3,'项目创新点7','项目实施方案7','项目详情7',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(8,'1682065183982','项目名称8',2,'933.43','upload/file.rar',2,'项目创新点8','项目实施方案8','项目详情8',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(9,'1682065184034','项目名称9',2,'611.79','upload/file.rar',2,'项目创新点9','项目实施方案9','项目详情9',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(10,'1682065184062','项目名称10',2,'722.89','upload/file.rar',1,'项目创新点10','项目实施方案10','项目详情10',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(11,'1682065183967','项目名称11',1,'447.25','upload/file.rar',1,'项目创新点11','项目实施方案11','项目详情11',4,'123',1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(12,'1682065183990','项目名称12',2,'106.07','upload/file.rar',2,'项目创新点12','项目实施方案12','项目详情12',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(13,'1682065184019','项目名称13',1,'584.62','upload/file.rar',2,'项目创新点13','项目实施方案13','项目详情13',1,NULL,1,'2023-04-21 16:19:43','2023-04-21 16:19:43'),(14,'1682065183986','项目名称14',1,'931.72','upload/file.rar',2,'项目创新点14','项目实施方案14','项目详情14',2,'123',1,'2023-04-21 16:19:43','2023-04-21 16:19:43');

/*Table structure for table `xiangmujindu` */

DROP TABLE IF EXISTS `xiangmujindu`;

CREATE TABLE `xiangmujindu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `xuantishenhe_id` int(11) DEFAULT NULL COMMENT '选题审核',
  `xiangmujindu_file` varchar(200) DEFAULT NULL COMMENT '项目文件',
  `xiangmujindu_content` longtext COMMENT '项目详情',
  `xiangmujindu_yesno_types` int(11) DEFAULT NULL COMMENT '进度审核 Search111',
  `xiangmujindu_yesno_text` longtext COMMENT '审核结果 ',
  `xiangmujindu_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COMMENT='项目进度';

/*Data for the table `xiangmujindu` */

insert  into `xiangmujindu`(`id`,`xuantishenhe_id`,`xiangmujindu_file`,`xiangmujindu_content`,`xiangmujindu_yesno_types`,`xiangmujindu_yesno_text`,`xiangmujindu_delete`,`insert_time`,`create_time`) values (21,17,'/upload/1682070020014.doc','<p>123123123</p>',2,'123',1,'2023-04-21 17:40:22','2023-04-21 17:40:22'),(22,17,'/upload/1682070060471.rar','<p>123</p>',2,'123123',1,'2023-04-21 17:41:02','2023-04-21 17:41:02'),(23,17,'/upload/1682070090231.rar','<p>123123</p>',2,'123123123',1,'2023-04-21 17:41:32','2023-04-21 17:41:32');

/*Table structure for table `xuantishenhe` */

DROP TABLE IF EXISTS `xuantishenhe`;

CREATE TABLE `xuantishenhe` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `xiangmu_id` int(11) DEFAULT NULL COMMENT '项目',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '学生',
  `xuantishenhe_yesno_types` int(11) DEFAULT NULL COMMENT '选题申请 Search111',
  `xuantishenhe_yesno_text` longtext COMMENT '申请结果',
  `xuantishenhe_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COMMENT='选题审核';

/*Data for the table `xuantishenhe` */

insert  into `xuantishenhe`(`id`,`xiangmu_id`,`yonghu_id`,`xuantishenhe_yesno_types`,`xuantishenhe_yesno_text`,`xuantishenhe_delete`,`insert_time`,`create_time`) values (17,11,1,6,'123',1,'2023-04-21 17:39:40','2023-04-21 17:39:40');

/*Table structure for table `yonghu` */

DROP TABLE IF EXISTS `yonghu`;

CREATE TABLE `yonghu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `yonghu_uuid_number` varchar(200) DEFAULT NULL COMMENT '学号',
  `username` varchar(200) DEFAULT NULL COMMENT '账户',
  `password` varchar(200) DEFAULT NULL COMMENT '密码',
  `yonghu_name` varchar(200) DEFAULT NULL COMMENT '学生名称 Search111 ',
  `yonghu_phone` varchar(200) DEFAULT NULL COMMENT '学生手机号',
  `yonghu_photo` varchar(200) DEFAULT NULL COMMENT '学生头像',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别 Search111',
  `yonghu_email` varchar(200) DEFAULT NULL COMMENT '学生邮箱',
  `yonghu_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `yonghu_time` date DEFAULT NULL COMMENT '入职时间',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='学生';

/*Data for the table `yonghu` */

insert  into `yonghu`(`id`,`yonghu_uuid_number`,`username`,`password`,`yonghu_name`,`yonghu_phone`,`yonghu_photo`,`sex_types`,`yonghu_email`,`yonghu_delete`,`yonghu_time`,`insert_time`,`create_time`) values (1,'1682065184077','a1','123456','学生名称1','17703786901','upload/yonghu1.jpg',2,'1@qq.com',1,'2023-04-21','2023-04-21 16:19:43','2023-04-21 16:19:43'),(2,'1682065184055','a2','123456','学生名称2','17703786902','upload/yonghu2.jpg',1,'2@qq.com',1,'2023-04-21','2023-04-21 16:19:43','2023-04-21 16:19:43'),(3,'1682065184046','a3','123456','学生名称3','17703786903','upload/yonghu3.jpg',2,'3@qq.com',1,'2023-04-21','2023-04-21 16:19:43','2023-04-21 16:19:43');

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

5、关键代码

5.1 项目申报Controller模块?

/**
 * 项目申报
 * 后端接口
 * @author 学长编程
 * @email
 * WeChat  jsjbysj88
*/
@RestController
@Controller
@RequestMapping("/xiangmu")
public class XiangmuController {
    private static final Logger logger = LoggerFactory.getLogger(XiangmuController.class);

    private static final String TABLE_NAME = "xiangmu";

    @Autowired
    private XiangmuService xiangmuService;

    @Autowired
    private TokenService tokenService;

    @Autowired
    private DictionaryService dictionaryService;//字典
    @Autowired
    private JiaoshiService jiaoshiService;//指导教师
    @Autowired
    private NewsService newsService;//公告信息
    @Autowired
    private XiangmujinduService xiangmujinduService;//项目进度
    @Autowired
    private XuantishenheService xuantishenheService;//选题审核
    @Autowired
    private YonghuService yonghuService;//学生
    @Autowired
    private UsersService usersService;//管理员

    /**
    * 后端列表
    */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
        logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永不会进入");
        else if("学生".equals(role))
            params.put("yonghuId",request.getSession().getAttribute("userId"));
        else if("指导教师".equals(role))
            params.put("jiaoshiId",request.getSession().getAttribute("userId"));
        params.put("xiangmuDeleteStart",1);params.put("xiangmuDeleteEnd",1);
        CommonUtil.checkMap(params);
        PageUtils page = xiangmuService.queryPage(params);

        //字典表数据转换
        List<XiangmuView> list =(List<XiangmuView>)page.getList();
        for(XiangmuView c:list){
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(c, request);
        }
        return R.ok().put("data", page);
    }

    /**
    * 后端详情
    */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id, HttpServletRequest request){
        logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
        XiangmuEntity xiangmu = xiangmuService.selectById(id);
        if(xiangmu !=null){
            //entity转view
            XiangmuView view = new XiangmuView();
            BeanUtils.copyProperties( xiangmu , view );//把实体数据重构到view中
            //级联表 指导教师
            //级联表
            JiaoshiEntity jiaoshi = jiaoshiService.selectById(xiangmu.getJiaoshiId());
            if(jiaoshi != null){
            BeanUtils.copyProperties( jiaoshi , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "jiaoshiId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
            view.setJiaoshiId(jiaoshi.getId());
            }
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

    /**
    * 后端保存
    */
    @RequestMapping("/save")
    public R save(@RequestBody XiangmuEntity xiangmu, HttpServletRequest request){
        logger.debug("save方法:,,Controller:{},,xiangmu:{}",this.getClass().getName(),xiangmu.toString());

        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永远不会进入");
        else if("指导教师".equals(role))
            xiangmu.setJiaoshiId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));

        Wrapper<XiangmuEntity> queryWrapper = new EntityWrapper<XiangmuEntity>()
            .eq("xiangmu_name", xiangmu.getXiangmuName())
            .eq("xiangmu_types", xiangmu.getXiangmuTypes())
            .eq("jiaoshi_id", xiangmu.getJiaoshiId())
            .eq("xiangmu_chuangxin", xiangmu.getXiangmuChuangxin())
            .in("xiangmu_yesno_types", new Integer[]{1,2})
            .eq("xiangmu_delete", 1)
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        XiangmuEntity xiangmuEntity = xiangmuService.selectOne(queryWrapper);
        if(xiangmuEntity==null){
            xiangmu.setXiangmuYesnoTypes(1);
            xiangmu.setXiangmuDelete(1);
            xiangmu.setInsertTime(new Date());
            xiangmu.setCreateTime(new Date());
            xiangmuService.insert(xiangmu);
            return R.ok();
        }else {
            if(xiangmuEntity.getXiangmuYesnoTypes()==1)
                return R.error(511,"有相同的待审核的数据");
            else if(xiangmuEntity.getXiangmuYesnoTypes()==2)
                return R.error(511,"有相同的审核通过的数据");
            else
                return R.error(511,"表中有相同数据");
        }
    }

    /**
    * 后端修改
    */
    @RequestMapping("/update")
    public R update(@RequestBody XiangmuEntity xiangmu, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
        logger.debug("update方法:,,Controller:{},,xiangmu:{}",this.getClass().getName(),xiangmu.toString());
        XiangmuEntity oldXiangmuEntity = xiangmuService.selectById(xiangmu.getId());//查询原先数据

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
//        else if("指导教师".equals(role))
//            xiangmu.setJiaoshiId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
        if("".equals(xiangmu.getXiangmuFile()) || "null".equals(xiangmu.getXiangmuFile())){
                xiangmu.setXiangmuFile(null);
        }

            xiangmuService.updateById(xiangmu);//根据id更新
            return R.ok();
    }

    /**
    * 审核
    */
    @RequestMapping("/shenhe")
    public R shenhe(@RequestBody XiangmuEntity xiangmuEntity, HttpServletRequest request){
        logger.debug("shenhe方法:,,Controller:{},,xiangmuEntity:{}",this.getClass().getName(),xiangmuEntity.toString());

        XiangmuEntity oldXiangmu = xiangmuService.selectById(xiangmuEntity.getId());//查询原先数据

//        if(xiangmuEntity.getXiangmuYesnoTypes() == 2){//通过
//            xiangmuEntity.setXiangmuTypes();
//        }else if(xiangmuEntity.getXiangmuYesnoTypes() == 3){//拒绝
//            xiangmuEntity.setXiangmuTypes();
//        }
        xiangmuService.updateById(xiangmuEntity);//审核

        return R.ok();
    }

    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        List<XiangmuEntity> oldXiangmuList =xiangmuService.selectBatchIds(Arrays.asList(ids));//要删除的数据
        ArrayList<XiangmuEntity> list = new ArrayList<>();
        for(Integer id:ids){
            XiangmuEntity xiangmuEntity = new XiangmuEntity();
            xiangmuEntity.setId(id);
            xiangmuEntity.setXiangmuDelete(2);
            list.add(xiangmuEntity);
        }
        if(list != null && list.size() >0){
            xiangmuService.updateBatchById(list);
        }

        return R.ok();
    }

    /**
     * 批量上传
     */
    @RequestMapping("/batchInsert")
    public R save( String fileName, HttpServletRequest request){
        logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
        Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        //.eq("time", new SimpleDateFormat("yyyy-MM-dd").format(new Date()))
        try {
            List<XiangmuEntity> xiangmuList = new ArrayList<>();//上传的东西
            Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
            Date date = new Date();
            int lastIndexOf = fileName.lastIndexOf(".");
            if(lastIndexOf == -1){
                return R.error(511,"该文件没有后缀");
            }else{
                String suffix = fileName.substring(lastIndexOf);
                if(!".xls".equals(suffix)){
                    return R.error(511,"只支持后缀为xls的excel文件");
                }else{
                    URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
                    File file = new File(resource.getFile());
                    if(!file.exists()){
                        return R.error(511,"找不到上传文件,请联系管理员");
                    }else{
                        List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
                        dataList.remove(0);//删除第一行,因为第一行是提示
                        for(List<String> data:dataList){
                            //循环
                            XiangmuEntity xiangmuEntity = new XiangmuEntity();
//                            xiangmuEntity.setXiangmuUuidNumber(data.get(0));                    //项目编号 要改的
//                            xiangmuEntity.setXiangmuName(data.get(0));                    //项目名称 要改的
//                            xiangmuEntity.setXiangmuTypes(Integer.valueOf(data.get(0)));   //项目类型 要改的
//                            xiangmuEntity.setXiangmuJingfei(data.get(0));                    //项目经费 要改的
//                            xiangmuEntity.setXiangmuFile(data.get(0));                    //项目文件 要改的
//                            xiangmuEntity.setJiaoshiId(Integer.valueOf(data.get(0)));   //教师 要改的
//                            xiangmuEntity.setXiangmuChuangxin(data.get(0));                    //项目创新点 要改的
//                            xiangmuEntity.setXiangmuText(data.get(0));                    //项目实施方案 要改的
//                            xiangmuEntity.setXiangmuContent("");//详情和图片
//                            xiangmuEntity.setXiangmuYesnoTypes(Integer.valueOf(data.get(0)));   //申报状态 要改的
//                            xiangmuEntity.setXiangmuYesnoText(data.get(0));                    //申报结果 要改的
//                            xiangmuEntity.setXiangmuDelete(1);//逻辑删除字段
//                            xiangmuEntity.setInsertTime(date);//时间
//                            xiangmuEntity.setCreateTime(date);//时间
                            xiangmuList.add(xiangmuEntity);


                            //把要查询是否重复的字段放入map中
                                //项目编号
                                if(seachFields.containsKey("xiangmuUuidNumber")){
                                    List<String> xiangmuUuidNumber = seachFields.get("xiangmuUuidNumber");
                                    xiangmuUuidNumber.add(data.get(0));//要改的
                                }else{
                                    List<String> xiangmuUuidNumber = new ArrayList<>();
                                    xiangmuUuidNumber.add(data.get(0));//要改的
                                    seachFields.put("xiangmuUuidNumber",xiangmuUuidNumber);
                                }
                        }

                        //查询是否重复
                         //项目编号
                        List<XiangmuEntity> xiangmuEntities_xiangmuUuidNumber = xiangmuService.selectList(new EntityWrapper<XiangmuEntity>().in("xiangmu_uuid_number", seachFields.get("xiangmuUuidNumber")).eq("xiangmu_delete", 1));
                        if(xiangmuEntities_xiangmuUuidNumber.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(XiangmuEntity s:xiangmuEntities_xiangmuUuidNumber){
                                repeatFields.add(s.getXiangmuUuidNumber());
                            }
                            return R.error(511,"数据库的该表中的 [项目编号] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                        xiangmuService.insertBatch(xiangmuList);
                        return R.ok();
                    }
                }
            }
        }catch (Exception e){
            e.printStackTrace();
            return R.error(511,"批量插入数据异常,请联系管理员");
        }
    }
}

5.2 项目申报Service模块?

package com.service;

import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.XiangmuEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import java.util.List;

/**
 * 项目申报 服务类
 */
public interface XiangmuService extends IService<XiangmuEntity> {

    /**
    * @param params 查询参数
    * @return 带分页的查询出来的数据
    */
     PageUtils queryPage(Map<String, Object> params);

}

5.3 项目申报ServiceImpl模块

package com.service.impl;

import com.utils.StringUtil;
import com.service.DictionaryService;
import com.utils.ClazzDiff;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.lang.reflect.Field;
import java.util.*;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.transaction.annotation.Transactional;
import com.utils.PageUtils;
import com.utils.Query;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import com.dao.XiangmuDao;
import com.entity.XiangmuEntity;
import com.service.XiangmuService;
import com.entity.view.XiangmuView;

/**
 * 项目申报 服务实现类
 */
@Service("xiangmuService")
@Transactional
public class XiangmuServiceImpl extends ServiceImpl<XiangmuDao, XiangmuEntity> implements XiangmuService {

    @Override
    public PageUtils queryPage(Map<String,Object> params) {
        Page<XiangmuView> page =new Query<XiangmuView>(params).getPage();
        page.setRecords(baseMapper.selectListView(page,params));
        return new PageUtils(page);
    }
}

5.4?项目申报Dao模块

package com.dao;

import com.entity.XiangmuEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;

import org.apache.ibatis.annotations.Param;
import com.entity.view.XiangmuView;

/**
 * 项目申报 Dao 接口
 *
 * @author 
 */
public interface XiangmuDao extends BaseMapper<XiangmuEntity> {

   List<XiangmuView> selectListView(Pagination page,@Param("params")Map<String,Object> params);

}

6、论文目录结构

7、源码获取

感谢大家的阅读,如有不懂的问题可以评论区交流或私聊!

喜欢文章可以点赞、收藏、关注、评论

获取源码请私信

文章来源:https://blog.csdn.net/m0_74181697/article/details/135072730
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。