feat: init

This commit is contained in:
Shu Guang 2025-06-05 23:45:30 +08:00
parent 9db44d37ba
commit d62bc5e47d
578 changed files with 49649 additions and 0 deletions

8
.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

18
.idea/compiler.xml generated Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="yiyuanyaopinguanli" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="yiyuanyaopinguanli" options="-parameters" />
</option>
</component>
</project>

6
.idea/encodings.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/yiyuanyaopinguanli/src/main/java" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
</profile>
</component>

20
.idea/jarRepositories.xml generated Normal file
View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

14
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/yiyuanyaopinguanli/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_22" default="true" project-jdk-name="corretto-22" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" />
</component>
</project>

8
.idea/modules.xml generated Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/医院药品管理系统.iml" filepath="$PROJECT_DIR$/.idea/医院药品管理系统.iml" />
</modules>
</component>
</project>

124
.idea/uiDesigner.xml generated Normal file
View File

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

9
.idea/医院药品管理系统.iml generated Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

Binary file not shown.

314
yiyuanyaopinguanli.sql Normal file
View File

@ -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', '<p><span style=\"color: rgb(64, 64, 64);\">近期检查发现,部分科室储存的中药饮片存在受潮、霉变现象。特此提醒:中药饮片应储存在阴凉、干燥、通风的环境中,避免阳光直射和高温高湿。请各科室定期检查药品储存条件,确保药品质量。药剂科将提供储存指导,如有问题请及时反馈。</span></p>', '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', '<p><span style=\"color: rgb(64, 64, 64);\">此前因供应链问题导致布洛芬缓释胶囊暂时缺货,现供应商已恢复正常供货。我院药剂科已完成药品入库,各科室可正常开具处方。感谢各科室在此期间的理解与配合,如有疑问请联系药剂科。</span></p>', '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', '<p><span style=\"color: rgb(64, 64, 64);\">为确保药品库存数据准确我院将于2024年12月1日至12月3日进行第四季度药品库存盘点。盘点期间药剂科将暂停部分药品的发放请各科室提前做好药品申领计划。盘点结束后药品发放将恢复正常。感谢各科室的配合与支持</span></p>', '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', '<p><span style=\"color: rgb(64, 64, 64);\">我院药剂科已引进新型降糖药“格列净”该药物适用于2型糖尿病患者的血糖控制具有疗效显著、副作用少的特点。临床医生可根据患者病情开具处方药剂科将提供详细的用药指导。欢迎各科室医生咨询相关使用信息详情请参阅药品说明书或联系药剂科。</span></p>', '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', '<p><span style=\"color: rgb(64, 64, 64);\">由于近期头孢类抗生素需求激增,供应商产能不足,导致我院头孢类抗生素(包括头孢呋辛、头孢克洛等)暂时缺货。预计缺货将持续至下月中旬。在此期间,建议临床医生根据患者情况选择替代药品,或与药剂科联系协调其他解决方案。对此造成的不便,我们深表歉意,并将尽快恢复供应。</span></p>', '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', '<p><span style=\"color: rgb(64, 64, 64);\">根据国家医保局最新政策及药品采购价格变动我院对部分药品价格进行了调整。具体涉及药品包括阿司匹林、二甲双胍、氨氯地平等。调整后的价格将于2024年11月1日正式生效请各科室医生及患者知悉。详细价格清单可在我院官网或药剂科查询。</span></p>', '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', '<p><span style=\"color: rgb(64, 64, 64);\">我院药剂科已引进新型降糖药“格列净”该药物适用于2型糖尿病患者的血糖控制具有疗效显著、副作用少的特点。临床医生可根据患者病情开具处方药剂科将提供详细的用药指导。欢迎各科室医生咨询相关使用信息详情请参阅药品说明书或联系药剂科。</span></p>', '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', '<p><span style=\"color: rgb(64, 64, 64);\">由于近期头孢类抗生素需求激增,供应商产能不足,导致我院头孢类抗生素(包括头孢呋辛、头孢克洛等)暂时缺货。预计缺货将持续至下月中旬。在此期间,建议临床医生根据患者情况选择替代药品,或与药剂科联系协调其他解决方案。对此造成的不便,我们深表歉意,并将尽快恢复供应。</span></p>', '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, '<p><span style=\"color: rgb(64, 64, 64);\">阿莫西林胶囊是一种广谱抗生素用于治疗细菌感染如呼吸道感染、尿路感染等。每盒包含20粒每粒剂量为500mg。常用剂量为每次1粒每日3次口服。对青霉素过敏者禁用使用期间可能出现皮疹、胃肠道不适等副作用。</span></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (2, '蒙脱石散', 5, 110, 4, 25.00, '<p><span style=\"color: rgb(64, 64, 64);\">蒙脱石散是一种止泻药用于治疗急慢性腹泻。每盒包含10袋每袋剂量为3g。常用剂量为每次1袋每日3次口服。使用期间需注意补充水分避免脱水。副作用较少偶见便秘。</span></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (3, '维生素C泡腾片', 6, 250, 5, 15.00, '<p><span style=\"color: rgb(64, 64, 64);\">维生素C泡腾片是一种维生素补充剂用于预防和治疗维生素C缺乏症。每盒包含20片每片剂量为1000mg。常用剂量为每日1片溶于水中饮用。过量服用可能导致腹泻建议按需使用。</span></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (4, '奥美拉唑肠溶胶囊', 1, 160, 3, 40.00, '<p><span style=\"color: rgb(64, 64, 64);\">奥美拉唑肠溶胶囊是一种质子泵抑制剂用于治疗胃酸过多引起的胃溃疡、十二指肠溃疡等。每盒包含14粒每粒剂量为20mg。常用剂量为每日1粒空腹服用。长期使用可能增加骨折风险建议定期监测。</span></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (5, '头孢呋辛片', 2, 120, 5, 45.00, '<p><span style=\"color: rgb(64, 64, 64);\">头孢呋辛片是一种广谱抗生素适用于治疗呼吸道感染、尿路感染、皮肤软组织感染等。每盒包含10片每片剂量为250mg。成人常用剂量为每次1片每日2次饭后服用。使用期间可能出现胃肠道不适、皮疹等副作用对青霉素过敏者慎用。</span></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (6, '氯雷他定片', 1, 130, 4, 18.00, '<p><span style=\"color: rgb(64, 64, 64);\">氯雷他定片是一种抗过敏药用于缓解过敏性鼻炎、荨麻疹等症状。每盒包含10片每片剂量为10mg。常用剂量为每日1片口服。副作用较少偶见头痛、乏力等。孕妇及哺乳期妇女慎用。</span></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (7, '布洛芬缓释胶囊', 1, 90, 5, 22.00, '<p><span style=\"color: rgb(64, 64, 64);\">布洛芬缓释胶囊是一种非甾体抗炎药用于缓解轻至中度疼痛如头痛、牙痛、关节痛等。每盒包含12粒每粒剂量为300mg。常用剂量为每次1粒每日2次。长期使用可能增加胃肠道出血风险建议饭后服用。</span></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (8, '氨氯地平片', 1, 180, 3, 35.00, '<p><span style=\"color: rgb(64, 64, 64);\">氨氯地平片是一种钙通道阻滞剂用于治疗高血压和心绞痛。每盒包含14片每片剂量为5mg。常用剂量为每日1片口服。可能出现头痛、水肿等副作用肝功能不全者需调整剂量。</span></p><p><br></p><p><br></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (9, '二甲双胍缓释片', 5, 150, 3, 28.00, '<p><span style=\"color: rgb(64, 64, 64);\">二甲双胍缓释片是治疗2型糖尿病的一线药物能够有效控制血糖水平。每盒包含20片每片剂量为500mg。常用剂量为每日1-2片随餐服用。常见副作用包括胃肠道不适建议从小剂量开始逐渐调整。肾功能不全者慎用。</span></p>', 1, '2025-02-25 15:18:34');
INSERT INTO `yaopin` VALUES (10, '阿司匹林肠溶片', 5, 200, 5, 12.00, '<p><span style=\"color: rgb(64, 64, 64);\">阿司匹林肠溶片主要用于预防心脑血管疾病如心肌梗死、脑卒中等。每盒包含30片每片剂量为100mg。建议空腹服用以减少胃肠道刺激。长期服用者需定期监测凝血功能避免出血风险。孕妇及消化性溃疡患者禁用。</span></p>', 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, '<p><span style=\"color: rgb(64, 64, 64);\">2024年11月1日根据儿科申请出库蒙脱石散20盒至儿科药房。出库时核对批号20240825有效期至2025年8月。出库后库存剩余90盒。</span></p>', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
INSERT INTO `yaopin_churu_inout` VALUES (2, '164853831928515', '维生素C泡腾片入库', 1, '<p><span style=\"color: rgb(64, 64, 64);\">2024年10月31日从制药厂采购维生素C泡腾片150盒批号20241015有效期至2025年10月。入库时抽查药品无异常包装完好。入库后库存更新为400盒。</span></p>', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
INSERT INTO `yaopin_churu_inout` VALUES (3, '16485383192857', '奥美拉唑肠溶胶囊出库', 2, '<p><span style=\"color: rgb(64, 64, 64);\">2024年10月30日根据消化内科申请出库奥美拉唑肠溶胶囊40盒至消化内科药房。出库时核对批号20240910有效期至2025年9月。出库后库存剩余120盒。</span></p>', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
INSERT INTO `yaopin_churu_inout` VALUES (4, '164853831928519', '氯雷他定片入库', 1, '<p><span style=\"color: rgb(64, 64, 64);\">2024年10月29日从医药公司采购氯雷他定片120盒批号20241005有效期至2025年10月。入库时检查药品无异常包装完好。入库后库存更新为250盒。</span></p>', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
INSERT INTO `yaopin_churu_inout` VALUES (5, '164853831928514', '布洛芬缓释胶囊出库', 2, '<p><span style=\"color: rgb(64, 64, 64);\">2024年10月28日根据急诊科申请出库布洛芬缓释胶囊30盒至急诊科药房。出库时核对批号20240820有效期至2025年8月。出库后库存剩余60盒。</span></p>', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
INSERT INTO `yaopin_churu_inout` VALUES (6, '1648539113625', '二甲双胍缓释片入库', 2, '<p><span style=\"color: rgb(64, 64, 64);\">2024年10月27日从制药厂采购二甲双胍缓释片80盒批号20241010有效期至2025年10月。入库时抽查药品无异常包装完好。入库后库存更新为230盒。</span></p>', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
INSERT INTO `yaopin_churu_inout` VALUES (7, '1648539189083', '阿司匹林肠溶片出库', 2, '<p><span style=\"color: rgb(64, 64, 64);\">2024年10月26日根据心内科申请出库阿司匹林肠溶片50盒至心内科药房。出库时核对批号20230915有效期至2025年9月。出库后库存剩余150盒。</span></p>', '2025-02-25 15:18:34', '2025-02-25 15:18:34');
INSERT INTO `yaopin_churu_inout` VALUES (8, '1648539236869', '头孢呋辛片入库', 1, '<p><span style=\"color: rgb(64, 64, 64);\">2024年10月25日采购头孢呋辛片100盒批号20231001有效期至2025年10月。入库时检查包装完好无破损药品质量符合标准。入库后库存更新为220盒。</span></p>', '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;

8
yiyuanyaopinguanli/.idea/.gitignore generated vendored Normal file
View File

@ -0,0 +1,8 @@
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

18
yiyuanyaopinguanli/.idea/compiler.xml generated Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="yiyuanyaopinguanli" />
</profile>
</annotationProcessing>
</component>
<component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="yiyuanyaopinguanli" options="-parameters" />
</option>
</component>
</project>

6
yiyuanyaopinguanli/.idea/encodings.xml generated Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
</component>
</project>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

12
yiyuanyaopinguanli/.idea/misc.xml generated Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_22" default="true" project-jdk-name="openjdk-22" project-jdk-type="JavaSDK" />
</project>

4
yiyuanyaopinguanli/.idea/vcs.xml generated Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings" defaultProject="true" />
</project>

182
yiyuanyaopinguanli/pom.xml Normal file
View File

@ -0,0 +1,182 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.2.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.jlwl</groupId>
<!-- 导入项目的名称 -->
<artifactId>yiyuanyaopinguanli</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>yiyuanyaopinguanli</name>
<description>医院药品管理系统</description>
<properties>
<java.version>1.8</java.version>
<fastjson.version>1.2.8</fastjson.version>
<maven-jar-plugin.version>3.1.1</maven-jar-plugin.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<!--访问静态资源-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<!--热部署-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatisplus-spring-boot-starter</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.10.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.1.Final</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>4.0.12</version>
</dependency>
<!-- FastJson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!--<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>sqljdbc4</artifactId>
<scope>4.0</scope>
<version>4.0</version>
</dependency>
<!- 百度人工智能 -->
<dependency>
<groupId>com.baidu.aip</groupId>
<artifactId>java-sdk</artifactId>
<version>4.4.1</version>
</dependency>
<!-- poi高版本额外包 -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-examples</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-excelant</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@ -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<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
Map<String, Map<Integer,String>> map = new HashMap<>();
for(DictionaryEntity d :dictionaryEntities){
Map<Integer, String> 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("----------线程执行结束----------");
}
}

View File

@ -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);
}
}

View File

@ -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 {
}

View File

@ -0,0 +1,13 @@
package com.annotation;
import java.lang.annotation.*;
/**
* 忽略Token验证
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface IgnoreAuth {
}

View File

@ -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 {
}

View File

@ -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);
}
}

View File

@ -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) {
// 关闭更新填充这里不执行
}
}

View File

@ -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();
}
}

View File

@ -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<ConfigEntity>().eq("name", "baidu_ditu_ak")).getValue();
if(BAIDU_DITU_AK==null) {
return R.error("请在配置管理中正确配置baidu_ditu_ak");
}
}
Map<String, String> 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<ConfigEntity>().eq("name", "AppID")).getValue();*/
String APIKey = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "APIKey")).getValue();
String SecretKey = configService.selectOne(new EntityWrapper<ConfigEntity>().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<MatchRequest> requests = new ArrayList<MatchRequest>();
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<String, Object> params = new HashMap<String, Object>();
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<String> 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<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
params.put("columnValue", columnValue);
Map<String, Object> 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<String, Object> 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<String, Object> 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<String,Object> params) {
params.put("table1", tableName);
List<Map<String, Object>> result = commonService.chartBoth(params);
return R.ok().put("data", result);
}
/**
* 单列求和
*/
@RequestMapping("/cal/{tableName}/{columnName}")
@IgnoreAuth
public R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
Map<String, Object> result = commonService.selectCal(params);
return R.ok().put("data", result);
}
/**
* 分组统计
*/
@RequestMapping("/group/{tableName}/{columnName}")
@IgnoreAuth
public R group(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("column", columnName);
List<Map<String, Object>> result = commonService.selectGroup(params);
return R.ok().put("data", result);
}
/**
* 按值统计
*/
@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}")
@IgnoreAuth
public R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("table", tableName);
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
List<Map<String, Object>> result = commonService.selectValue(params);
return R.ok().put("data", result);
}
/**
* 下面为新加的
*
*
*
*/
/**
* 查询字典表的分组求和
* tableName 表名
* groupColumn 分组字段
* sumCloum 统计字段
* @return
*/
@RequestMapping("/newSelectGroupSum")
public R newSelectGroupSum(@RequestParam Map<String,Object> params) {
logger.debug("newSelectGroupSum:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.newSelectGroupSum(params);
return R.ok().put("data", result);
}
/**
tableName 查询表
condition1 条件1
condition1Value 条件1值
average 计算平均评分
取值
有值 Number(res.data.value.toFixed(1))
无值 if(res.data){}
* */
@IgnoreAuth
@RequestMapping("/queryScore")
public R queryScore(@RequestParam Map<String, Object> params) {
logger.debug("queryScore:,,Controller:{},,params:{}",this.getClass().getName(),params);
Map<String, Object> queryScore = commonService.queryScore(params);
return R.ok().put("data", queryScore);
}
/**
* 查询字典表的分组统计总条数
* tableName 表名
* groupColumn 分组字段
* @return
*/
@RequestMapping("/newSelectGroupCount")
public R newSelectGroupCount(@RequestParam Map<String,Object> params) {
logger.debug("newSelectGroupCount:,,Controller:{},,params:{}",this.getClass().getName(),params);
List<Map<String, Object>> result = commonService.newSelectGroupCount(params);
return R.ok().put("data", result);
}
/**
* 当前表的日期分组求和
* tableName 表名
* groupColumn 分组字段
* sumCloum 统计字段
* dateFormatType 日期格式化类型 1: 2: 3:
* @return
*/
@RequestMapping("/newSelectDateGroupSum")
public R newSelectDateGroupSum(@RequestParam Map<String,Object> params) {
logger.debug("newSelectDateGroupSum:,,Controller:{},,params:{}",this.getClass().getName(),params);
String dateFormatType = String.valueOf(params.get("dateFormatType"));
if("1".equals(dateFormatType)){
params.put("dateFormat", "%Y");
}else if("2".equals(dateFormatType)){
params.put("dateFormat", "%Y-%m");
}else if("3".equals(dateFormatType)){
params.put("dateFormat", "%Y-%m-%d");
}else{
R.error("日期格式化不正确");
}
List<Map<String, Object>> result = commonService.newSelectDateGroupSum(params);
return R.ok().put("data", result);
}
/**
*
* 查询字典表的分组统计总条数
* tableName 表名
* groupColumn 分组字段
* dateFormatType 日期格式化类型 1: 2: 3:
* @return
*/
@RequestMapping("/newSelectDateGroupCount")
public R newSelectDateGroupCount(@RequestParam Map<String,Object> params) {
logger.debug("newSelectDateGroupCount:,,Controller:{},,params:{}",this.getClass().getName(),params);
String dateFormatType = String.valueOf(params.get("dateFormatType"));
if("1".equals(dateFormatType)){
params.put("dateFormat", "%Y");
}else if("2".equals(dateFormatType)){
params.put("dateFormat", "%Y-%m");
}else if("3".equals(dateFormatType)){
params.put("dateFormat", "%Y-%m-%d");
}else{
R.error("日期格式化类型不正确");
}
List<Map<String, Object>> result = commonService.newSelectDateGroupCount(params);
return R.ok().put("data", result);
}
/**
* 饼状图
* -- 饼状图 查询当前表
-- 查询字典表
-- 统计 -- 查询某个月的每个类型的订单销售数量
-- 求和 -- 查询某个月的每个类型的订单销售额
-- 查询某个字符串
-- 统计 -- 查询某个月的每个员工的订单销售数量
-- 求和 -- 查询某个月的每个员工的订单销售额
-- 查询时间
-- 统计 -- 查询每个月的订单销售数量
-- 求和 -- 查询每个月的订单销售额
-- 饼状图 查询级联表
-- 查询字典表
-- 统计 -- 查询某个月的每个类型的订单销售数量
-- 求和 -- 查询某个月的每个类型的订单销售额
-- 查询某个字符串
-- 统计 -- 查询某个月的每个员工的订单销售数量
-- 求和 -- 查询某个月的每个员工的订单销售额
-- 查询时间
-- 统计 -- 统计每个月的订单销售数量
-- 求和 -- 查询每个月的订单销售额
*/
/**
* 柱状图
-- 柱状图 查询当前表
-- 某个
-- 当前表 2 级联表 1
-- 统计
-- 日期字符串下拉框
-- 求和
-- 日期字符串下拉框
-- 柱状图 查询级联表
-- 某个
-- 统计
-- 日期字符串下拉框
-- 求和
-- 日期字符串下拉框
*/
/**
* 柱状图求和
*/
@RequestMapping("/barSum")
public R barSum(@RequestParam Map<String,Object> params) {
logger.debug("barSum方法:,,Controller:{},,params:{}",this.getClass().getName(), com.alibaba.fastjson.JSONObject.toJSONString(params));
Boolean isJoinTableFlag = false;//是否有级联表相关
String one = "";//第一优先
String two = "";//第二优先
//处理thisTable和joinTable 处理内容是把json字符串转为Map并把带有,的切割为数组
//当前表
Map<String,Object> thisTable = JSON.parseObject(String.valueOf(params.get("thisTable")),Map.class);
params.put("thisTable",thisTable);
//级联表
String joinTableString = String.valueOf(params.get("joinTable"));
if(StringUtil.isNotEmpty(joinTableString)) {
Map<String, Object> joinTable = JSON.parseObject(joinTableString, Map.class);
params.put("joinTable", joinTable);
isJoinTableFlag = true;
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("date")))){//当前表日期
thisTable.put("date",String.valueOf(thisTable.get("date")).split(","));
one = "thisDate0";
}
if(isJoinTableFlag){//级联表日期
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("date")))){
joinTable.put("date",String.valueOf(joinTable.get("date")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinDate0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinDate0";
}
}
}
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("string")))){//当前表字符串
thisTable.put("string",String.valueOf(thisTable.get("string")).split(","));
if(StringUtil.isEmpty(one)){
one ="thisString0";
}else{
if(StringUtil.isEmpty(two)){
two ="thisString0";
}
}
}
if(isJoinTableFlag){//级联表字符串
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("string")))){
joinTable.put("string",String.valueOf(joinTable.get("string")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinString0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinString0";
}
}
}
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("types")))){//当前表类型
thisTable.put("types",String.valueOf(thisTable.get("types")).split(","));
if(StringUtil.isEmpty(one)){
one ="thisTypes0";
}else{
if(StringUtil.isEmpty(two)){
two ="thisTypes0";
}
}
}
if(isJoinTableFlag){//级联表类型
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("types")))){
joinTable.put("types",String.valueOf(joinTable.get("types")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinTypes0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinTypes0";
}
}
}
}
List<Map<String, Object>> result = commonService.barSum(params);
List<String> xAxis = new ArrayList<>();//报表x轴
List<List<String>> yAxis = new ArrayList<>();//y轴
List<String> legend = new ArrayList<>();//标题
if(StringUtil.isEmpty(two)){//不包含第二列
List<String> yAxis0 = new ArrayList<>();
yAxis.add(yAxis0);
legend.add("数值");
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get(one));
String value = String.valueOf(map.get("value"));
xAxis.add(oneValue);
yAxis0.add(value);
}
}else{//包含第二列
Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();
if(StringUtil.isNotEmpty(two)){
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get(one));
String twoValue = String.valueOf(map.get(two));
String value = String.valueOf(map.get("value"));
if(!legend.contains(twoValue)){
legend.add(twoValue);//添加完成后 就是最全的第二列的类型
}
if(dataMap.containsKey(oneValue)){
dataMap.get(oneValue).put(twoValue,value);
}else{
HashMap<String, String> oneData = new HashMap<>();
oneData.put(twoValue,value);
dataMap.put(oneValue,oneData);
}
}
}
for(int i =0; i<legend.size(); i++){
yAxis.add(new ArrayList<String>());
}
Set<String> keys = dataMap.keySet();
for(String key:keys){
xAxis.add(key);
HashMap<String, String> map = dataMap.get(key);
for(int i =0; i<legend.size(); i++){
List<String> data = yAxis.get(i);
if(StringUtil.isNotEmpty(map.get(legend.get(i)))){
data.add(map.get(legend.get(i)));
}else{
data.add("0");
}
}
}
System.out.println();
}
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("xAxis",xAxis);
resultMap.put("yAxis",yAxis);
resultMap.put("legend",legend);
return R.ok().put("data", resultMap);
}
/**
* 柱状图统计
*/
@RequestMapping("/barCount")
public R barCount(@RequestParam Map<String,Object> params) {
logger.debug("barCount方法:,,Controller:{},,params:{}",this.getClass().getName(), com.alibaba.fastjson.JSONObject.toJSONString(params));
Boolean isJoinTableFlag = false;//是否有级联表相关
String one = "";//第一优先
String two = "";//第二优先
//处理thisTable和joinTable 处理内容是把json字符串转为Map并把带有,的切割为数组
//当前表
Map<String,Object> thisTable = JSON.parseObject(String.valueOf(params.get("thisTable")),Map.class);
params.put("thisTable",thisTable);
//级联表
String joinTableString = String.valueOf(params.get("joinTable"));
if(StringUtil.isNotEmpty(joinTableString)) {
Map<String, Object> joinTable = JSON.parseObject(joinTableString, Map.class);
params.put("joinTable", joinTable);
isJoinTableFlag = true;
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("date")))){//当前表日期
thisTable.put("date",String.valueOf(thisTable.get("date")).split(","));
one = "thisDate0";
}
if(isJoinTableFlag){//级联表日期
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("date")))){
joinTable.put("date",String.valueOf(joinTable.get("date")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinDate0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinDate0";
}
}
}
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("string")))){//当前表字符串
thisTable.put("string",String.valueOf(thisTable.get("string")).split(","));
if(StringUtil.isEmpty(one)){
one ="thisString0";
}else{
if(StringUtil.isEmpty(two)){
two ="thisString0";
}
}
}
if(isJoinTableFlag){//级联表字符串
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("string")))){
joinTable.put("string",String.valueOf(joinTable.get("string")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinString0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinString0";
}
}
}
}
if(StringUtil.isNotEmpty(String.valueOf(thisTable.get("types")))){//当前表类型
thisTable.put("types",String.valueOf(thisTable.get("types")).split(","));
if(StringUtil.isEmpty(one)){
one ="thisTypes0";
}else{
if(StringUtil.isEmpty(two)){
two ="thisTypes0";
}
}
}
if(isJoinTableFlag){//级联表类型
Map<String, Object> joinTable = (Map<String, Object>) params.get("joinTable");
if(StringUtil.isNotEmpty(String.valueOf(joinTable.get("types")))){
joinTable.put("types",String.valueOf(joinTable.get("types")).split(","));
if(StringUtil.isEmpty(one)){
one ="joinTypes0";
}else{
if(StringUtil.isEmpty(two)){
two ="joinTypes0";
}
}
}
}
List<Map<String, Object>> result = commonService.barCount(params);
List<String> xAxis = new ArrayList<>();//报表x轴
List<List<String>> yAxis = new ArrayList<>();//y轴
List<String> legend = new ArrayList<>();//标题
if(StringUtil.isEmpty(two)){//不包含第二列
List<String> yAxis0 = new ArrayList<>();
yAxis.add(yAxis0);
legend.add("数值");
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get(one));
String value = String.valueOf(map.get("value"));
xAxis.add(oneValue);
yAxis0.add(value);
}
}else{//包含第二列
Map<String, HashMap<String, String>> dataMap = new LinkedHashMap<>();
if(StringUtil.isNotEmpty(two)){
for(Map<String, Object> map :result){
String oneValue = String.valueOf(map.get(one));
String twoValue = String.valueOf(map.get(two));
String value = String.valueOf(map.get("value"));
if(!legend.contains(twoValue)){
legend.add(twoValue);//添加完成后 就是最全的第二列的类型
}
if(dataMap.containsKey(oneValue)){
dataMap.get(oneValue).put(twoValue,value);
}else{
HashMap<String, String> oneData = new HashMap<>();
oneData.put(twoValue,value);
dataMap.put(oneValue,oneData);
}
}
}
for(int i =0; i<legend.size(); i++){
yAxis.add(new ArrayList<String>());
}
Set<String> keys = dataMap.keySet();
for(String key:keys){
xAxis.add(key);
HashMap<String, String> map = dataMap.get(key);
for(int i =0; i<legend.size(); i++){
List<String> data = yAxis.get(i);
if(StringUtil.isNotEmpty(map.get(legend.get(i)))){
data.add(map.get(legend.get(i)));
}else{
data.add("0");
}
}
}
System.out.println();
}
Map<String, Object> resultMap = new HashMap<>();
resultMap.put("xAxis",xAxis);
resultMap.put("yAxis",yAxis);
resultMap.put("legend",legend);
return R.ok().put("data", resultMap);
}
}

