diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..8bca515
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
new file mode 100644
index 0000000..337bd31
--- /dev/null
+++ b/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
new file mode 100644
index 0000000..03d9549
--- /dev/null
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml
new file mode 100644
index 0000000..712ab9d
--- /dev/null
+++ b/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..1c5247c
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..6fc788c
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..2b63946
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/医院药品管理系统.iml b/.idea/医院药品管理系统.iml
new file mode 100644
index 0000000..d6ebd48
--- /dev/null
+++ b/.idea/医院药品管理系统.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/0149物联2101-管理系统毕业论文(1).docx b/0149物联2101-管理系统毕业论文(1).docx
new file mode 100644
index 0000000..52e5206
Binary files /dev/null and b/0149物联2101-管理系统毕业论文(1).docx differ
diff --git a/yiyuanyaopinguanli.sql b/yiyuanyaopinguanli.sql
new file mode 100644
index 0000000..00699fd
--- /dev/null
+++ b/yiyuanyaopinguanli.sql
@@ -0,0 +1,314 @@
+/*
+ Navicat Premium Dump SQL
+
+ Source Server : localhost
+ Source Server Type : MySQL
+ Source Server Version : 80039 (8.0.39)
+ Source Host : localhost:3306
+ Source Schema : yiyuanyaopinguanli
+
+ Target Server Type : MySQL
+ Target Server Version : 80039 (8.0.39)
+ File Encoding : 65001
+
+ Date: 25/02/2025 23:40:19
+*/
+CREATE DATABASE /*!32312 IF NOT EXISTS*/`yiyuanyaopinguanli` /*!40100 DEFAULT CHARACTER SET utf8 */;
+USE `yiyuanyaopinguanli`;
+
+SET NAMES utf8mb4;
+SET FOREIGN_KEY_CHECKS = 0;
+
+-- ----------------------------
+-- Table structure for config
+-- ----------------------------
+DROP TABLE IF EXISTS `config`;
+CREATE TABLE `config` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `name` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '配置参数名称',
+ `value` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '配置参数值',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '配置文件' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of config
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for dictionary
+-- ----------------------------
+DROP TABLE IF EXISTS `dictionary`;
+CREATE TABLE `dictionary` (
+ `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `dic_code` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '字段',
+ `dic_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '字段名',
+ `code_index` int NULL DEFAULT NULL COMMENT '编码',
+ `index_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '编码名字 Search111 ',
+ `super_id` int NULL DEFAULT NULL COMMENT '父字段id',
+ `beizhu` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '备注',
+ `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 27 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '字典表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of dictionary
+-- ----------------------------
+INSERT INTO `dictionary` VALUES (1, 'danwei_types', '药品单位', 1, '瓶', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (2, 'danwei_types', '药品单位', 2, '粒', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (3, 'danwei_types', '药品单位', 3, '片', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (4, 'yaopin_types', '药品类型', 1, '心血管药', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (5, 'yaopin_types', '药品类型', 2, '镇痛药', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (6, 'yaopin_types', '药品类型', 3, '抗生素', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (7, 'yaopin_churu_inout_types', '出入库类型', 1, '出库', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (8, 'yaopin_churu_inout_types', '出入库类型', 2, '入库', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (9, 'quyaojilu_types', '类型', 1, '取药', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (10, 'quyaojilu_types', '类型', 2, '退药', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (11, 'news_types', '公告类型', 1, '药品价格调整通知', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (12, 'news_types', '公告类型', 2, '新药上市公告', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (13, 'news_types', '公告类型', 3, '药品缺货通知', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (14, 'sex_types', '性别类型', 1, '男', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (15, 'sex_types', '性别类型', 2, '女', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (16, 'sex_types', '性别类型', 1, '男', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (17, 'sex_types', '性别类型', 2, '女', NULL, NULL, '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (18, 'danwei_types', '药品单位', 4, '支', NULL, '', '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (19, 'danwei_types', '药品单位', 5, '盒', NULL, '', '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (20, 'danwei_types', '药品单位', 6, '袋', NULL, '', '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (21, 'news_types', '公告类型', 4, '药品召回通知', NULL, '', '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (22, 'news_types', '公告类型', 5, '药品使用注意事项', NULL, '', '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (23, 'news_types', '公告类型', 6, '药品库存盘点通知', NULL, '', '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (24, 'yaopin_types', '药品类型', 4, '抗过敏药', NULL, '', '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (25, 'yaopin_types', '药品类型', 5, '消化系统药', NULL, '', '2025-02-25 15:18:34');
+INSERT INTO `dictionary` VALUES (26, 'yaopin_types', '药品类型', 6, '维生素及矿物质补充剂', NULL, '', '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for news
+-- ----------------------------
+DROP TABLE IF EXISTS `news`;
+CREATE TABLE `news` (
+ `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `news_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '公告标题 Search111 ',
+ `news_types` int NULL DEFAULT NULL COMMENT '公告类型 Search111 ',
+ `news_photo` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '公告图片',
+ `insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',
+ `news_content` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '公告详情',
+ `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show1 show2 nameShow',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '公告信息' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of news
+-- ----------------------------
+INSERT INTO `news` VALUES (1, '关于中药饮片储存条件的重要提醒', 5, 'http://localhost:8080/yiyuanyaopinguanli/upload/news1.jpg', '2025-02-25 15:18:34', '
近期检查发现,部分科室储存的中药饮片存在受潮、霉变现象。特此提醒:中药饮片应储存在阴凉、干燥、通风的环境中,避免阳光直射和高温高湿。请各科室定期检查药品储存条件,确保药品质量。药剂科将提供储存指导,如有问题请及时反馈。
', '2025-02-25 15:18:34');
+INSERT INTO `news` VALUES (2, '关于布洛芬缓释胶囊供应恢复的通知', 2, 'http://localhost:8080/yiyuanyaopinguanli/upload/news2.jpg', '2025-02-25 15:18:34', '此前因供应链问题导致布洛芬缓释胶囊暂时缺货,现供应商已恢复正常供货。我院药剂科已完成药品入库,各科室可正常开具处方。感谢各科室在此期间的理解与配合,如有疑问请联系药剂科。
', '2025-02-25 15:18:34');
+INSERT INTO `news` VALUES (3, '2024年第四季度药品库存盘点通知', 6, 'http://localhost:8080/yiyuanyaopinguanli/upload/news3.jpg', '2025-02-25 15:18:34', '为确保药品库存数据准确,我院将于2024年12月1日至12月3日进行第四季度药品库存盘点。盘点期间,药剂科将暂停部分药品的发放,请各科室提前做好药品申领计划。盘点结束后,药品发放将恢复正常。感谢各科室的配合与支持!
', '2025-02-25 15:18:34');
+INSERT INTO `news` VALUES (4, '新型降糖药“格列净”正式上市', 2, 'http://localhost:8080/yiyuanyaopinguanli/upload/news1.jpg', '2025-02-25 15:18:34', '我院药剂科已引进新型降糖药“格列净”,该药物适用于2型糖尿病患者的血糖控制,具有疗效显著、副作用少的特点。临床医生可根据患者病情开具处方,药剂科将提供详细的用药指导。欢迎各科室医生咨询相关使用信息,详情请参阅药品说明书或联系药剂科。
', '2025-02-25 15:18:34');
+INSERT INTO `news` VALUES (5, '关于头孢类抗生素暂时缺货的通知', 3, 'http://localhost:8080/yiyuanyaopinguanli/upload/news2.jpg', '2025-02-25 15:18:34', '由于近期头孢类抗生素需求激增,供应商产能不足,导致我院头孢类抗生素(包括头孢呋辛、头孢克洛等)暂时缺货。预计缺货将持续至下月中旬。在此期间,建议临床医生根据患者情况选择替代药品,或与药剂科联系协调其他解决方案。对此造成的不便,我们深表歉意,并将尽快恢复供应。
', '2025-02-25 15:18:34');
+INSERT INTO `news` VALUES (6, '关于部分药品价格调整的说明', 1, 'http://localhost:8080/yiyuanyaopinguanli/upload/news3.jpg', '2025-02-25 15:18:34', '根据国家医保局最新政策及药品采购价格变动,我院对部分药品价格进行了调整。具体涉及药品包括阿司匹林、二甲双胍、氨氯地平等。调整后的价格将于2024年11月1日正式生效,请各科室医生及患者知悉。详细价格清单可在我院官网或药剂科查询。
', '2025-02-25 15:18:34');
+INSERT INTO `news` VALUES (7, '新型降糖药“格列净”正式上市', 2, 'http://localhost:8080/yiyuanyaopinguanli/upload/news1.jpg', '2025-02-25 15:18:34', '我院药剂科已引进新型降糖药“格列净”,该药物适用于2型糖尿病患者的血糖控制,具有疗效显著、副作用少的特点。临床医生可根据患者病情开具处方,药剂科将提供详细的用药指导。欢迎各科室医生咨询相关使用信息,详情请参阅药品说明书或联系药剂科。
', '2025-02-25 15:18:34');
+INSERT INTO `news` VALUES (8, '关于头孢类抗生素暂时缺货的通知', 3, 'http://localhost:8080/yiyuanyaopinguanli/upload/news2.jpg', '2025-02-25 15:18:34', '由于近期头孢类抗生素需求激增,供应商产能不足,导致我院头孢类抗生素(包括头孢呋辛、头孢克洛等)暂时缺货。预计缺货将持续至下月中旬。在此期间,建议临床医生根据患者情况选择替代药品,或与药剂科联系协调其他解决方案。对此造成的不便,我们深表歉意,并将尽快恢复供应。
', '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for quyaojilu
+-- ----------------------------
+DROP TABLE IF EXISTS `quyaojilu`;
+CREATE TABLE `quyaojilu` (
+ `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `yaopin_id` int NULL DEFAULT NULL COMMENT '药品',
+ `yonghu_id` int NULL DEFAULT NULL COMMENT '用户',
+ `yuangong_id` int NULL DEFAULT NULL COMMENT '员工',
+ `quyaojilu_number` int NULL DEFAULT NULL COMMENT '取药数量',
+ `quyaojilu_types` int NULL DEFAULT NULL COMMENT '类型 Search111',
+ `quyaojilu_delete` int NULL DEFAULT NULL COMMENT '逻辑删除',
+ `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show2 photoShow',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '取退记录' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of quyaojilu
+-- ----------------------------
+INSERT INTO `quyaojilu` VALUES (1, 1, 2, 1, 27, 2, 1, '2025-02-25 15:18:34');
+INSERT INTO `quyaojilu` VALUES (2, 2, 3, 3, 352, 1, 1, '2025-02-25 15:18:34');
+INSERT INTO `quyaojilu` VALUES (3, 3, 2, 3, 389, 1, 1, '2025-02-25 15:18:34');
+INSERT INTO `quyaojilu` VALUES (4, 4, 1, 1, 264, 1, 1, '2025-02-25 15:18:34');
+INSERT INTO `quyaojilu` VALUES (5, 5, 1, 3, 342, 1, 1, '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for token
+-- ----------------------------
+DROP TABLE IF EXISTS `token`;
+CREATE TABLE `token` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `userid` bigint NOT NULL COMMENT '用户id',
+ `username` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '用户名',
+ `tablename` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '表名',
+ `role` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '角色',
+ `token` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '密码',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
+ `expiratedtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '过期时间',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = 'token表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of token
+-- ----------------------------
+INSERT INTO `token` VALUES (1, 1, 'admin', 'users', '管理员', 'v1a4ethjswvmsamk1q3wg3rkza5mdbeo', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `token` VALUES (2, 1, 'a1', 'yuangong', '员工', 'rrazvwcqpcedd3ptgc5jv4q6f2lcy1la', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `token` VALUES (3, 1, 'a1', 'yonghu', '用户', 'y2wbthn8hbjg0v0w9rlliam4gcugztad', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for users
+-- ----------------------------
+DROP TABLE IF EXISTS `users`;
+CREATE TABLE `users` (
+ `id` bigint NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `username` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '用户名',
+ `password` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL COMMENT '密码',
+ `role` varchar(100) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT '管理员' COMMENT '角色',
+ `addtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '新增时间',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of users
+-- ----------------------------
+INSERT INTO `users` VALUES (1, 'admin', 'admin', '管理员', '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for yaopin
+-- ----------------------------
+DROP TABLE IF EXISTS `yaopin`;
+CREATE TABLE `yaopin` (
+ `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `yaopin_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '药品名称 Search111',
+ `yaopin_types` int NULL DEFAULT NULL COMMENT '药品类型 Search111',
+ `yaopin_kucun_number` int NULL DEFAULT NULL COMMENT '药品库存',
+ `danwei_types` int NULL DEFAULT NULL COMMENT '药品单位 Search111',
+ `yaopin_new_money` decimal(10, 2) NULL DEFAULT NULL COMMENT '现价',
+ `yaopin_content` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '详情',
+ `yaopin_delete` int NULL DEFAULT NULL COMMENT '逻辑删除',
+ `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间 show2 photoShow',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 11 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '药品信息' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of yaopin
+-- ----------------------------
+INSERT INTO `yaopin` VALUES (1, '阿莫西林胶囊', 6, 140, 4, 30.00, '阿莫西林胶囊是一种广谱抗生素,用于治疗细菌感染,如呼吸道感染、尿路感染等。每盒包含20粒,每粒剂量为500mg。常用剂量为每次1粒,每日3次,口服。对青霉素过敏者禁用,使用期间可能出现皮疹、胃肠道不适等副作用。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (2, '蒙脱石散', 5, 110, 4, 25.00, '蒙脱石散是一种止泻药,用于治疗急慢性腹泻。每盒包含10袋,每袋剂量为3g。常用剂量为每次1袋,每日3次,口服。使用期间需注意补充水分,避免脱水。副作用较少,偶见便秘。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (3, '维生素C泡腾片', 6, 250, 5, 15.00, '维生素C泡腾片是一种维生素补充剂,用于预防和治疗维生素C缺乏症。每盒包含20片,每片剂量为1000mg。常用剂量为每日1片,溶于水中饮用。过量服用可能导致腹泻,建议按需使用。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (4, '奥美拉唑肠溶胶囊', 1, 160, 3, 40.00, '奥美拉唑肠溶胶囊是一种质子泵抑制剂,用于治疗胃酸过多引起的胃溃疡、十二指肠溃疡等。每盒包含14粒,每粒剂量为20mg。常用剂量为每日1粒,空腹服用。长期使用可能增加骨折风险,建议定期监测。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (5, '头孢呋辛片', 2, 120, 5, 45.00, '头孢呋辛片是一种广谱抗生素,适用于治疗呼吸道感染、尿路感染、皮肤软组织感染等。每盒包含10片,每片剂量为250mg。成人常用剂量为每次1片,每日2次,饭后服用。使用期间可能出现胃肠道不适、皮疹等副作用,对青霉素过敏者慎用。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (6, '氯雷他定片', 1, 130, 4, 18.00, '氯雷他定片是一种抗过敏药,用于缓解过敏性鼻炎、荨麻疹等症状。每盒包含10片,每片剂量为10mg。常用剂量为每日1片,口服。副作用较少,偶见头痛、乏力等。孕妇及哺乳期妇女慎用。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (7, '布洛芬缓释胶囊', 1, 90, 5, 22.00, '布洛芬缓释胶囊是一种非甾体抗炎药,用于缓解轻至中度疼痛,如头痛、牙痛、关节痛等。每盒包含12粒,每粒剂量为300mg。常用剂量为每次1粒,每日2次。长期使用可能增加胃肠道出血风险,建议饭后服用。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (8, '氨氯地平片', 1, 180, 3, 35.00, '氨氯地平片是一种钙通道阻滞剂,用于治疗高血压和心绞痛。每盒包含14片,每片剂量为5mg。常用剂量为每日1片,口服。可能出现头痛、水肿等副作用,肝功能不全者需调整剂量。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (9, '二甲双胍缓释片', 5, 150, 3, 28.00, '二甲双胍缓释片是治疗2型糖尿病的一线药物,能够有效控制血糖水平。每盒包含20片,每片剂量为500mg。常用剂量为每日1-2片,随餐服用。常见副作用包括胃肠道不适,建议从小剂量开始逐渐调整。肾功能不全者慎用。
', 1, '2025-02-25 15:18:34');
+INSERT INTO `yaopin` VALUES (10, '阿司匹林肠溶片', 5, 200, 5, 12.00, '阿司匹林肠溶片主要用于预防心脑血管疾病,如心肌梗死、脑卒中等。每盒包含30片,每片剂量为100mg。建议空腹服用,以减少胃肠道刺激。长期服用者需定期监测凝血功能,避免出血风险。孕妇及消化性溃疡患者禁用。
', 1, '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for yaopin_churu_inout
+-- ----------------------------
+DROP TABLE IF EXISTS `yaopin_churu_inout`;
+CREATE TABLE `yaopin_churu_inout` (
+ `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `yaopin_churu_inout_uuid_number` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '出入库流水号',
+ `yaopin_churu_inout_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '出入库名称 Search111 ',
+ `yaopin_churu_inout_types` int NULL DEFAULT NULL COMMENT '出入库类型',
+ `yaopin_churu_inout_content` text CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL COMMENT '备注',
+ `insert_time` timestamp NULL DEFAULT NULL COMMENT '添加时间',
+ `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '出入库' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of yaopin_churu_inout
+-- ----------------------------
+INSERT INTO `yaopin_churu_inout` VALUES (1, '16485383192855', '蒙脱石散出库', 1, '2024年11月1日,根据儿科申请,出库蒙脱石散20盒至儿科药房。出库时核对批号20240825,有效期至2025年8月。出库后库存剩余90盒。
', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout` VALUES (2, '164853831928515', '维生素C泡腾片入库', 1, '2024年10月31日,从制药厂采购维生素C泡腾片150盒,批号20241015,有效期至2025年10月。入库时抽查药品无异常,包装完好。入库后库存更新为400盒。
', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout` VALUES (3, '16485383192857', '奥美拉唑肠溶胶囊出库', 2, '2024年10月30日,根据消化内科申请,出库奥美拉唑肠溶胶囊40盒至消化内科药房。出库时核对批号20240910,有效期至2025年9月。出库后库存剩余120盒。
', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout` VALUES (4, '164853831928519', '氯雷他定片入库', 1, '2024年10月29日,从医药公司采购氯雷他定片120盒,批号20241005,有效期至2025年10月。入库时检查药品无异常,包装完好。入库后库存更新为250盒。
', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout` VALUES (5, '164853831928514', '布洛芬缓释胶囊出库', 2, '2024年10月28日,根据急诊科申请,出库布洛芬缓释胶囊30盒至急诊科药房。出库时核对批号20240820,有效期至2025年8月。出库后库存剩余60盒。
', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout` VALUES (6, '1648539113625', '二甲双胍缓释片入库', 2, '2024年10月27日,从制药厂采购二甲双胍缓释片80盒,批号20241010,有效期至2025年10月。入库时抽查药品无异常,包装完好。入库后库存更新为230盒。
', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout` VALUES (7, '1648539189083', '阿司匹林肠溶片出库', 2, '2024年10月26日,根据心内科申请,出库阿司匹林肠溶片50盒至心内科药房。出库时核对批号20230915,有效期至2025年9月。出库后库存剩余150盒。
', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout` VALUES (8, '1648539236869', '头孢呋辛片入库', 1, '2024年10月25日,采购头孢呋辛片100盒,批号20231001,有效期至2025年10月。入库时检查包装完好,无破损,药品质量符合标准。入库后库存更新为220盒。
', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for yaopin_churu_inout_list
+-- ----------------------------
+DROP TABLE IF EXISTS `yaopin_churu_inout_list`;
+CREATE TABLE `yaopin_churu_inout_list` (
+ `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `yaopin_churu_inout_id` int NULL DEFAULT NULL COMMENT '出入库',
+ `yaopin_id` int NULL DEFAULT NULL COMMENT '药品',
+ `yaopin_churu_inout_list_number` int NULL DEFAULT NULL COMMENT '操作数量',
+ `insert_time` timestamp NULL DEFAULT NULL COMMENT '操作时间',
+ `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 15 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '出入库详情' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of yaopin_churu_inout_list
+-- ----------------------------
+INSERT INTO `yaopin_churu_inout_list` VALUES (1, 1, 1, 273, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (2, 2, 2, 357, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (3, 3, 3, 110, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (4, 4, 4, 275, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (5, 5, 5, 298, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (6, 6, 1, 100, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (7, 6, 2, 100, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (8, 6, 3, 100, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (9, 7, 1, 100, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (10, 7, 2, 100, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (11, 7, 3, 100, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (12, 8, 1, 200, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (13, 8, 2, 200, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+INSERT INTO `yaopin_churu_inout_list` VALUES (14, 8, 3, 200, '2025-02-25 15:18:34', '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for yonghu
+-- ----------------------------
+DROP TABLE IF EXISTS `yonghu`;
+CREATE TABLE `yonghu` (
+ `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `username` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '账户',
+ `password` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '密码',
+ `yonghu_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '用户姓名 Search111 ',
+ `yonghu_photo` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '头像',
+ `sex_types` int NULL DEFAULT NULL COMMENT '性别 Search111 ',
+ `yonghu_phone` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '联系方式',
+ `yonghu_email` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '邮箱',
+ `yonghu_delete` int NULL DEFAULT 1 COMMENT '假删',
+ `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '用户' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of yonghu
+-- ----------------------------
+INSERT INTO `yonghu` VALUES (1, 'a1', '123456', '慧琳', 'http://localhost:8080/yiyuanyaopinguanli/upload/yonghu1.jpg', 2, '17703786901', '1@qq.com', 1, '2025-02-25 15:18:34');
+INSERT INTO `yonghu` VALUES (2, 'a2', '123456', '张伟', 'http://localhost:8080/yiyuanyaopinguanli/upload/yonghu2.jpg', 1, '17703786902', '2@qq.com', 1, '2025-02-25 15:18:34');
+INSERT INTO `yonghu` VALUES (3, 'a3', '123456', '李娜', 'http://localhost:8080/yiyuanyaopinguanli/upload/yonghu3.jpg', 2, '17703786903', '3@qq.com', 1, '2025-02-25 15:18:34');
+
+-- ----------------------------
+-- Table structure for yuangong
+-- ----------------------------
+DROP TABLE IF EXISTS `yuangong`;
+CREATE TABLE `yuangong` (
+ `id` int NOT NULL AUTO_INCREMENT COMMENT '主键',
+ `username` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '账户',
+ `password` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '密码',
+ `yuangong_name` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '员工姓名 Search111 ',
+ `sex_types` int NULL DEFAULT NULL COMMENT '性别 Search111 ',
+ `yuangong_phone` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NULL DEFAULT NULL COMMENT '联系方式',
+ `yuangong_delete` int NULL DEFAULT 1 COMMENT '假删',
+ `create_time` timestamp NULL DEFAULT NULL COMMENT '创建时间',
+ PRIMARY KEY (`id`) USING BTREE
+) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb3 COLLATE = utf8mb3_general_ci COMMENT = '员工' ROW_FORMAT = Dynamic;
+
+-- ----------------------------
+-- Records of yuangong
+-- ----------------------------
+INSERT INTO `yuangong` VALUES (1, 'a1', '123456', '陈磊(药品管理员)', 1, '17703786901', 1, '2025-02-25 15:18:34');
+INSERT INTO `yuangong` VALUES (2, 'a2', '123456', '赵敏(临床药师)', 2, '17703786902', 1, '2025-02-25 15:18:34');
+INSERT INTO `yuangong` VALUES (3, 'a3', '123456', '刘芳(药剂科主任)', 2, '17703786903', 1, '2025-02-25 15:18:34');
+
+SET FOREIGN_KEY_CHECKS = 1;
diff --git a/yiyuanyaopinguanli/.idea/.gitignore b/yiyuanyaopinguanli/.idea/.gitignore
new file mode 100644
index 0000000..35410ca
--- /dev/null
+++ b/yiyuanyaopinguanli/.idea/.gitignore
@@ -0,0 +1,8 @@
+# 默认忽略的文件
+/shelf/
+/workspace.xml
+# 基于编辑器的 HTTP 客户端请求
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml
diff --git a/yiyuanyaopinguanli/.idea/compiler.xml b/yiyuanyaopinguanli/.idea/compiler.xml
new file mode 100644
index 0000000..8bca515
--- /dev/null
+++ b/yiyuanyaopinguanli/.idea/compiler.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yiyuanyaopinguanli/.idea/encodings.xml b/yiyuanyaopinguanli/.idea/encodings.xml
new file mode 100644
index 0000000..63e9001
--- /dev/null
+++ b/yiyuanyaopinguanli/.idea/encodings.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yiyuanyaopinguanli/.idea/jarRepositories.xml b/yiyuanyaopinguanli/.idea/jarRepositories.xml
new file mode 100644
index 0000000..5a2f139
--- /dev/null
+++ b/yiyuanyaopinguanli/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yiyuanyaopinguanli/.idea/misc.xml b/yiyuanyaopinguanli/.idea/misc.xml
new file mode 100644
index 0000000..f0f8287
--- /dev/null
+++ b/yiyuanyaopinguanli/.idea/misc.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/yiyuanyaopinguanli/.idea/vcs.xml b/yiyuanyaopinguanli/.idea/vcs.xml
new file mode 100644
index 0000000..d843f34
--- /dev/null
+++ b/yiyuanyaopinguanli/.idea/vcs.xml
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
diff --git a/yiyuanyaopinguanli/pom.xml b/yiyuanyaopinguanli/pom.xml
new file mode 100644
index 0000000..ba73240
--- /dev/null
+++ b/yiyuanyaopinguanli/pom.xml
@@ -0,0 +1,182 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.2.2.RELEASE
+
+
+ com.jlwl
+
+ yiyuanyaopinguanli
+ 0.0.1-SNAPSHOT
+ yiyuanyaopinguanli
+ 医院药品管理系统
+
+
+ 1.8
+ 1.2.8
+ 3.1.1
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.mybatis.spring.boot
+ mybatis-spring-boot-starter
+ 2.1.1
+
+
+ org.springframework.boot
+ spring-boot-starter-jdbc
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-thymeleaf
+
+
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ runtime
+ true
+
+
+
+ mysql
+ mysql-connector-java
+
+
+ org.apache.shiro
+ shiro-spring
+ 1.3.2
+
+
+
+ com.baomidou
+ mybatis-plus
+ 2.3
+
+
+ com.baomidou
+ mybatisplus-spring-boot-starter
+ 1.0.5
+
+
+ com.google.protobuf
+ protobuf-java
+ 3.10.0
+
+
+
+ org.apache.commons
+ commons-lang3
+ 3.0
+
+
+
+ javax.validation
+ validation-api
+ 2.0.1.Final
+
+
+
+ commons-io
+ commons-io
+ 2.5
+
+
+
+
+ cn.hutool
+ hutool-all
+ 4.0.12
+
+
+
+
+ com.alibaba
+ fastjson
+ ${fastjson.version}
+
+
+
+ com.baidu.aip
+ java-sdk
+ 4.4.1
+
+
+
+
+ commons-io
+ commons-io
+ 2.2
+
+
+ org.apache.poi
+ poi-examples
+ 3.9
+
+
+ org.apache.poi
+ poi-excelant
+ 3.9
+
+
+ org.apache.poi
+ poi-ooxml
+ 3.9
+
+
+ org.apache.poi
+ poi-ooxml-schemas
+ 3.9
+
+
+ org.apache.poi
+ poi-scratchpad
+ 3.9
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+
+
+
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
+
+
diff --git a/yiyuanyaopinguanli/src/main/java/com/ServletContextListener/DictionaryServletContextListener.java b/yiyuanyaopinguanli/src/main/java/com/ServletContextListener/DictionaryServletContextListener.java
new file mode 100644
index 0000000..a74d177
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/ServletContextListener/DictionaryServletContextListener.java
@@ -0,0 +1,61 @@
+package com.ServletContextListener;
+
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.entity.DictionaryEntity;
+import com.service.DictionaryService;
+import com.thread.MyThreadMethod;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.context.ApplicationContext;
+import org.springframework.web.context.support.WebApplicationContextUtils;
+
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+import javax.servlet.annotation.WebListener;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 字典初始化监视器 用的是服务器监听,每次项目启动,都会调用这个类
+ */
+@WebListener
+public class DictionaryServletContextListener implements ServletContextListener {
+
+ private static final Logger logger = LoggerFactory.getLogger(DictionaryServletContextListener.class);
+ private MyThreadMethod myThreadMethod;
+ @Override
+ public void contextDestroyed(ServletContextEvent sce) {
+ logger.info("----------服务器停止----------");
+ }
+
+ @Override
+ public void contextInitialized(ServletContextEvent sce) {
+ ApplicationContext appContext = WebApplicationContextUtils.getWebApplicationContext(sce.getServletContext());
+
+ logger.info("----------字典表初始化开始----------");
+ DictionaryService dictionaryService = (DictionaryService)appContext.getBean("dictionaryService");
+ List dictionaryEntities = dictionaryService.selectList(new EntityWrapper());
+ Map> map = new HashMap<>();
+ for(DictionaryEntity d :dictionaryEntities){
+ Map m = map.get(d.getDicCode());
+ if(m ==null || m.isEmpty()){
+ m = new HashMap<>();
+ }
+ m.put(d.getCodeIndex(),d.getIndexName());
+ map.put(d.getDicCode(),m);
+ }
+ sce.getServletContext().setAttribute("dictionaryMap", map);
+ logger.info("----------字典表初始化完成----------");
+
+
+
+ logger.info("----------线程执行开始----------");
+ if (myThreadMethod == null) {
+ myThreadMethod = new MyThreadMethod();
+ myThreadMethod.start(); // servlet 上下文初始化时启动线程myThreadMethod
+ }
+ logger.info("----------线程执行结束----------");
+ }
+
+}
diff --git a/yiyuanyaopinguanli/src/main/java/com/YiyuanyaopinguanliApplication.java b/yiyuanyaopinguanli/src/main/java/com/YiyuanyaopinguanliApplication.java
new file mode 100644
index 0000000..1d7d79b
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/YiyuanyaopinguanliApplication.java
@@ -0,0 +1,23 @@
+package com;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.boot.web.servlet.ServletComponentScan;
+import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
+
+@SpringBootApplication
+@ServletComponentScan(value = "com.ServletContextListener")
+@MapperScan(basePackages = {"com.dao"})
+public class YiyuanyaopinguanliApplication extends SpringBootServletInitializer{
+
+ public static void main(String[] args) {
+ SpringApplication.run(YiyuanyaopinguanliApplication.class, args);
+ }
+
+ @Override
+ protected SpringApplicationBuilder configure(SpringApplicationBuilder applicationBuilder) {
+ return applicationBuilder.sources(YiyuanyaopinguanliApplication.class);
+ }
+}
diff --git a/yiyuanyaopinguanli/src/main/java/com/annotation/APPLoginUser.java b/yiyuanyaopinguanli/src/main/java/com/annotation/APPLoginUser.java
new file mode 100644
index 0000000..21d41b9
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/annotation/APPLoginUser.java
@@ -0,0 +1,15 @@
+package com.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 登录用户信息
+ */
+@Target(ElementType.PARAMETER)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface APPLoginUser {
+
+}
diff --git a/yiyuanyaopinguanli/src/main/java/com/annotation/IgnoreAuth.java b/yiyuanyaopinguanli/src/main/java/com/annotation/IgnoreAuth.java
new file mode 100644
index 0000000..7c3cc55
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/annotation/IgnoreAuth.java
@@ -0,0 +1,13 @@
+package com.annotation;
+
+import java.lang.annotation.*;
+
+/**
+ * 忽略Token验证
+ */
+@Target(ElementType.METHOD)
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface IgnoreAuth {
+
+}
diff --git a/yiyuanyaopinguanli/src/main/java/com/annotation/LoginUser.java b/yiyuanyaopinguanli/src/main/java/com/annotation/LoginUser.java
new file mode 100644
index 0000000..3d808d3
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/annotation/LoginUser.java
@@ -0,0 +1,15 @@
+package com.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * 登录用户信息
+ */
+@Target(ElementType.PARAMETER)
+@Retention(RetentionPolicy.RUNTIME)
+public @interface LoginUser {
+
+}
diff --git a/yiyuanyaopinguanli/src/main/java/com/config/InterceptorConfig.java b/yiyuanyaopinguanli/src/main/java/com/config/InterceptorConfig.java
new file mode 100644
index 0000000..586ccc5
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/config/InterceptorConfig.java
@@ -0,0 +1,39 @@
+package com.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
+
+import com.interceptor.AuthorizationInterceptor;
+
+@Configuration
+public class InterceptorConfig extends WebMvcConfigurationSupport{
+
+ @Bean
+ public AuthorizationInterceptor getAuthorizationInterceptor() {
+ return new AuthorizationInterceptor();
+ }
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ registry.addInterceptor(getAuthorizationInterceptor()).addPathPatterns("/**").excludePathPatterns("/static/**");
+ super.addInterceptors(registry);
+ }
+
+ /**
+ * springboot 2.0配置WebMvcConfigurationSupport之后,会导致默认配置被覆盖,要访问静态资源需要重写addResourceHandlers方法
+ */
+ @Override
+ public void addResourceHandlers(ResourceHandlerRegistry registry) {
+ registry.addResourceHandler("/**")
+ .addResourceLocations("classpath:/resources/")
+ .addResourceLocations("classpath:/static/")
+ .addResourceLocations("classpath:/admin/")
+ .addResourceLocations("classpath:/img/")
+ .addResourceLocations("classpath:/front/")
+ .addResourceLocations("classpath:/public/");
+ super.addResourceHandlers(registry);
+ }
+}
diff --git a/yiyuanyaopinguanli/src/main/java/com/config/MyMetaObjectHandler.java b/yiyuanyaopinguanli/src/main/java/com/config/MyMetaObjectHandler.java
new file mode 100644
index 0000000..2f9e793
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/config/MyMetaObjectHandler.java
@@ -0,0 +1,28 @@
+package com.config;
+
+import java.util.Date;
+
+import org.apache.ibatis.reflection.MetaObject;
+
+import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
+
+/**
+ * 自定义填充处理器
+ */
+public class MyMetaObjectHandler extends MetaObjectHandler {
+
+ @Override
+ public void insertFill(MetaObject metaObject) {
+ this.setFieldValByName("ctime", new Date(), metaObject);
+ }
+
+ @Override
+ public boolean openUpdateFill() {
+ return false;
+ }
+
+ @Override
+ public void updateFill(MetaObject metaObject) {
+ // 关闭更新填充、这里不执行
+ }
+}
diff --git a/yiyuanyaopinguanli/src/main/java/com/config/MybatisPlusConfig.java b/yiyuanyaopinguanli/src/main/java/com/config/MybatisPlusConfig.java
new file mode 100644
index 0000000..ec2e84b
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/config/MybatisPlusConfig.java
@@ -0,0 +1,24 @@
+
+package com.config;
+
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+
+import com.baomidou.mybatisplus.mapper.MetaObjectHandler;
+import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
+
+/**
+ * mybatis-plus配置
+ */
+@Configuration
+public class MybatisPlusConfig {
+
+ /**
+ * 分页插件
+ */
+ @Bean
+ public PaginationInterceptor paginationInterceptor() {
+ return new PaginationInterceptor();
+ }
+
+}
diff --git a/yiyuanyaopinguanli/src/main/java/com/controller/CommonController.java b/yiyuanyaopinguanli/src/main/java/com/controller/CommonController.java
new file mode 100644
index 0000000..d388dcf
--- /dev/null
+++ b/yiyuanyaopinguanli/src/main/java/com/controller/CommonController.java
@@ -0,0 +1,698 @@
+package com.controller;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.text.SimpleDateFormat;
+import java.util.*;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.alibaba.fastjson.JSON;
+import com.utils.StringUtil;
+import org.apache.commons.lang3.StringUtils;
+import org.json.JSONObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.util.ResourceUtils;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import com.annotation.IgnoreAuth;
+import com.baidu.aip.face.AipFace;
+import com.baidu.aip.face.MatchRequest;
+import com.baidu.aip.util.Base64Util;
+import com.baomidou.mybatisplus.mapper.EntityWrapper;
+import com.baomidou.mybatisplus.mapper.Wrapper;
+import com.entity.ConfigEntity;
+import com.service.CommonService;
+import com.service.ConfigService;
+import com.utils.BaiduUtil;
+import com.utils.FileUtil;
+import com.utils.R;
+
+/**
+ * 通用接口
+ */
+@RestController
+public class CommonController{
+ private static final Logger logger = LoggerFactory.getLogger(CommonController.class);
+ @Autowired
+ private CommonService commonService;
+
+ @Autowired
+ private ConfigService configService;
+
+ private static AipFace client = null;
+
+ private static String BAIDU_DITU_AK = null;
+
+ @RequestMapping("/location")
+ public R location(String lng,String lat) {
+ if(BAIDU_DITU_AK==null) {
+ BAIDU_DITU_AK = configService.selectOne(new EntityWrapper().eq("name", "baidu_ditu_ak")).getValue();
+ if(BAIDU_DITU_AK==null) {
+ return R.error("请在配置管理中正确配置baidu_ditu_ak");
+ }
+ }
+ Map map = BaiduUtil.getCityByLonLat(BAIDU_DITU_AK, lng, lat);
+ return R.ok().put("data", map);
+ }
+
+ /**
+ * 人脸比对
+ *
+ * @param face1 人脸1
+ * @param face2 人脸2
+ * @return
+ */
+ @RequestMapping("/matchFace")
+ public R matchFace(String face1, String face2, HttpServletRequest request) {
+ if(client==null) {
+ /*String AppID = configService.selectOne(new EntityWrapper().eq("name", "AppID")).getValue();*/
+ String APIKey = configService.selectOne(new EntityWrapper().eq("name", "APIKey")).getValue();
+ String SecretKey = configService.selectOne(new EntityWrapper().eq("name", "SecretKey")).getValue();
+ String token = BaiduUtil.getAuth(APIKey, SecretKey);
+ if(token==null) {
+ return R.error("请在配置管理中正确配置APIKey和SecretKey");
+ }
+ client = new AipFace(null, APIKey, SecretKey);
+ client.setConnectionTimeoutInMillis(2000);
+ client.setSocketTimeoutInMillis(60000);
+ }
+ JSONObject res = null;
+ try {
+ File file1 = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+face1);
+ File file2 = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+face2);
+ String img1 = Base64Util.encode(FileUtil.FileToByte(file1));
+ String img2 = Base64Util.encode(FileUtil.FileToByte(file2));
+ MatchRequest req1 = new MatchRequest(img1, "BASE64");
+ MatchRequest req2 = new MatchRequest(img2, "BASE64");
+ ArrayList requests = new ArrayList();
+ requests.add(req1);
+ requests.add(req2);
+ res = client.match(requests);
+ System.out.println(res.get("result"));
+ } catch (FileNotFoundException e) {
+ e.printStackTrace();
+ return R.error("文件不存在");
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ return R.ok().put("data", com.alibaba.fastjson.JSONObject.parse(res.get("result").toString()));
+ }
+
+ /**
+ * 获取table表中的column列表(联动接口)
+ * @return
+ */
+ @RequestMapping("/option/{tableName}/{columnName}")
+ @IgnoreAuth
+ public R getOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,String level,String parent) {
+ Map params = new HashMap();
+ params.put("table", tableName);
+ params.put("column", columnName);
+ if(StringUtils.isNotBlank(level)) {
+ params.put("level", level);
+ }
+ if(StringUtils.isNotBlank(parent)) {
+ params.put("parent", parent);
+ }
+ List data = commonService.getOption(params);
+ return R.ok().put("data", data);
+ }
+
+ /**
+ * 根据table中的column获取单条记录
+ * @return
+ */
+ @RequestMapping("/follow/{tableName}/{columnName}")
+ @IgnoreAuth
+ public R getFollowByOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, @RequestParam String columnValue) {
+ Map params = new HashMap();
+ params.put("table", tableName);
+ params.put("column", columnName);
+ params.put("columnValue", columnValue);
+ Map result = commonService.getFollowByOption(params);
+ return R.ok().put("data", result);
+ }
+
+ /**
+ * 修改table表的sfsh状态
+ * @param map
+ * @return
+ */
+ @RequestMapping("/sh/{tableName}")
+ public R sh(@PathVariable("tableName") String tableName, @RequestBody Map map) {
+ map.put("table", tableName);
+ commonService.sh(map);
+ return R.ok();
+ }
+
+ /**
+ * 获取需要提醒的记录数
+ * @param tableName
+ * @param columnName
+ * @param type 1:数字 2:日期
+ * @param map
+ * @return
+ */
+ @RequestMapping("/remind/{tableName}/{columnName}/{type}")
+ @IgnoreAuth
+ public R remindCount(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,
+ @PathVariable("type") String type,@RequestParam Map map) {
+ map.put("table", tableName);
+ map.put("column", columnName);
+ map.put("type", type);
+
+ if(type.equals("2")) {
+ SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
+ Calendar c = Calendar.getInstance();
+ Date remindStartDate = null;
+ Date remindEndDate = null;
+ if(map.get("remindstart")!=null) {
+ Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
+ c.setTime(new Date());
+ c.add(Calendar.DAY_OF_MONTH,remindStart);
+ remindStartDate = c.getTime();
+ map.put("remindstart", sdf.format(remindStartDate));
+ }
+ if(map.get("remindend")!=null) {
+ Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
+ c.setTime(new Date());
+ c.add(Calendar.DAY_OF_MONTH,remindEnd);
+ remindEndDate = c.getTime();
+ map.put("remindend", sdf.format(remindEndDate));
+ }
+ }
+
+ int count = commonService.remindCount(map);
+ return R.ok().put("count", count);
+ }
+
+ /**
+ * 圖表统计
+ */
+ @IgnoreAuth
+ @RequestMapping("/group/{tableName}")
+ public R group1(@PathVariable("tableName") String tableName, @RequestParam Map params) {
+ params.put("table1", tableName);
+ List