计算机毕业设计 基于SpringBoot的物资管理信息系统的设计与实现 Java实战项目 附源码+文档+视频讲解

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

目录

1、项目介绍及开发技术

1.1 项目介绍

1.2 开发技术

2、系统功能设计结构图

3、功能截图

3.1 前台功能

3.2 后台功能

4、数据库表结构设计

5、关键代码

5.1 物资管理Controller模块 

5.2 物资管理Service模块 

5.3 物资管理ServiceImpl模块

5.4 物资管理Dao模块

6、论文目录结构

7、源码获取


1、项目介绍及开发技术

1.1 项目介绍

当前的网络技术,软件技术等都具备成熟的理论基础,市场上也出现各种技术开发的软件,这些软件都被用于各个领域,包括生活和工作的领域。随着电脑和笔记本的广泛运用,以及各种计算机硬件的完善和升级,市面上的电脑和笔记本的性能都得到提升,可以支持的软件也逐渐增多,因此,在计算机上安装软件来发挥其高效地信息处理的作用,则很受人们的青睐。对于物资管理信息系统信息来讲,通过手工形式处理,在面对庞大的信息数量时,就显得不适宜了,首先需要花费的时间比较多,其次数据出错率比较高,而且对错误的数据进行更改也比较困难,最后,检索数据费事费力。因此,为了解决上述问题,有必要建立物资管理信息系统,来规范物资管理信息系统信息管理流程,让管理工作可以系统化和程序化,同时,物资管理信息系统的有效运用可以帮助管理人员准确快速地处理信息。

物资管理信息系统可以对系统信息进行集中管理,可以真正避免传统管理的缺陷。管理信息系统是一款运用软件开发技术设计实现的应用系统,在信息处理上可以达到快速的目的,不管是针对数据添加,数据维护和统计,以及数据查询等处理要求,物资管理信息系统都可以轻松应对。所以,物资管理信息系统的运用是让系统信息管理升级的最好方式。它可以实现信息处理的便利化要求,还可以规范信息处理的流程,让事务处理成为管理人员手中的一件简单事,而不是之前手工处理时的困难事。尽管该系统具备较完善的功能,但是也需要管理人员利用闲暇时间提升自身素质以及个人能力,在操作系统时可以最大化运用物资管理信息系统提供的功能,让系统在满足高效率处理数据的同时,也能始终稳定运行,还可以确保数据的可靠性与数据处理的质量。

1.2 开发技术

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

2、系统功能设计结构图

3、功能截图

3.1 前台功能

登录

首页

物资

 论坛

 意见反馈

通知公告

 个人中心

3.2 后台功能

登录

首页

物资管理

出入库管理

物资申请管理

出入库管理

论坛管理

4、数据库表结构设计

