计算机毕业设计 基于SpringBoot的高校危化试剂仓储管理系统的设计与实现 Java实战项目 附源码+文档+视频讲解

2023-12-29 04:51:44

博主介绍:?从事软件开发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 项目介绍

如今社会上各行各业,都喜欢用自己行业的专属软件工作,互联网发展到这个时候,人们已经发现离不开了互联网。新技术的产生,往往能解决一些老技术的弊端问题。因为传统高校危化试剂仓储系统信息管理难度大,容错率低,管理人员处理数据费工费时,所以专门为解决这个难题开发了一个高校危化试剂仓储系统管理系统,可以解决许多问题。高校危化试剂仓储系统管理系统按照操作主体分为管理员和用户。管理员的功能包括安全管理、存储管理、字典管理、公告资讯管理、试剂管理、出入库管理、出入库详情管理、使用记录管理、用户管理、管理员管理。用户的功能等。该系统采用了Mysql数据库,Java语言,Spring Boot框架等技术进行编程实现。高校危化试剂仓储系统管理系统可以提高高校危化试剂仓储系统信息管理问题的解决效率,优化高校危化试剂仓储系统信息处理流程,保证高校危化试剂仓储系统信息数据的安全,它是一个非常可靠,非常安全的应用程序。

1.2 开发技术

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

2、系统功能设计结构图

3、功能截图

登录

试剂

?使用

试剂管理:管理员在试剂管理界面中可以对界面中显示,可以对试剂信息的试剂状态进行查看,可以添加新的试剂信息等。

?使用管理:管理员在使用管理界面中查看使用种类信息,使用描述信息,新增使用信息等。

?公告管理:管理员在公告管理界面中新增公告,可以删除公告。

公告类型管理:管理员在公告类型管理界面查看公告的工作状态,可以对公告的数据进行导出,可以添加新公告的信息,可以编辑公告信息,删除公告信息。

4、数据库表结构设计

/*
SQLyog Ultimate v11.3 (64 bit)
MySQL - 5.7.32-log : Database - gxwhsjccxt
*********************************************************************
*/

/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`gxwhsjccxt` /*!40100 DEFAULT CHARACTER SET utf8 */;

USE `gxwhsjccxt`;

/*Table structure for table `anquan` */

DROP TABLE IF EXISTS `anquan`;

CREATE TABLE `anquan` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `shiji_id` int(11) DEFAULT NULL COMMENT '试剂',
  `anquan_uuid_number` varchar(200) DEFAULT NULL COMMENT '安全管理编号',
  `anquan_photo` varchar(200) DEFAULT NULL COMMENT '安全管理照片',
  `anquan_types` int(11) DEFAULT NULL COMMENT '危险程度 Search111',
  `anquan_kucun_number` int(11) DEFAULT NULL COMMENT '安全管理库存',
  `anquan_content` longtext COMMENT '操作规范 ',
  `anquan_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间  show1 show2 photoShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='安全';

/*Data for the table `anquan` */

insert  into `anquan`(`id`,`shiji_id`,`anquan_uuid_number`,`anquan_photo`,`anquan_types`,`anquan_kucun_number`,`anquan_content`,`anquan_delete`,`insert_time`,`create_time`) values (1,1,'1683771062645','upload/anquan1.jpg',3,101,'操作规范1',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(2,2,'1683771062635','upload/anquan2.jpg',2,102,'操作规范2',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(3,3,'1683771062639','upload/anquan3.jpg',1,103,'操作规范3',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(4,4,'1683771062709','upload/anquan4.jpg',3,104,'操作规范4',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(5,5,'1683771062716','upload/anquan5.jpg',3,105,'操作规范5',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(6,6,'1683771062683','upload/anquan6.jpg',3,106,'操作规范6',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(7,7,'1683771062677','upload/anquan7.jpg',1,107,'操作规范7',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(8,8,'1683771062647','upload/anquan8.jpg',1,108,'操作规范8',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(9,9,'1683771062674','upload/anquan9.jpg',2,109,'操作规范9',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(10,10,'1683771062726','upload/anquan10.jpg',4,1010,'操作规范10',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(11,11,'1683771062649','upload/anquan11.jpg',3,1011,'操作规范11',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(12,12,'1683771062722','upload/anquan12.jpg',4,1012,'操作规范12',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(13,13,'1683771062678','upload/anquan13.jpg',2,1013,'操作规范13',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(14,14,'1683771062666','upload/anquan14.jpg',2,1014,'操作规范14',1,'2023-05-11 10:11:02','2023-05-11 10:11:02');

/*Table structure for table `config` */

DROP TABLE IF EXISTS `config`;

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 DEFAULT CHARSET=utf8 COMMENT='配置文件';

/*Data for the table `config` */

/*Table structure for table `cunchu` */

DROP TABLE IF EXISTS `cunchu`;

CREATE TABLE `cunchu` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `shiji_id` int(11) DEFAULT NULL COMMENT '试剂',
  `cunchu_uuid_number` varchar(200) DEFAULT NULL COMMENT '存储编号',
  `cunchu_photo` varchar(200) DEFAULT NULL COMMENT '存储照片',
  `cunchu_address` varchar(200) DEFAULT NULL COMMENT '存储地点',
  `cunchu_types` int(11) DEFAULT NULL COMMENT '存储类型 Search111',
  `cunchu_content` longtext COMMENT '存储介绍 ',
  `cunchu_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间  show1 show2 photoShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='存储';