View File

@ -0,0 +1,111 @@
package com.controller;
import java.util.Arrays;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
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.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.service.ConfigService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.ValidatorUtils;
/**
* 登录相关
*/
@RequestMapping("config")
@RestController
public class ConfigController{
@Autowired
private ConfigService configService;
/**
* 列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params);
return R.ok().put("data", page);
}
/**
* 列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,ConfigEntity config){
EntityWrapper<ConfigEntity> ew = new EntityWrapper<ConfigEntity>();
PageUtils page = configService.queryPage(params);
return R.ok().put("data", page);
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
* 详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") String id){
ConfigEntity config = configService.selectById(id);
return R.ok().put("data", config);
}
/**
* 根据name获取信息
*/
@RequestMapping("/info")
public R infoByName(@RequestParam String name){
ConfigEntity config = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
return R.ok().put("data", config);
}
/**
* 保存
*/
@PostMapping("/save")
public R save(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.insert(config);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody ConfigEntity config){
// ValidatorUtils.validateEntity(config);
configService.updateById(config);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
configService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}

View File

@ -0,0 +1,280 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 字典表
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/dictionary")
public class DictionaryController {
private static final Logger logger = LoggerFactory.getLogger(DictionaryController.class);
@Autowired
private DictionaryService dictionaryService;
@Autowired
private TokenService tokenService;
//级联表service
@Autowired
private YonghuService yonghuService;
@Autowired
private YuangongService yuangongService;
/**
* 后端列表
*/
@RequestMapping("/page")
@IgnoreAuth
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
if(params.get("orderBy")==null || params.get("orderBy")==""){
params.put("orderBy","id");
}
PageUtils page = dictionaryService.queryPage(params);
//字典表数据转换
List<DictionaryView> list =(List<DictionaryView>)page.getList();
for(DictionaryView 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);
DictionaryEntity dictionary = dictionaryService.selectById(id);
if(dictionary !=null){
//entity转view
DictionaryView view = new DictionaryView();
BeanUtils.copyProperties( dictionary , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>()
.eq("dic_code", dictionary.getDicCode())
.eq("index_name", dictionary.getIndexName())
;
if(dictionary.getDicCode().contains("_erji_types")){
queryWrapper.eq("super_id",dictionary.getSuperId());
}
logger.info("sql语句:"+queryWrapper.getSqlSegment());
DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);
if(dictionaryEntity==null){
dictionary.setCreateTime(new Date());
dictionaryService.insert(dictionary);
//字典表新增数据,把数据再重新查出,放入监听器中
List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
ServletContext servletContext = request.getServletContext();
Map<String, Map<Integer,String>> map = new HashMap<>();
for(DictionaryEntity d :dictionaryEntities){
Map<Integer, String> m = map.get(d.getDicCode());
if(m ==null || m.isEmpty()){
m = new HashMap<>();
}
m.put(d.getCodeIndex(),d.getIndexName());
map.put(d.getDicCode(),m);
}
servletContext.setAttribute("dictionaryMap",map);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody DictionaryEntity dictionary, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有相同数据
Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>()
.notIn("id",dictionary.getId())
.eq("dic_code", dictionary.getDicCode())
.eq("index_name", dictionary.getIndexName())
;
if(dictionary.getDicCode().contains("_erji_types")){
queryWrapper.eq("super_id",dictionary.getSuperId());
}
logger.info("sql语句:"+queryWrapper.getSqlSegment());
DictionaryEntity dictionaryEntity = dictionaryService.selectOne(queryWrapper);
if(dictionaryEntity==null){
dictionaryService.updateById(dictionary);//根据id更新
//如果字典表修改数据的话,把数据再重新查出,放入监听器中
List<DictionaryEntity> dictionaryEntities = dictionaryService.selectList(new EntityWrapper<DictionaryEntity>());
ServletContext servletContext = request.getServletContext();
Map<String, Map<Integer,String>> map = new HashMap<>();
for(DictionaryEntity d :dictionaryEntities){
Map<Integer, String> m = map.get(d.getDicCode());
if(m ==null || m.isEmpty()){
m = new HashMap<>();
}
m.put(d.getCodeIndex(),d.getIndexName());
map.put(d.getDicCode(),m);
}
servletContext.setAttribute("dictionaryMap",map);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
dictionaryService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 最大值
*/
@RequestMapping("/maxCodeIndex")
public R maxCodeIndex(@RequestBody DictionaryEntity dictionary){
logger.debug("maxCodeIndex:,,Controller:{},,dictionary:{}",this.getClass().getName(),dictionary.toString());
List<String> descs = new ArrayList<>();
descs.add("code_index");
Wrapper<DictionaryEntity> queryWrapper = new EntityWrapper<DictionaryEntity>()
.eq("dic_code", dictionary.getDicCode())
.orderDesc(descs);
logger.info("sql语句:"+queryWrapper.getSqlSegment());
List<DictionaryEntity> dictionaryEntityList = dictionaryService.selectList(queryWrapper);
if(dictionaryEntityList != null ){
return R.ok().put("maxCodeIndex",dictionaryEntityList.get(0).getCodeIndex()+1);
}else{
return R.ok().put("maxCodeIndex",1);
}
}
/**
* 批量上传
*/
@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<DictionaryEntity> dictionaryList = 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){
//循环
DictionaryEntity dictionaryEntity = new DictionaryEntity();
// dictionaryEntity.setDicCode(data.get(0)); //字段 要改的
// dictionaryEntity.setDicName(data.get(0)); //字段名 要改的
// dictionaryEntity.setCodeIndex(Integer.valueOf(data.get(0))); //编码 要改的
// dictionaryEntity.setIndexName(data.get(0)); //编码名字 要改的
// dictionaryEntity.setSuperId(Integer.valueOf(data.get(0))); //父字段id 要改的
// dictionaryEntity.setBeizhu(data.get(0)); //备注 要改的
// dictionaryEntity.setCreateTime(date);//时间
dictionaryList.add(dictionaryEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
dictionaryService.insertBatch(dictionaryList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
}

View File

@ -0,0 +1,110 @@
package com.controller;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Arrays;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.UUID;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
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 org.springframework.web.multipart.MultipartFile;
import com.annotation.IgnoreAuth;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.ConfigEntity;
import com.entity.EIException;
import com.service.ConfigService;
import com.utils.R;
/**
* 上传文件映射表
*/
@RestController
@RequestMapping("file")
@SuppressWarnings({"unchecked","rawtypes"})
public class FileController{
@Autowired
private ConfigService configService;
/**
* 上传文件
*/
@RequestMapping("/upload")
public R upload(@RequestParam("file") MultipartFile file,String type) throws Exception {
if (file.isEmpty()) {
throw new EIException("上传文件不能为空");
}
String fileExt = file.getOriginalFilename().substring(file.getOriginalFilename().lastIndexOf(".")+1);
File path = new File(ResourceUtils.getURL("classpath:static").getPath());
if(!path.exists()) {
path = new File("");
}
File upload = new File(path.getAbsolutePath(),"/upload/");
if(!upload.exists()) {
upload.mkdirs();
}
String fileName = new Date().getTime()+"."+fileExt;
File dest = new File(upload.getAbsolutePath()+"/"+fileName);
file.transferTo(dest);
if(StringUtils.isNotBlank(type) && type.equals("1")) {
ConfigEntity configEntity = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "faceFile"));
if(configEntity==null) {
configEntity = new ConfigEntity();
configEntity.setName("faceFile");
configEntity.setValue(fileName);
} else {
configEntity.setValue(fileName);
}
configService.insertOrUpdate(configEntity);
}
return R.ok().put("file", fileName);
}
/**
* 下载文件
*/
@IgnoreAuth
@RequestMapping("/download")
public ResponseEntity<byte[]> download(@RequestParam String fileName) {
try {
File path = new File(ResourceUtils.getURL("classpath:static").getPath());
if(!path.exists()) {
path = new File("");
}
File upload = new File(path.getAbsolutePath(),"/upload/");
if(!upload.exists()) {
upload.mkdirs();
}
File file = new File(upload.getAbsolutePath()+"/"+fileName);
if(file.exists()){
/*if(!fileService.canRead(file, SessionManager.getSessionUser())){
getResponse().sendError(403);
}*/
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_OCTET_STREAM);
headers.setContentDispositionFormData("attachment", fileName);
return new ResponseEntity<byte[]>(FileUtils.readFileToByteArray(file),headers, HttpStatus.CREATED);
}
} catch (IOException e) {
e.printStackTrace();
}
return new ResponseEntity<byte[]>(HttpStatus.INTERNAL_SERVER_ERROR);
}
}

View File

@ -0,0 +1,241 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 公告信息
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/news")
public class NewsController {
private static final Logger logger = LoggerFactory.getLogger(NewsController.class);
@Autowired
private NewsService newsService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
@Autowired
private YonghuService yonghuService;
@Autowired
private YuangongService yuangongService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("员工".equals(role))
params.put("yuangongId",request.getSession().getAttribute("userId"));
if(params.get("orderBy")==null || params.get("orderBy")==""){
params.put("orderBy","id");
}
PageUtils page = newsService.queryPage(params);
//字典表数据转换
List<NewsView> list =(List<NewsView>)page.getList();
for(NewsView 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);
NewsEntity news = newsService.selectById(id);
if(news !=null){
//entity转view
NewsView view = new NewsView();
BeanUtils.copyProperties( news , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody NewsEntity news, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<NewsEntity> queryWrapper = new EntityWrapper<NewsEntity>()
.eq("news_name", news.getNewsName())
.eq("news_types", news.getNewsTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
NewsEntity newsEntity = newsService.selectOne(queryWrapper);
if(newsEntity==null){
news.setInsertTime(new Date());
news.setCreateTime(new Date());
newsService.insert(news);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody NewsEntity news, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,news:{}",this.getClass().getName(),news.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有相同数据
Wrapper<NewsEntity> queryWrapper = new EntityWrapper<NewsEntity>()
.notIn("id",news.getId())
.andNew()
.eq("news_name", news.getNewsName())
.eq("news_types", news.getNewsTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
NewsEntity newsEntity = newsService.selectOne(queryWrapper);
if("".equals(news.getNewsPhoto()) || "null".equals(news.getNewsPhoto())){
news.setNewsPhoto(null);
}
if(newsEntity==null){
newsService.updateById(news);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
newsService.deleteBatchIds(Arrays.asList(ids));
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<NewsEntity> newsList = 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){
//循环
NewsEntity newsEntity = new NewsEntity();
// newsEntity.setNewsName(data.get(0)); //公告标题 要改的
// newsEntity.setNewsTypes(Integer.valueOf(data.get(0))); //公告类型 要改的
// newsEntity.setNewsPhoto("");//详情和图片
// newsEntity.setInsertTime(date);//时间
// newsEntity.setNewsContent("");//详情和图片
// newsEntity.setCreateTime(date);//时间
newsList.add(newsEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
newsService.insertBatch(newsList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
}

View File

@ -0,0 +1,299 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 取退记录
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/quyaojilu")
public class QuyaojiluController {
private static final Logger logger = LoggerFactory.getLogger(QuyaojiluController.class);
@Autowired
private QuyaojiluService quyaojiluService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
@Autowired
private YaopinService yaopinService;
@Autowired
private YonghuService yonghuService;
@Autowired
private YuangongService yuangongService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("员工".equals(role))
params.put("yuangongId",request.getSession().getAttribute("userId"));
params.put("quyaojiluDeleteStart",1);params.put("quyaojiluDeleteEnd",1);
if(params.get("orderBy")==null || params.get("orderBy")==""){
params.put("orderBy","id");
}
PageUtils page = quyaojiluService.queryPage(params);
//字典表数据转换
List<QuyaojiluView> list =(List<QuyaojiluView>)page.getList();
for(QuyaojiluView 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);
QuyaojiluEntity quyaojilu = quyaojiluService.selectById(id);
if(quyaojilu !=null){
//entity转view
QuyaojiluView view = new QuyaojiluView();
BeanUtils.copyProperties( quyaojilu , view );//把实体数据重构到view中
//级联表
YaopinEntity yaopin = yaopinService.selectById(quyaojilu.getYaopinId());
if(yaopin != null){
BeanUtils.copyProperties( yaopin , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYaopinId(yaopin.getId());
}
//级联表
YonghuEntity yonghu = yonghuService.selectById(quyaojilu.getYonghuId());
if(yonghu != null){
BeanUtils.copyProperties( yonghu , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYonghuId(yonghu.getId());
}
//级联表
YuangongEntity yuangong = yuangongService.selectById(quyaojilu.getYuangongId());
if(yuangong != null){
BeanUtils.copyProperties( yuangong , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYuangongId(yuangong.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody QuyaojiluEntity quyaojilu, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,quyaojilu:{}",this.getClass().getName(),quyaojilu.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
else if("用户".equals(role))
quyaojilu.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
else if("员工".equals(role))
quyaojilu.setYuangongId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
Wrapper<QuyaojiluEntity> queryWrapper = new EntityWrapper<QuyaojiluEntity>()
.eq("yaopin_id", quyaojilu.getYaopinId())
.eq("yonghu_id", quyaojilu.getYonghuId())
.eq("yuangong_id", quyaojilu.getYuangongId())
.eq("quyaojilu_number", quyaojilu.getQuyaojiluNumber())
.eq("quyaojilu_types", quyaojilu.getQuyaojiluTypes())
.eq("quyaojilu_delete", quyaojilu.getQuyaojiluDelete())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
QuyaojiluEntity quyaojiluEntity = quyaojiluService.selectOne(queryWrapper);
if(quyaojiluEntity==null){
quyaojilu.setQuyaojiluDelete(1);
quyaojilu.setCreateTime(new Date());
YaopinEntity yaopinEntity = yaopinService.selectById(quyaojilu.getYaopinId());
if(yaopinEntity == null){
return R.error();
}
if(quyaojilu.getQuyaojiluTypes() == 1){
if(yaopinEntity.getYaopinKucunNumber() < quyaojilu.getQuyaojiluNumber()){
return R.error("药品库存不足");
}
yaopinEntity.setYaopinKucunNumber(yaopinEntity.getYaopinKucunNumber() - quyaojilu.getQuyaojiluNumber());
}else{
yaopinEntity.setYaopinKucunNumber(yaopinEntity.getYaopinKucunNumber() + quyaojilu.getQuyaojiluNumber());
}
yaopinService.updateById(yaopinEntity);
quyaojiluService.insert(quyaojilu);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody QuyaojiluEntity quyaojilu, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,quyaojilu:{}",this.getClass().getName(),quyaojilu.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
// else if("用户".equals(role))
// quyaojilu.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
// else if("员工".equals(role))
// quyaojilu.setYuangongId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
//根据字段查询是否有相同数据
Wrapper<QuyaojiluEntity> queryWrapper = new EntityWrapper<QuyaojiluEntity>()
.notIn("id",quyaojilu.getId())
.andNew()
.eq("yaopin_id", quyaojilu.getYaopinId())
.eq("yonghu_id", quyaojilu.getYonghuId())
.eq("yuangong_id", quyaojilu.getYuangongId())
.eq("quyaojilu_number", quyaojilu.getQuyaojiluNumber())
.eq("quyaojilu_types", quyaojilu.getQuyaojiluTypes())
.eq("quyaojilu_delete", quyaojilu.getQuyaojiluDelete())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
QuyaojiluEntity quyaojiluEntity = quyaojiluService.selectOne(queryWrapper);
if(quyaojiluEntity==null){
quyaojiluService.updateById(quyaojilu);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
ArrayList<QuyaojiluEntity> list = new ArrayList<>();
for(Integer id:ids){
QuyaojiluEntity quyaojiluEntity = new QuyaojiluEntity();
quyaojiluEntity.setId(id);
quyaojiluEntity.setQuyaojiluDelete(2);
list.add(quyaojiluEntity);
}
if(list != null && list.size() >0){
quyaojiluService.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<QuyaojiluEntity> quyaojiluList = 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){
//循环
QuyaojiluEntity quyaojiluEntity = new QuyaojiluEntity();
// quyaojiluEntity.setYaopinId(Integer.valueOf(data.get(0))); //药品 要改的
// quyaojiluEntity.setYonghuId(Integer.valueOf(data.get(0))); //用户 要改的
// quyaojiluEntity.setYuangongId(Integer.valueOf(data.get(0))); //员工 要改的
// quyaojiluEntity.setQuyaojiluNumber(Integer.valueOf(data.get(0))); //取药数量 要改的
// quyaojiluEntity.setQuyaojiluTypes(Integer.valueOf(data.get(0))); //类型 要改的
// quyaojiluEntity.setQuyaojiluDelete(1);//逻辑删除字段
// quyaojiluEntity.setCreateTime(date);//时间
quyaojiluList.add(quyaojiluEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
quyaojiluService.insertBatch(quyaojiluList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
}

View File

@ -0,0 +1,168 @@
package com.controller;
import java.util.Arrays;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import com.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
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.baomidou.mybatisplus.mapper.EntityWrapper;
import com.entity.UsersEntity;
import com.service.TokenService;
import com.utils.MPUtil;
import com.utils.PageUtils;
import com.utils.R;
/**
* 登录相关
*/
@RequestMapping("users")
@RestController
public class UsersController {
@Autowired
private UsersService usersService;
@Autowired
private TokenService tokenService;
/**
* 登录
*/
@IgnoreAuth
@PostMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
UsersEntity user = usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null || !user.getPassword().equals(password)) {
return R.error("账号或密码不正确");
}
String token = tokenService.generateToken(user.getId(),username, "users", user.getRole());
R r = R.ok();
r.put("token", token);
r.put("role",user.getRole());
r.put("userId",user.getId());
return r;
}
/**
* 注册
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
usersService.insert(user);
return R.ok();
}
/**
* 退出
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
/**
* 密码重置
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request){
UsersEntity user = usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", username));
if(user==null) {
return R.error("账号不存在");
}
user.setPassword("123456");
usersService.update(user,null);
return R.ok("密码已重置为123456");
}
/**
* 列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
PageUtils page = usersService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/list")
public R list( UsersEntity user){
EntityWrapper<UsersEntity> ew = new EntityWrapper<UsersEntity>();
ew.allEq(MPUtil.allEQMapPre( user, "user"));
return R.ok().put("data", usersService.selectListView(ew));
}
/**
* 信息
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") String id){
UsersEntity user = usersService.selectById(id);
return R.ok().put("data", user);
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrUser(HttpServletRequest request){
Integer id = (Integer)request.getSession().getAttribute("userId");
UsersEntity user = usersService.selectById(id);
return R.ok().put("data", user);
}
/**
* 保存
*/
@PostMapping("/save")
public R save(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
if(usersService.selectOne(new EntityWrapper<UsersEntity>().eq("username", user.getUsername())) !=null) {
return R.error("用户已存在");
}
user.setPassword("123456");
usersService.insert(user);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
public R update(@RequestBody UsersEntity user){
// ValidatorUtils.validateEntity(user);
usersService.updateById(user);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
usersService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
}

View File

@ -0,0 +1,400 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 出入库
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/yaopinChuruInout")
public class YaopinChuruInoutController {
private static final Logger logger = LoggerFactory.getLogger(YaopinChuruInoutController.class);
@Autowired
private YaopinChuruInoutService yaopinChuruInoutService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
// 列表详情的表级联service
@Autowired
private YaopinChuruInoutListService yaopinChuruInoutListService;
// @Autowired
// private YonghuService yonghuService;
@Autowired
private YaopinService yaopinService;
@Autowired
private YonghuService yonghuService;
@Autowired
private YuangongService yuangongService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("员工".equals(role))
params.put("yuangongId",request.getSession().getAttribute("userId"));
if(params.get("orderBy")==null || params.get("orderBy")==""){
params.put("orderBy","id");
}
PageUtils page = yaopinChuruInoutService.queryPage(params);
//字典表数据转换
List<YaopinChuruInoutView> list =(List<YaopinChuruInoutView>)page.getList();
for(YaopinChuruInoutView 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);
YaopinChuruInoutEntity yaopinChuruInout = yaopinChuruInoutService.selectById(id);
if(yaopinChuruInout !=null){
//entity转view
YaopinChuruInoutView view = new YaopinChuruInoutView();
BeanUtils.copyProperties( yaopinChuruInout , view );//把实体数据重构到view中
//🈶/修改对应字典表字段佳 j
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YaopinChuruInoutEntity yaopinChuruInout, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,yaopinChuruInout:{}",this.getClass().getName(),yaopinChuruInout.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<YaopinChuruInoutEntity> queryWrapper = new EntityWrapper<YaopinChuruInoutEntity>()
.eq("yaopin_churu_inout_uuid_number", yaopinChuruInout.getYaopinChuruInoutUuidNumber())
.eq("yaopin_churu_inout_name", yaopinChuruInout.getYaopinChuruInoutName())
.eq("yaopin_churu_inout_types", yaopinChuruInout.getYaopinChuruInoutTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YaopinChuruInoutEntity yaopinChuruInoutEntity = yaopinChuruInoutService.selectOne(queryWrapper);
if(yaopinChuruInoutEntity==null){
yaopinChuruInout.setInsertTime(new Date());
yaopinChuruInout.setCreateTime(new Date());
yaopinChuruInoutService.insert(yaopinChuruInout);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody YaopinChuruInoutEntity yaopinChuruInout, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,yaopinChuruInout:{}",this.getClass().getName(),yaopinChuruInout.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有相同数据
Wrapper<YaopinChuruInoutEntity> queryWrapper = new EntityWrapper<YaopinChuruInoutEntity>()
.notIn("id",yaopinChuruInout.getId())
.andNew()
.eq("yaopin_churu_inout_uuid_number", yaopinChuruInout.getYaopinChuruInoutUuidNumber())
.eq("yaopin_churu_inout_name", yaopinChuruInout.getYaopinChuruInoutName())
.eq("yaopin_churu_inout_types", yaopinChuruInout.getYaopinChuruInoutTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YaopinChuruInoutEntity yaopinChuruInoutEntity = yaopinChuruInoutService.selectOne(queryWrapper);
if(yaopinChuruInoutEntity==null){
yaopinChuruInoutService.updateById(yaopinChuruInout);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 出库
*/
@RequestMapping("/outYaopinChuruInoutList")
public R outYaopinChuruInoutList(@RequestBody Map<String, Object> params,HttpServletRequest request){
logger.debug("outYaopinChuruInoutList方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
//取出入库名称并判断是否存在
String yaopinChuruInoutName = String.valueOf(params.get("yaopinChuruInoutName"));
Wrapper<YaopinChuruInoutEntity> queryWrapper = new EntityWrapper<YaopinChuruInoutEntity>()
.eq("yaopin_churu_inout_name", yaopinChuruInoutName)
;
YaopinChuruInoutEntity yaopinChuruInoutSelectOne = yaopinChuruInoutService.selectOne(queryWrapper);
if(yaopinChuruInoutSelectOne != null)
return R.error(511,"出入库名称已被使用");
//取当前表的级联表并判断是否前台传入
Map<String, Integer> map = (Map<String, Integer>) params.get("map");
if(map == null || map.size() == 0)
return R.error(511,"列表内容不能为空");
Set<String> ids = map.keySet();
List<YaopinEntity> yaopinList = yaopinService.selectBatchIds(ids);
if(yaopinList == null || yaopinList.size() == 0){
return R.error(511,"查数据库查不到数据");
}else{
for(YaopinEntity w:yaopinList){
Integer value = w.getYaopinKucunNumber()-map.get(String.valueOf(w.getId()));
if(value <0){
return R.error(511,"出库数量大于库存数量");
}
w.setYaopinKucunNumber(value);
}
}
//当前表
YaopinChuruInoutEntity yaopinChuruInoutEntity = new YaopinChuruInoutEntity<>();
yaopinChuruInoutEntity.setYaopinChuruInoutUuidNumber(String.valueOf(new Date().getTime()));
yaopinChuruInoutEntity.setYaopinChuruInoutName(yaopinChuruInoutName);
yaopinChuruInoutEntity.setYaopinChuruInoutTypes(1);
yaopinChuruInoutEntity.setYaopinChuruInoutContent("");
yaopinChuruInoutEntity.setInsertTime(new Date());
yaopinChuruInoutEntity.setCreateTime(new Date());
boolean insertYaopinChuruInout = yaopinChuruInoutService.insert(yaopinChuruInoutEntity);
if(insertYaopinChuruInout){
//级联表
ArrayList<YaopinChuruInoutListEntity> yaopinChuruInoutLists = new ArrayList<>();
for(String id:ids){
YaopinChuruInoutListEntity yaopinChuruInoutListEntity = new YaopinChuruInoutListEntity();
yaopinChuruInoutListEntity.setYaopinChuruInoutId(yaopinChuruInoutEntity.getId());
yaopinChuruInoutListEntity.setYaopinId(Integer.valueOf(id));
yaopinChuruInoutListEntity.setYaopinChuruInoutListNumber(map.get(id));
yaopinChuruInoutListEntity.setInsertTime(new Date());
yaopinChuruInoutListEntity.setCreateTime(new Date());
yaopinChuruInoutLists.add(yaopinChuruInoutListEntity);
yaopinService.updateBatchById(yaopinList);
}
yaopinChuruInoutListService.insertBatch(yaopinChuruInoutLists);
}
return R.ok();
}
/**
*入库
*/
@RequestMapping("/inYaopinChuruInoutList")
public R inYaopinChuruInoutList(@RequestBody Map<String, Object> params,HttpServletRequest request){
logger.debug("inYaopinChuruInoutList方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
//params:{"map":{"1":2,"2":3},"wuziOutinName":"订单1"}
String role = String.valueOf(request.getSession().getAttribute("role"));
//取当前表名称并判断
String yaopinChuruInoutName = String.valueOf(params.get("yaopinChuruInoutName"));
Wrapper<YaopinChuruInoutEntity> queryWrapper = new EntityWrapper<YaopinChuruInoutEntity>()
.eq("yaopin_churu_inout_name", yaopinChuruInoutName)
;
YaopinChuruInoutEntity yaopinChuruInoutSelectOne = yaopinChuruInoutService.selectOne(queryWrapper);
if(yaopinChuruInoutSelectOne != null)
return R.error(511,"出入库名称已被使用");
//取当前表的级联表并判断是否前台传入
Map<String, Integer> map = (Map<String, Integer>) params.get("map");
if(map == null || map.size() == 0)
return R.error(511,"列表内容不能为空");
Set<String> ids = map.keySet();
List<YaopinEntity> yaopinList = yaopinService.selectBatchIds(ids);
if(yaopinList == null || yaopinList.size() == 0){
return R.error(511,"查数据库查不到数据");
}else{
for(YaopinEntity w:yaopinList){
w.setYaopinKucunNumber(w.getYaopinKucunNumber()+map.get(String.valueOf(w.getId())));
}
}
//当前表
YaopinChuruInoutEntity yaopinChuruInoutEntity = new YaopinChuruInoutEntity<>();
yaopinChuruInoutEntity.setYaopinChuruInoutUuidNumber(String.valueOf(new Date().getTime()));
yaopinChuruInoutEntity.setYaopinChuruInoutName(yaopinChuruInoutName);
yaopinChuruInoutEntity.setYaopinChuruInoutTypes(2);
yaopinChuruInoutEntity.setYaopinChuruInoutContent("");
yaopinChuruInoutEntity.setInsertTime(new Date());
yaopinChuruInoutEntity.setCreateTime(new Date());
boolean insertYaopinChuruInout = yaopinChuruInoutService.insert(yaopinChuruInoutEntity);
if(insertYaopinChuruInout){
//级联表
ArrayList<YaopinChuruInoutListEntity> yaopinChuruInoutLists = new ArrayList<>();
for(String id:ids){
YaopinChuruInoutListEntity yaopinChuruInoutListEntity = new YaopinChuruInoutListEntity();
yaopinChuruInoutListEntity.setYaopinChuruInoutId(yaopinChuruInoutEntity.getId());
yaopinChuruInoutListEntity.setYaopinId(Integer.valueOf(id));
yaopinChuruInoutListEntity.setYaopinChuruInoutListNumber(map.get(id));
yaopinChuruInoutListEntity.setInsertTime(new Date());
yaopinChuruInoutListEntity.setCreateTime(new Date());
yaopinChuruInoutLists.add(yaopinChuruInoutListEntity);
yaopinService.updateBatchById(yaopinList);
}
yaopinChuruInoutListService.insertBatch(yaopinChuruInoutLists);
}
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
yaopinChuruInoutService.deleteBatchIds(Arrays.asList(ids));
yaopinChuruInoutListService.delete(new EntityWrapper<YaopinChuruInoutListEntity>().in("yaopin_churu_inout_id",ids));
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<YaopinChuruInoutEntity> yaopinChuruInoutList = 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){
//循环
YaopinChuruInoutEntity yaopinChuruInoutEntity = new YaopinChuruInoutEntity();
// yaopinChuruInoutEntity.setYaopinChuruInoutUuidNumber(data.get(0)); //出入库流水号 要改的
// yaopinChuruInoutEntity.setYaopinChuruInoutName(data.get(0)); //出入库名称 要改的
// yaopinChuruInoutEntity.setYaopinChuruInoutTypes(Integer.valueOf(data.get(0))); //出入库类型 要改的
// yaopinChuruInoutEntity.setYaopinChuruInoutContent("");//详情和图片
// yaopinChuruInoutEntity.setInsertTime(date);//时间
// yaopinChuruInoutEntity.setCreateTime(date);//时间
yaopinChuruInoutList.add(yaopinChuruInoutEntity);
//把要查询是否重复的字段放入map中
//出入库流水号
if(seachFields.containsKey("yaopinChuruInoutUuidNumber")){
List<String> yaopinChuruInoutUuidNumber = seachFields.get("yaopinChuruInoutUuidNumber");
yaopinChuruInoutUuidNumber.add(data.get(0));//要改的
}else{
List<String> yaopinChuruInoutUuidNumber = new ArrayList<>();
yaopinChuruInoutUuidNumber.add(data.get(0));//要改的
seachFields.put("yaopinChuruInoutUuidNumber",yaopinChuruInoutUuidNumber);
}
}
//查询是否重复
//出入库流水号
List<YaopinChuruInoutEntity> yaopinChuruInoutEntities_yaopinChuruInoutUuidNumber = yaopinChuruInoutService.selectList(new EntityWrapper<YaopinChuruInoutEntity>().in("yaopin_churu_inout_uuid_number", seachFields.get("yaopinChuruInoutUuidNumber")));
if(yaopinChuruInoutEntities_yaopinChuruInoutUuidNumber.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(YaopinChuruInoutEntity s:yaopinChuruInoutEntities_yaopinChuruInoutUuidNumber){
repeatFields.add(s.getYaopinChuruInoutUuidNumber());
}
return R.error(511,"数据库的该表中的 [出入库流水号] 字段已经存在 存在数据为:"+repeatFields.toString());
}
yaopinChuruInoutService.insertBatch(yaopinChuruInoutList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
}

View File

@ -0,0 +1,255 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 出入库详情
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/yaopinChuruInoutList")
public class YaopinChuruInoutListController {
private static final Logger logger = LoggerFactory.getLogger(YaopinChuruInoutListController.class);
@Autowired
private YaopinChuruInoutListService yaopinChuruInoutListService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
@Autowired
private YaopinService yaopinService;
@Autowired
private YaopinChuruInoutService yaopinChuruInoutService;
@Autowired
private YonghuService yonghuService;
@Autowired
private YuangongService yuangongService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("员工".equals(role))
params.put("yuangongId",request.getSession().getAttribute("userId"));
if(params.get("orderBy")==null || params.get("orderBy")==""){
params.put("orderBy","id");
}
PageUtils page = yaopinChuruInoutListService.queryPage(params);
//字典表数据转换
List<YaopinChuruInoutListView> list =(List<YaopinChuruInoutListView>)page.getList();
for(YaopinChuruInoutListView 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);
YaopinChuruInoutListEntity yaopinChuruInoutList = yaopinChuruInoutListService.selectById(id);
if(yaopinChuruInoutList !=null){
//entity转view
YaopinChuruInoutListView view = new YaopinChuruInoutListView();
BeanUtils.copyProperties( yaopinChuruInoutList , view );//把实体数据重构到view中
//级联表
YaopinEntity yaopin = yaopinService.selectById(yaopinChuruInoutList.getYaopinId());
if(yaopin != null){
BeanUtils.copyProperties( yaopin , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYaopinId(yaopin.getId());
}
//级联表
YaopinChuruInoutEntity yaopinChuruInout = yaopinChuruInoutService.selectById(yaopinChuruInoutList.getYaopinChuruInoutId());
if(yaopinChuruInout != null){
BeanUtils.copyProperties( yaopinChuruInout , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setYaopinChuruInoutId(yaopinChuruInout.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YaopinChuruInoutListEntity yaopinChuruInoutList, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,yaopinChuruInoutList:{}",this.getClass().getName(),yaopinChuruInoutList.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<YaopinChuruInoutListEntity> queryWrapper = new EntityWrapper<YaopinChuruInoutListEntity>()
.eq("yaopin_churu_inout_id", yaopinChuruInoutList.getYaopinChuruInoutId())
.eq("yaopin_id", yaopinChuruInoutList.getYaopinId())
.eq("yaopin_churu_inout_list_number", yaopinChuruInoutList.getYaopinChuruInoutListNumber())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YaopinChuruInoutListEntity yaopinChuruInoutListEntity = yaopinChuruInoutListService.selectOne(queryWrapper);
if(yaopinChuruInoutListEntity==null){
yaopinChuruInoutList.setInsertTime(new Date());
yaopinChuruInoutList.setCreateTime(new Date());
yaopinChuruInoutListService.insert(yaopinChuruInoutList);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody YaopinChuruInoutListEntity yaopinChuruInoutList, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,yaopinChuruInoutList:{}",this.getClass().getName(),yaopinChuruInoutList.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有相同数据
Wrapper<YaopinChuruInoutListEntity> queryWrapper = new EntityWrapper<YaopinChuruInoutListEntity>()
.notIn("id",yaopinChuruInoutList.getId())
.andNew()
.eq("yaopin_churu_inout_id", yaopinChuruInoutList.getYaopinChuruInoutId())
.eq("yaopin_id", yaopinChuruInoutList.getYaopinId())
.eq("yaopin_churu_inout_list_number", yaopinChuruInoutList.getYaopinChuruInoutListNumber())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YaopinChuruInoutListEntity yaopinChuruInoutListEntity = yaopinChuruInoutListService.selectOne(queryWrapper);
if(yaopinChuruInoutListEntity==null){
yaopinChuruInoutListService.updateById(yaopinChuruInoutList);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
yaopinChuruInoutListService.deleteBatchIds(Arrays.asList(ids));
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<YaopinChuruInoutListEntity> yaopinChuruInoutListList = 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){
//循环
YaopinChuruInoutListEntity yaopinChuruInoutListEntity = new YaopinChuruInoutListEntity();
// yaopinChuruInoutListEntity.setYaopinChuruInoutId(Integer.valueOf(data.get(0))); //出入库 要改的
// yaopinChuruInoutListEntity.setYaopinId(Integer.valueOf(data.get(0))); //药品 要改的
// yaopinChuruInoutListEntity.setYaopinChuruInoutListNumber(Integer.valueOf(data.get(0))); //操作数量 要改的
// yaopinChuruInoutListEntity.setInsertTime(date);//时间
// yaopinChuruInoutListEntity.setCreateTime(date);//时间
yaopinChuruInoutListList.add(yaopinChuruInoutListEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
yaopinChuruInoutListService.insertBatch(yaopinChuruInoutListList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
}

View File

@ -0,0 +1,256 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 药品信息
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/yaopin")
public class YaopinController {
private static final Logger logger = LoggerFactory.getLogger(YaopinController.class);
@Autowired
private YaopinService yaopinService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
@Autowired
private YonghuService yonghuService;
@Autowired
private YuangongService yuangongService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("员工".equals(role))
params.put("yuangongId",request.getSession().getAttribute("userId"));
params.put("yaopinDeleteStart",1);params.put("yaopinDeleteEnd",1);
if(params.get("orderBy")==null || params.get("orderBy")==""){
params.put("orderBy","id");
}
PageUtils page = yaopinService.queryPage(params);
//字典表数据转换
List<YaopinView> list =(List<YaopinView>)page.getList();
for(YaopinView 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);
YaopinEntity yaopin = yaopinService.selectById(id);
if(yaopin !=null){
//entity转view
YaopinView view = new YaopinView();
BeanUtils.copyProperties( yaopin , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YaopinEntity yaopin, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,yaopin:{}",this.getClass().getName(),yaopin.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<YaopinEntity> queryWrapper = new EntityWrapper<YaopinEntity>()
.eq("yaopin_name", yaopin.getYaopinName())
.eq("yaopin_types", yaopin.getYaopinTypes())
.eq("yaopin_kucun_number", yaopin.getYaopinKucunNumber())
.eq("danwei_types", yaopin.getDanweiTypes())
.eq("yaopin_delete", yaopin.getYaopinDelete())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YaopinEntity yaopinEntity = yaopinService.selectOne(queryWrapper);
if(yaopinEntity==null){
yaopin.setYaopinDelete(1);
yaopin.setCreateTime(new Date());
yaopinService.insert(yaopin);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody YaopinEntity yaopin, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,yaopin:{}",this.getClass().getName(),yaopin.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有相同数据
Wrapper<YaopinEntity> queryWrapper = new EntityWrapper<YaopinEntity>()
.notIn("id",yaopin.getId())
.andNew()
.eq("yaopin_name", yaopin.getYaopinName())
.eq("yaopin_types", yaopin.getYaopinTypes())
.eq("yaopin_kucun_number", yaopin.getYaopinKucunNumber())
.eq("danwei_types", yaopin.getDanweiTypes())
.eq("yaopin_delete", yaopin.getYaopinDelete())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YaopinEntity yaopinEntity = yaopinService.selectOne(queryWrapper);
if(yaopinEntity==null){
yaopinService.updateById(yaopin);//根据id更新
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
ArrayList<YaopinEntity> list = new ArrayList<>();
for(Integer id:ids){
YaopinEntity yaopinEntity = new YaopinEntity();
yaopinEntity.setId(id);
yaopinEntity.setYaopinDelete(2);
list.add(yaopinEntity);
}
if(list != null && list.size() >0){
yaopinService.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<YaopinEntity> yaopinList = 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){
//循环
YaopinEntity yaopinEntity = new YaopinEntity();
// yaopinEntity.setYaopinName(data.get(0)); //药品名称 要改的
// yaopinEntity.setYaopinTypes(Integer.valueOf(data.get(0))); //药品类型 要改的
// yaopinEntity.setYaopinKucunNumber(Integer.valueOf(data.get(0))); //药品库存 要改的
// yaopinEntity.setDanweiTypes(Integer.valueOf(data.get(0))); //药品单位 要改的
// yaopinEntity.setYaopinNewMoney(data.get(0)); //现价 要改的
// yaopinEntity.setYaopinContent("");//详情和图片
// yaopinEntity.setYaopinDelete(1);//逻辑删除字段
// yaopinEntity.setCreateTime(date);//时间
yaopinList.add(yaopinEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
yaopinService.insertBatch(yaopinList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
}

View File

@ -0,0 +1,407 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 用户
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/yonghu")
public class YonghuController {
private static final Logger logger = LoggerFactory.getLogger(YonghuController.class);
@Autowired
private YonghuService yonghuService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
@Autowired
private YuangongService yuangongService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("员工".equals(role))
params.put("yuangongId",request.getSession().getAttribute("userId"));
params.put("yonghuDeleteStart",1);params.put("yonghuDeleteEnd",1);
if(params.get("orderBy")==null || params.get("orderBy")==""){
params.put("orderBy","id");
}
PageUtils page = yonghuService.queryPage(params);
//字典表数据转换
List<YonghuView> list =(List<YonghuView>)page.getList();
for(YonghuView 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);
YonghuEntity yonghu = yonghuService.selectById(id);
if(yonghu !=null){
//entity转view
YonghuView view = new YonghuView();
BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
.eq("username", yonghu.getUsername())
.or()
.eq("yonghu_phone", yonghu.getYonghuPhone())
.andNew()
.eq("yonghu_delete", 1)
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
if(yonghuEntity==null){
yonghu.setYonghuDelete(1);
yonghu.setCreateTime(new Date());
yonghu.setPassword("123456");
yonghuService.insert(yonghu);
return R.ok();
}else {
return R.error(511,"账户或者联系方式已经被使用");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody YonghuEntity yonghu, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,yonghu:{}",this.getClass().getName(),yonghu.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有相同数据
Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
.notIn("id",yonghu.getId())
.andNew()
.eq("username", yonghu.getUsername())
.or()
.eq("yonghu_phone", yonghu.getYonghuPhone())
.andNew()
.eq("yonghu_delete", 1)
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
if("".equals(yonghu.getYonghuPhoto()) || "null".equals(yonghu.getYonghuPhoto())){
yonghu.setYonghuPhoto(null);
}
if(yonghuEntity==null){
yonghuService.updateById(yonghu);//根据id更新
return R.ok();
}else {
return R.error(511,"账户或者联系方式已经被使用");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
ArrayList<YonghuEntity> list = new ArrayList<>();
for(Integer id:ids){
YonghuEntity yonghuEntity = new YonghuEntity();
yonghuEntity.setId(id);
yonghuEntity.setYonghuDelete(2);
list.add(yonghuEntity);
}
if(list != null && list.size() >0){
yonghuService.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<YonghuEntity> yonghuList = 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){
//循环
YonghuEntity yonghuEntity = new YonghuEntity();
// yonghuEntity.setUsername(data.get(0)); //账户 要改的
// //yonghuEntity.setPassword("123456");//密码
// yonghuEntity.setYonghuName(data.get(0)); //用户姓名 要改的
// yonghuEntity.setYonghuPhoto("");//详情和图片
// yonghuEntity.setSexTypes(Integer.valueOf(data.get(0))); //性别 要改的
// yonghuEntity.setYonghuPhone(data.get(0)); //联系方式 要改的
// yonghuEntity.setYonghuEmail(data.get(0)); //邮箱 要改的
// yonghuEntity.setYonghuDelete(1);//逻辑删除字段
// yonghuEntity.setCreateTime(date);//时间
yonghuList.add(yonghuEntity);
//把要查询是否重复的字段放入map中
//账户
if(seachFields.containsKey("username")){
List<String> username = seachFields.get("username");
username.add(data.get(0));//要改的
}else{
List<String> username = new ArrayList<>();
username.add(data.get(0));//要改的
seachFields.put("username",username);
}
//联系方式
if(seachFields.containsKey("yonghuPhone")){
List<String> yonghuPhone = seachFields.get("yonghuPhone");
yonghuPhone.add(data.get(0));//要改的
}else{
List<String> yonghuPhone = new ArrayList<>();
yonghuPhone.add(data.get(0));//要改的
seachFields.put("yonghuPhone",yonghuPhone);
}
}
//查询是否重复
//账户
List<YonghuEntity> yonghuEntities_username = yonghuService.selectList(new EntityWrapper<YonghuEntity>().in("username", seachFields.get("username")).eq("yonghu_delete", 1));
if(yonghuEntities_username.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(YonghuEntity s:yonghuEntities_username){
repeatFields.add(s.getUsername());
}
return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString());
}
//联系方式
List<YonghuEntity> yonghuEntities_yonghuPhone = yonghuService.selectList(new EntityWrapper<YonghuEntity>().in("yonghu_phone", seachFields.get("yonghuPhone")).eq("yonghu_delete", 1));
if(yonghuEntities_yonghuPhone.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(YonghuEntity s:yonghuEntities_yonghuPhone){
repeatFields.add(s.getYonghuPhone());
}
return R.error(511,"数据库的该表中的 [联系方式] 字段已经存在 存在数据为:"+repeatFields.toString());
}
yonghuService.insertBatch(yonghuList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YonghuEntity yonghu = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", username));
if(yonghu==null || !yonghu.getPassword().equals(password))
return R.error("账号或密码不正确");
else if(yonghu.getYonghuDelete() != 1)
return R.error("账户已被删除");
// // 获取监听器中的字典表
// ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
// Map<String, Map<Integer, String>> dictionaryMap= (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
// Map<Integer, String> role_types = dictionaryMap.get("role_types");
// role_types.get(.getRoleTypes());
String token = tokenService.generateToken(yonghu.getId(),username, "yonghu", "用户");
R r = R.ok();
r.put("token", token);
r.put("role","用户");
r.put("username",yonghu.getYonghuName());
r.put("tableName","yonghu");
r.put("userId",yonghu.getId());
return r;
}
/**
* 注册
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody YonghuEntity yonghu){
// ValidatorUtils.validateEntity(user);
Wrapper<YonghuEntity> queryWrapper = new EntityWrapper<YonghuEntity>()
.eq("username", yonghu.getUsername())
.or()
.eq("yonghu_phone", yonghu.getYonghuPhone())
.andNew()
.eq("yonghu_delete", 1)
;
YonghuEntity yonghuEntity = yonghuService.selectOne(queryWrapper);
if(yonghuEntity != null)
return R.error("账户或者联系方式已经被使用");
yonghu.setYonghuDelete(1);
yonghu.setCreateTime(new Date());
yonghuService.insert(yonghu);
return R.ok();
}
/**
* 重置密码
*/
@GetMapping(value = "/resetPassword")
public R resetPassword(Integer id){
YonghuEntity yonghu = new YonghuEntity();
yonghu.setPassword("123456");
yonghu.setId(id);
yonghuService.updateById(yonghu);
return R.ok();
}
/**
* 忘记密码
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request) {
YonghuEntity yonghu = yonghuService.selectOne(new EntityWrapper<YonghuEntity>().eq("username", username));
if(yonghu!=null){
yonghu.setPassword("123456");
boolean b = yonghuService.updateById(yonghu);
if(!b){
return R.error();
}
}else{
return R.error("账号不存在");
}
return R.ok();
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrYonghu(HttpServletRequest request){
Integer id = (Integer)request.getSession().getAttribute("userId");
YonghuEntity yonghu = yonghuService.selectById(id);
if(yonghu !=null){
//entity转view
YonghuView view = new YonghuView();
BeanUtils.copyProperties( yonghu , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 退出
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
}

View File

@ -0,0 +1,402 @@
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
import java.text.SimpleDateFormat;
import com.alibaba.fastjson.JSONObject;
import java.util.*;
import org.springframework.beans.BeanUtils;
import javax.servlet.http.HttpServletRequest;
import org.springframework.web.context.ContextLoader;
import javax.servlet.ServletContext;
import com.service.TokenService;
import com.utils.*;
import java.lang.reflect.InvocationTargetException;
import com.service.DictionaryService;
import org.apache.commons.lang3.StringUtils;
import com.annotation.IgnoreAuth;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.*;
import com.entity.view.*;
import com.service.*;
import com.utils.PageUtils;
import com.utils.R;
import com.alibaba.fastjson.*;
/**
* 员工
* 后端接口
* @author
* @email
*/
@RestController
@Controller
@RequestMapping("/yuangong")
public class YuangongController {
private static final Logger logger = LoggerFactory.getLogger(YuangongController.class);
@Autowired
private YuangongService yuangongService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;
//级联表service
@Autowired
private 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"));
else if("员工".equals(role))
params.put("yuangongId",request.getSession().getAttribute("userId"));
params.put("yuangongDeleteStart",1);params.put("yuangongDeleteEnd",1);
if(params.get("orderBy")==null || params.get("orderBy")==""){
params.put("orderBy","id");
}
PageUtils page = yuangongService.queryPage(params);
//字典表数据转换
List<YuangongView> list =(List<YuangongView>)page.getList();
for(YuangongView 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);
YuangongEntity yuangong = yuangongService.selectById(id);
if(yuangong !=null){
//entity转view
YuangongView view = new YuangongView();
BeanUtils.copyProperties( yuangong , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody YuangongEntity yuangong, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,yuangong:{}",this.getClass().getName(),yuangong.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<YuangongEntity> queryWrapper = new EntityWrapper<YuangongEntity>()
.eq("username", yuangong.getUsername())
.or()
.eq("yuangong_phone", yuangong.getYuangongPhone())
.andNew()
.eq("yuangong_delete", 1)
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YuangongEntity yuangongEntity = yuangongService.selectOne(queryWrapper);
if(yuangongEntity==null){
yuangong.setYuangongDelete(1);
yuangong.setCreateTime(new Date());
yuangong.setPassword("123456");
yuangongService.insert(yuangong);
return R.ok();
}else {
return R.error(511,"账户或者联系方式已经被使用");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody YuangongEntity yuangong, HttpServletRequest request){
logger.debug("update方法:,,Controller:{},,yuangong:{}",this.getClass().getName(),yuangong.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
//根据字段查询是否有相同数据
Wrapper<YuangongEntity> queryWrapper = new EntityWrapper<YuangongEntity>()
.notIn("id",yuangong.getId())
.andNew()
.eq("username", yuangong.getUsername())
.or()
.eq("yuangong_phone", yuangong.getYuangongPhone())
.andNew()
.eq("yuangong_delete", 1)
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
YuangongEntity yuangongEntity = yuangongService.selectOne(queryWrapper);
if(yuangongEntity==null){
yuangongService.updateById(yuangong);//根据id更新
return R.ok();
}else {
return R.error(511,"账户或者联系方式已经被使用");
}
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
ArrayList<YuangongEntity> list = new ArrayList<>();
for(Integer id:ids){
YuangongEntity yuangongEntity = new YuangongEntity();
yuangongEntity.setId(id);
yuangongEntity.setYuangongDelete(2);
list.add(yuangongEntity);
}
if(list != null && list.size() >0){
yuangongService.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<YuangongEntity> yuangongList = 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){
//循环
YuangongEntity yuangongEntity = new YuangongEntity();
// yuangongEntity.setUsername(data.get(0)); //账户 要改的
// //yuangongEntity.setPassword("123456");//密码
// yuangongEntity.setYuangongName(data.get(0)); //员工姓名 要改的
// yuangongEntity.setSexTypes(Integer.valueOf(data.get(0))); //性别 要改的
// yuangongEntity.setYuangongPhone(data.get(0)); //联系方式 要改的
// yuangongEntity.setYuangongDelete(1);//逻辑删除字段
// yuangongEntity.setCreateTime(date);//时间
yuangongList.add(yuangongEntity);
//把要查询是否重复的字段放入map中
//账户
if(seachFields.containsKey("username")){
List<String> username = seachFields.get("username");
username.add(data.get(0));//要改的
}else{
List<String> username = new ArrayList<>();
username.add(data.get(0));//要改的
seachFields.put("username",username);
}
//联系方式
if(seachFields.containsKey("yuangongPhone")){
List<String> yuangongPhone = seachFields.get("yuangongPhone");
yuangongPhone.add(data.get(0));//要改的
}else{
List<String> yuangongPhone = new ArrayList<>();
yuangongPhone.add(data.get(0));//要改的
seachFields.put("yuangongPhone",yuangongPhone);
}
}
//查询是否重复
//账户
List<YuangongEntity> yuangongEntities_username = yuangongService.selectList(new EntityWrapper<YuangongEntity>().in("username", seachFields.get("username")).eq("yuangong_delete", 1));
if(yuangongEntities_username.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(YuangongEntity s:yuangongEntities_username){
repeatFields.add(s.getUsername());
}
return R.error(511,"数据库的该表中的 [账户] 字段已经存在 存在数据为:"+repeatFields.toString());
}
//联系方式
List<YuangongEntity> yuangongEntities_yuangongPhone = yuangongService.selectList(new EntityWrapper<YuangongEntity>().in("yuangong_phone", seachFields.get("yuangongPhone")).eq("yuangong_delete", 1));
if(yuangongEntities_yuangongPhone.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(YuangongEntity s:yuangongEntities_yuangongPhone){
repeatFields.add(s.getYuangongPhone());
}
return R.error(511,"数据库的该表中的 [联系方式] 字段已经存在 存在数据为:"+repeatFields.toString());
}
yuangongService.insertBatch(yuangongList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
* 登录
*/
@IgnoreAuth
@RequestMapping(value = "/login")
public R login(String username, String password, String captcha, HttpServletRequest request) {
YuangongEntity yuangong = yuangongService.selectOne(new EntityWrapper<YuangongEntity>().eq("username", username));
if(yuangong==null || !yuangong.getPassword().equals(password))
return R.error("账号或密码不正确");
else if(yuangong.getYuangongDelete() != 1)
return R.error("账户已被删除");
// // 获取监听器中的字典表
// ServletContext servletContext = ContextLoader.getCurrentWebApplicationContext().getServletContext();
// Map<String, Map<Integer, String>> dictionaryMap= (Map<String, Map<Integer, String>>) servletContext.getAttribute("dictionaryMap");
// Map<Integer, String> role_types = dictionaryMap.get("role_types");
// role_types.get(.getRoleTypes());
String token = tokenService.generateToken(yuangong.getId(),username, "yuangong", "员工");
R r = R.ok();
r.put("token", token);
r.put("role","员工");
r.put("username",yuangong.getYuangongName());
r.put("tableName","yuangong");
r.put("userId",yuangong.getId());
return r;
}
/**
* 注册
*/
@IgnoreAuth
@PostMapping(value = "/register")
public R register(@RequestBody YuangongEntity yuangong){
// ValidatorUtils.validateEntity(user);
Wrapper<YuangongEntity> queryWrapper = new EntityWrapper<YuangongEntity>()
.eq("username", yuangong.getUsername())
.or()
.eq("yuangong_phone", yuangong.getYuangongPhone())
.andNew()
.eq("yuangong_delete", 1)
;
YuangongEntity yuangongEntity = yuangongService.selectOne(queryWrapper);
if(yuangongEntity != null)
return R.error("账户或者联系方式已经被使用");
yuangong.setYuangongDelete(1);
yuangong.setCreateTime(new Date());
yuangongService.insert(yuangong);
return R.ok();
}
/**
* 重置密码
*/
@GetMapping(value = "/resetPassword")
public R resetPassword(Integer id){
YuangongEntity yuangong = new YuangongEntity();
yuangong.setPassword("123456");
yuangong.setId(id);
yuangongService.updateById(yuangong);
return R.ok();
}
/**
* 忘记密码
*/
@IgnoreAuth
@RequestMapping(value = "/resetPass")
public R resetPass(String username, HttpServletRequest request) {
YuangongEntity yuangong = yuangongService.selectOne(new EntityWrapper<YuangongEntity>().eq("username", username));
if(yuangong!=null){
yuangong.setPassword("123456");
boolean b = yuangongService.updateById(yuangong);
if(!b){
return R.error();
}
}else{
return R.error("账号不存在");
}
return R.ok();
}
/**
* 获取用户的session用户信息
*/
@RequestMapping("/session")
public R getCurrYuangong(HttpServletRequest request){
Integer id = (Integer)request.getSession().getAttribute("userId");
YuangongEntity yuangong = yuangongService.selectById(id);
if(yuangong !=null){
//entity转view
YuangongView view = new YuangongView();
BeanUtils.copyProperties( yuangong , view );//把实体数据重构到view中
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 退出
*/
@GetMapping(value = "logout")
public R logout(HttpServletRequest request) {
request.getSession().invalidate();
return R.ok("退出成功");
}
}

View File

@ -0,0 +1,152 @@
package com.dao;
import java.util.List;
import java.util.Map;
/**
* 通用接口
*/
public interface CommonDao{
List<String> getOption(Map<String, Object> params);
Map<String, Object> getFollowByOption(Map<String, Object> params);
List<String> getFollowByOption2(Map<String, Object> params);
void sh(Map<String, Object> params);
int remindCount(Map<String, Object> params);
Map<String, Object> selectCal(Map<String, Object> params);
/**
tableName 查询表
condition1 条件1
condition1Value 条件1值
average 计算平均评分
* */
Map<String, Object> queryScore(Map<String, Object> params);
List<Map<String, Object>> selectGroup(Map<String, Object> params);
List<Map<String, Object>> selectValue(Map<String, Object> params);
List<Map<String, Object>> chartBoth(Map<String, Object> params);
List<Map<String, Object>> chartOne(Map<String, Object> params);
/**
* 下面为新加的
*/
/**
* 新的级联字典表的 分组求和方法
* @param params
* @return
*/
List<Map<String, Object>> newSelectGroupSum(Map<String, Object> params);
/**
* 新的级联字典表的 分组条数统计统计方法方法
* @param params
* @return
*/
List<Map<String, Object>> newSelectGroupCount(Map<String, Object> params);
/**
* 当前表的日期分组求和
* @param params
* @return
*/
List<Map<String, Object>> newSelectDateGroupSum(Map<String, Object> params);
/**
* 查询字典表的分组统计总条数
* @param params
* @return
*/
List<Map<String, Object>> newSelectDateGroupCount(Map<String, Object> params);
/**
* 增加字段值
* @param params
* @return
*/
int plusCloumNumber(Map<String, Object> params);
/**
* 减少字段值
* @param params
* @return
*/
int reduceCloumNumber(Map<String, Object> params);
/**
* 修改字段值
* @param params
* @return
*/
int updateCloumValue(Map<String, Object> params);
/**
* 饼状图
* -- 饼状图 查询当前表
-- 查询字典表
-- 统计 -- 查询某个月的每个类型的订单销售数量
-- 求和 -- 查询某个月的每个类型的订单销售额
-- 查询某个字符串
-- 统计 -- 查询某个月的每个员工的订单销售数量
-- 求和 -- 查询某个月的每个员工的订单销售额
-- 查询时间
-- 统计 -- 查询每个月的订单销售数量
-- 求和 -- 查询每个月的订单销售额
-- 饼状图 查询级联表
-- 查询字典表
-- 统计 -- 查询某个月的每个类型的订单销售数量
-- 求和 -- 查询某个月的每个类型的订单销售额
-- 查询某个字符串
-- 统计 -- 查询某个月的每个员工的订单销售数量
-- 求和 -- 查询某个月的每个员工的订单销售额
-- 查询时间
-- 统计 -- 统计每个月的订单销售数量
-- 求和 -- 查询每个月的订单销售额
*/
/**
* 柱状图
-- 柱状图 查询当前表
-- 某个
-- 当前表 2 级联表 1
-- 统计
-- 日期字符串下拉框
-- 求和
-- 日期字符串下拉框
-- 柱状图 查询级联表
-- 某个
-- 统计
-- 日期字符串下拉框
-- 求和
-- 日期字符串下拉框
*/
/**
* 柱状图求和
* @param params
* @return
*/
List<Map<String, Object>> barSum(Map<String, Object> params);
/**
* 柱状图统计
* @param params
* @return
*/
List<Map<String, Object>> barCount(Map<String, Object> params);
}

View File

@ -0,0 +1,12 @@
package com.dao;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.entity.ConfigEntity;
/**
* 配置
*/
public interface ConfigDao extends BaseMapper<ConfigEntity> {
}

View File

@ -0,0 +1,21 @@
package com.dao;
import com.entity.DictionaryEntity;
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.DictionaryView;
/**
* 字典表 Dao 接口
*
* @author
*/
public interface DictionaryDao extends BaseMapper<DictionaryEntity> {
List<DictionaryView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

View File

@ -0,0 +1,21 @@
package com.dao;
import com.entity.NewsEntity;
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.NewsView;
/**
* 公告信息 Dao 接口
*
* @author
*/
public interface NewsDao extends BaseMapper<NewsEntity> {
List<NewsView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

View File

@ -0,0 +1,21 @@
package com.dao;
import com.entity.QuyaojiluEntity;
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.QuyaojiluView;
/**
* 取退记录 Dao 接口
*
* @author
*/
public interface QuyaojiluDao extends BaseMapper<QuyaojiluEntity> {
List<QuyaojiluView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

View File

@ -0,0 +1,22 @@
package com.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.entity.TokenEntity;
/**
* token
*/
public interface TokenDao extends BaseMapper<TokenEntity> {
List<TokenEntity> selectListView(@Param("ew") Wrapper<TokenEntity> wrapper);
List<TokenEntity> selectListView(Pagination page,@Param("ew") Wrapper<TokenEntity> wrapper);
}

View File

@ -0,0 +1,22 @@
package com.dao;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.pagination.Pagination;
import com.entity.UsersEntity;
/**
* 用户
*/
public interface UsersDao extends BaseMapper<UsersEntity> {
List<UsersEntity> selectListView(@Param("ew") Wrapper<UsersEntity> wrapper);
List<UsersEntity> selectListView(Pagination page, @Param("ew") Wrapper<UsersEntity> wrapper);
}

View File

@ -0,0 +1,21 @@
package com.dao;
import com.entity.YaopinChuruInoutEntity;
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.YaopinChuruInoutView;
/**
* 出入库 Dao 接口
*
* @author
*/
public interface YaopinChuruInoutDao extends BaseMapper<YaopinChuruInoutEntity> {
List<YaopinChuruInoutView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

View File

@ -0,0 +1,21 @@
package com.dao;
import com.entity.YaopinChuruInoutListEntity;
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.YaopinChuruInoutListView;
/**
* 出入库详情 Dao 接口
*
* @author
*/
public interface YaopinChuruInoutListDao extends BaseMapper<YaopinChuruInoutListEntity> {
List<YaopinChuruInoutListView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

View File

@ -0,0 +1,21 @@
package com.dao;
import com.entity.YaopinEntity;
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.YaopinView;
/**
* 药品信息 Dao 接口
*
* @author
*/
public interface YaopinDao extends BaseMapper<YaopinEntity> {
List<YaopinView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

View File

@ -0,0 +1,21 @@
package com.dao;
import com.entity.YonghuEntity;
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.YonghuView;
/**
* 用户 Dao 接口
*
* @author
*/
public interface YonghuDao extends BaseMapper<YonghuEntity> {
List<YonghuView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

View File

@ -0,0 +1,21 @@
package com.dao;
import com.entity.YuangongEntity;
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.YuangongView;
/**
* 员工 Dao 接口
*
* @author
*/
public interface YuangongDao extends BaseMapper<YuangongEntity> {
List<YuangongView> selectListView(Pagination page,@Param("params")Map<String,Object> params);
}

View File

@ -0,0 +1,55 @@
package com.entity;
import java.io.Serializable;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
* @author yangliyuan
* @version 创建时间2020年2月7日 下午8:36:05
* 类说明 :
*/
@TableName("config")
public class ConfigEntity implements Serializable{
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Long id;
/**
* key
*/
private String name;
/**
* value
*/
private String value;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}

View File

@ -0,0 +1,233 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 字典表
*
* @author
* @email
*/
@TableName("dictionary")
public class DictionaryEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public DictionaryEntity() {
}
public DictionaryEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 主键
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
private Integer id;
/**
* 字段
*/
@TableField(value = "dic_code")
private String dicCode;
/**
* 字段名
*/
@TableField(value = "dic_name")
private String dicName;
/**
* 编码
*/
@TableField(value = "code_index")
private Integer codeIndex;
/**
* 编码名字
*/
@TableField(value = "index_name")
private String indexName;
/**
* 父字段id
*/
@TableField(value = "super_id")
private Integer superId;
/**
* 备注
*/
@TableField(value = "beizhu")
private String beizhu;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置字段
*/
public String getDicCode() {
return dicCode;
}
/**
* 获取字段
*/
public void setDicCode(String dicCode) {
this.dicCode = dicCode;
}
/**
* 设置字段名
*/
public String getDicName() {
return dicName;
}
/**
* 获取字段名
*/
public void setDicName(String dicName) {
this.dicName = dicName;
}
/**
* 设置编码
*/
public Integer getCodeIndex() {
return codeIndex;
}
/**
* 获取编码
*/
public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex;
}
/**
* 设置编码名字
*/
public String getIndexName() {
return indexName;
}
/**
* 获取编码名字
*/
public void setIndexName(String indexName) {
this.indexName = indexName;
}
/**
* 设置父字段id
*/
public Integer getSuperId() {
return superId;
}
/**
* 获取父字段id
*/
public void setSuperId(Integer superId) {
this.superId = superId;
}
/**
* 设置备注
*/
public String getBeizhu() {
return beizhu;
}
/**
* 获取备注
*/
public void setBeizhu(String beizhu) {
this.beizhu = beizhu;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Dictionary{" +
"id=" + id +
", dicCode=" + dicCode +
", dicName=" + dicName +
", codeIndex=" + codeIndex +
", indexName=" + indexName +
", superId=" + superId +
", beizhu=" + beizhu +
", createTime=" + createTime +
"}";
}
}

View File

@ -0,0 +1,52 @@
package com.entity;
/**
* 自定义异常
*/
public class EIException extends RuntimeException {
private static final long serialVersionUID = 1L;
private String msg;
private int code = 500;
public EIException(String msg) {
super(msg);
this.msg = msg;
}
public EIException(String msg, Throwable e) {
super(msg, e);
this.msg = msg;
}
public EIException(String msg, int code) {
super(msg);
this.msg = msg;
this.code = code;
}
public EIException(String msg, int code, Throwable e) {
super(msg, e);
this.msg = msg;
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
}

View File

@ -0,0 +1,213 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 公告信息
*
* @author
* @email
*/
@TableName("news")
public class NewsEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public NewsEntity() {
}
public NewsEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 主键
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
private Integer id;
/**
* 公告标题
*/
@TableField(value = "news_name")
private String newsName;
/**
* 公告类型
*/
@TableField(value = "news_types")
private Integer newsTypes;
/**
* 公告图片
*/
@TableField(value = "news_photo")
private String newsPhoto;
/**
* 添加时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime;
/**
* 公告详情
*/
@TableField(value = "news_content")
private String newsContent;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置公告标题
*/
public String getNewsName() {
return newsName;
}
/**
* 获取公告标题
*/
public void setNewsName(String newsName) {
this.newsName = newsName;
}
/**
* 设置公告类型
*/
public Integer getNewsTypes() {
return newsTypes;
}
/**
* 获取公告类型
*/
public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes;
}
/**
* 设置公告图片
*/
public String getNewsPhoto() {
return newsPhoto;
}
/**
* 获取公告图片
*/
public void setNewsPhoto(String newsPhoto) {
this.newsPhoto = newsPhoto;
}
/**
* 设置添加时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 获取添加时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 设置公告详情
*/
public String getNewsContent() {
return newsContent;
}
/**
* 获取公告详情
*/
public void setNewsContent(String newsContent) {
this.newsContent = newsContent;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "News{" +
"id=" + id +
", newsName=" + newsName +
", newsTypes=" + newsTypes +
", newsPhoto=" + newsPhoto +
", insertTime=" + insertTime +
", newsContent=" + newsContent +
", createTime=" + createTime +
"}";
}
}

View File

@ -0,0 +1,233 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 取退记录
*
* @author
* @email
*/
@TableName("quyaojilu")
public class QuyaojiluEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public QuyaojiluEntity() {
}
public QuyaojiluEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 主键
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
private Integer id;
/**
* 药品
*/
@TableField(value = "yaopin_id")
private Integer yaopinId;
/**
* 用户
*/
@TableField(value = "yonghu_id")
private Integer yonghuId;
/**
* 员工
*/
@TableField(value = "yuangong_id")
private Integer yuangongId;
/**
* 取药数量
*/
@TableField(value = "quyaojilu_number")
private Integer quyaojiluNumber;
/**
* 类型
*/
@TableField(value = "quyaojilu_types")
private Integer quyaojiluTypes;
/**
* 逻辑删除
*/
@TableField(value = "quyaojilu_delete")
private Integer quyaojiluDelete;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置药品
*/
public Integer getYaopinId() {
return yaopinId;
}
/**
* 获取药品
*/
public void setYaopinId(Integer yaopinId) {
this.yaopinId = yaopinId;
}
/**
* 设置用户
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
* 获取用户
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
* 设置员工
*/
public Integer getYuangongId() {
return yuangongId;
}
/**
* 获取员工
*/
public void setYuangongId(Integer yuangongId) {
this.yuangongId = yuangongId;
}
/**
* 设置取药数量
*/
public Integer getQuyaojiluNumber() {
return quyaojiluNumber;
}
/**
* 获取取药数量
*/
public void setQuyaojiluNumber(Integer quyaojiluNumber) {
this.quyaojiluNumber = quyaojiluNumber;
}
/**
* 设置类型
*/
public Integer getQuyaojiluTypes() {
return quyaojiluTypes;
}
/**
* 获取类型
*/
public void setQuyaojiluTypes(Integer quyaojiluTypes) {
this.quyaojiluTypes = quyaojiluTypes;
}
/**
* 设置逻辑删除
*/
public Integer getQuyaojiluDelete() {
return quyaojiluDelete;
}
/**
* 获取逻辑删除
*/
public void setQuyaojiluDelete(Integer quyaojiluDelete) {
this.quyaojiluDelete = quyaojiluDelete;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Quyaojilu{" +
"id=" + id +
", yaopinId=" + yaopinId +
", yonghuId=" + yonghuId +
", yuangongId=" + yuangongId +
", quyaojiluNumber=" + quyaojiluNumber +
", quyaojiluTypes=" + quyaojiluTypes +
", quyaojiluDelete=" + quyaojiluDelete +
", createTime=" + createTime +
"}";
}
}

View File

@ -0,0 +1,132 @@
package com.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
* token表
*/
@TableName("token")
public class TokenEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Integer id;
/**
* 用户id
*/
private Integer userid;
/**
* 用户名
*/
private String username;
/**
* 表名
*/
private String tablename;
/**
* 角色
*/
private String role;
/**
* token
*/
private String token;
/**
* 过期时间
*/
private Date expiratedtime;
/**
* 新增时间
*/
private Date addtime;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getUserid() {
return userid;
}
public void setUserid(Integer userid) {
this.userid = userid;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public String getToken() {
return token;
}
public String getTablename() {
return tablename;
}
public void setTablename(String tablename) {
this.tablename = tablename;
}
public void setToken(String token) {
this.token = token;
}
public Date getExpiratedtime() {
return expiratedtime;
}
public void setExpiratedtime(Date expiratedtime) {
this.expiratedtime = expiratedtime;
}
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public TokenEntity(Integer userid, String username, String tablename,String role, String token, Date expiratedtime) {
super();
this.userid = userid;
this.username = username;
this.tablename = tablename;
this.role = role;
this.token = token;
this.expiratedtime = expiratedtime;
}
public TokenEntity() {
}
}

View File

@ -0,0 +1,77 @@
package com.entity;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 用户
*/
@TableName("users")
public class UsersEntity implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(type = IdType.AUTO)
private Integer id;
/**
* 用户账号
*/
private String username;
/**
* 密码
*/
private String password;
/**
* 用户类型
*/
private String role;
private Date addtime;
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public Date getAddtime() {
return addtime;
}
public void setAddtime(Date addtime) {
this.addtime = addtime;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
}

View File

@ -0,0 +1,213 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 出入库
*
* @author
* @email
*/
@TableName("yaopin_churu_inout")
public class YaopinChuruInoutEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public YaopinChuruInoutEntity() {
}
public YaopinChuruInoutEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 主键
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
private Integer id;
/**
* 出入库流水号
*/
@TableField(value = "yaopin_churu_inout_uuid_number")
private String yaopinChuruInoutUuidNumber;
/**
* 出入库名称
*/
@TableField(value = "yaopin_churu_inout_name")
private String yaopinChuruInoutName;
/**
* 出入库类型
*/
@TableField(value = "yaopin_churu_inout_types")
private Integer yaopinChuruInoutTypes;
/**
* 备注
*/
@TableField(value = "yaopin_churu_inout_content")
private String yaopinChuruInoutContent;
/**
* 添加时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置出入库流水号
*/
public String getYaopinChuruInoutUuidNumber() {
return yaopinChuruInoutUuidNumber;
}
/**
* 获取出入库流水号
*/
public void setYaopinChuruInoutUuidNumber(String yaopinChuruInoutUuidNumber) {
this.yaopinChuruInoutUuidNumber = yaopinChuruInoutUuidNumber;
}
/**
* 设置出入库名称
*/
public String getYaopinChuruInoutName() {
return yaopinChuruInoutName;
}
/**
* 获取出入库名称
*/
public void setYaopinChuruInoutName(String yaopinChuruInoutName) {
this.yaopinChuruInoutName = yaopinChuruInoutName;
}
/**
* 设置出入库类型
*/
public Integer getYaopinChuruInoutTypes() {
return yaopinChuruInoutTypes;
}
/**
* 获取出入库类型
*/
public void setYaopinChuruInoutTypes(Integer yaopinChuruInoutTypes) {
this.yaopinChuruInoutTypes = yaopinChuruInoutTypes;
}
/**
* 设置备注
*/
public String getYaopinChuruInoutContent() {
return yaopinChuruInoutContent;
}
/**
* 获取备注
*/
public void setYaopinChuruInoutContent(String yaopinChuruInoutContent) {
this.yaopinChuruInoutContent = yaopinChuruInoutContent;
}
/**
* 设置添加时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 获取添加时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "YaopinChuruInout{" +
"id=" + id +
", yaopinChuruInoutUuidNumber=" + yaopinChuruInoutUuidNumber +
", yaopinChuruInoutName=" + yaopinChuruInoutName +
", yaopinChuruInoutTypes=" + yaopinChuruInoutTypes +
", yaopinChuruInoutContent=" + yaopinChuruInoutContent +
", insertTime=" + insertTime +
", createTime=" + createTime +
"}";
}
}

View File

@ -0,0 +1,191 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 出入库详情
*
* @author
* @email
*/
@TableName("yaopin_churu_inout_list")
public class YaopinChuruInoutListEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public YaopinChuruInoutListEntity() {
}
public YaopinChuruInoutListEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 主键
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
private Integer id;
/**
* 出入库
*/
@TableField(value = "yaopin_churu_inout_id")
private Integer yaopinChuruInoutId;
/**
* 药品
*/
@TableField(value = "yaopin_id")
private Integer yaopinId;
/**
* 操作数量
*/
@TableField(value = "yaopin_churu_inout_list_number")
private Integer yaopinChuruInoutListNumber;
/**
* 操作时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time",fill = FieldFill.INSERT)
private Date insertTime;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置出入库
*/
public Integer getYaopinChuruInoutId() {
return yaopinChuruInoutId;
}
/**
* 获取出入库
*/
public void setYaopinChuruInoutId(Integer yaopinChuruInoutId) {
this.yaopinChuruInoutId = yaopinChuruInoutId;
}
/**
* 设置药品
*/
public Integer getYaopinId() {
return yaopinId;
}
/**
* 获取药品
*/
public void setYaopinId(Integer yaopinId) {
this.yaopinId = yaopinId;
}
/**
* 设置操作数量
*/
public Integer getYaopinChuruInoutListNumber() {
return yaopinChuruInoutListNumber;
}
/**
* 获取操作数量
*/
public void setYaopinChuruInoutListNumber(Integer yaopinChuruInoutListNumber) {
this.yaopinChuruInoutListNumber = yaopinChuruInoutListNumber;
}
/**
* 设置操作时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 获取操作时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "YaopinChuruInoutList{" +
"id=" + id +
", yaopinChuruInoutId=" + yaopinChuruInoutId +
", yaopinId=" + yaopinId +
", yaopinChuruInoutListNumber=" + yaopinChuruInoutListNumber +
", insertTime=" + insertTime +
", createTime=" + createTime +
"}";
}
}

View File

@ -0,0 +1,255 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 药品信息
*
* @author
* @email
*/
@TableName("yaopin")
public class YaopinEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public YaopinEntity() {
}
public YaopinEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 主键
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
private Integer id;
/**
* 药品名称
*/
@TableField(value = "yaopin_name")
private String yaopinName;
/**
* 药品类型
*/
@TableField(value = "yaopin_types")
private Integer yaopinTypes;
/**
* 药品库存
*/
@TableField(value = "yaopin_kucun_number")
private Integer yaopinKucunNumber;
/**
* 药品单位
*/
@TableField(value = "danwei_types")
private Integer danweiTypes;
/**
* 现价
*/
@TableField(value = "yaopin_new_money")
private Double yaopinNewMoney;
/**
* 详情
*/
@TableField(value = "yaopin_content")
private String yaopinContent;
/**
* 逻辑删除
*/
@TableField(value = "yaopin_delete")
private Integer yaopinDelete;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置药品名称
*/
public String getYaopinName() {
return yaopinName;
}
/**
* 获取药品名称
*/
public void setYaopinName(String yaopinName) {
this.yaopinName = yaopinName;
}
/**
* 设置药品类型
*/
public Integer getYaopinTypes() {
return yaopinTypes;
}
/**
* 获取药品类型
*/
public void setYaopinTypes(Integer yaopinTypes) {
this.yaopinTypes = yaopinTypes;
}
/**
* 设置药品库存
*/
public Integer getYaopinKucunNumber() {
return yaopinKucunNumber;
}
/**
* 获取药品库存
*/
public void setYaopinKucunNumber(Integer yaopinKucunNumber) {
this.yaopinKucunNumber = yaopinKucunNumber;
}
/**
* 设置药品单位
*/
public Integer getDanweiTypes() {
return danweiTypes;
}
/**
* 获取药品单位
*/
public void setDanweiTypes(Integer danweiTypes) {
this.danweiTypes = danweiTypes;
}
/**
* 设置现价
*/
public Double getYaopinNewMoney() {
return yaopinNewMoney;
}
/**
* 获取现价
*/
public void setYaopinNewMoney(Double yaopinNewMoney) {
this.yaopinNewMoney = yaopinNewMoney;
}
/**
* 设置详情
*/
public String getYaopinContent() {
return yaopinContent;
}
/**
* 获取详情
*/
public void setYaopinContent(String yaopinContent) {
this.yaopinContent = yaopinContent;
}
/**
* 设置逻辑删除
*/
public Integer getYaopinDelete() {
return yaopinDelete;
}
/**
* 获取逻辑删除
*/
public void setYaopinDelete(Integer yaopinDelete) {
this.yaopinDelete = yaopinDelete;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Yaopin{" +
"id=" + id +
", yaopinName=" + yaopinName +
", yaopinTypes=" + yaopinTypes +
", yaopinKucunNumber=" + yaopinKucunNumber +
", danweiTypes=" + danweiTypes +
", yaopinNewMoney=" + yaopinNewMoney +
", yaopinContent=" + yaopinContent +
", yaopinDelete=" + yaopinDelete +
", createTime=" + createTime +
"}";
}
}

View File

@ -0,0 +1,277 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 用户
*
* @author
* @email
*/
@TableName("yonghu")
public class YonghuEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public YonghuEntity() {
}
public YonghuEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 主键
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
private Integer id;
/**
* 账户
*/
@TableField(value = "username")
private String username;
/**
* 密码
*/
@TableField(value = "password")
private String password;
/**
* 用户姓名
*/
@TableField(value = "yonghu_name")
private String yonghuName;
/**
* 头像
*/
@TableField(value = "yonghu_photo")
private String yonghuPhoto;
/**
* 性别
*/
@TableField(value = "sex_types")
private Integer sexTypes;
/**
* 联系方式
*/
@TableField(value = "yonghu_phone")
private String yonghuPhone;
/**
* 邮箱
*/
@TableField(value = "yonghu_email")
private String yonghuEmail;
/**
* 假删
*/
@TableField(value = "yonghu_delete")
private Integer yonghuDelete;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置账户
*/
public String getUsername() {
return username;
}
/**
* 获取账户
*/
public void setUsername(String username) {
this.username = username;
}
/**
* 设置密码
*/
public String getPassword() {
return password;
}
/**
* 获取密码
*/
public void setPassword(String password) {
this.password = password;
}
/**
* 设置用户姓名
*/
public String getYonghuName() {
return yonghuName;
}
/**
* 获取用户姓名
*/
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
/**
* 设置头像
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
* 获取头像
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
* 设置性别
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
* 获取性别
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
* 设置联系方式
*/
public String getYonghuPhone() {
return yonghuPhone;
}
/**
* 获取联系方式
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
/**
* 设置邮箱
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
* 获取邮箱
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
* 设置假删
*/
public Integer getYonghuDelete() {
return yonghuDelete;
}
/**
* 获取假删
*/
public void setYonghuDelete(Integer yonghuDelete) {
this.yonghuDelete = yonghuDelete;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Yonghu{" +
"id=" + id +
", username=" + username +
", password=" + password +
", yonghuName=" + yonghuName +
", yonghuPhoto=" + yonghuPhoto +
", sexTypes=" + sexTypes +
", yonghuPhone=" + yonghuPhone +
", yonghuEmail=" + yonghuEmail +
", yonghuDelete=" + yonghuDelete +
", createTime=" + createTime +
"}";
}
}

View File

@ -0,0 +1,233 @@
package com.entity;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import java.lang.reflect.InvocationTargetException;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.beanutils.BeanUtils;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
/**
* 员工
*
* @author
* @email
*/
@TableName("yuangong")
public class YuangongEntity<T> implements Serializable {
private static final long serialVersionUID = 1L;
public YuangongEntity() {
}
public YuangongEntity(T t) {
try {
BeanUtils.copyProperties(this, t);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 主键
*/
@TableId(type = IdType.AUTO)
@TableField(value = "id")
private Integer id;
/**
* 账户
*/
@TableField(value = "username")
private String username;
/**
* 密码
*/
@TableField(value = "password")
private String password;
/**
* 员工姓名
*/
@TableField(value = "yuangong_name")
private String yuangongName;
/**
* 性别
*/
@TableField(value = "sex_types")
private Integer sexTypes;
/**
* 联系方式
*/
@TableField(value = "yuangong_phone")
private String yuangongPhone;
/**
* 假删
*/
@TableField(value = "yuangong_delete")
private Integer yuangongDelete;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time",fill = FieldFill.INSERT)
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置账户
*/
public String getUsername() {
return username;
}
/**
* 获取账户
*/
public void setUsername(String username) {
this.username = username;
}
/**
* 设置密码
*/
public String getPassword() {
return password;
}
/**
* 获取密码
*/
public void setPassword(String password) {
this.password = password;
}
/**
* 设置员工姓名
*/
public String getYuangongName() {
return yuangongName;
}
/**
* 获取员工姓名
*/
public void setYuangongName(String yuangongName) {
this.yuangongName = yuangongName;
}
/**
* 设置性别
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
* 获取性别
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
* 设置联系方式
*/
public String getYuangongPhone() {
return yuangongPhone;
}
/**
* 获取联系方式
*/
public void setYuangongPhone(String yuangongPhone) {
this.yuangongPhone = yuangongPhone;
}
/**
* 设置假删
*/
public Integer getYuangongDelete() {
return yuangongDelete;
}
/**
* 获取假删
*/
public void setYuangongDelete(Integer yuangongDelete) {
this.yuangongDelete = yuangongDelete;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
@Override
public String toString() {
return "Yuangong{" +
"id=" + id +
", username=" + username +
", password=" + password +
", yuangongName=" + yuangongName +
", sexTypes=" + sexTypes +
", yuangongPhone=" + yuangongPhone +
", yuangongDelete=" + yuangongDelete +
", createTime=" + createTime +
"}";
}
}

View File

@ -0,0 +1,187 @@
package com.entity.model;
import com.entity.DictionaryEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 字典表
* 接收传参的实体类
*实际开发中配合移动端接口开发手动去掉些没用的字段 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
public class DictionaryModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Integer id;
/**
* 字段
*/
private String dicCode;
/**
* 字段名
*/
private String dicName;
/**
* 编码
*/
private Integer codeIndex;
/**
* 编码名字
*/
private String indexName;
/**
* 父字段id
*/
private Integer superId;
/**
* 备注
*/
private String beizhu;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
* 获取主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取字段
*/
public String getDicCode() {
return dicCode;
}
/**
* 设置字段
*/
public void setDicCode(String dicCode) {
this.dicCode = dicCode;
}
/**
* 获取字段名
*/
public String getDicName() {
return dicName;
}
/**
* 设置字段名
*/
public void setDicName(String dicName) {
this.dicName = dicName;
}
/**
* 获取编码
*/
public Integer getCodeIndex() {
return codeIndex;
}
/**
* 设置编码
*/
public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex;
}
/**
* 获取编码名字
*/
public String getIndexName() {
return indexName;
}
/**
* 设置编码名字
*/
public void setIndexName(String indexName) {
this.indexName = indexName;
}
/**
* 获取父字段id
*/
public Integer getSuperId() {
return superId;
}
/**
* 设置父字段id
*/
public void setSuperId(Integer superId) {
this.superId = superId;
}
/**
* 获取备注
*/
public String getBeizhu() {
return beizhu;
}
/**
* 设置备注
*/
public void setBeizhu(String beizhu) {
this.beizhu = beizhu;
}
/**
* 获取创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,169 @@
package com.entity.model;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 公告信息
* 接收传参的实体类
*实际开发中配合移动端接口开发手动去掉些没用的字段 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
public class NewsModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Integer id;
/**
* 公告标题
*/
private String newsName;
/**
* 公告类型
*/
private Integer newsTypes;
/**
* 公告图片
*/
private String newsPhoto;
/**
* 添加时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
* 公告详情
*/
private String newsContent;
/**
* 创建时间 show1 show2 nameShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
* 获取主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取公告标题
*/
public String getNewsName() {
return newsName;
}
/**
* 设置公告标题
*/
public void setNewsName(String newsName) {
this.newsName = newsName;
}
/**
* 获取公告类型
*/
public Integer getNewsTypes() {
return newsTypes;
}
/**
* 设置公告类型
*/
public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes;
}
/**
* 获取公告图片
*/
public String getNewsPhoto() {
return newsPhoto;
}
/**
* 设置公告图片
*/
public void setNewsPhoto(String newsPhoto) {
this.newsPhoto = newsPhoto;
}
/**
* 获取添加时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 设置添加时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 获取公告详情
*/
public String getNewsContent() {
return newsContent;
}
/**
* 设置公告详情
*/
public void setNewsContent(String newsContent) {
this.newsContent = newsContent;
}
/**
* 获取创建时间 show1 show2 nameShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间 show1 show2 nameShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,187 @@
package com.entity.model;
import com.entity.QuyaojiluEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 取退记录
* 接收传参的实体类
*实际开发中配合移动端接口开发手动去掉些没用的字段 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
public class QuyaojiluModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Integer id;
/**
* 药品
*/
private Integer yaopinId;
/**
* 用户
*/
private Integer yonghuId;
/**
* 员工
*/
private Integer yuangongId;
/**
* 取药数量
*/
private Integer quyaojiluNumber;
/**
* 类型
*/
private Integer quyaojiluTypes;
/**
* 逻辑删除
*/
private Integer quyaojiluDelete;
/**
* 创建时间 show2 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
* 获取主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取药品
*/
public Integer getYaopinId() {
return yaopinId;
}
/**
* 设置药品
*/
public void setYaopinId(Integer yaopinId) {
this.yaopinId = yaopinId;
}
/**
* 获取用户
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
* 设置用户
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
* 获取员工
*/
public Integer getYuangongId() {
return yuangongId;
}
/**
* 设置员工
*/
public void setYuangongId(Integer yuangongId) {
this.yuangongId = yuangongId;
}
/**
* 获取取药数量
*/
public Integer getQuyaojiluNumber() {
return quyaojiluNumber;
}
/**
* 设置取药数量
*/
public void setQuyaojiluNumber(Integer quyaojiluNumber) {
this.quyaojiluNumber = quyaojiluNumber;
}
/**
* 获取类型
*/
public Integer getQuyaojiluTypes() {
return quyaojiluTypes;
}
/**
* 设置类型
*/
public void setQuyaojiluTypes(Integer quyaojiluTypes) {
this.quyaojiluTypes = quyaojiluTypes;
}
/**
* 获取逻辑删除
*/
public Integer getQuyaojiluDelete() {
return quyaojiluDelete;
}
/**
* 设置逻辑删除
*/
public void setQuyaojiluDelete(Integer quyaojiluDelete) {
this.quyaojiluDelete = quyaojiluDelete;
}
/**
* 获取创建时间 show2 photoShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间 show2 photoShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,149 @@
package com.entity.model;
import com.entity.YaopinChuruInoutListEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 出入库详情
* 接收传参的实体类
*实际开发中配合移动端接口开发手动去掉些没用的字段 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
public class YaopinChuruInoutListModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Integer id;
/**
* 出入库
*/
private Integer yaopinChuruInoutId;
/**
* 药品
*/
private Integer yaopinId;
/**
* 操作数量
*/
private Integer yaopinChuruInoutListNumber;
/**
* 操作时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
* 获取主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取出入库
*/
public Integer getYaopinChuruInoutId() {
return yaopinChuruInoutId;
}
/**
* 设置出入库
*/
public void setYaopinChuruInoutId(Integer yaopinChuruInoutId) {
this.yaopinChuruInoutId = yaopinChuruInoutId;
}
/**
* 获取药品
*/
public Integer getYaopinId() {
return yaopinId;
}
/**
* 设置药品
*/
public void setYaopinId(Integer yaopinId) {
this.yaopinId = yaopinId;
}
/**
* 获取操作数量
*/
public Integer getYaopinChuruInoutListNumber() {
return yaopinChuruInoutListNumber;
}
/**
* 设置操作数量
*/
public void setYaopinChuruInoutListNumber(Integer yaopinChuruInoutListNumber) {
this.yaopinChuruInoutListNumber = yaopinChuruInoutListNumber;
}
/**
* 获取操作时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 设置操作时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 获取创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,169 @@
package com.entity.model;
import com.entity.YaopinChuruInoutEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 出入库
* 接收传参的实体类
*实际开发中配合移动端接口开发手动去掉些没用的字段 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
public class YaopinChuruInoutModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Integer id;
/**
* 出入库流水号
*/
private String yaopinChuruInoutUuidNumber;
/**
* 出入库名称
*/
private String yaopinChuruInoutName;
/**
* 出入库类型
*/
private Integer yaopinChuruInoutTypes;
/**
* 备注
*/
private String yaopinChuruInoutContent;
/**
* 添加时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date insertTime;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
* 获取主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取出入库流水号
*/
public String getYaopinChuruInoutUuidNumber() {
return yaopinChuruInoutUuidNumber;
}
/**
* 设置出入库流水号
*/
public void setYaopinChuruInoutUuidNumber(String yaopinChuruInoutUuidNumber) {
this.yaopinChuruInoutUuidNumber = yaopinChuruInoutUuidNumber;
}
/**
* 获取出入库名称
*/
public String getYaopinChuruInoutName() {
return yaopinChuruInoutName;
}
/**
* 设置出入库名称
*/
public void setYaopinChuruInoutName(String yaopinChuruInoutName) {
this.yaopinChuruInoutName = yaopinChuruInoutName;
}
/**
* 获取出入库类型
*/
public Integer getYaopinChuruInoutTypes() {
return yaopinChuruInoutTypes;
}
/**
* 设置出入库类型
*/
public void setYaopinChuruInoutTypes(Integer yaopinChuruInoutTypes) {
this.yaopinChuruInoutTypes = yaopinChuruInoutTypes;
}
/**
* 获取备注
*/
public String getYaopinChuruInoutContent() {
return yaopinChuruInoutContent;
}
/**
* 设置备注
*/
public void setYaopinChuruInoutContent(String yaopinChuruInoutContent) {
this.yaopinChuruInoutContent = yaopinChuruInoutContent;
}
/**
* 获取添加时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 设置添加时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 获取创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,207 @@
package com.entity.model;
import com.entity.YaopinEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 药品信息
* 接收传参的实体类
*实际开发中配合移动端接口开发手动去掉些没用的字段 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
public class YaopinModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Integer id;
/**
* 药品名称
*/
private String yaopinName;
/**
* 药品类型
*/
private Integer yaopinTypes;
/**
* 药品库存
*/
private Integer yaopinKucunNumber;
/**
* 药品单位
*/
private Integer danweiTypes;
/**
* 现价
*/
private Double yaopinNewMoney;
/**
* 详情
*/
private String yaopinContent;
/**
* 逻辑删除
*/
private Integer yaopinDelete;
/**
* 创建时间 show2 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
* 获取主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取药品名称
*/
public String getYaopinName() {
return yaopinName;
}
/**
* 设置药品名称
*/
public void setYaopinName(String yaopinName) {
this.yaopinName = yaopinName;
}
/**
* 获取药品类型
*/
public Integer getYaopinTypes() {
return yaopinTypes;
}
/**
* 设置药品类型
*/
public void setYaopinTypes(Integer yaopinTypes) {
this.yaopinTypes = yaopinTypes;
}
/**
* 获取药品库存
*/
public Integer getYaopinKucunNumber() {
return yaopinKucunNumber;
}
/**
* 设置药品库存
*/
public void setYaopinKucunNumber(Integer yaopinKucunNumber) {
this.yaopinKucunNumber = yaopinKucunNumber;
}
/**
* 获取药品单位
*/
public Integer getDanweiTypes() {
return danweiTypes;
}
/**
* 设置药品单位
*/
public void setDanweiTypes(Integer danweiTypes) {
this.danweiTypes = danweiTypes;
}
/**
* 获取现价
*/
public Double getYaopinNewMoney() {
return yaopinNewMoney;
}
/**
* 设置现价
*/
public void setYaopinNewMoney(Double yaopinNewMoney) {
this.yaopinNewMoney = yaopinNewMoney;
}
/**
* 获取详情
*/
public String getYaopinContent() {
return yaopinContent;
}
/**
* 设置详情
*/
public void setYaopinContent(String yaopinContent) {
this.yaopinContent = yaopinContent;
}
/**
* 获取逻辑删除
*/
public Integer getYaopinDelete() {
return yaopinDelete;
}
/**
* 设置逻辑删除
*/
public void setYaopinDelete(Integer yaopinDelete) {
this.yaopinDelete = yaopinDelete;
}
/**
* 获取创建时间 show2 photoShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间 show2 photoShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,227 @@
package com.entity.model;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 用户
* 接收传参的实体类
*实际开发中配合移动端接口开发手动去掉些没用的字段 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
public class YonghuModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Integer id;
/**
* 账户
*/
private String username;
/**
* 密码
*/
private String password;
/**
* 用户姓名
*/
private String yonghuName;
/**
* 头像
*/
private String yonghuPhoto;
/**
* 性别
*/
private Integer sexTypes;
/**
* 联系方式
*/
private String yonghuPhone;
/**
* 邮箱
*/
private String yonghuEmail;
/**
* 假删
*/
private Integer yonghuDelete;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
* 获取主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取账户
*/
public String getUsername() {
return username;
}
/**
* 设置账户
*/
public void setUsername(String username) {
this.username = username;
}
/**
* 获取密码
*/
public String getPassword() {
return password;
}
/**
* 设置密码
*/
public void setPassword(String password) {
this.password = password;
}
/**
* 获取用户姓名
*/
public String getYonghuName() {
return yonghuName;
}
/**
* 设置用户姓名
*/
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
/**
* 获取头像
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
* 设置头像
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
* 获取性别
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
* 设置性别
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
* 获取联系方式
*/
public String getYonghuPhone() {
return yonghuPhone;
}
/**
* 设置联系方式
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
/**
* 获取邮箱
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
* 设置邮箱
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
* 获取假删
*/
public Integer getYonghuDelete() {
return yonghuDelete;
}
/**
* 设置假删
*/
public void setYonghuDelete(Integer yonghuDelete) {
this.yonghuDelete = yonghuDelete;
}
/**
* 获取创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,187 @@
package com.entity.model;
import com.entity.YuangongEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 员工
* 接收传参的实体类
*实际开发中配合移动端接口开发手动去掉些没用的字段 后端一般用entity就够用了
* 取自ModelAndView 的model名称
*/
public class YuangongModel implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
private Integer id;
/**
* 账户
*/
private String username;
/**
* 密码
*/
private String password;
/**
* 员工姓名
*/
private String yuangongName;
/**
* 性别
*/
private Integer sexTypes;
/**
* 联系方式
*/
private String yuangongPhone;
/**
* 假删
*/
private Integer yuangongDelete;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
private Date createTime;
/**
* 获取主键
*/
public Integer getId() {
return id;
}
/**
* 设置主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 获取账户
*/
public String getUsername() {
return username;
}
/**
* 设置账户
*/
public void setUsername(String username) {
this.username = username;
}
/**
* 获取密码
*/
public String getPassword() {
return password;
}
/**
* 设置密码
*/
public void setPassword(String password) {
this.password = password;
}
/**
* 获取员工姓名
*/
public String getYuangongName() {
return yuangongName;
}
/**
* 设置员工姓名
*/
public void setYuangongName(String yuangongName) {
this.yuangongName = yuangongName;
}
/**
* 获取性别
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
* 设置性别
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
* 获取联系方式
*/
public String getYuangongPhone() {
return yuangongPhone;
}
/**
* 设置联系方式
*/
public void setYuangongPhone(String yuangongPhone) {
this.yuangongPhone = yuangongPhone;
}
/**
* 获取假删
*/
public Integer getYuangongDelete() {
return yuangongDelete;
}
/**
* 设置假删
*/
public void setYuangongDelete(Integer yuangongDelete) {
this.yuangongDelete = yuangongDelete;
}
/**
* 获取创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 设置创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,59 @@
package com.entity.view;
import com.entity.DictionaryEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 字典表
* 后端返回视图实体辅助类
* 通常后端关联的表或者自定义的字段需要返回使用
*/
@TableName("dictionary")
public class DictionaryView extends DictionaryEntity implements Serializable {
private static final long serialVersionUID = 1L;
public DictionaryView() {
}
public DictionaryView(DictionaryEntity dictionaryEntity) {
try {
BeanUtils.copyProperties(this, dictionaryEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}

View File

@ -0,0 +1,66 @@
package com.entity.view;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 公告信息
* 后端返回视图实体辅助类
* 通常后端关联的表或者自定义的字段需要返回使用
*/
@TableName("news")
public class NewsView extends NewsEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 公告类型的值
*/
private String newsValue;
public NewsView() {
}
public NewsView(NewsEntity newsEntity) {
try {
BeanUtils.copyProperties(this, newsEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 获取 公告类型的值
*/
public String getNewsValue() {
return newsValue;
}
/**
* 设置 公告类型的值
*/
public void setNewsValue(String newsValue) {
this.newsValue = newsValue;
}
}

View File

@ -0,0 +1,393 @@
package com.entity.view;
import com.entity.QuyaojiluEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 取退记录
* 后端返回视图实体辅助类
* 通常后端关联的表或者自定义的字段需要返回使用
*/
@TableName("quyaojilu")
public class QuyaojiluView extends QuyaojiluEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 类型的值
*/
private String quyaojiluValue;
//级联表 yaopin
/**
* 药品名称
*/
private String yaopinName;
/**
* 药品类型
*/
private Integer yaopinTypes;
/**
* 药品类型的值
*/
private String yaopinValue;
/**
* 药品库存
*/
private Integer yaopinKucunNumber;
/**
* 药品单位
*/
private Integer danweiTypes;
/**
* 药品单位的值
*/
private String danweiValue;
/**
* 现价
*/
private Double yaopinNewMoney;
/**
* 详情
*/
private String yaopinContent;
/**
* 逻辑删除
*/
private Integer yaopinDelete;
//级联表 yonghu
/**
* 用户姓名
*/
private String yonghuName;
/**
* 头像
*/
private String yonghuPhoto;
/**
* 联系方式
*/
private String yonghuPhone;
/**
* 邮箱
*/
private String yonghuEmail;
/**
* 假删
*/
private Integer yonghuDelete;
//级联表 yuangong
/**
* 员工姓名
*/
private String yuangongName;
/**
* 联系方式
*/
private String yuangongPhone;
/**
* 假删
*/
private Integer yuangongDelete;
public QuyaojiluView() {
}
public QuyaojiluView(QuyaojiluEntity quyaojiluEntity) {
try {
BeanUtils.copyProperties(this, quyaojiluEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 获取 类型的值
*/
public String getQuyaojiluValue() {
return quyaojiluValue;
}
/**
* 设置 类型的值
*/
public void setQuyaojiluValue(String quyaojiluValue) {
this.quyaojiluValue = quyaojiluValue;
}
//级联表的get和set yaopin
/**
* 获取 药品名称
*/
public String getYaopinName() {
return yaopinName;
}
/**
* 设置 药品名称
*/
public void setYaopinName(String yaopinName) {
this.yaopinName = yaopinName;
}
/**
* 获取 药品类型
*/
public Integer getYaopinTypes() {
return yaopinTypes;
}
/**
* 设置 药品类型
*/
public void setYaopinTypes(Integer yaopinTypes) {
this.yaopinTypes = yaopinTypes;
}
/**
* 获取 药品类型的值
*/
public String getYaopinValue() {
return yaopinValue;
}
/**
* 设置 药品类型的值
*/
public void setYaopinValue(String yaopinValue) {
this.yaopinValue = yaopinValue;
}
/**
* 获取 药品库存
*/
public Integer getYaopinKucunNumber() {
return yaopinKucunNumber;
}
/**
* 设置 药品库存
*/
public void setYaopinKucunNumber(Integer yaopinKucunNumber) {
this.yaopinKucunNumber = yaopinKucunNumber;
}
/**
* 获取 药品单位
*/
public Integer getDanweiTypes() {
return danweiTypes;
}
/**
* 设置 药品单位
*/
public void setDanweiTypes(Integer danweiTypes) {
this.danweiTypes = danweiTypes;
}
/**
* 获取 药品单位的值
*/
public String getDanweiValue() {
return danweiValue;
}
/**
* 设置 药品单位的值
*/
public void setDanweiValue(String danweiValue) {
this.danweiValue = danweiValue;
}
/**
* 获取 现价
*/
public Double getYaopinNewMoney() {
return yaopinNewMoney;
}
/**
* 设置 现价
*/
public void setYaopinNewMoney(Double yaopinNewMoney) {
this.yaopinNewMoney = yaopinNewMoney;
}
/**
* 获取 详情
*/
public String getYaopinContent() {
return yaopinContent;
}
/**
* 设置 详情
*/
public void setYaopinContent(String yaopinContent) {
this.yaopinContent = yaopinContent;
}
/**
* 获取 逻辑删除
*/
public Integer getYaopinDelete() {
return yaopinDelete;
}
/**
* 设置 逻辑删除
*/
public void setYaopinDelete(Integer yaopinDelete) {
this.yaopinDelete = yaopinDelete;
}
//级联表的get和set yonghu
/**
* 获取 用户姓名
*/
public String getYonghuName() {
return yonghuName;
}
/**
* 设置 用户姓名
*/
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
/**
* 获取 头像
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
* 设置 头像
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
* 获取 联系方式
*/
public String getYonghuPhone() {
return yonghuPhone;
}
/**
* 设置 联系方式
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
/**
* 获取 邮箱
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
* 设置 邮箱
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
* 获取 假删
*/
public Integer getYonghuDelete() {
return yonghuDelete;
}
/**
* 设置 假删
*/
public void setYonghuDelete(Integer yonghuDelete) {
this.yonghuDelete = yonghuDelete;
}
//级联表的get和set yuangong
/**
* 获取 员工姓名
*/
public String getYuangongName() {
return yuangongName;
}
/**
* 设置 员工姓名
*/
public void setYuangongName(String yuangongName) {
this.yuangongName = yuangongName;
}
/**
* 获取 联系方式
*/
public String getYuangongPhone() {
return yuangongPhone;
}
/**
* 设置 联系方式
*/
public void setYuangongPhone(String yuangongPhone) {
this.yuangongPhone = yuangongPhone;
}
/**
* 获取 假删
*/
public Integer getYuangongDelete() {
return yuangongDelete;
}
/**
* 设置 假删
*/
public void setYuangongDelete(Integer yuangongDelete) {
this.yuangongDelete = yuangongDelete;
}
}

View File

@ -0,0 +1,315 @@
package com.entity.view;
import com.entity.YaopinChuruInoutListEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 出入库详情
* 后端返回视图实体辅助类
* 通常后端关联的表或者自定义的字段需要返回使用
*/
@TableName("yaopin_churu_inout_list")
public class YaopinChuruInoutListView extends YaopinChuruInoutListEntity implements Serializable {
private static final long serialVersionUID = 1L;
//级联表 yaopin
/**
* 药品名称
*/
private String yaopinName;
/**
* 药品类型
*/
private Integer yaopinTypes;
/**
* 药品类型的值
*/
private String yaopinValue;
/**
* 药品库存
*/
private Integer yaopinKucunNumber;
/**
* 药品单位
*/
private Integer danweiTypes;
/**
* 药品单位的值
*/
private String danweiValue;
/**
* 现价
*/
private Double yaopinNewMoney;
/**
* 详情
*/
private String yaopinContent;
/**
* 逻辑删除
*/
private Integer yaopinDelete;
//级联表 yaopin_churu_inout
/**
* 出入库流水号
*/
private String yaopinChuruInoutUuidNumber;
/**
* 出入库名称
*/
private String yaopinChuruInoutName;
/**
* 出入库类型
*/
private Integer yaopinChuruInoutTypes;
/**
* 出入库类型的值
*/
private String yaopinChuruInoutValue;
/**
* 备注
*/
private String yaopinChuruInoutContent;
public YaopinChuruInoutListView() {
}
public YaopinChuruInoutListView(YaopinChuruInoutListEntity yaopinChuruInoutListEntity) {
try {
BeanUtils.copyProperties(this, yaopinChuruInoutListEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
//级联表的get和set yaopin
/**
* 获取 药品名称
*/
public String getYaopinName() {
return yaopinName;
}
/**
* 设置 药品名称
*/
public void setYaopinName(String yaopinName) {
this.yaopinName = yaopinName;
}
/**
* 获取 药品类型
*/
public Integer getYaopinTypes() {
return yaopinTypes;
}
/**
* 设置 药品类型
*/
public void setYaopinTypes(Integer yaopinTypes) {
this.yaopinTypes = yaopinTypes;
}
/**
* 获取 药品类型的值
*/
public String getYaopinValue() {
return yaopinValue;
}
/**
* 设置 药品类型的值
*/
public void setYaopinValue(String yaopinValue) {
this.yaopinValue = yaopinValue;
}
/**
* 获取 药品库存
*/
public Integer getYaopinKucunNumber() {
return yaopinKucunNumber;
}
/**
* 设置 药品库存
*/
public void setYaopinKucunNumber(Integer yaopinKucunNumber) {
this.yaopinKucunNumber = yaopinKucunNumber;
}
/**
* 获取 药品单位
*/
public Integer getDanweiTypes() {
return danweiTypes;
}
/**
* 设置 药品单位
*/
public void setDanweiTypes(Integer danweiTypes) {
this.danweiTypes = danweiTypes;
}
/**
* 获取 药品单位的值
*/
public String getDanweiValue() {
return danweiValue;
}
/**
* 设置 药品单位的值
*/
public void setDanweiValue(String danweiValue) {
this.danweiValue = danweiValue;
}
/**
* 获取 现价
*/
public Double getYaopinNewMoney() {
return yaopinNewMoney;
}
/**
* 设置 现价
*/
public void setYaopinNewMoney(Double yaopinNewMoney) {
this.yaopinNewMoney = yaopinNewMoney;
}
/**
* 获取 详情
*/
public String getYaopinContent() {
return yaopinContent;
}
/**
* 设置 详情
*/
public void setYaopinContent(String yaopinContent) {
this.yaopinContent = yaopinContent;
}
/**
* 获取 逻辑删除
*/
public Integer getYaopinDelete() {
return yaopinDelete;
}
/**
* 设置 逻辑删除
*/
public void setYaopinDelete(Integer yaopinDelete) {
this.yaopinDelete = yaopinDelete;
}
//级联表的get和set yaopin_churu_inout
/**
* 获取 出入库流水号
*/
public String getYaopinChuruInoutUuidNumber() {
return yaopinChuruInoutUuidNumber;
}
/**
* 设置 出入库流水号
*/
public void setYaopinChuruInoutUuidNumber(String yaopinChuruInoutUuidNumber) {
this.yaopinChuruInoutUuidNumber = yaopinChuruInoutUuidNumber;
}
/**
* 获取 出入库名称
*/
public String getYaopinChuruInoutName() {
return yaopinChuruInoutName;
}
/**
* 设置 出入库名称
*/
public void setYaopinChuruInoutName(String yaopinChuruInoutName) {
this.yaopinChuruInoutName = yaopinChuruInoutName;
}
/**
* 获取 出入库类型
*/
public Integer getYaopinChuruInoutTypes() {
return yaopinChuruInoutTypes;
}
/**
* 设置 出入库类型
*/
public void setYaopinChuruInoutTypes(Integer yaopinChuruInoutTypes) {
this.yaopinChuruInoutTypes = yaopinChuruInoutTypes;
}
/**
* 获取 出入库类型的值
*/
public String getYaopinChuruInoutValue() {
return yaopinChuruInoutValue;
}
/**
* 设置 出入库类型的值
*/
public void setYaopinChuruInoutValue(String yaopinChuruInoutValue) {
this.yaopinChuruInoutValue = yaopinChuruInoutValue;
}
/**
* 获取 备注
*/
public String getYaopinChuruInoutContent() {
return yaopinChuruInoutContent;
}
/**
* 设置 备注
*/
public void setYaopinChuruInoutContent(String yaopinChuruInoutContent) {
this.yaopinChuruInoutContent = yaopinChuruInoutContent;
}
}

View File

@ -0,0 +1,66 @@
package com.entity.view;
import com.entity.YaopinChuruInoutEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 出入库
* 后端返回视图实体辅助类
* 通常后端关联的表或者自定义的字段需要返回使用
*/
@TableName("yaopin_churu_inout")
public class YaopinChuruInoutView extends YaopinChuruInoutEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 出入库类型的值
*/
private String yaopinChuruInoutValue;
public YaopinChuruInoutView() {
}
public YaopinChuruInoutView(YaopinChuruInoutEntity yaopinChuruInoutEntity) {
try {
BeanUtils.copyProperties(this, yaopinChuruInoutEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 获取 出入库类型的值
*/
public String getYaopinChuruInoutValue() {
return yaopinChuruInoutValue;
}
/**
* 设置 出入库类型的值
*/
public void setYaopinChuruInoutValue(String yaopinChuruInoutValue) {
this.yaopinChuruInoutValue = yaopinChuruInoutValue;
}
}

View File

@ -0,0 +1,82 @@
package com.entity.view;
import com.entity.YaopinEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 药品信息
* 后端返回视图实体辅助类
* 通常后端关联的表或者自定义的字段需要返回使用
*/
@TableName("yaopin")
public class YaopinView extends YaopinEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 药品类型的值
*/
private String yaopinValue;
/**
* 药品单位的值
*/
private String danweiValue;
public YaopinView() {
}
public YaopinView(YaopinEntity yaopinEntity) {
try {
BeanUtils.copyProperties(this, yaopinEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 获取 药品类型的值
*/
public String getYaopinValue() {
return yaopinValue;
}
/**
* 设置 药品类型的值
*/
public void setYaopinValue(String yaopinValue) {
this.yaopinValue = yaopinValue;
}
/**
* 获取 药品单位的值
*/
public String getDanweiValue() {
return danweiValue;
}
/**
* 设置 药品单位的值
*/
public void setDanweiValue(String danweiValue) {
this.danweiValue = danweiValue;
}
}

View File

@ -0,0 +1,66 @@
package com.entity.view;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 用户
* 后端返回视图实体辅助类
* 通常后端关联的表或者自定义的字段需要返回使用
*/
@TableName("yonghu")
public class YonghuView extends YonghuEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 性别的值
*/
private String sexValue;
public YonghuView() {
}
public YonghuView(YonghuEntity yonghuEntity) {
try {
BeanUtils.copyProperties(this, yonghuEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 获取 性别的值
*/
public String getSexValue() {
return sexValue;
}
/**
* 设置 性别的值
*/
public void setSexValue(String sexValue) {
this.sexValue = sexValue;
}
}

View File

@ -0,0 +1,66 @@
package com.entity.view;
import com.entity.YuangongEntity;
import com.baomidou.mybatisplus.annotations.TableName;
import org.apache.commons.beanutils.BeanUtils;
import java.lang.reflect.InvocationTargetException;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.io.Serializable;
import java.util.Date;
/**
* 员工
* 后端返回视图实体辅助类
* 通常后端关联的表或者自定义的字段需要返回使用
*/
@TableName("yuangong")
public class YuangongView extends YuangongEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 性别的值
*/
private String sexValue;
public YuangongView() {
}
public YuangongView(YuangongEntity yuangongEntity) {
try {
BeanUtils.copyProperties(this, yuangongEntity);
} catch (IllegalAccessException | InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/**
* 获取 性别的值
*/
public String getSexValue() {
return sexValue;
}
/**
* 设置 性别的值
*/
public void setSexValue(String sexValue) {
this.sexValue = sexValue;
}
}

View File

@ -0,0 +1,209 @@
package com.entity.vo;
import com.entity.DictionaryEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 字典表
* 手机端接口返回实体辅助类
* 主要作用去除一些不必要的字段
*/
@TableName("dictionary")
public class DictionaryVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableField(value = "id")
private Integer id;
/**
* 字段
*/
@TableField(value = "dic_code")
private String dicCode;
/**
* 字段名
*/
@TableField(value = "dic_name")
private String dicName;
/**
* 编码
*/
@TableField(value = "code_index")
private Integer codeIndex;
/**
* 编码名字
*/
@TableField(value = "index_name")
private String indexName;
/**
* 父字段id
*/
@TableField(value = "super_id")
private Integer superId;
/**
* 备注
*/
@TableField(value = "beizhu")
private String beizhu;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置字段
*/
public String getDicCode() {
return dicCode;
}
/**
* 获取字段
*/
public void setDicCode(String dicCode) {
this.dicCode = dicCode;
}
/**
* 设置字段名
*/
public String getDicName() {
return dicName;
}
/**
* 获取字段名
*/
public void setDicName(String dicName) {
this.dicName = dicName;
}
/**
* 设置编码
*/
public Integer getCodeIndex() {
return codeIndex;
}
/**
* 获取编码
*/
public void setCodeIndex(Integer codeIndex) {
this.codeIndex = codeIndex;
}
/**
* 设置编码名字
*/
public String getIndexName() {
return indexName;
}
/**
* 获取编码名字
*/
public void setIndexName(String indexName) {
this.indexName = indexName;
}
/**
* 设置父字段id
*/
public Integer getSuperId() {
return superId;
}
/**
* 获取父字段id
*/
public void setSuperId(Integer superId) {
this.superId = superId;
}
/**
* 设置备注
*/
public String getBeizhu() {
return beizhu;
}
/**
* 获取备注
*/
public void setBeizhu(String beizhu) {
this.beizhu = beizhu;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,188 @@
package com.entity.vo;
import com.entity.NewsEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 公告信息
* 手机端接口返回实体辅助类
* 主要作用去除一些不必要的字段
*/
@TableName("news")
public class NewsVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableField(value = "id")
private Integer id;
/**
* 公告标题
*/
@TableField(value = "news_name")
private String newsName;
/**
* 公告类型
*/
@TableField(value = "news_types")
private Integer newsTypes;
/**
* 公告图片
*/
@TableField(value = "news_photo")
private String newsPhoto;
/**
* 添加时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
* 公告详情
*/
@TableField(value = "news_content")
private String newsContent;
/**
* 创建时间 show1 show2 nameShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置公告标题
*/
public String getNewsName() {
return newsName;
}
/**
* 获取公告标题
*/
public void setNewsName(String newsName) {
this.newsName = newsName;
}
/**
* 设置公告类型
*/
public Integer getNewsTypes() {
return newsTypes;
}
/**
* 获取公告类型
*/
public void setNewsTypes(Integer newsTypes) {
this.newsTypes = newsTypes;
}
/**
* 设置公告图片
*/
public String getNewsPhoto() {
return newsPhoto;
}
/**
* 获取公告图片
*/
public void setNewsPhoto(String newsPhoto) {
this.newsPhoto = newsPhoto;
}
/**
* 设置添加时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 获取添加时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 设置公告详情
*/
public String getNewsContent() {
return newsContent;
}
/**
* 获取公告详情
*/
public void setNewsContent(String newsContent) {
this.newsContent = newsContent;
}
/**
* 设置创建时间 show1 show2 nameShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间 show1 show2 nameShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,209 @@
package com.entity.vo;
import com.entity.QuyaojiluEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 取退记录
* 手机端接口返回实体辅助类
* 主要作用去除一些不必要的字段
*/
@TableName("quyaojilu")
public class QuyaojiluVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableField(value = "id")
private Integer id;
/**
* 药品
*/
@TableField(value = "yaopin_id")
private Integer yaopinId;
/**
* 用户
*/
@TableField(value = "yonghu_id")
private Integer yonghuId;
/**
* 员工
*/
@TableField(value = "yuangong_id")
private Integer yuangongId;
/**
* 取药数量
*/
@TableField(value = "quyaojilu_number")
private Integer quyaojiluNumber;
/**
* 类型
*/
@TableField(value = "quyaojilu_types")
private Integer quyaojiluTypes;
/**
* 逻辑删除
*/
@TableField(value = "quyaojilu_delete")
private Integer quyaojiluDelete;
/**
* 创建时间 show2 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置药品
*/
public Integer getYaopinId() {
return yaopinId;
}
/**
* 获取药品
*/
public void setYaopinId(Integer yaopinId) {
this.yaopinId = yaopinId;
}
/**
* 设置用户
*/
public Integer getYonghuId() {
return yonghuId;
}
/**
* 获取用户
*/
public void setYonghuId(Integer yonghuId) {
this.yonghuId = yonghuId;
}
/**
* 设置员工
*/
public Integer getYuangongId() {
return yuangongId;
}
/**
* 获取员工
*/
public void setYuangongId(Integer yuangongId) {
this.yuangongId = yuangongId;
}
/**
* 设置取药数量
*/
public Integer getQuyaojiluNumber() {
return quyaojiluNumber;
}
/**
* 获取取药数量
*/
public void setQuyaojiluNumber(Integer quyaojiluNumber) {
this.quyaojiluNumber = quyaojiluNumber;
}
/**
* 设置类型
*/
public Integer getQuyaojiluTypes() {
return quyaojiluTypes;
}
/**
* 获取类型
*/
public void setQuyaojiluTypes(Integer quyaojiluTypes) {
this.quyaojiluTypes = quyaojiluTypes;
}
/**
* 设置逻辑删除
*/
public Integer getQuyaojiluDelete() {
return quyaojiluDelete;
}
/**
* 获取逻辑删除
*/
public void setQuyaojiluDelete(Integer quyaojiluDelete) {
this.quyaojiluDelete = quyaojiluDelete;
}
/**
* 设置创建时间 show2 photoShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间 show2 photoShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,165 @@
package com.entity.vo;
import com.entity.YaopinChuruInoutListEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 出入库详情
* 手机端接口返回实体辅助类
* 主要作用去除一些不必要的字段
*/
@TableName("yaopin_churu_inout_list")
public class YaopinChuruInoutListVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableField(value = "id")
private Integer id;
/**
* 出入库
*/
@TableField(value = "yaopin_churu_inout_id")
private Integer yaopinChuruInoutId;
/**
* 药品
*/
@TableField(value = "yaopin_id")
private Integer yaopinId;
/**
* 操作数量
*/
@TableField(value = "yaopin_churu_inout_list_number")
private Integer yaopinChuruInoutListNumber;
/**
* 操作时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置出入库
*/
public Integer getYaopinChuruInoutId() {
return yaopinChuruInoutId;
}
/**
* 获取出入库
*/
public void setYaopinChuruInoutId(Integer yaopinChuruInoutId) {
this.yaopinChuruInoutId = yaopinChuruInoutId;
}
/**
* 设置药品
*/
public Integer getYaopinId() {
return yaopinId;
}
/**
* 获取药品
*/
public void setYaopinId(Integer yaopinId) {
this.yaopinId = yaopinId;
}
/**
* 设置操作数量
*/
public Integer getYaopinChuruInoutListNumber() {
return yaopinChuruInoutListNumber;
}
/**
* 获取操作数量
*/
public void setYaopinChuruInoutListNumber(Integer yaopinChuruInoutListNumber) {
this.yaopinChuruInoutListNumber = yaopinChuruInoutListNumber;
}
/**
* 设置操作时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 获取操作时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,188 @@
package com.entity.vo;
import com.entity.YaopinChuruInoutEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 出入库
* 手机端接口返回实体辅助类
* 主要作用去除一些不必要的字段
*/
@TableName("yaopin_churu_inout")
public class YaopinChuruInoutVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableField(value = "id")
private Integer id;
/**
* 出入库流水号
*/
@TableField(value = "yaopin_churu_inout_uuid_number")
private String yaopinChuruInoutUuidNumber;
/**
* 出入库名称
*/
@TableField(value = "yaopin_churu_inout_name")
private String yaopinChuruInoutName;
/**
* 出入库类型
*/
@TableField(value = "yaopin_churu_inout_types")
private Integer yaopinChuruInoutTypes;
/**
* 备注
*/
@TableField(value = "yaopin_churu_inout_content")
private String yaopinChuruInoutContent;
/**
* 添加时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "insert_time")
private Date insertTime;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置出入库流水号
*/
public String getYaopinChuruInoutUuidNumber() {
return yaopinChuruInoutUuidNumber;
}
/**
* 获取出入库流水号
*/
public void setYaopinChuruInoutUuidNumber(String yaopinChuruInoutUuidNumber) {
this.yaopinChuruInoutUuidNumber = yaopinChuruInoutUuidNumber;
}
/**
* 设置出入库名称
*/
public String getYaopinChuruInoutName() {
return yaopinChuruInoutName;
}
/**
* 获取出入库名称
*/
public void setYaopinChuruInoutName(String yaopinChuruInoutName) {
this.yaopinChuruInoutName = yaopinChuruInoutName;
}
/**
* 设置出入库类型
*/
public Integer getYaopinChuruInoutTypes() {
return yaopinChuruInoutTypes;
}
/**
* 获取出入库类型
*/
public void setYaopinChuruInoutTypes(Integer yaopinChuruInoutTypes) {
this.yaopinChuruInoutTypes = yaopinChuruInoutTypes;
}
/**
* 设置备注
*/
public String getYaopinChuruInoutContent() {
return yaopinChuruInoutContent;
}
/**
* 获取备注
*/
public void setYaopinChuruInoutContent(String yaopinChuruInoutContent) {
this.yaopinChuruInoutContent = yaopinChuruInoutContent;
}
/**
* 设置添加时间
*/
public Date getInsertTime() {
return insertTime;
}
/**
* 获取添加时间
*/
public void setInsertTime(Date insertTime) {
this.insertTime = insertTime;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,232 @@
package com.entity.vo;
import com.entity.YaopinEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 药品信息
* 手机端接口返回实体辅助类
* 主要作用去除一些不必要的字段
*/
@TableName("yaopin")
public class YaopinVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableField(value = "id")
private Integer id;
/**
* 药品名称
*/
@TableField(value = "yaopin_name")
private String yaopinName;
/**
* 药品类型
*/
@TableField(value = "yaopin_types")
private Integer yaopinTypes;
/**
* 药品库存
*/
@TableField(value = "yaopin_kucun_number")
private Integer yaopinKucunNumber;
/**
* 药品单位
*/
@TableField(value = "danwei_types")
private Integer danweiTypes;
/**
* 现价
*/
@TableField(value = "yaopin_new_money")
private Double yaopinNewMoney;
/**
* 详情
*/
@TableField(value = "yaopin_content")
private String yaopinContent;
/**
* 逻辑删除
*/
@TableField(value = "yaopin_delete")
private Integer yaopinDelete;
/**
* 创建时间 show2 photoShow
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置药品名称
*/
public String getYaopinName() {
return yaopinName;
}
/**
* 获取药品名称
*/
public void setYaopinName(String yaopinName) {
this.yaopinName = yaopinName;
}
/**
* 设置药品类型
*/
public Integer getYaopinTypes() {
return yaopinTypes;
}
/**
* 获取药品类型
*/
public void setYaopinTypes(Integer yaopinTypes) {
this.yaopinTypes = yaopinTypes;
}
/**
* 设置药品库存
*/
public Integer getYaopinKucunNumber() {
return yaopinKucunNumber;
}
/**
* 获取药品库存
*/
public void setYaopinKucunNumber(Integer yaopinKucunNumber) {
this.yaopinKucunNumber = yaopinKucunNumber;
}
/**
* 设置药品单位
*/
public Integer getDanweiTypes() {
return danweiTypes;
}
/**
* 获取药品单位
*/
public void setDanweiTypes(Integer danweiTypes) {
this.danweiTypes = danweiTypes;
}
/**
* 设置现价
*/
public Double getYaopinNewMoney() {
return yaopinNewMoney;
}
/**
* 获取现价
*/
public void setYaopinNewMoney(Double yaopinNewMoney) {
this.yaopinNewMoney = yaopinNewMoney;
}
/**
* 设置详情
*/
public String getYaopinContent() {
return yaopinContent;
}
/**
* 获取详情
*/
public void setYaopinContent(String yaopinContent) {
this.yaopinContent = yaopinContent;
}
/**
* 设置逻辑删除
*/
public Integer getYaopinDelete() {
return yaopinDelete;
}
/**
* 获取逻辑删除
*/
public void setYaopinDelete(Integer yaopinDelete) {
this.yaopinDelete = yaopinDelete;
}
/**
* 设置创建时间 show2 photoShow
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间 show2 photoShow
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,255 @@
package com.entity.vo;
import com.entity.YonghuEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 用户
* 手机端接口返回实体辅助类
* 主要作用去除一些不必要的字段
*/
@TableName("yonghu")
public class YonghuVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableField(value = "id")
private Integer id;
/**
* 账户
*/
@TableField(value = "username")
private String username;
/**
* 密码
*/
@TableField(value = "password")
private String password;
/**
* 用户姓名
*/
@TableField(value = "yonghu_name")
private String yonghuName;
/**
* 头像
*/
@TableField(value = "yonghu_photo")
private String yonghuPhoto;
/**
* 性别
*/
@TableField(value = "sex_types")
private Integer sexTypes;
/**
* 联系方式
*/
@TableField(value = "yonghu_phone")
private String yonghuPhone;
/**
* 邮箱
*/
@TableField(value = "yonghu_email")
private String yonghuEmail;
/**
* 假删
*/
@TableField(value = "yonghu_delete")
private Integer yonghuDelete;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置账户
*/
public String getUsername() {
return username;
}
/**
* 获取账户
*/
public void setUsername(String username) {
this.username = username;
}
/**
* 设置密码
*/
public String getPassword() {
return password;
}
/**
* 获取密码
*/
public void setPassword(String password) {
this.password = password;
}
/**
* 设置用户姓名
*/
public String getYonghuName() {
return yonghuName;
}
/**
* 获取用户姓名
*/
public void setYonghuName(String yonghuName) {
this.yonghuName = yonghuName;
}
/**
* 设置头像
*/
public String getYonghuPhoto() {
return yonghuPhoto;
}
/**
* 获取头像
*/
public void setYonghuPhoto(String yonghuPhoto) {
this.yonghuPhoto = yonghuPhoto;
}
/**
* 设置性别
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
* 获取性别
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
* 设置联系方式
*/
public String getYonghuPhone() {
return yonghuPhone;
}
/**
* 获取联系方式
*/
public void setYonghuPhone(String yonghuPhone) {
this.yonghuPhone = yonghuPhone;
}
/**
* 设置邮箱
*/
public String getYonghuEmail() {
return yonghuEmail;
}
/**
* 获取邮箱
*/
public void setYonghuEmail(String yonghuEmail) {
this.yonghuEmail = yonghuEmail;
}
/**
* 设置假删
*/
public Integer getYonghuDelete() {
return yonghuDelete;
}
/**
* 获取假删
*/
public void setYonghuDelete(Integer yonghuDelete) {
this.yonghuDelete = yonghuDelete;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,209 @@
package com.entity.vo;
import com.entity.YuangongEntity;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.util.Date;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
/**
* 员工
* 手机端接口返回实体辅助类
* 主要作用去除一些不必要的字段
*/
@TableName("yuangong")
public class YuangongVO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@TableField(value = "id")
private Integer id;
/**
* 账户
*/
@TableField(value = "username")
private String username;
/**
* 密码
*/
@TableField(value = "password")
private String password;
/**
* 员工姓名
*/
@TableField(value = "yuangong_name")
private String yuangongName;
/**
* 性别
*/
@TableField(value = "sex_types")
private Integer sexTypes;
/**
* 联系方式
*/
@TableField(value = "yuangong_phone")
private String yuangongPhone;
/**
* 假删
*/
@TableField(value = "yuangong_delete")
private Integer yuangongDelete;
/**
* 创建时间
*/
@JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
@DateTimeFormat
@TableField(value = "create_time")
private Date createTime;
/**
* 设置主键
*/
public Integer getId() {
return id;
}
/**
* 获取主键
*/
public void setId(Integer id) {
this.id = id;
}
/**
* 设置账户
*/
public String getUsername() {
return username;
}
/**
* 获取账户
*/
public void setUsername(String username) {
this.username = username;
}
/**
* 设置密码
*/
public String getPassword() {
return password;
}
/**
* 获取密码
*/
public void setPassword(String password) {
this.password = password;
}
/**
* 设置员工姓名
*/
public String getYuangongName() {
return yuangongName;
}
/**
* 获取员工姓名
*/
public void setYuangongName(String yuangongName) {
this.yuangongName = yuangongName;
}
/**
* 设置性别
*/
public Integer getSexTypes() {
return sexTypes;
}
/**
* 获取性别
*/
public void setSexTypes(Integer sexTypes) {
this.sexTypes = sexTypes;
}
/**
* 设置联系方式
*/
public String getYuangongPhone() {
return yuangongPhone;
}
/**
* 获取联系方式
*/
public void setYuangongPhone(String yuangongPhone) {
this.yuangongPhone = yuangongPhone;
}
/**
* 设置假删
*/
public Integer getYuangongDelete() {
return yuangongDelete;
}
/**
* 获取假删
*/
public void setYuangongDelete(Integer yuangongDelete) {
this.yuangongDelete = yuangongDelete;
}
/**
* 设置创建时间
*/
public Date getCreateTime() {
return createTime;
}
/**
* 获取创建时间
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}

View File

@ -0,0 +1,94 @@
package com.interceptor;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import com.alibaba.fastjson.JSONObject;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.HandlerInterceptor;
import com.annotation.IgnoreAuth;
import com.entity.EIException;
import com.entity.TokenEntity;
import com.service.TokenService;
import com.utils.R;
/**
* 权限(Token)验证
*/
@Component
public class AuthorizationInterceptor implements HandlerInterceptor {
public static final String LOGIN_TOKEN_KEY = "Token";
@Autowired
private TokenService tokenService;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
String servletPath = request.getServletPath();
if("/dictionary/page".equals(request.getServletPath()) || "/file/upload".equals(request.getServletPath()) || "/yonghu/register".equals(request.getServletPath()) ){//请求路径是字典表或者文件上传 直接放行
return true;
}
//支持跨域请求
response.setHeader("Access-Control-Allow-Methods", "POST, GET, OPTIONS, DELETE");
response.setHeader("Access-Control-Max-Age", "3600");
response.setHeader("Access-Control-Allow-Credentials", "true");
response.setHeader("Access-Control-Allow-Headers", "x-requested-with,request-source,Token, Origin,imgType, Content-Type, cache-control,postman-token,Cookie, Accept,authorization");
response.setHeader("Access-Control-Allow-Origin", request.getHeader("Origin"));
IgnoreAuth annotation;
if (handler instanceof HandlerMethod) {
annotation = ((HandlerMethod) handler).getMethodAnnotation(IgnoreAuth.class);
} else {
return true;
}
//从header中获取token
String token = request.getHeader(LOGIN_TOKEN_KEY);
/**
* 不需要验证权限的方法直接放过
*/
if(annotation!=null) {
return true;
}
TokenEntity tokenEntity = null;
if(StringUtils.isNotBlank(token)) {
tokenEntity = tokenService.getTokenEntity(token);
}
if(tokenEntity != null) {
request.getSession().setAttribute("userId", tokenEntity.getUserid());
request.getSession().setAttribute("role", tokenEntity.getRole());
request.getSession().setAttribute("tableName", tokenEntity.getTablename());
request.getSession().setAttribute("username", tokenEntity.getUsername());
return true;
}
PrintWriter writer = null;
response.setCharacterEncoding("UTF-8");
response.setContentType("application/json; charset=utf-8");
try {
writer = response.getWriter();
writer.print(JSONObject.toJSONString(R.error(401, "请先登录")));
} finally {
if(writer != null){
writer.close();
}
}
// throw new EIException("请先登录", 401);
return false;
}
}

View File

@ -0,0 +1,31 @@
package com.model.enums;
import java.io.Serializable;
import com.baomidou.mybatisplus.enums.IEnum;
/**
* 必须现在 IEnum 配置 该包扫描自动注入查看文件 spring-mybatis.xml 参数 typeEnumsPackage
*/
public enum TypeEnum implements IEnum {
DISABLED(0, "禁用"),
NORMAL(1, "正常");
private final int value;
private final String desc;
TypeEnum(final int value, final String desc) {
this.value = value;
this.desc = desc;
}
@Override
public Serializable getValue() {
return this.value;
}
// Jackson 注解为 JsonValue 返回中文 json 描述
public String getDesc() {
return this.desc;
}
}

View File

@ -0,0 +1,139 @@
package com.service;
import java.util.List;
import java.util.Map;
public interface CommonService {
List<String> getOption(Map<String, Object> params);
Map<String, Object> getFollowByOption(Map<String, Object> params);
void sh(Map<String, Object> params);
int remindCount(Map<String, Object> params);
Map<String, Object> selectCal(Map<String, Object> params);
List<Map<String, Object>> chartBoth(Map<String, Object> params);
List<Map<String, Object>> chartOne(Map<String, Object> params);
List<Map<String, Object>> selectGroup(Map<String, Object> params);
List<Map<String, Object>> selectValue(Map<String, Object> params);
/**
tableName 查询表
condition1 条件1
condition1Value 条件1值
average 计算平均评分
* */
Map<String, Object> queryScore(Map<String, Object> params);
/**
* 下面为新加的
*/
/**
* 新的级联字典表的 分组求和统计
* @param params
* @return
*/
List<Map<String, Object>> newSelectGroupSum(Map<String, Object> params);
/**
* 新的级联字典表的 分组求和统计
* @param params
* @return
*/
List<Map<String, Object>> newSelectGroupCount(Map<String, Object> params);
/**
* 当前表的日期分组求和
* @param params
* @return
*/
List<Map<String, Object>> newSelectDateGroupSum(Map<String, Object> params);
/**
* 查询字典表的分组统计总条数
* @param params
* @return
*/
List<Map<String, Object>> newSelectDateGroupCount(Map<String, Object> params);
/**
* 增加字段数字
* @param params
* @return
*/
int plusCloumNumber(Map<String, Object> params);
/**
* 减少字段数字
* @param params
* @return
*/
int reduceCloumNumber(Map<String, Object> params);
/**
* 修改字段数字
* @param params
* @return
*/
int updateCloumValue(Map<String, Object> params);
/**
* 饼状图
* -- 饼状图 查询当前表
-- 查询字典表
-- 统计 -- 查询某个月的每个类型的订单销售数量
-- 求和 -- 查询某个月的每个类型的订单销售额
-- 查询某个字符串
-- 统计 -- 查询某个月的每个员工的订单销售数量
-- 求和 -- 查询某个月的每个员工的订单销售额
-- 查询时间
-- 统计 -- 查询每个月的订单销售数量
-- 求和 -- 查询每个月的订单销售额
-- 饼状图 查询级联表
-- 查询字典表
-- 统计 -- 查询某个月的每个类型的订单销售数量
-- 求和 -- 查询某个月的每个类型的订单销售额
-- 查询某个字符串
-- 统计 -- 查询某个月的每个员工的订单销售数量
-- 求和 -- 查询某个月的每个员工的订单销售额
-- 查询时间
-- 统计 -- 统计每个月的订单销售数量
-- 求和 -- 查询每个月的订单销售额
*/
/**
* 柱状图
-- 柱状图 查询当前表
-- 某个
-- 当前表 2 级联表 1
-- 统计
-- 日期字符串下拉框
-- 求和
-- 日期字符串下拉框
-- 柱状图 查询级联表
-- 某个
-- 统计
-- 日期字符串下拉框
-- 求和
-- 日期字符串下拉框
*/
/**
* 柱状图求和
* @param params
* @return
*/
List<Map<String, Object>> barSum(Map<String, Object> params);
/**
* 柱状图统计
* @param params
* @return
*/
List<Map<String, Object>> barCount(Map<String, Object> params);
}

View File

@ -0,0 +1,18 @@
package com.service;
import java.util.Map;
import com.baomidou.mybatisplus.service.IService;
import com.entity.ConfigEntity;
import com.utils.PageUtils;
/**
* 系统用户
* @author yangliyuan
* @date 2019年10月10日 上午9:18:20
*/
public interface ConfigService extends IService<ConfigEntity> {
PageUtils queryPage(Map<String, Object> params);
}

View File

@ -0,0 +1,24 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.DictionaryEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
/**
* 字典表 服务类
*/
public interface DictionaryService extends IService<DictionaryEntity> {
/**
* @param params 查询参数
* @return 带分页的查询出来的数据
*/
PageUtils queryPage(Map<String, Object> params);
/**
* 字典表转换
* @param obj
*/
void dictionaryConvert(Object obj, HttpServletRequest request);
}

View File

@ -0,0 +1,19 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.NewsEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
/**
* 公告信息 服务类
*/
public interface NewsService extends IService<NewsEntity> {
/**
* @param params 查询参数
* @return 带分页的查询出来的数据
*/
PageUtils queryPage(Map<String, Object> params);
}

View File

@ -0,0 +1,19 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.QuyaojiluEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
/**
* 取退记录 服务类
*/
public interface QuyaojiluService extends IService<QuyaojiluEntity> {
/**
* @param params 查询参数
* @return 带分页的查询出来的数据
*/
PageUtils queryPage(Map<String, Object> params);
}

View File

@ -0,0 +1,28 @@
package com.service;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.TokenEntity;
import com.utils.PageUtils;
/**
* token
* @author yangliyuan
* @date 2019年10月10日 上午9:18:20
*/
public interface TokenService extends IService<TokenEntity> {
PageUtils queryPage(Map<String, Object> params);
List<TokenEntity> selectListView(Wrapper<TokenEntity> wrapper);
PageUtils queryPage(Map<String, Object> params,Wrapper<TokenEntity> wrapper);
String generateToken(Integer userid,String username,String tableName, String role);
TokenEntity getTokenEntity(String token);
}

View File

@ -0,0 +1,25 @@
package com.service;
import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.service.IService;
import com.entity.UsersEntity;
import com.utils.PageUtils;
/**
* 系统用户
* @author yangliyuan
* @date 2019年10月10日 上午9:18:20
*/
public interface UsersService extends IService<UsersEntity> {
PageUtils queryPage(Map<String, Object> params);
List<UsersEntity> selectListView(Wrapper<UsersEntity> wrapper);
PageUtils queryPage(Map<String, Object> params, Wrapper<UsersEntity> wrapper);
}

View File

@ -0,0 +1,19 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.YaopinChuruInoutListEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
/**
* 出入库详情 服务类
*/
public interface YaopinChuruInoutListService extends IService<YaopinChuruInoutListEntity> {
/**
* @param params 查询参数
* @return 带分页的查询出来的数据
*/
PageUtils queryPage(Map<String, Object> params);
}

View File

@ -0,0 +1,19 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.YaopinChuruInoutEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
/**
* 出入库 服务类
*/
public interface YaopinChuruInoutService extends IService<YaopinChuruInoutEntity> {
/**
* @param params 查询参数
* @return 带分页的查询出来的数据
*/
PageUtils queryPage(Map<String, Object> params);
}

View File

@ -0,0 +1,19 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.YaopinEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
/**
* 药品信息 服务类
*/
public interface YaopinService extends IService<YaopinEntity> {
/**
* @param params 查询参数
* @return 带分页的查询出来的数据
*/
PageUtils queryPage(Map<String, Object> params);
}

View File

@ -0,0 +1,19 @@
package com.service;
import com.baomidou.mybatisplus.service.IService;
import com.utils.PageUtils;
import com.entity.YonghuEntity;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
/**
* 用户 服务类
*/
public interface YonghuService extends IService<YonghuEntity> {
/**
* @param params 查询参数
* @return 带分页的查询出来的数据
*/
PageUtils queryPage(Map<String, Object> params);
}

Some files were not shown because too many files have changed in this diff Show More