CREATE TABLE `config` (`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',`name` varchar(100) NOT NULL COMMENT '配置参数名称',`value` varchar(100) DEFAULT NULL COMMENT '配置参数值',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COMMENT='配置文件';/*Data for the table `config` */insert  into `config`(`id`,`name`,`value`) values (1,'轮播图1','upload/config1.jpg'),(2,'轮播图2','upload/config2.jpg'),(3,'轮播图3','upload/config3.jpg');/*Table structure for table `dictionary` */DROP TABLE IF EXISTS `dictionary`;CREATE TABLE `dictionary` (`id` int(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=16 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,'fangyiwuzi_types','物资类型',1,'物资类型1',NULL,NULL,'2023-02-20 16:15:12'),(2,'fangyiwuzi_types','物资类型',2,'物资类型2',NULL,NULL,'2023-02-20 16:15:12'),(3,'fangyiwuzi_types','物资类型',3,'物资类型3',NULL,NULL,'2023-02-20 16:15:12'),(4,'fangyiwuzi_churu_inout_types','出入库类型',1,'出库',NULL,NULL,'2023-02-20 16:15:12'),(5,'fangyiwuzi_churu_inout_types','出入库类型',2,'入库',NULL,NULL,'2023-02-20 16:15:12'),(6,'fangyiwuzi_yuyue_yesno_types','申请状态',1,'已申请',NULL,NULL,'2023-02-20 16:15:12'),(7,'fangyiwuzi_yuyue_yesno_types','申请状态',2,'已同意',NULL,NULL,'2023-02-20 16:15:12'),(8,'fangyiwuzi_yuyue_yesno_types','申请状态',3,'已拒绝',NULL,NULL,'2023-02-20 16:15:12'),(9,'news_types','公告类型',1,'公告类型1',NULL,NULL,'2023-02-20 16:15:13'),(10,'news_types','公告类型',2,'公告类型2',NULL,NULL,'2023-02-20 16:15:13'),(11,'news_types','公告类型',3,'公告类型3',NULL,NULL,'2023-02-20 16:15:13'),(12,'sex_types','性别',1,'男',NULL,NULL,'2023-02-20 16:15:13'),(13,'sex_types','性别',2,'女',NULL,NULL,'2023-02-20 16:15:13'),(14,'forum_state_types','帖子状态',1,'发帖',NULL,NULL,'2023-02-20 16:15:13'),(15,'forum_state_types','帖子状态',2,'回帖',NULL,NULL,'2023-02-20 16:15:13');/*Table structure for table `fangyiwuzi` */DROP TABLE IF EXISTS `fangyiwuzi`;CREATE TABLE `fangyiwuzi` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',`fangyiwuzi_uuid_number` varchar(200) DEFAULT NULL COMMENT '物资编号',`fangyiwuzi_name` varchar(200) DEFAULT NULL COMMENT '物资名称  Search111 ',`fangyiwuzi_photo` varchar(200) DEFAULT NULL COMMENT '物资图片',`fangyiwuzi_types` int(11) DEFAULT NULL COMMENT '物资类型 Search111',`fangyiwuzi_kucun_number` int(11) DEFAULT NULL COMMENT '物资库存',`fangyiwuzi_content` text COMMENT '物资介绍 ',`fangyiwuzi_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',`insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间  show1 show2 photoShow homeMain',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='物资';/*Data for the table `fangyiwuzi` */insert  into `fangyiwuzi`(`id`,`fangyiwuzi_uuid_number`,`fangyiwuzi_name`,`fangyiwuzi_photo`,`fangyiwuzi_types`,`fangyiwuzi_kucun_number`,`fangyiwuzi_content`,`fangyiwuzi_delete`,`insert_time`,`create_time`) values (1,'1676880958984','物资名称1','upload/fangyiwuzi1.jpg',2,101,'物资介绍1',1,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(2,'1676880958945','物资名称2','upload/fangyiwuzi2.jpg',3,102,'物资介绍2',1,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(3,'1676880958980','物资名称3','upload/fangyiwuzi3.jpg',1,102,'物资介绍3',1,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(4,'1676880958931','物资名称4','upload/fangyiwuzi4.jpg',2,103,'物资介绍4',1,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(5,'1676880959014','物资名称5','upload/fangyiwuzi5.jpg',2,101,'物资介绍5',1,'2023-02-20 16:15:58','2023-02-20 16:15:58');/*Table structure for table `fangyiwuzi_churu_inout` */DROP TABLE IF EXISTS `fangyiwuzi_churu_inout`;CREATE TABLE `fangyiwuzi_churu_inout` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`fangyiwuzi_churu_inout_uuid_number` varchar(200) DEFAULT NULL COMMENT '出入库流水号',`fangyiwuzi_churu_inout_name` varchar(200) DEFAULT NULL COMMENT '出入库名称  Search111 ',`fangyiwuzi_churu_inout_types` int(11) DEFAULT NULL COMMENT '出入库类型  Search111 ',`fangyiwuzi_churu_inout_content` text COMMENT '备注',`insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='出入库';/*Data for the table `fangyiwuzi_churu_inout` */insert  into `fangyiwuzi_churu_inout`(`id`,`fangyiwuzi_churu_inout_uuid_number`,`fangyiwuzi_churu_inout_name`,`fangyiwuzi_churu_inout_types`,`fangyiwuzi_churu_inout_content`,`insert_time`,`create_time`) values (1,'1676880958934','出入库名称1',2,'备注1','2023-02-20 16:15:58','2023-02-20 16:15:58'),(2,'1676880959010','出入库名称2',1,'备注2','2023-02-20 16:15:58','2023-02-20 16:15:58'),(3,'1676880958961','出入库名称3',2,'备注3','2023-02-20 16:15:58','2023-02-20 16:15:58'),(4,'1676880958971','出入库名称4',2,'备注4','2023-02-20 16:15:58','2023-02-20 16:15:58'),(5,'1676880958985','出入库名称5',2,'备注5','2023-02-20 16:15:58','2023-02-20 16:15:58'),(6,'1676892754840','出库1111',1,'','2023-02-20 19:32:35','2023-02-20 19:32:35');/*Table structure for table `fangyiwuzi_churu_inout_list` */DROP TABLE IF EXISTS `fangyiwuzi_churu_inout_list`;CREATE TABLE `fangyiwuzi_churu_inout_list` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`fangyiwuzi_churu_inout_id` int(11) DEFAULT NULL COMMENT '出入库',`fangyiwuzi_id` int(11) DEFAULT NULL COMMENT '物资',`fangyiwuzi_churu_inout_list_number` 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=9 DEFAULT CHARSET=utf8 COMMENT='出入库详情';/*Data for the table `fangyiwuzi_churu_inout_list` */insert  into `fangyiwuzi_churu_inout_list`(`id`,`fangyiwuzi_churu_inout_id`,`fangyiwuzi_id`,`fangyiwuzi_churu_inout_list_number`,`insert_time`,`create_time`) values (1,1,1,415,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(2,2,2,472,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(3,3,3,58,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(4,4,4,438,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(5,5,5,169,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(6,6,3,1,'2023-02-20 19:32:35','2023-02-20 19:32:35'),(7,6,4,1,'2023-02-20 19:32:35','2023-02-20 19:32:35'),(8,6,5,1,'2023-02-20 19:32:35','2023-02-20 19:32:35');/*Table structure for table `fangyiwuzi_yuyue` */DROP TABLE IF EXISTS `fangyiwuzi_yuyue`;CREATE TABLE `fangyiwuzi_yuyue` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`fangyiwuzi_id` int(11) DEFAULT NULL COMMENT '物资',`yonghu_id` int(11) DEFAULT NULL COMMENT '用户',`fangyiwuzi_yuyue_number` int(11) DEFAULT NULL COMMENT '申请数量',`fangyiwuzi_yuyue_yesno_types` int(11) DEFAULT NULL COMMENT '申请状态 Search111',`fangyiwuzi_yuyue_yesno_text` text COMMENT '申请结果',`insert_time` timestamp NULL DEFAULT NULL COMMENT '申请时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show3 listShow',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COMMENT='物资申请';/*Data for the table `fangyiwuzi_yuyue` */insert  into `fangyiwuzi_yuyue`(`id`,`fangyiwuzi_id`,`yonghu_id`,`fangyiwuzi_yuyue_number`,`fangyiwuzi_yuyue_yesno_types`,`fangyiwuzi_yuyue_yesno_text`,`insert_time`,`create_time`) values (1,1,1,236,1,NULL,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(2,2,2,233,1,NULL,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(3,3,1,220,1,NULL,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(4,4,2,54,1,NULL,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(5,5,1,275,1,NULL,'2023-02-20 16:15:58','2023-02-20 16:15:58'),(7,5,1,3,2,'123123','2023-02-20 19:15:54','2023-02-20 19:15:54');/*Table structure for table `forum` */DROP TABLE IF EXISTS `forum`;CREATE TABLE `forum` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`forum_name` varchar(200) DEFAULT NULL COMMENT '帖子标题  Search111 ',`yonghu_id` int(11) DEFAULT NULL COMMENT '用户',`users_id` int(11) DEFAULT NULL COMMENT '管理员',`forum_phone` varchar(200) DEFAULT NULL COMMENT '图片',`forum_content` text COMMENT '发布内容',`super_ids` int(11) DEFAULT NULL COMMENT '父id',`forum_state_types` int(11) DEFAULT NULL COMMENT '帖子状态',`insert_time` timestamp NULL DEFAULT NULL COMMENT '发帖时间',`update_time` timestamp NULL DEFAULT NULL COMMENT '修改时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show2',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='论坛';/*Data for the table `forum` */insert  into `forum`(`id`,`forum_name`,`yonghu_id`,`users_id`,`forum_phone`,`forum_content`,`super_ids`,`forum_state_types`,`insert_time`,`update_time`,`create_time`) values (1,'帖子标题1',3,NULL,'17703786901','发布内容1',284,1,'2023-02-20 16:15:58','2023-02-20 16:15:58','2023-02-20 16:15:58'),(2,'帖子标题2',3,NULL,'17703786902','发布内容2',366,1,'2023-02-20 16:15:58','2023-02-20 16:15:58','2023-02-20 16:15:58'),(3,'帖子标题3',3,NULL,'17703786903','发布内容3',143,1,'2023-02-20 16:15:58','2023-02-20 16:15:58','2023-02-20 16:15:58'),(4,'帖子标题4',1,NULL,'17703786904','发布内容4',126,1,'2023-02-20 16:15:58','2023-02-20 16:15:58','2023-02-20 16:15:58'),(5,'帖子标题5',1,NULL,'17703786905','发布内容5',217,1,'2023-02-20 16:15:58','2023-02-20 16:15:58','2023-02-20 16:15:58');/*Table structure for table `liuyan` */DROP TABLE IF EXISTS `liuyan`;CREATE TABLE `liuyan` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',`yonghu_id` int(11) DEFAULT NULL COMMENT '用户',`liuyan_name` varchar(200) DEFAULT NULL COMMENT '标题  Search111 ',`liuyan_text` text COMMENT '反馈内容',`insert_time` timestamp NULL DEFAULT NULL COMMENT '反馈时间',`reply_text` text COMMENT '回复内容',`update_time` timestamp NULL DEFAULT NULL COMMENT '回复时间',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show2 nameShow',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='意见反馈';/*Data for the table `liuyan` */insert  into `liuyan`(`id`,`yonghu_id`,`liuyan_name`,`liuyan_text`,`insert_time`,`reply_text`,`update_time`,`create_time`) values (1,1,'标题1','反馈内容1','2023-02-20 16:15:58','回复信息1','2023-02-20 16:15:58','2023-02-20 16:15:58'),(2,2,'标题2','反馈内容2','2023-02-20 16:15:58','回复信息2','2023-02-20 16:15:58','2023-02-20 16:15:58'),(3,2,'标题3','反馈内容3','2023-02-20 16:15:58','回复信息3','2023-02-20 16:15:58','2023-02-20 16:15:58'),(4,2,'标题4','反馈内容4','2023-02-20 16:15:58','回复信息4','2023-02-20 16:15:58','2023-02-20 16:15:58'),(5,1,'标题5','反馈内容5','2023-02-20 16:15:58','回复信息5','2023-02-20 16:15:58','2023-02-20 16:15:58');/*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` text COMMENT '公告详情',`create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show1 show2 nameShow',PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 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-02-20 16:15:58','公告详情1','2023-02-20 16:15:58'),(2,'公告标题2',2,'upload/news2.jpg','2023-02-20 16:15:58','公告详情2','2023-02-20 16:15:58'),(3,'公告标题3',2,'upload/news3.jpg','2023-02-20 16:15:58','公告详情3','2023-02-20 16:15:58'),(4,'公告标题4',2,'upload/news4.jpg','2023-02-20 16:15:58','公告详情4','2023-02-20 16:15:58'),(5,'公告标题5',1,'upload/news5.jpg','2023-02-20 16:15:58','公告详情5','2023-02-20 16:15:58');/*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=3 DEFAULT CHARSET=utf8 COMMENT='token表';/*Data for the table `token` */insert  into `token`(`id`,`userid`,`username`,`tablename`,`role`,`token`,`addtime`,`expiratedtime`) values (1,1,'a1','yonghu','用户','oj7mjdjmmr57wlterrq4xeth59ej8kq8','2023-02-20 16:26:01','2023-02-20 20:22:12'),(2,1,'admin','users','管理员','k9djgmu3kbs1kegkstjx53lqvne91uwx','2023-02-20 16:26:16','2023-02-20 20:30:44');/*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','管理员','2022-05-01 00:00:00');/*Table structure for table `yonghu` */DROP TABLE IF EXISTS `yonghu`;CREATE TABLE `yonghu` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',`username` varchar(200) DEFAULT NULL COMMENT '账户',`password` varchar(200) DEFAULT NULL COMMENT '密码',`yonghu_name` varchar(200) DEFAULT NULL COMMENT '用户姓名 Search111 ',`sex_types` int(11) DEFAULT NULL COMMENT '性别 Search111',`yonghu_photo` varchar(200) DEFAULT NULL COMMENT '用户头像',`yonghu_id_number` varchar(200) DEFAULT NULL COMMENT '身份证号',`yonghu_phone` varchar(200) DEFAULT NULL COMMENT '联系方式',`yonghu_email` varchar(200) DEFAULT NULL COMMENT '电子邮箱',`yonghu_address` varchar(200) DEFAULT NULL COMMENT '地址',`yonghu_delete` int(11) 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`,`username`,`password`,`yonghu_name`,`sex_types`,`yonghu_photo`,`yonghu_id_number`,`yonghu_phone`,`yonghu_email`,`yonghu_address`,`yonghu_delete`,`create_time`) values (1,'a1','123456','用户姓名1',2,'upload/yonghu1.jpg','410224199010102001','17703786901','1@qq.com','地址1',1,'2023-02-20 16:15:58'),(2,'a2','123456','用户姓名2',2,'upload/yonghu2.jpg','410224199010102002','17703786902','2@qq.com','地址2',1,'2023-02-20 16:15:58'),(3,'a3','123456','用户姓名3',2,'upload/yonghu3.jpg','410224199010102003','17703786903','3@qq.com','地址3',1,'2023-02-20 16:15:58');/*!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("/fangyiwuzi")
public class FangyiwuziController {private static final Logger logger = LoggerFactory.getLogger(FangyiwuziController.class);private static final String TABLE_NAME = "fangyiwuzi";@Autowiredprivate FangyiwuziService fangyiwuziService;@Autowiredprivate TokenService tokenService;@Autowiredprivate DictionaryService dictionaryService;//级联表非注册的service//注册表service@Autowiredprivate YonghuService yonghuService;/*** 后端列表*/@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"));params.put("fangyiwuziDeleteStart",1);params.put("fangyiwuziDeleteEnd",1);CommonUtil.checkMap(params);PageUtils page = fangyiwuziService.queryPage(params);//字典表数据转换List<FangyiwuziView> list =(List<FangyiwuziView>)page.getList();for(FangyiwuziView 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);FangyiwuziEntity fangyiwuzi = fangyiwuziService.selectById(id);if(fangyiwuzi !=null){//entity转viewFangyiwuziView view = new FangyiwuziView();BeanUtils.copyProperties( fangyiwuzi , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 后端保存*/@RequestMapping("/save")public R save(@RequestBody FangyiwuziEntity fangyiwuzi, HttpServletRequest request){logger.debug("save方法:,,Controller:{},,fangyiwuzi:{}",this.getClass().getName(),fangyiwuzi.toString());String role = String.valueOf(request.getSession().getAttribute("role"));if(false)return R.error(511,"永远不会进入");Wrapper<FangyiwuziEntity> queryWrapper = new EntityWrapper<FangyiwuziEntity>().eq("fangyiwuzi_name", fangyiwuzi.getFangyiwuziName()).eq("fangyiwuzi_types", fangyiwuzi.getFangyiwuziTypes()).eq("fangyiwuzi_kucun_number", fangyiwuzi.getFangyiwuziKucunNumber()).eq("fangyiwuzi_delete", fangyiwuzi.getFangyiwuziDelete());logger.info("sql语句:"+queryWrapper.getSqlSegment());FangyiwuziEntity fangyiwuziEntity = fangyiwuziService.selectOne(queryWrapper);if(fangyiwuziEntity==null){fangyiwuzi.setFangyiwuziDelete(1);fangyiwuzi.setInsertTime(new Date());fangyiwuzi.setCreateTime(new Date());fangyiwuziService.insert(fangyiwuzi);return R.ok();}else {return R.error(511,"表中有相同数据");}}/*** 后端修改*/@RequestMapping("/update")public R update(@RequestBody FangyiwuziEntity fangyiwuzi, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {logger.debug("update方法:,,Controller:{},,fangyiwuzi:{}",this.getClass().getName(),fangyiwuzi.toString());FangyiwuziEntity oldFangyiwuziEntity = fangyiwuziService.selectById(fangyiwuzi.getId());//查询原先数据String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");//根据字段查询是否有相同数据Wrapper<FangyiwuziEntity> queryWrapper = new EntityWrapper<FangyiwuziEntity>().notIn("id",fangyiwuzi.getId()).andNew().eq("fangyiwuzi_name", fangyiwuzi.getFangyiwuziName()).eq("fangyiwuzi_types", fangyiwuzi.getFangyiwuziTypes()).eq("fangyiwuzi_kucun_number", fangyiwuzi.getFangyiwuziKucunNumber()).eq("fangyiwuzi_delete", fangyiwuzi.getFangyiwuziDelete());logger.info("sql语句:"+queryWrapper.getSqlSegment());FangyiwuziEntity fangyiwuziEntity = fangyiwuziService.selectOne(queryWrapper);if("".equals(fangyiwuzi.getFangyiwuziPhoto()) || "null".equals(fangyiwuzi.getFangyiwuziPhoto())){fangyiwuzi.setFangyiwuziPhoto(null);}if(fangyiwuziEntity==null){fangyiwuziService.updateById(fangyiwuzi);//根据id更新return R.ok();}else {return R.error(511,"表中有相同数据");}}/*** 删除*/@RequestMapping("/delete")public R delete(@RequestBody Integer[] ids, HttpServletRequest request){logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());List<FangyiwuziEntity> oldFangyiwuziList =fangyiwuziService.selectBatchIds(Arrays.asList(ids));//要删除的数据ArrayList<FangyiwuziEntity> list = new ArrayList<>();for(Integer id:ids){FangyiwuziEntity fangyiwuziEntity = new FangyiwuziEntity();fangyiwuziEntity.setId(id);fangyiwuziEntity.setFangyiwuziDelete(2);list.add(fangyiwuziEntity);}if(list != null && list.size() >0){fangyiwuziService.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");try {List<FangyiwuziEntity> fangyiwuziList = 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){//循环FangyiwuziEntity fangyiwuziEntity = new FangyiwuziEntity();fangyiwuziEntity.setFangyiwuziUuidNumber(data.get(0));                    //物资编号 要改的fangyiwuziEntity.setFangyiwuziName(data.get(1));                    //物资名称 要改的fangyiwuziEntity.setFangyiwuziPhoto("");//详情和图片fangyiwuziEntity.setFangyiwuziTypes(Integer.valueOf(data.get(2)));   //物资类型 要改的fangyiwuziEntity.setFangyiwuziKucunNumber(Integer.valueOf(data.get(3)));   //物资库存 要改的fangyiwuziEntity.setFangyiwuziContent("");//详情和图片fangyiwuziEntity.setFangyiwuziDelete(1);//逻辑删除字段fangyiwuziEntity.setInsertTime(date);//时间fangyiwuziEntity.setCreateTime(date);//时间fangyiwuziList.add(fangyiwuziEntity);//把要查询是否重复的字段放入map中//物资编号if(seachFields.containsKey("fangyiwuziUuidNumber")){List<String> fangyiwuziUuidNumber = seachFields.get("fangyiwuziUuidNumber");fangyiwuziUuidNumber.add(data.get(0));//要改的}else{List<String> fangyiwuziUuidNumber = new ArrayList<>();fangyiwuziUuidNumber.add(data.get(0));//要改的seachFields.put("fangyiwuziUuidNumber",fangyiwuziUuidNumber);}}//查询是否重复//物资编号List<FangyiwuziEntity> fangyiwuziEntities_fangyiwuziUuidNumber = fangyiwuziService.selectList(new EntityWrapper<FangyiwuziEntity>().in("fangyiwuzi_uuid_number", seachFields.get("fangyiwuziUuidNumber")).eq("fangyiwuzi_delete", 1));if(fangyiwuziEntities_fangyiwuziUuidNumber.size() >0 ){ArrayList<String> repeatFields = new ArrayList<>();for(FangyiwuziEntity s:fangyiwuziEntities_fangyiwuziUuidNumber){repeatFields.add(s.getFangyiwuziUuidNumber());}return R.error(511,"数据库的该表中的 [物资编号] 字段已经存在 存在数据为:"+repeatFields.toString());}fangyiwuziService.insertBatch(fangyiwuziList);return R.ok();}}}}catch (Exception e){e.printStackTrace();return R.error(511,"批量插入数据异常,请联系管理员");}}/*** 前端列表*/@IgnoreAuth@RequestMapping("/list")public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));CommonUtil.checkMap(params);PageUtils page = fangyiwuziService.queryPage(params);//字典表数据转换List<FangyiwuziView> list =(List<FangyiwuziView>)page.getList();for(FangyiwuziView c:list)dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段return R.ok().put("data", page);}/*** 前端详情*/@RequestMapping("/detail/{id}")public R detail(@PathVariable("id") Long id, HttpServletRequest request){logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);FangyiwuziEntity fangyiwuzi = fangyiwuziService.selectById(id);if(fangyiwuzi !=null){//entity转viewFangyiwuziView view = new FangyiwuziView();BeanUtils.copyProperties( fangyiwuzi , view );//把实体数据重构到view中//修改对应字典表字段dictionaryService.dictionaryConvert(view, request);return R.ok().put("data", view);}else {return R.error(511,"查不到数据");}}/*** 前端保存*/@RequestMapping("/add")public R add(@RequestBody FangyiwuziEntity fangyiwuzi, HttpServletRequest request){logger.debug("add方法:,,Controller:{},,fangyiwuzi:{}",this.getClass().getName(),fangyiwuzi.toString());Wrapper<FangyiwuziEntity> queryWrapper = new EntityWrapper<FangyiwuziEntity>().eq("fangyiwuzi_uuid_number", fangyiwuzi.getFangyiwuziUuidNumber()).eq("fangyiwuzi_name", fangyiwuzi.getFangyiwuziName()).eq("fangyiwuzi_types", fangyiwuzi.getFangyiwuziTypes()).eq("fangyiwuzi_kucun_number", fangyiwuzi.getFangyiwuziKucunNumber()).eq("fangyiwuzi_delete", fangyiwuzi.getFangyiwuziDelete());logger.info("sql语句:"+queryWrapper.getSqlSegment());FangyiwuziEntity fangyiwuziEntity = fangyiwuziService.selectOne(queryWrapper);if(fangyiwuziEntity==null){fangyiwuzi.setFangyiwuziDelete(1);fangyiwuzi.setInsertTime(new Date());fangyiwuzi.setCreateTime(new Date());fangyiwuziService.insert(fangyiwuzi);return R.ok();}else {return R.error(511,"表中有相同数据");}}
}

5.2 物资管理Service模块 

/*** 物资 服务类*/
public interface FangyiwuziService extends IService<FangyiwuziEntity> {/*** @param params 查询参数* @return 带分页的查询出来的数据*/PageUtils queryPage(Map<String, Object> params);
}

5.3 物资管理ServiceImpl模块

/*** 物资 服务实现类*/
@Service("fangyiwuziService")
@Transactional
public class FangyiwuziServiceImpl extends ServiceImpl<FangyiwuziDao, FangyiwuziEntity> implements FangyiwuziService {@Overridepublic PageUtils queryPage(Map<String,Object> params) {Page<FangyiwuziView> page =new Query<FangyiwuziView>(params).getPage();page.setRecords(baseMapper.selectListView(page,params));return new PageUtils(page);}}

5.4 物资管理Dao模块

/*** 物资 Dao 接口** @author 学长编程*  Wechat jsjbysj88*/
public interface FangyiwuziDao extends BaseMapper<FangyiwuziEntity> {List<FangyiwuziView> selectListView(Pagination page,@Param("params")Map<String,Object> params);}

6、论文目录结构

7、源码获取

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

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

获取源码请私信

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/227977.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

nginx_rtmp_module 之 ngx_rtmp_live_module模块

模块作用 直播模块代码 ngx_rtmp_live_module.c&#xff0c;主要作用是&#xff1a;当客户端推流或者拉流的时候&#xff0c;创建的rtmp session会加入到 live 模块的存储链表中。 模块配置命令 static ngx_command_t ngx_rtmp_live_commands[] {{ ngx_string("live&…

SQL规约

文章目录 前言SQL规约-索引注意字段类型利用覆盖索引利用有序性禁模糊 超过三个表禁止 joinSQL规约-count拒绝替代计算不重复行数当值全是NULL时 SQL规约-分页若 count 为 0优化超多分页场景 SQL规约-null值使用 ISNULL()来判断是否为 NULL 值NULL< >NULLNULLNULLNULL<…

vue3 插槽slot

插槽是子组件中的提供给父组件使用的一个占位符&#xff0c;用 <slot> 表示&#xff0c;父组件可以在这个占位符中填充任何模板代码&#xff0c;如 HTML、组件等&#xff0c;填充的内容会替换子组件的<slot> 元素。<slot> 元素是一个插槽出口 (slot outlet)&…

蓝桥杯专题-真题版含答案-【骑士走棋盘】【阿姆斯壮数】【Shell 排序法 - 改良的插入排序】【合并排序法】

Unity3D特效百例案例项目实战源码Android-Unity实战问题汇总游戏脚本-辅助自动化Android控件全解手册再战Android系列Scratch编程案例软考全系列Unity3D学习专栏蓝桥系列ChatGPT和AIGC &#x1f449;关于作者 专注于Android/Unity和各种游戏开发技巧&#xff0c;以及各种资源分…

李宏毅机器学习2023课程记录(1)--课程介绍

李宏毅机器学习2023课程记录(1)–课程介绍 在这里&#xff0c;记录我最近听的李宏毅老师的机器学习课程的一些笔记和感想&#xff0c;进行归纳总结同时方便后续复习回顾。 注&#xff1a;这门课虽然叫做机器学习&#xff0c;但是李宏毅老师讲课主要以深度学习的技术&#xff0…

接口-幂等性问题

1.什么是接口的幂等性&#xff1f; 接口的幂等性就是一个接口无论是调用一次还是多次&#xff0c;最后的结果应该是一样的。2.为何需要保证接口的幂等性&#xff1f; 因为服务之间调用&#xff0c;可能存在超时。如果是成功或者失败&#xff0c;那么程序都是正常的。当出现超…

10 在Vue3中使用SCSS编写样式

概述 When using Vue components, the Vite compiler allows you to use almost any frontend templating language style. The easiest way to enable these expressive library plugins in your Vue templates is to install them when you initialize your project, or by …

在Node.js中MongoDB的连接查询操作

本文主要介绍在Node.js中MongoDB的连接查询操作。 目录 Node.js中MongoDB的连接查询操作使用原生的mongodb驱动程序进行连接查询操作使用Mongoose库进行连接查询操作注意项 Node.js中MongoDB的连接查询操作 在Node.js中使用MongoDB进行连接操作&#xff0c;可以使用原生的mong…

条款27:尽量少做转型动作

1.前言 C规则的设计目标之一是保证“类型错误”绝对不可能发生。理论上如果你的程序很顺利的通过编译&#xff0c;就表示它并不企图在任何对象身上执行任何不安全&#xff0c;无意义的操作。这是个极具价值的保证&#xff0c;可别草率的放弃它。 不幸的是&#xff0c;转型&am…

AOP切入点表达式和使用连接点获取匹配到的方法信息

目录 第一种 execution(访问修饰符? 返回值 包名.类名.?方法名(方法参数) throws 异常?) 第二种 annotation(com.itheima.anno.Log 首先&#xff0c;自定义一个注解&#xff0c;可以自己随意命名&#xff1a; 第一种 execution(访问修饰符? 返回值 包名.类名.?方法名…

Explain工具-SQL性能优化

文章目录 SQL性能优化的目标Explain中type效率级别&#xff08;重要&#xff09;注意 Explain覆盖索引ExplainindexExplainfilesortExplainfilesort创建 idx_bd(b,d) SQL性能优化的目标 达到 range 级别 Explain中type效率级别&#xff08;重要&#xff09; 显示的是单位查询…

工作流JBPM笔记:了解JBPM

一、什么是工作流 工作流管理联盟&#xff08;WFMC&#xff09;把工作流定义为&#xff1a;全部或部分由计算机支持或自动处理的业务过程。 工作流管理系统&#xff08;Workflow Management System&#xff0c;WFMS&#xff09;用来支持流程定义、管理和执行一批设定好的工作…

pytorch强化学习(1)——DQNSARSA

实验环境 python3.10 torch2.1.1 gym0.26.2 gym[classic_control] matplotlib3.8.0 numpy1.26.2DQN代码 首先是module.py代码&#xff0c;在这里定义了网络模型和DQN模型 import torch import torch.nn as nn import numpy as npclass Net(nn.Module):# 构造只有一个隐含层的…

Qt容器QToolBox工具箱

# QToolBox QToolBox是Qt框架中的一个窗口容器类,常用的几个函数有: ​setCurrentIndex(int index):设置当前显示的页面索引。可以通过调用该函数,将指定索引的页面设置为当前显示的页面。 addItem(QWidget * widget, const QString & text):向QToolBox中添加一个页面…

Flink系列之:分组聚合

Flink系列之&#xff1a;分组聚合 一、DISTINCT 聚合二、GROUPING SETS三、ROLLUP四、CUBE五、HAVING 适用于流、批 像大多数数据系统一样&#xff0c;Apache Flink支持聚合函数&#xff1b;包括内置的和用户定义的。用户自定义函数在使用前必须在目录中注册。 聚合函数把多行…

flutter学习-day10-布局类组件

&#x1f4da; 目录 介绍布局原理和约束盒模型布局 约束容器ConstrainedBox非约束容器UnconstrainedBox 线性布局 行row列column 弹性布局流式布局 WrapFlow 层叠布局对齐和相对定位布局构建回调 LayoutBuilder布局过程中AfterLayout布局完成后执行 本文学习和引用自《Flutte…

LLM大语言模型(二):Streamlit 无需前端经验也能画web页面

目录 问题 Streamlit是什么&#xff1f; 怎样用Streamlit画一个LLM的web页面呢&#xff1f; 文本输出 页面布局 滑动条 按钮 对话框 输入框 总结 问题 假如你是一位后端开发&#xff0c;没有任何的web开发经验&#xff0c;那如何去实现一个LLM的对话交互页面呢&…

Python MySQL数据库连接与基本使用

一、应用场景 python项目连接MySQL数据库时&#xff0c;需要第三方库的支持。这篇文章使用的是PyMySQL库&#xff0c;适用于python3.x。 二、安装 pip install PyMySQL三、使用方法 导入模块 import pymysql连接数据库 db pymysql.connect(hostlocalhost,usercode_space…

Spring MVC开发流程

1.Spring MVC环境基本配置 Maven工程依赖spring-webmvc <dependency><groupId>org.springframework</groupId><artifactId>spring-webmvc</artifactId><version>5.1.9.RELEASE</version> </dependency>web.xml配置Dispatche…

NSSCTF第16页(2)

[NSSRound#4 SWPU]1zweb(revenge) 查看index.php <?php class LoveNss{public $ljt;public $dky;public $cmd;public function __construct(){$this->ljt"ljt";$this->dky"dky";phpinfo();}public function __destruct(){if($this->ljt"…