/*Data for the table `cunchu` */

insert  into `cunchu`(`id`,`shiji_id`,`cunchu_uuid_number`,`cunchu_photo`,`cunchu_address`,`cunchu_types`,`cunchu_content`,`cunchu_delete`,`insert_time`,`create_time`) values (1,1,'1683771062716','upload/cunchu1.jpg','存储地点1',1,'存储介绍1',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(2,2,'1683771062783','upload/cunchu2.jpg','存储地点2',2,'存储介绍2',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(3,3,'1683771062774','upload/cunchu3.jpg','存储地点3',4,'存储介绍3',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(4,4,'1683771062724','upload/cunchu4.jpg','存储地点4',1,'存储介绍4',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(5,5,'1683771062801','upload/cunchu5.jpg','存储地点5',4,'存储介绍5',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(6,6,'1683771062715','upload/cunchu6.jpg','存储地点6',1,'存储介绍6',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(7,7,'1683771062789','upload/cunchu7.jpg','存储地点7',2,'存储介绍7',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(8,8,'1683771062757','upload/cunchu8.jpg','存储地点8',4,'存储介绍8',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(9,9,'1683771062730','upload/cunchu9.jpg','存储地点9',4,'存储介绍9',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(10,10,'1683771062729','upload/cunchu10.jpg','存储地点10',3,'存储介绍10',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(11,11,'1683771062809','upload/cunchu11.jpg','存储地点11',4,'存储介绍11',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(12,12,'1683771062762','upload/cunchu12.jpg','存储地点12',3,'存储介绍12',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(13,13,'1683771062719','upload/cunchu13.jpg','存储地点13',3,'存储介绍13',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(14,14,'1683771062719','upload/cunchu14.jpg','存储地点14',1,'存储介绍14',1,'2023-05-11 10:11:02','2023-05-11 10:11:02');

/*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=26 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,'sex_types','性别类型',1,'男',NULL,NULL,'2023-05-11 10:10:14'),(2,'sex_types','性别类型',2,'女',NULL,NULL,'2023-05-11 10:10:14'),(3,'gonggao_types','公告类型',1,'公告类型1',NULL,NULL,'2023-05-11 10:10:14'),(4,'gonggao_types','公告类型',2,'公告类型2',NULL,NULL,'2023-05-11 10:10:14'),(5,'shiji_types','试剂类型',1,'试剂类型1',NULL,NULL,'2023-05-11 10:10:14'),(6,'shiji_types','试剂类型',2,'试剂类型2',NULL,NULL,'2023-05-11 10:10:14'),(7,'shiji_types','试剂类型',3,'试剂类型3',NULL,NULL,'2023-05-11 10:10:14'),(8,'shiji_types','试剂类型',4,'试剂类型4',NULL,NULL,'2023-05-11 10:10:14'),(9,'shiji_churu_inout_types','出入库类型',1,'出库',NULL,NULL,'2023-05-11 10:10:15'),(10,'shiji_churu_inout_types','出入库类型',2,'入库',NULL,NULL,'2023-05-11 10:10:15'),(11,'cunchu_types','存储类型',1,'存储类型1',NULL,NULL,'2023-05-11 10:10:15'),(12,'cunchu_types','存储类型',2,'存储类型2',NULL,NULL,'2023-05-11 10:10:15'),(13,'cunchu_types','存储类型',3,'存储类型3',NULL,NULL,'2023-05-11 10:10:15'),(14,'cunchu_types','存储类型',4,'存储类型4',NULL,NULL,'2023-05-11 10:10:15'),(15,'anquan_types','危险程度',1,'危险程度1',NULL,NULL,'2023-05-11 10:10:15'),(16,'anquan_types','危险程度',2,'危险程度2',NULL,NULL,'2023-05-11 10:10:15'),(17,'anquan_types','危险程度',3,'危险程度3',NULL,NULL,'2023-05-11 10:10:15'),(18,'anquan_types','危险程度',4,'危险程度4',NULL,NULL,'2023-05-11 10:10:15'),(19,'shiyong_yesno_types','申请状态',1,'待审核',NULL,NULL,'2023-05-11 10:10:15'),(20,'shiyong_yesno_types','申请状态',2,'同意',NULL,NULL,'2023-05-11 10:10:15'),(21,'shiyong_yesno_types','申请状态',3,'拒绝',NULL,NULL,'2023-05-11 10:10:15'),(22,'shiyong_types','使用记录类型',1,'使用记录类型1',NULL,NULL,'2023-05-11 10:10:15'),(23,'shiyong_types','使用记录类型',2,'使用记录类型2',NULL,NULL,'2023-05-11 10:10:15'),(24,'shiyong_types','使用记录类型',3,'使用记录类型3',NULL,NULL,'2023-05-11 10:10:15'),(25,'shiyong_types','使用记录类型',4,'使用记录类型4',NULL,NULL,'2023-05-11 10:10:15');

/*Table structure for table `gonggao` */

DROP TABLE IF EXISTS `gonggao`;

CREATE TABLE `gonggao` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `gonggao_name` varchar(200) DEFAULT NULL COMMENT '公告名称 Search111  ',
  `gonggao_photo` varchar(200) DEFAULT NULL COMMENT '公告图片 ',
  `gonggao_types` int(11) NOT NULL COMMENT '公告类型 Search111 ',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '发布时间',
  `gonggao_content` longtext COMMENT '公告详情 ',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show1 show2 nameShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='公告资讯';

/*Data for the table `gonggao` */

insert  into `gonggao`(`id`,`gonggao_name`,`gonggao_photo`,`gonggao_types`,`insert_time`,`gonggao_content`,`create_time`) values (1,'公告名称1','upload/gonggao1.jpg',2,'2023-05-11 10:11:02','公告详情1','2023-05-11 10:11:02'),(2,'公告名称2','upload/gonggao2.jpg',1,'2023-05-11 10:11:02','公告详情2','2023-05-11 10:11:02'),(3,'公告名称3','upload/gonggao3.jpg',1,'2023-05-11 10:11:02','公告详情3','2023-05-11 10:11:02'),(4,'公告名称4','upload/gonggao4.jpg',1,'2023-05-11 10:11:02','公告详情4','2023-05-11 10:11:02'),(5,'公告名称5','upload/gonggao5.jpg',2,'2023-05-11 10:11:02','公告详情5','2023-05-11 10:11:02'),(6,'公告名称6','upload/gonggao6.jpg',1,'2023-05-11 10:11:02','公告详情6','2023-05-11 10:11:02'),(7,'公告名称7','upload/gonggao7.jpg',2,'2023-05-11 10:11:02','公告详情7','2023-05-11 10:11:02'),(8,'公告名称8','upload/gonggao8.jpg',1,'2023-05-11 10:11:02','公告详情8','2023-05-11 10:11:02'),(9,'公告名称9','upload/gonggao9.jpg',2,'2023-05-11 10:11:02','公告详情9','2023-05-11 10:11:02'),(10,'公告名称10','upload/gonggao10.jpg',2,'2023-05-11 10:11:02','公告详情10','2023-05-11 10:11:02'),(11,'公告名称11','upload/gonggao11.jpg',1,'2023-05-11 10:11:02','公告详情11','2023-05-11 10:11:02'),(12,'公告名称12','upload/gonggao12.jpg',1,'2023-05-11 10:11:02','公告详情12','2023-05-11 10:11:02'),(13,'公告名称13','upload/gonggao13.jpg',1,'2023-05-11 10:11:02','公告详情13','2023-05-11 10:11:02'),(14,'公告名称14','upload/gonggao14.jpg',1,'2023-05-11 10:11:02','公告详情14','2023-05-11 10:11:02');

/*Table structure for table `shiji` */

DROP TABLE IF EXISTS `shiji`;

CREATE TABLE `shiji` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `shiji_name` varchar(200) DEFAULT NULL COMMENT '试剂名称  Search111 ',
  `shiji_uuid_number` varchar(200) DEFAULT NULL COMMENT '试剂编号',
  `shiji_photo` varchar(200) DEFAULT NULL COMMENT '试剂照片',
  `shiji_guige` varchar(200) DEFAULT NULL COMMENT '试剂规格',
  `shiji_changjia` varchar(200) DEFAULT NULL COMMENT '生产厂家',
  `shiji_pici` int(11) DEFAULT NULL COMMENT '生产批次',
  `shiji_time` date DEFAULT NULL COMMENT '生产日期',
  `shiji_baozhi` int(11) DEFAULT NULL COMMENT '保质期/月',
  `shiji_types` int(11) DEFAULT NULL COMMENT '试剂类型 Search111',
  `shiji_kucun_number` int(11) DEFAULT NULL COMMENT '试剂数量',
  `shiji_content` longtext COMMENT '试剂介绍 ',
  `shiji_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间  show1 show2 photoShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COMMENT='试剂';

/*Data for the table `shiji` */

insert  into `shiji`(`id`,`shiji_name`,`shiji_uuid_number`,`shiji_photo`,`shiji_guige`,`shiji_changjia`,`shiji_pici`,`shiji_time`,`shiji_baozhi`,`shiji_types`,`shiji_kucun_number`,`shiji_content`,`shiji_delete`,`insert_time`,`create_time`) values (1,'试剂名称1','1683771062759','upload/shiji1.jpg','试剂规格1','生产厂家1',207,'2023-05-11',75,1,101,'试剂介绍1',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(2,'试剂名称2','1683771062730','upload/shiji2.jpg','试剂规格2','生产厂家2',244,'2023-05-11',319,3,102,'试剂介绍2',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(3,'试剂名称3','1683771062775','upload/shiji3.jpg','试剂规格3','生产厂家3',8,'2023-05-11',470,3,103,'试剂介绍3',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(4,'试剂名称4','1683771062800','upload/shiji4.jpg','试剂规格4','生产厂家4',322,'2023-05-11',351,2,104,'试剂介绍4',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(5,'试剂名称5','1683771062793','upload/shiji5.jpg','试剂规格5','生产厂家5',442,'2023-05-11',72,1,105,'试剂介绍5',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(6,'试剂名称6','1683771062776','upload/shiji6.jpg','试剂规格6','生产厂家6',472,'2023-05-11',274,3,106,'试剂介绍6',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(7,'试剂名称7','1683771062807','upload/shiji7.jpg','试剂规格7','生产厂家7',306,'2023-05-11',270,2,107,'试剂介绍7',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(8,'试剂名称8','1683771062726','upload/shiji8.jpg','试剂规格8','生产厂家8',326,'2023-05-11',169,2,108,'试剂介绍8',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(9,'试剂名称9','1683771062724','upload/shiji9.jpg','试剂规格9','生产厂家9',367,'2023-05-11',336,1,109,'试剂介绍9',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(10,'试剂名称10','1683771062795','upload/shiji10.jpg','试剂规格10','生产厂家10',400,'2023-05-11',401,3,1010,'试剂介绍10',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(11,'试剂名称11','1683771062773','upload/shiji11.jpg','试剂规格11','生产厂家11',471,'2023-05-11',308,2,1011,'试剂介绍11',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(12,'试剂名称12','1683771062723','upload/shiji12.jpg','试剂规格12','生产厂家12',183,'2023-05-11',478,4,1012,'试剂介绍12',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(13,'试剂名称13','1683771062788','upload/shiji13.jpg','试剂规格13','生产厂家13',92,'2023-05-11',368,3,913,'试剂介绍13',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(14,'试剂名称14','1683771062798','upload/shiji14.jpg','试剂规格14','生产厂家14',247,'2023-05-11',331,3,638,'<p>试剂介绍14</p>',1,'2023-05-11 10:11:02','2023-05-11 10:11:02');

/*Table structure for table `shiji_churu_inout` */

DROP TABLE IF EXISTS `shiji_churu_inout`;

CREATE TABLE `shiji_churu_inout` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `shiji_churu_inout_uuid_number` varchar(200) DEFAULT NULL COMMENT '出入库流水号',
  `shiji_churu_inout_name` varchar(200) DEFAULT NULL COMMENT '出入库名称  Search111 ',
  `shiji_churu_inout_types` int(11) DEFAULT NULL COMMENT '出入库类型  Search111 ',
  `shiji_churu_inout_content` longtext COMMENT '备注',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COMMENT='出入库';

/*Data for the table `shiji_churu_inout` */

insert  into `shiji_churu_inout`(`id`,`shiji_churu_inout_uuid_number`,`shiji_churu_inout_name`,`shiji_churu_inout_types`,`shiji_churu_inout_content`,`insert_time`,`create_time`) values (1,'1683771062767','出入库名称1',2,'备注1','2023-05-11 10:11:02','2023-05-11 10:11:02'),(2,'1683771062734','出入库名称2',2,'备注2','2023-05-11 10:11:02','2023-05-11 10:11:02'),(3,'1683771062788','出入库名称3',2,'备注3','2023-05-11 10:11:02','2023-05-11 10:11:02'),(4,'1683771062786','出入库名称4',1,'备注4','2023-05-11 10:11:02','2023-05-11 10:11:02'),(5,'1683771062759','出入库名称5',2,'备注5','2023-05-11 10:11:02','2023-05-11 10:11:02'),(6,'1683771062804','出入库名称6',2,'备注6','2023-05-11 10:11:02','2023-05-11 10:11:02'),(7,'1683771062782','出入库名称7',2,'备注7','2023-05-11 10:11:02','2023-05-11 10:11:02'),(8,'1683771062821','出入库名称8',1,'备注8','2023-05-11 10:11:02','2023-05-11 10:11:02'),(9,'1683771062823','出入库名称9',2,'备注9','2023-05-11 10:11:02','2023-05-11 10:11:02'),(10,'1683771062802','出入库名称10',1,'备注10','2023-05-11 10:11:02','2023-05-11 10:11:02'),(11,'1683771062789','出入库名称11',2,'备注11','2023-05-11 10:11:02','2023-05-11 10:11:02'),(12,'1683771062782','出入库名称12',1,'备注12','2023-05-11 10:11:02','2023-05-11 10:11:02'),(13,'1683771062749','出入库名称13',1,'备注13','2023-05-11 10:11:02','2023-05-11 10:11:02'),(14,'1683771062813','出入库名称14',2,'备注14','2023-05-11 10:11:02','2023-05-11 10:11:02'),(16,'1683773397031','使用',2,'<p>丫丫</p>','2023-05-11 10:49:57','2023-05-11 10:49:57'),(17,'1683775428073','100',1,'<p>实验使用</p>','2023-05-11 11:23:48','2023-05-11 11:23:48'),(18,'1683775473813','使用记录名称14',1,'用途14','2023-05-11 11:24:34','2023-05-11 11:24:34');

/*Table structure for table `shiji_churu_inout_list` */

DROP TABLE IF EXISTS `shiji_churu_inout_list`;

CREATE TABLE `shiji_churu_inout_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `shiji_churu_inout_id` int(11) DEFAULT NULL COMMENT '出入库',
  `shiji_id` int(11) DEFAULT NULL COMMENT '试剂',
  `shiji_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=19 DEFAULT CHARSET=utf8 COMMENT='出入库详情';

/*Data for the table `shiji_churu_inout_list` */

insert  into `shiji_churu_inout_list`(`id`,`shiji_churu_inout_id`,`shiji_id`,`shiji_churu_inout_list_number`,`insert_time`,`create_time`) values (1,1,1,35,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(2,2,2,261,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(3,3,3,282,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(4,4,4,9,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(5,5,5,172,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(6,6,6,94,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(7,7,7,242,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(8,8,8,427,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(9,9,9,450,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(10,10,10,453,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(11,11,11,292,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(12,12,12,430,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(13,13,13,393,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(14,14,14,63,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(17,17,13,100,'2023-05-11 11:23:48','2023-05-11 11:23:48'),(18,18,14,182,'2023-05-11 11:24:34','2023-05-11 11:24:34');

/*Table structure for table `shiyong` */

DROP TABLE IF EXISTS `shiyong`;

CREATE TABLE `shiyong` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键 ',
  `shiji_id` int(11) DEFAULT NULL COMMENT '试剂',
  `yonghu_id` int(11) DEFAULT NULL COMMENT '用户',
  `shiyong_name` varchar(200) DEFAULT NULL COMMENT '使用记录名称  Search111 ',
  `shiyong_uuid_number` varchar(200) DEFAULT NULL COMMENT '使用记录编号',
  `shiyong_photo` varchar(200) DEFAULT NULL COMMENT '使用记录照片',
  `shiyong_types` int(11) DEFAULT NULL COMMENT '使用记录类型 Search111',
  `shiyong_shuliang` int(11) DEFAULT NULL COMMENT '使用数量',
  `shiyong_time` date DEFAULT NULL COMMENT '使用时间',
  `shiyong_content` longtext COMMENT '用途',
  `shiyong_yesno_types` int(11) DEFAULT NULL COMMENT '申请状态 Search111',
  `shiyong_yesno_text` longtext COMMENT '审核意见',
  `shiyong_shenhe_time` timestamp NULL DEFAULT NULL COMMENT '审核时间',
  `shiyong_delete` int(11) DEFAULT NULL COMMENT '逻辑删除',
  `insert_time` timestamp NULL DEFAULT NULL COMMENT '录入时间',
  `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间  show1 show2 photoShow',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COMMENT='使用记录';

/*Data for the table `shiyong` */

insert  into `shiyong`(`id`,`shiji_id`,`yonghu_id`,`shiyong_name`,`shiyong_uuid_number`,`shiyong_photo`,`shiyong_types`,`shiyong_shuliang`,`shiyong_time`,`shiyong_content`,`shiyong_yesno_types`,`shiyong_yesno_text`,`shiyong_shenhe_time`,`shiyong_delete`,`insert_time`,`create_time`) values (1,1,2,'使用记录名称1','1683771062812','upload/shiyong1.jpg',3,135,'2023-05-11','用途1',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(2,2,3,'使用记录名称2','1683771062738','upload/shiyong2.jpg',3,415,'2023-05-11','用途2',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(3,3,1,'使用记录名称3','1683771062754','upload/shiyong3.jpg',1,143,'2023-05-11','用途3',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(4,4,3,'使用记录名称4','1683771062739','upload/shiyong4.jpg',1,31,'2023-05-11','用途4',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(5,5,1,'使用记录名称5','1683771062734','upload/shiyong5.jpg',3,428,'2023-05-11','用途5',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(6,6,2,'使用记录名称6','1683771062808','upload/shiyong6.jpg',2,311,'2023-05-11','用途6',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(7,7,3,'使用记录名称7','1683771062816','upload/shiyong7.jpg',4,431,'2023-05-11','用途7',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(8,8,3,'使用记录名称8','1683771062814','upload/shiyong8.jpg',2,173,'2023-05-11','用途8',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(9,9,1,'使用记录名称9','1683771062800','upload/shiyong9.jpg',1,80,'2023-05-11','用途9',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(10,10,2,'使用记录名称10','1683771062808','upload/shiyong10.jpg',1,4,'2023-05-11','用途10',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(11,11,3,'使用记录名称11','1683771062785','upload/shiyong11.jpg',4,222,'2023-05-11','用途11',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(12,12,1,'使用记录名称12','1683771062761','upload/shiyong12.jpg',4,237,'2023-05-11','用途12',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(13,13,2,'使用记录名称13','1683771062777','upload/shiyong13.jpg',4,181,'2023-05-11','用途13',1,NULL,NULL,1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(14,14,3,'使用记录名称14','1683771062813','upload/shiyong14.jpg',3,182,'2023-05-11','用途14',2,'挨打','2023-05-11 11:24:34',1,'2023-05-11 10:11:02','2023-05-11 10:11:02'),(15,14,1,'使用','1683773294263','/upload/1683773303373.jpg',3,80,'2023-05-11','<p>丫丫</p>',2,'啊','2023-05-11 10:49:57',1,'2023-05-11 10:48:34','2023-05-11 10:48:34'),(16,13,1,'100','1683775347869','/upload/1683775356494.jpg',4,100,'2023-05-11','<p>实验使用</p>',2,'好的','2023-05-11 11:23:48',1,'2023-05-11 11:22:53','2023-05-11 11:22:53');

/*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,'admin','users','管理员','cz3w3s5a1zbzxdzzpm35ut2ywma82bps','2023-05-11 10:15:46','2023-05-11 12:23:06'),(2,1,'a1','yonghu','用户','6xzgfyj8t7clje0nfdibflzy56lrix11','2023-05-11 10:39:15','2023-05-11 12:21:41');

/*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-05-11 10:10:14');

/*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_uuid_number` varchar(200) DEFAULT NULL COMMENT '用户编号 Search111 ',
  `yonghu_name` varchar(200) DEFAULT NULL COMMENT '用户姓名 Search111 ',
  `yonghu_phone` varchar(200) DEFAULT NULL COMMENT '用户手机号',
  `yonghu_id_number` varchar(200) DEFAULT NULL COMMENT '用户身份证号',
  `yonghu_photo` varchar(200) DEFAULT NULL COMMENT '用户头像',
  `sex_types` int(11) DEFAULT NULL COMMENT '性别',
  `yonghu_email` varchar(200) 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_uuid_number`,`yonghu_name`,`yonghu_phone`,`yonghu_id_number`,`yonghu_photo`,`sex_types`,`yonghu_email`,`create_time`) values (1,'a1','123456','1683771062739','用户姓名1','17703786901','410224199010102001','upload/yonghu1.jpg',2,'1@qq.com','2023-05-11 10:11:02'),(2,'a2','123456','1683771062794','用户姓名2','17703786902','410224199010102002','upload/yonghu2.jpg',1,'2@qq.com','2023-05-11 10:11:02'),(3,'a3','123456','1683771062779','用户姓名3','17703786903','410224199010102003','upload/yonghu3.jpg',1,'3@qq.com','2023-05-11 10:11:02');

/*!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("/shiji")
public class ShijiController {
    private static final Logger logger = LoggerFactory.getLogger(ShijiController.class);

    private static final String TABLE_NAME = "shiji";

    @Autowired
    private ShijiService shijiService;

    @Autowired
    private TokenService tokenService;

    @Autowired
    private AnquanService anquanService;//安全
    @Autowired
    private CunchuService cunchuService;//存储
    @Autowired
    private DictionaryService dictionaryService;//字典
    @Autowired
    private GonggaoService gonggaoService;//公告资讯
    @Autowired
    private ShijiChuruInoutService shijiChuruInoutService;//出入库
    @Autowired
    private ShijiChuruInoutListService shijiChuruInoutListService;//出入库详情
    @Autowired
    private ShiyongService shiyongService;//使用记录
    @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"));
        params.put("shijiDeleteStart",1);params.put("shijiDeleteEnd",1);
        CommonUtil.checkMap(params);
        PageUtils page = shijiService.queryPage(params);

        //字典表数据转换
        List<ShijiView> list =(List<ShijiView>)page.getList();
        for(ShijiView 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);
        ShijiEntity shiji = shijiService.selectById(id);
        if(shiji !=null){
            //entity转view
            ShijiView view = new ShijiView();
            BeanUtils.copyProperties( shiji , view );//把实体数据重构到view中
            //修改对应字典表字段
            dictionaryService.dictionaryConvert(view, request);
            return R.ok().put("data", view);
        }else {
            return R.error(511,"查不到数据");
        }

    }

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

        String role = String.valueOf(request.getSession().getAttribute("role"));
        if(false)
            return R.error(511,"永远不会进入");

        Wrapper<ShijiEntity> queryWrapper = new EntityWrapper<ShijiEntity>()
            .eq("shiji_name", shiji.getShijiName())
            .eq("shiji_guige", shiji.getShijiGuige())
            .eq("shiji_changjia", shiji.getShijiChangjia())
            .eq("shiji_pici", shiji.getShijiPici())
            .eq("shiji_time", new SimpleDateFormat("yyyy-MM-dd").format(shiji.getShijiTime()))
            .eq("shiji_baozhi", shiji.getShijiBaozhi())
            .eq("shiji_types", shiji.getShijiTypes())
            .eq("shiji_kucun_number", shiji.getShijiKucunNumber())
            .eq("shiji_delete", 1)
            ;

        logger.info("sql语句:"+queryWrapper.getSqlSegment());
        ShijiEntity shijiEntity = shijiService.selectOne(queryWrapper);
        if(shijiEntity==null){
            shiji.setShijiDelete(1);
            shiji.setInsertTime(new Date());
            shiji.setCreateTime(new Date());
            shijiService.insert(shiji);
            return R.ok();
        }else {
            return R.error(511,"表中有相同数据");
        }
    }

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

        String role = String.valueOf(request.getSession().getAttribute("role"));
//        if(false)
//            return R.error(511,"永远不会进入");
        if("".equals(shiji.getShijiPhoto()) || "null".equals(shiji.getShijiPhoto())){
                shiji.setShijiPhoto(null);
        }
        if("".equals(shiji.getShijiContent()) || "null".equals(shiji.getShijiContent())){
                shiji.setShijiContent(null);
        }

            shijiService.updateById(shiji);//根据id更新
            return R.ok();
    }

    /**
    * 删除
    */
    @RequestMapping("/delete")
    public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
        logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
        List<ShijiEntity> oldShijiList =shijiService.selectBatchIds(Arrays.asList(ids));//要删除的数据
        ArrayList<ShijiEntity> list = new ArrayList<>();
        for(Integer id:ids){
            ShijiEntity shijiEntity = new ShijiEntity();
            shijiEntity.setId(id);
            shijiEntity.setShijiDelete(2);
            list.add(shijiEntity);
        }
        if(list != null && list.size() >0){
            shijiService.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<ShijiEntity> shijiList = 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){
                            //循环
                            ShijiEntity shijiEntity = new ShijiEntity();
//                            shijiEntity.setShijiName(data.get(0));                    //试剂名称 要改的
//                            shijiEntity.setShijiUuidNumber(data.get(0));                    //试剂编号 要改的
//                            shijiEntity.setShijiPhoto("");//详情和图片
//                            shijiEntity.setShijiGuige(data.get(0));                    //试剂规格 要改的
//                            shijiEntity.setShijiChangjia(data.get(0));                    //生产厂家 要改的
//                            shijiEntity.setShijiPici(Integer.valueOf(data.get(0)));   //生产批次 要改的
//                            shijiEntity.setShijiTime(sdf.parse(data.get(0)));          //生产日期 要改的
//                            shijiEntity.setShijiBaozhi(Integer.valueOf(data.get(0)));   //保质期/月 要改的
//                            shijiEntity.setShijiTypes(Integer.valueOf(data.get(0)));   //试剂类型 要改的
//                            shijiEntity.setShijiKucunNumber(Integer.valueOf(data.get(0)));   //试剂数量 要改的
//                            shijiEntity.setShijiContent("");//详情和图片
//                            shijiEntity.setShijiDelete(1);//逻辑删除字段
//                            shijiEntity.setInsertTime(date);//时间
//                            shijiEntity.setCreateTime(date);//时间
                            shijiList.add(shijiEntity);


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

                        //查询是否重复
                         //试剂编号
                        List<ShijiEntity> shijiEntities_shijiUuidNumber = shijiService.selectList(new EntityWrapper<ShijiEntity>().in("shiji_uuid_number", seachFields.get("shijiUuidNumber")).eq("shiji_delete", 1));
                        if(shijiEntities_shijiUuidNumber.size() >0 ){
                            ArrayList<String> repeatFields = new ArrayList<>();
                            for(ShijiEntity s:shijiEntities_shijiUuidNumber){
                                repeatFields.add(s.getShijiUuidNumber());
                            }
                            return R.error(511,"数据库的该表中的 [试剂编号] 字段已经存在 存在数据为:"+repeatFields.toString());
                        }
                        shijiService.insertBatch(shijiList);
                        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.ShijiEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.lang.Nullable;
import java.util.List;

/**
 * 试剂 服务类
 */
public interface ShijiService extends IService<ShijiEntity> {

    /**
    * @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.ShijiDao;
import com.entity.ShijiEntity;
import com.service.ShijiService;
import com.entity.view.ShijiView;

/**
 * 试剂 服务实现类
 */
@Service("shijiService")
@Transactional
public class ShijiServiceImpl extends ServiceImpl<ShijiDao, ShijiEntity> implements ShijiService {

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

}

5.4? 试剂Dao模块

package com.dao;

import com.entity.ShijiEntity;
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.ShijiView;

/**
 * 试剂 Dao 接口
 *
 * @author 
 */
public interface ShijiDao extends BaseMapper<ShijiEntity> {

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

}

6、论文目录结构

7、源码获取

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

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

获取源码请私信

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