Browse Source

添加数据表sql

NorthLan 7 years ago
parent
commit
04eaa2309b
5 changed files with 991 additions and 0 deletions
  1. 233 0
      sql/archives_mgr.sql
  2. 107 0
      sql/archives_receive.sql
  3. 237 0
      sql/archives_save.sql
  4. 281 0
      sql/archives_sys.sql
  5. 133 0
      sql/archives_usage.sql

+ 233 - 0
sql/archives_mgr.sql

@@ -0,0 +1,233 @@
+/*
+Navicat MariaDB Data Transfer
+
+Source Server         : archives
+Source Server Version : 100032
+Source Host           : 192.168.1.124:3307
+Source Database       : archives_mgr
+
+Target Server Type    : MariaDB
+Target Server Version : 100032
+File Encoding         : 65001
+
+Date: 2018-02-02 16:29:38
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for mgr_archives_classification
+-- ----------------------------
+DROP TABLE IF EXISTS `mgr_archives_classification`;
+CREATE TABLE `mgr_archives_classification` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '分类表ID',
+  `classification_code` varchar(50) DEFAULT NULL COMMENT '分类代码',
+  `name` varchar(50) DEFAULT NULL COMMENT '分类名称',
+  `parent_id` bigint(20) DEFAULT NULL COMMENT '父ID',
+  `connection_code` varchar(10) DEFAULT NULL COMMENT '连接符',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1002 DEFAULT CHARSET=utf8 COMMENT='分类表';
+
+-- ----------------------------
+-- Table structure for mgr_archives_document
+-- ----------------------------
+DROP TABLE IF EXISTS `mgr_archives_document`;
+CREATE TABLE `mgr_archives_document` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键',
+  `enable` tinyint(1) DEFAULT NULL COMMENT '可用性',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注/附注',
+  `create_by` varchar(20) DEFAULT NULL COMMENT '登记人',
+  `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '登记日期',
+  `update_by` varchar(20) DEFAULT NULL COMMENT '修改人',
+  `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `filing_by` varchar(20) DEFAULT NULL COMMENT '归档人',
+  `filing_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '归档日期',
+  `fonds_no` varchar(20) DEFAULT NULL COMMENT '全宗号',
+  `catalogue_code` int(11) DEFAULT NULL COMMENT '案卷目录号',
+  `file_code` varchar(20) DEFAULT NULL COMMENT '案卷号',
+  `archival_code` varchar(20) DEFAULT NULL COMMENT '档号',
+  `page_code` varchar(20) DEFAULT NULL COMMENT '页号',
+  `part_no` varchar(20) DEFAULT NULL COMMENT '件号',
+  `responsible_person` varchar(50) DEFAULT NULL COMMENT '责任者',
+  `document_code` varchar(10) DEFAULT NULL COMMENT '文件编号',
+  `document_title` varchar(50) DEFAULT NULL COMMENT '文件题名',
+  `pages_count` int(11) DEFAULT NULL COMMENT '页数',
+  `written_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '成文时间',
+  `year` varchar(10) DEFAULT NULL COMMENT '年度',
+  `box_code` varchar(20) DEFAULT NULL COMMENT '盒号',
+  `security_classification` int(11) DEFAULT NULL COMMENT '密级。(0无密;1秘密;2机密;3绝密;)',
+  `archives_type_code` int(11) DEFAULT NULL COMMENT '分类号',
+  `electronic_record_title` varchar(50) DEFAULT NULL COMMENT '电子档案名称',
+  `descriptor` varchar(100) DEFAULT NULL COMMENT '主题词',
+  `organization_problem` varchar(100) DEFAULT NULL COMMENT '机构(问题)',
+  `personage` varchar(20) DEFAULT NULL COMMENT '人物',
+  `archives_name` varchar(100) DEFAULT NULL COMMENT '档案馆名称',
+  `attachment_title` varchar(100) DEFAULT NULL COMMENT '附件题名',
+  `control_sign` varchar(10) DEFAULT NULL COMMENT '控制标识',
+  `archives_code` varchar(10) DEFAULT NULL COMMENT '档案馆代码',
+  `produce_way` varchar(20) DEFAULT NULL COMMENT '电子档案生成方式',
+  `secrecy_period` int(11) DEFAULT NULL COMMENT '保密期限',
+  `retention_period` int(11) DEFAULT NULL COMMENT '保管期限',
+  `filing_status` int(1) DEFAULT '0' COMMENT '档案归档状态(0未归档;1归档)',
+  `del_flag` int(1) DEFAULT '0' COMMENT '删除标识(0未删除;1删除)',
+  `digitization_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '数字化时间',
+  `digitization_obj_describe` varchar(100) DEFAULT NULL COMMENT '数字化对象描述',
+  `digitization_authorize_describe` varchar(100) DEFAULT NULL COMMENT '数字化授权描述',
+  `format_name` varchar(20) DEFAULT NULL COMMENT '格式名称',
+  `format_version` varchar(20) DEFAULT NULL COMMENT '格式版本',
+  `color_space` varchar(20) DEFAULT '' COMMENT '色彩空间',
+  `compress_scheme` varchar(20) DEFAULT '' COMMENT '压缩方案',
+  `compression_ratio` varchar(10) DEFAULT '' COMMENT '压缩率',
+  `horizontal_resolution` varchar(10) DEFAULT '' COMMENT '水平分辨率',
+  `vertical_resolution` varchar(10) DEFAULT '' COMMENT '垂直分辨率',
+  `image_width` varchar(10) DEFAULT NULL COMMENT '图像宽度',
+  `image_height` varchar(10) DEFAULT NULL COMMENT '图像高度',
+  `equipment_type` varchar(20) DEFAULT '' COMMENT '设备类型',
+  `equipment_manufacturer` varchar(50) DEFAULT '' COMMENT '设备制造商',
+  `equipment_model` varchar(20) DEFAULT '' COMMENT '设备型号',
+  `equipment_series_number` varchar(50) DEFAULT '' COMMENT '设备系列号',
+  `equipment_photoreceptor` varchar(20) DEFAULT '' COMMENT '设备感光器',
+  `digital_software_name` varchar(50) DEFAULT NULL COMMENT '数字化软件名称',
+  `digital_software_version` varchar(20) DEFAULT NULL COMMENT '数字化软件版本',
+  `digital_software_manufacturer` varchar(50) DEFAULT NULL COMMENT '数字化软件生产商',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文书档案文件';
+
+-- ----------------------------
+-- Table structure for mgr_archives_electronic_record
+-- ----------------------------
+DROP TABLE IF EXISTS `mgr_archives_electronic_record`;
+CREATE TABLE `mgr_archives_electronic_record` (
+  `id` bigint(20) NOT NULL COMMENT '主键',
+  `enable` tinyint(1) DEFAULT '1' COMMENT '可用性(1可用;0不可用)',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注',
+  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
+  `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建日期',
+  `update_by` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改人',
+  `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改日期',
+  `document_id` bigint(20) DEFAULT NULL COMMENT '文件id(mgr_archives_document表的id)',
+  `electronic_record_title` varchar(50) DEFAULT NULL COMMENT '电子文件标题',
+  `connect_configure_name` varchar(20) DEFAULT NULL COMMENT '挂接配置名',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='电子档案文件';
+
+-- ----------------------------
+-- Table structure for mgr_archives_file
+-- ----------------------------
+DROP TABLE IF EXISTS `mgr_archives_file`;
+CREATE TABLE `mgr_archives_file` (
+  `id` bigint(20) NOT NULL COMMENT '主键',
+  `enable` tinyint(1) DEFAULT '1' COMMENT '可用性(1可用;0不可用)',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注/附注',
+  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
+  `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_by` varchar(20) DEFAULT NULL COMMENT '修改人',
+  `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `filing_by` varchar(20) DEFAULT NULL COMMENT '归档人',
+  `filing_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '归档日期',
+  `archival_code` varchar(20) DEFAULT NULL COMMENT '案卷级档号',
+  `fonds_no` varchar(20) DEFAULT NULL COMMENT '全宗号',
+  `fonds_name` varchar(50) DEFAULT NULL,
+  `catalogue_code` int(11) DEFAULT NULL COMMENT '目录号',
+  `file_code` int(11) DEFAULT NULL COMMENT '案卷号',
+  `year` varchar(10) DEFAULT NULL COMMENT '年度',
+  `retention_period` int(11) DEFAULT NULL COMMENT '保管期限',
+  `retention_period_code` varchar(10) DEFAULT NULL COMMENT '保管期限代码',
+  `file_title` varchar(500) DEFAULT NULL COMMENT '案卷题名',
+  `start_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '起时间',
+  `end_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '止时间',
+  `responsible_person` varchar(50) DEFAULT NULL COMMENT '责任者',
+  `written_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '成文时间',
+  `pages_count` int(11) DEFAULT NULL COMMENT '页数',
+  `document_count` int(11) DEFAULT NULL COMMENT '文件件数',
+  `personage` varchar(20) DEFAULT NULL COMMENT '人物',
+  `box_code` varchar(20) DEFAULT NULL COMMENT '盒号',
+  `secrecy_period` int(11) DEFAULT NULL COMMENT '保密期限',
+  `security_classification` varchar(10) DEFAULT '0' COMMENT '密级(0无密;1秘密;2机密;3绝密;)',
+  `archives_name` varchar(100) DEFAULT NULL COMMENT '档案馆名称',
+  `descriptor` varchar(100) DEFAULT NULL COMMENT '主题词',
+  `archives_code` varchar(10) DEFAULT NULL COMMENT '档案馆代码',
+  `attachment_title` varchar(100) DEFAULT NULL COMMENT '附件题名',
+  `RFID` varchar(20) DEFAULT NULL COMMENT 'RFID',
+  `filing_status` int(1) DEFAULT '0' COMMENT '归档状态(0:未归档,1归档)',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文书档案案卷';
+
+-- ----------------------------
+-- Table structure for mgr_archives_file_note
+-- ----------------------------
+DROP TABLE IF EXISTS `mgr_archives_file_note`;
+CREATE TABLE `mgr_archives_file_note` (
+  `id` bigint(20) NOT NULL COMMENT '主键',
+  `enable` tinyint(1) DEFAULT '1' COMMENT '可用性(0不可用;1可用)',
+  `remark` varchar(500) DEFAULT NULL COMMENT '备注/附注',
+  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
+  `create_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
+  `update_by` varchar(20) DEFAULT NULL COMMENT '修改人',
+  `update_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
+  `fonds_name` varchar(50) DEFAULT NULL COMMENT '全宗名称',
+  `fonds_no` varchar(20) DEFAULT NULL COMMENT '全宗号',
+  `detail` varchar(500) DEFAULT NULL COMMENT '档案说明',
+  `collator` varchar(20) DEFAULT NULL COMMENT '整理人',
+  `inspector` varchar(20) DEFAULT NULL COMMENT '检查人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='文书档案备考表';
+
+-- ----------------------------
+-- Table structure for mgr_archives_relation
+-- ----------------------------
+DROP TABLE IF EXISTS `mgr_archives_relation`;
+CREATE TABLE `mgr_archives_relation` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '目录树关系表ID',
+  `classification_id` bigint(20) DEFAULT NULL COMMENT '分类id',
+  `fonds_id` bigint(20) DEFAULT NULL COMMENT '全宗ID',
+  `type_id` bigint(20) DEFAULT NULL COMMENT '档案类型ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1002 DEFAULT CHARSET=utf8 COMMENT='目录树关系表';
+
+-- ----------------------------
+-- Table structure for mgr_archives_type
+-- ----------------------------
+DROP TABLE IF EXISTS `mgr_archives_type`;
+CREATE TABLE `mgr_archives_type` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '档案类型ID',
+  `type_code` varchar(50) DEFAULT NULL COMMENT '档案类型代码',
+  `name` varchar(50) DEFAULT NULL COMMENT '类型名',
+  `parent_id` bigint(20) DEFAULT NULL COMMENT '父ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='档案类型表';
+
+-- ----------------------------
+-- Table structure for mgr_fonds
+-- ----------------------------
+DROP TABLE IF EXISTS `mgr_fonds`;
+CREATE TABLE `mgr_fonds` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '全宗ID',
+  `fonds_no` varchar(32) DEFAULT NULL COMMENT '全宗号',
+  `fonds_name` varchar(50) DEFAULT NULL COMMENT '全宗名',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='全宗表';

+ 107 - 0
sql/archives_receive.sql

@@ -0,0 +1,107 @@
+/*
+Navicat MariaDB Data Transfer
+
+Source Server         : archives
+Source Server Version : 100032
+Source Host           : 192.168.1.124:3307
+Source Database       : archives_receive
+
+Target Server Type    : MariaDB
+Target Server Version : 100032
+File Encoding         : 65001
+
+Date: 2018-02-02 16:29:47
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for arc_ electronic_accession
+-- ----------------------------
+DROP TABLE IF EXISTS `arc_ electronic_accession`;
+CREATE TABLE `arc_ electronic_accession` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '表id',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
+  `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
+  `cerate_department` varchar(50) DEFAULT NULL COMMENT '形成部门',
+  `cccomplish_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '完成日期',
+  `carrier_id` int(11) NOT NULL COMMENT '载体编号',
+  `address` varchar(50) DEFAULT NULL COMMENT '通讯地址',
+  `phone` int(20) DEFAULT NULL COMMENT '联系电话',
+  `contact` varchar(255) DEFAULT NULL COMMENT '联系人',
+  `hardware_environment` varchar(255) DEFAULT NULL COMMENT '硬件环境',
+  `software_environment` varchar(255) DEFAULT NULL COMMENT '软件环境',
+  `related_software` varchar(255) DEFAULT NULL COMMENT '相关软件',
+  `database_system` varchar(255) DEFAULT NULL COMMENT '数据库系统',
+  `operating_system` varchar(255) DEFAULT NULL COMMENT '操作系统',
+  `record_structure` varchar(255) DEFAULT NULL COMMENT '记录结构',
+  `record_type` varchar(255) DEFAULT NULL COMMENT '记录类型',
+  `format` varchar(255) DEFAULT NULL COMMENT '格式',
+  `record_number` int(50) DEFAULT NULL COMMENT '记录总数',
+  `bytes_number` int(255) DEFAULT NULL COMMENT '总记录数',
+  `model_id` varchar(20) DEFAULT NULL COMMENT '型号',
+  `number` int(255) DEFAULT NULL COMMENT '数量',
+  `backups_number` int(255) DEFAULT NULL COMMENT '备份数',
+  `file_carrier_relation` varchar(255) DEFAULT NULL COMMENT '文件与载体的关系(一件一盘、一件多盘、多件多盘、多件一盘)',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for arc_accession_examine
+-- ----------------------------
+DROP TABLE IF EXISTS `arc_accession_examine`;
+CREATE TABLE `arc_accession_examine` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '表id',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
+  `accession_unit` varchar(20) NOT NULL COMMENT '接收单位',
+  `facade_inspect` varchar(1024) DEFAULT NULL COMMENT '外观检查记录',
+  `virus_appraisal` varchar(1024) DEFAULT NULL COMMENT '病毒检测记录',
+  `validity` varchar(255) DEFAULT NULL COMMENT '有效性考证记录',
+  `Integrality` varchar(255) DEFAULT NULL COMMENT '完整性考证记录',
+  `truth` varchar(255) DEFAULT NULL COMMENT '真实性考证记录',
+  `preparer` varchar(20) DEFAULT NULL COMMENT '填表人',
+  `verifier` varchar(20) DEFAULT NULL COMMENT '审核人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for arc_accession_receipt
+-- ----------------------------
+DROP TABLE IF EXISTS `arc_accession_receipt`;
+CREATE TABLE `arc_accession_receipt` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '当前表id',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `create_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
+  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
+  `visit_unit` varchar(255) NOT NULL COMMENT '来访单位',
+  `sbmitter` varchar(20) DEFAULT NULL COMMENT '提交人',
+  `recipirnt` varchar(20) DEFAULT NULL COMMENT '接收人',
+  `archives_number` int(255) DEFAULT NULL COMMENT '案卷数',
+  `accession_unit` varchar(50) NOT NULL COMMENT '接收单位',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for rec_record
+-- ----------------------------
+DROP TABLE IF EXISTS `rec_record`;
+CREATE TABLE `rec_record` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '表id',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '逻辑删除',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '备注',
+  `crate_time` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '创建时间',
+  `create_by` varchar(20) DEFAULT NULL COMMENT '创建人',
+  `visit_unit` varchar(20) NOT NULL COMMENT '来访单位',
+  `year` varchar(20) NOT NULL COMMENT '年度',
+  `accseeion_reason` varchar(50) NOT NULL COMMENT '接收原因',
+  `accession_time` datetime NOT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '接收时间',
+  `archives_number` int(255) NOT NULL COMMENT '案卷数量',
+  `save_time` varchar(20) NOT NULL COMMENT '保管期限',
+  `file_number` int(20) NOT NULL COMMENT '案卷目录数',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;

+ 237 - 0
sql/archives_save.sql

@@ -0,0 +1,237 @@
+/*
+Navicat MariaDB Data Transfer
+
+Source Server         : archives
+Source Server Version : 100032
+Source Host           : 192.168.1.124:3307
+Source Database       : archives_save
+
+Target Server Type    : MariaDB
+Target Server Version : 100032
+File Encoding         : 65001
+
+Date: 2018-02-02 16:29:53
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for save _ Migration
+-- ----------------------------
+DROP TABLE IF EXISTS `save _ Migration`;
+CREATE TABLE `save _ Migration` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` bigint(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL,
+  `medium_num` varchar(20) DEFAULT NULL COMMENT '光盘号',
+  `data_format` varchar(20) DEFAULT NULL COMMENT '数据格式',
+  `data_size` varchar(20) DEFAULT NULL COMMENT '数据大小',
+  `Migration_ reason` varchar(50) DEFAULT NULL COMMENT '迁移原因',
+  `reviewer` varchar(10) DEFAULT NULL COMMENT '审批人',
+  `new_medium` varchar(10) DEFAULT NULL COMMENT '新载体',
+  `new_medium_num` varchar(20) DEFAULT NULL COMMENT '新载体编号',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='迁移表';
+
+-- ----------------------------
+-- Table structure for save _ sampling
+-- ----------------------------
+DROP TABLE IF EXISTS `save _ sampling`;
+CREATE TABLE `save _ sampling` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` bigint(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL,
+  `medium_num` varchar(20) DEFAULT NULL COMMENT '光盘号',
+  `bler` varchar(10) DEFAULT NULL COMMENT '块错误率  CD-R光盘的块错误率是指每秒测得的错误块数量,CD-R光盘技术规范规定:BLER<220数据块/秒',
+  `e32` varchar(10) DEFAULT NULL COMMENT '不可校正错误  读CD-R光盘时不能被解码器校正的错误的总数称为E32,CD-R光盘技术规范规定:E32 = 0',
+  `sym` varchar(10) DEFAULT NULL,
+  `jitter` varchar(10) DEFAULT NULL,
+  `pie` varchar(10) DEFAULT NULL COMMENT '奇偶校验内码错误  PI 与PO分别是ECC(错误校正编码)块中的奇偶校验内码和外码,DVD 光盘用PI 与PO 校验中发现错误的次数与程度来评价其记录质量,DVD-R和DVD+R技术规范规定PIE不能超过280',
+  `pof` varchar(10) DEFAULT NULL COMMENT '奇偶校验外码失败  当DVDR读出解码器经过第一轮纠错后,不能校正ECC块内数据就叫奇偶校验外码失败,DVD-R和DVD+R技术规范都规定POF = 0',
+  `asym` varchar(10) DEFAULT NULL,
+  `dc_jitter` varchar(10) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='检测表';
+
+-- ----------------------------
+-- Table structure for save _disposition
+-- ----------------------------
+DROP TABLE IF EXISTS `save _disposition`;
+CREATE TABLE `save _disposition` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` bigint(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL,
+  `medium_num` varchar(20) DEFAULT NULL COMMENT '光盘编号',
+  `disposal_type` varchar(10) DEFAULT NULL COMMENT '处置类型',
+  `disposal_reason` varchar(50) DEFAULT NULL COMMENT '处置原因',
+  `reviewer` varchar(10) DEFAULT NULL COMMENT '审批人',
+  `disposal_opinion` varchar(10) DEFAULT NULL COMMENT '审批意见',
+  `disposal_person` varchar(10) DEFAULT NULL COMMENT '处置人',
+  `security_supervisor` varchar(10) DEFAULT NULL COMMENT '监销人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='处置表';
+
+-- ----------------------------
+-- Table structure for save _warehousing
+-- ----------------------------
+DROP TABLE IF EXISTS `save _warehousing`;
+CREATE TABLE `save _warehousing` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL COMMENT '刻录时间',
+  `create_by` bigint(20) DEFAULT NULL COMMENT '清点人员',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL,
+  `Medium_num` varchar(20) DEFAULT NULL COMMENT '光盘号',
+  `Archieves_type` varchar(20) DEFAULT NULL COMMENT '档案类型',
+  `filing_num` varchar(50) DEFAULT NULL COMMENT '起止档号或归档号',
+  `medium_content` varchar(255) DEFAULT NULL COMMENT '光盘内容',
+  `file_format` varchar(10) DEFAULT NULL COMMENT '文件格式',
+  `data_size` varchar(10) DEFAULT NULL COMMENT '数据大小',
+  `Backup_count` int(1) DEFAULT NULL COMMENT '备份套数',
+  `Stowed_position` varchar(50) DEFAULT NULL COMMENT '存放位置',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='入库表';
+
+-- ----------------------------
+-- Table structure for save_backups_record
+-- ----------------------------
+DROP TABLE IF EXISTS `save_backups_record`;
+CREATE TABLE `save_backups_record` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL COMMENT '备份说明',
+  `create_by` bigint(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL COMMENT '备份方式',
+  `backups_mode` varchar(20) DEFAULT NULL COMMENT '备份方式',
+  `backups_medium` varchar(20) DEFAULT NULL COMMENT '备份介质',
+  `backups_num` int(1) DEFAULT NULL COMMENT '备份套数',
+  `backups_batch` varchar(20) DEFAULT NULL COMMENT '批次',
+  `backups_capacity` varchar(20) DEFAULT NULL COMMENT '每份备份大小',
+  `security_classification` varchar(20) DEFAULT NULL COMMENT '涉密情况',
+  `connect_tab` varchar(20) DEFAULT NULL COMMENT '交接表',
+  `leader` varchar(10) NOT NULL COMMENT '领导审核',
+  `rate_progress` int(1) DEFAULT NULL COMMENT '进度',
+  `warehousing_tab` varchar(20) DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='备份记录表';
+
+-- ----------------------------
+-- Table structure for save_connect
+-- ----------------------------
+DROP TABLE IF EXISTS `save_connect`;
+CREATE TABLE `save_connect` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL COMMENT '移出时间',
+  `create_by` bigint(20) DEFAULT NULL COMMENT '移出填表人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL,
+  `connect_name` varchar(20) DEFAULT NULL COMMENT '交接工作名',
+  `connect_content` varchar(255) DEFAULT NULL COMMENT '内容描述',
+  `connect_num` varchar(50) DEFAULT NULL COMMENT '移交电子数量',
+  `connect_unit` varchar(10) DEFAULT NULL COMMENT '移交数据量',
+  `serial` varchar(50) DEFAULT NULL COMMENT '载体起止顺序号',
+  `specification` varchar(50) DEFAULT NULL COMMENT '载体规格',
+  `accuracy_detection` int(1) DEFAULT NULL COMMENT '准确性检测',
+  `Integrity_ testing` int(1) DEFAULT NULL COMMENT '完整性检测',
+  `Availability_ detection` int(1) DEFAULT NULL COMMENT '可用性检测',
+  `safety_inspection` int(1) DEFAULT NULL COMMENT '安全性检测',
+  `Appearance_ detection` int(1) DEFAULT NULL COMMENT '载体外观检测',
+  `transfer_reviewer` varchar(10) DEFAULT NULL COMMENT '移交审核人',
+  `transfer_stamp` int(1) DEFAULT NULL COMMENT '移交单位签章',
+  `accession_reviewer` varchar(10) DEFAULT NULL COMMENT '接收审核人',
+  `accession_stamp` int(1) DEFAULT NULL COMMENT '接收单位签章',
+  `rate_progress` int(1) DEFAULT NULL COMMENT '进度',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='交接表';
+
+-- ----------------------------
+-- Table structure for save_label
+-- ----------------------------
+DROP TABLE IF EXISTS `save_label`;
+CREATE TABLE `save_label` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL COMMENT '存入日期',
+  `create_by` bigint(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL,
+  `num` varchar(20) DEFAULT NULL COMMENT '编号',
+  `fonds_code` varchar(20) DEFAULT NULL COMMENT '全宗号',
+  `category_code` varchar(20) DEFAULT NULL COMMENT '类别号',
+  `security_classification` varchar(20) DEFAULT NULL COMMENT '密级',
+  `retention_period` varchar(10) DEFAULT NULL COMMENT '保管期限',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='备份标签表';
+
+-- ----------------------------
+-- Table structure for save_recovery_application
+-- ----------------------------
+DROP TABLE IF EXISTS `save_recovery_application`;
+CREATE TABLE `save_recovery_application` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL COMMENT '申请时间',
+  `create_by` bigint(20) DEFAULT NULL COMMENT '申请人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL,
+  `Instruction` varchar(255) DEFAULT NULL COMMENT '申请说明',
+  `director_opinion` int(1) DEFAULT NULL COMMENT '局长审核',
+  `Recovery_information_tab` varchar(20) DEFAULT NULL COMMENT '恢复信息表',
+  `rate_progress` int(1) DEFAULT NULL COMMENT '进度 -1审核不通过  0审核中  1审核通过  2恢复成功 不是2的话都显示还未恢复',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='恢复申请表';
+
+-- ----------------------------
+-- Table structure for save_recovery_record
+-- ----------------------------
+DROP TABLE IF EXISTS `save_recovery_record`;
+CREATE TABLE `save_recovery_record` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL COMMENT '恢复时间',
+  `create_by` bigint(20) DEFAULT NULL COMMENT '操作人员',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` bigint(20) DEFAULT NULL,
+  `restoration_num` varchar(20) DEFAULT NULL COMMENT '恢复档案号',
+  `restoration_content` varchar(255) DEFAULT NULL COMMENT '恢复内容',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='恢复信息表';

+ 281 - 0
sql/archives_sys.sql

@@ -0,0 +1,281 @@
+/*
+Navicat MariaDB Data Transfer
+
+Source Server         : archives
+Source Server Version : 100032
+Source Host           : 192.168.1.124:3307
+Source Database       : archives_sys
+
+Target Server Type    : MariaDB
+Target Server Version : 100032
+File Encoding         : 65001
+
+Date: 2018-02-02 16:30:02
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for sys_dept
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dept`;
+CREATE TABLE `sys_dept` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门主键ID',
+  `dept_name` varchar(20) DEFAULT NULL COMMENT '部门名称',
+  `principal` varchar(32) DEFAULT NULL COMMENT '负责人',
+  `sort` int(5) DEFAULT NULL COMMENT '排序号',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1002 DEFAULT CHARSET=utf8 COMMENT='部门管理';
+
+-- ----------------------------
+-- Table structure for sys_dept_user
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dept_user`;
+CREATE TABLE `sys_dept_user` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门用户主键ID',
+  `dept_id` varchar(20) DEFAULT NULL COMMENT '部门ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`),
+  KEY `idx_dept_id` (`dept_id`),
+  KEY `idx_user_id` (`user_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='部门用户表';
+
+-- ----------------------------
+-- Table structure for sys_dic
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_dic`;
+CREATE TABLE `sys_dic` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `key` varchar(50) DEFAULT NULL COMMENT '字典代码',
+  `value` varchar(100) DEFAULT NULL COMMENT '字典值',
+  `sort` int(2) DEFAULT NULL COMMENT '排序号',
+  `enable` bit(1) NOT NULL DEFAULT b'1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '字典描述',
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1001 DEFAULT CHARSET=utf8 COMMENT='字典表';
+
+-- ----------------------------
+-- Table structure for sys_event_login
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_event_login`;
+CREATE TABLE `sys_event_login` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `title` varchar(50) DEFAULT NULL COMMENT '日志标题',
+  `request_uri` varchar(100) DEFAULT NULL COMMENT '请求地址',
+  `sort` int(2) DEFAULT NULL COMMENT '排序号',
+  `account` varchar(50) NOT NULL COMMENT '账户名',
+  `client_host` varchar(50) DEFAULT NULL COMMENT '登录IP地址',
+  `user_agent` varchar(200) DEFAULT NULL COMMENT '用户代理',
+  `status` int(2) NOT NULL DEFAULT '1' COMMENT '请求状态',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '字典描述',
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`),
+  KEY `idx_account` (`account`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='登录日志表';
+
+-- ----------------------------
+-- Table structure for sys_event_oper
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_event_oper`;
+CREATE TABLE `sys_event_oper` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `title` varchar(50) DEFAULT NULL COMMENT '日志标题',
+  `request_uri` varchar(100) DEFAULT NULL COMMENT '请求地址',
+  `sort` int(2) DEFAULT NULL COMMENT '排序号',
+  `account` varchar(50) NOT NULL COMMENT '账户名',
+  `client_host` varchar(50) DEFAULT NULL COMMENT '登录IP地址',
+  `parameter` varchar(1024) DEFAULT NULL COMMENT '请求参数',
+  `method` varchar(50) DEFAULT NULL COMMENT '请求方法',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL COMMENT '字典描述',
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`),
+  KEY `idx_account` (`account`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='操作日志表';
+
+-- ----------------------------
+-- Table structure for sys_menu
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_menu`;
+CREATE TABLE `sys_menu` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '菜单ID',
+  `menu_name` varchar(100) DEFAULT NULL COMMENT '菜单名称',
+  `menu_type` smallint(2) DEFAULT NULL COMMENT '菜单类型(0:CURD;1:系统菜单;2:业务菜单)',
+  `parent_id` bigint(20) DEFAULT NULL COMMENT '上级菜单ID',
+  `request` varchar(100) DEFAULT NULL COMMENT '请求地址',
+  `expand` tinyint(1) NOT NULL DEFAULT '0' COMMENT '展开状态(1:展开;0:收缩)',
+  `sort` int(2) DEFAULT NULL COMMENT '排序号',
+  `is_show` tinyint(1) NOT NULL DEFAULT '1' COMMENT '叶子节点(0:树枝节点;1:叶子节点)',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='菜单表';
+
+-- ----------------------------
+-- Table structure for sys_notice
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_notice`;
+CREATE TABLE `sys_notice` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '公告编号',
+  `notice_title` varchar(128) NOT NULL COMMENT '公告标题',
+  `notice_type` varchar(8) NOT NULL COMMENT '公告类型',
+  `send_time` datetime DEFAULT NULL COMMENT '发布时间',
+  `sources_url` varchar(2048) DEFAULT NULL COMMENT '来源地址',
+  `content` text COMMENT '内容',
+  `status` varchar(2) NOT NULL DEFAULT '1' COMMENT '发布状态',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='通知公告表';
+
+-- ----------------------------
+-- Table structure for sys_param
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_param`;
+CREATE TABLE `sys_param` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
+  `key` varchar(50) DEFAULT NULL COMMENT '参数key',
+  `value` varchar(100) DEFAULT NULL COMMENT '参数值',
+  `sort` int(2) DEFAULT NULL COMMENT '排序号',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='系统参数表';
+
+-- ----------------------------
+-- Table structure for sys_permission
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_permission`;
+CREATE TABLE `sys_permission` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '权限ID',
+  `name` varchar(100) DEFAULT NULL COMMENT '权限名称',
+  `code` smallint(2) DEFAULT NULL COMMENT '权限代码',
+  `parent_id` bigint(20) DEFAULT NULL COMMENT '上级菜单ID',
+  `description` varchar(100) DEFAULT NULL COMMENT '权限描述',
+  `menu_id` varchar(20) DEFAULT NULL COMMENT '所属菜单ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='权限表';
+
+-- ----------------------------
+-- Table structure for sys_role
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role`;
+CREATE TABLE `sys_role` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色ID',
+  `role_name` varchar(50) DEFAULT NULL COMMENT '角色名称',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='角色表';
+
+-- ----------------------------
+-- Table structure for sys_role_permission
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_role_permission`;
+CREATE TABLE `sys_role_permission` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '角色授权ID',
+  `role_id` varchar(20) DEFAULT NULL COMMENT '角色ID',
+  `permission_id` varchar(20) DEFAULT NULL COMMENT '权限ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='角色授权表';
+
+-- ----------------------------
+-- Table structure for sys_user
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user`;
+CREATE TABLE `sys_user` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户主键ID',
+  `account` varchar(20) DEFAULT NULL COMMENT '登陆帐户',
+  `password` varchar(50) DEFAULT NULL COMMENT '密码',
+  `user_type` varchar(2) DEFAULT '1' COMMENT '用户类型(1普通用户2管理员3系统用户)',
+  `user_name` varchar(30) DEFAULT NULL COMMENT '姓名',
+  `phone` varchar(50) DEFAULT NULL COMMENT '电话',
+  `email` varchar(64) DEFAULT NULL COMMENT '邮箱',
+  `dept_id` bigint(20) DEFAULT NULL COMMENT '部门编号',
+  `position` varchar(64) DEFAULT NULL COMMENT '职位',
+  `address` varchar(256) DEFAULT NULL COMMENT '详细地址',
+  `staff_no` varchar(32) DEFAULT NULL COMMENT '工号',
+  `ext_01` varchar(100) DEFAULT NULL COMMENT '备用字段',
+  `ext_02` varchar(100) DEFAULT NULL COMMENT '备用字段',
+  `ext_03` varchar(100) DEFAULT NULL COMMENT '备用字段',
+  `ext_04` varchar(100) DEFAULT NULL COMMENT '备用字段',
+  `enable` tinyint(1) NOT NULL DEFAULT '1',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `account` (`account`),
+  KEY `index_account` (`account`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='用户管理';
+
+-- ----------------------------
+-- Table structure for sys_user_role
+-- ----------------------------
+DROP TABLE IF EXISTS `sys_user_role`;
+CREATE TABLE `sys_user_role` (
+  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户角色表主键ID',
+  `role_id` varchar(20) DEFAULT NULL COMMENT '角色ID',
+  `user_id` varchar(20) DEFAULT NULL COMMENT '用户ID',
+  `enable` tinyint(1) NOT NULL DEFAULT '1' COMMENT '启用状态',
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(50) DEFAULT NULL COMMENT '创建人',
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
+  PRIMARY KEY (`id`),
+  KEY `idx_role_id` (`role_id`),
+  KEY `idx_user_id` (`user_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=utf8 COMMENT='用户角色表';

+ 133 - 0
sql/archives_usage.sql

@@ -0,0 +1,133 @@
+/*
+Navicat MariaDB Data Transfer
+
+Source Server         : archives
+Source Server Version : 100032
+Source Host           : 192.168.1.124:3307
+Source Database       : archives_usage
+
+Target Server Type    : MariaDB
+Target Server Version : 100032
+File Encoding         : 65001
+
+Date: 2018-02-02 16:30:10
+*/
+
+SET FOREIGN_KEY_CHECKS=0;
+
+-- ----------------------------
+-- Table structure for usage_apply
+-- ----------------------------
+DROP TABLE IF EXISTS `usage_apply`;
+CREATE TABLE `usage_apply` (
+  `id` bigint(20) NOT NULL,
+  `enable` tinyint(4) DEFAULT NULL,
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(20) DEFAULT NULL,
+  `property` varchar(50) NOT NULL,
+  `name` varchar(50) NOT NULL,
+  `phone` varchar(20) DEFAULT NULL,
+  `idcard_number` varchar(50) DEFAULT NULL,
+  `credentials_file` varchar(255) NOT NULL,
+  `company_name` varchar(255) DEFAULT NULL,
+  `archives_name` varchar(255) NOT NULL,
+  `apply_time` datetime NOT NULL,
+  `apply_purpose` varchar(255) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for usage_audit
+-- ----------------------------
+DROP TABLE IF EXISTS `usage_audit`;
+CREATE TABLE `usage_audit` (
+  `id` bigint(20) NOT NULL,
+  `enable` tinyint(4) DEFAULT NULL,
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(20) DEFAULT NULL,
+  `name` varchar(50) NOT NULL,
+  `position` varchar(50) DEFAULT NULL,
+  `result` varchar(50) DEFAULT NULL,
+  `time` datetime NOT NULL,
+  PRIMARY KEY (`id`),
+  CONSTRAINT `usage_audit_ibfk_1` FOREIGN KEY (`id`) REFERENCES `usage_apply` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for usage_borrow
+-- ----------------------------
+DROP TABLE IF EXISTS `usage_borrow`;
+CREATE TABLE `usage_borrow` (
+  `id` bigint(20) NOT NULL,
+  `enable` tinyint(4) DEFAULT NULL,
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(20) DEFAULT NULL,
+  `borrow_time` datetime NOT NULL,
+  `duration` varchar(50) DEFAULT NULL,
+  `deadline` datetime DEFAULT NULL,
+  `status` varchar(50) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  CONSTRAINT `usage_borrow_ibfk_1` FOREIGN KEY (`id`) REFERENCES `usage_apply` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for usage_evaluation
+-- ----------------------------
+DROP TABLE IF EXISTS `usage_evaluation`;
+CREATE TABLE `usage_evaluation` (
+  `id` bigint(20) NOT NULL,
+  `enable` tinyint(4) DEFAULT NULL,
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(20) DEFAULT NULL,
+  `evaluate_score` varchar(10) NOT NULL,
+  `evaluate_content` varchar(255) DEFAULT NULL,
+  `evaluate_time` datetime NOT NULL,
+  PRIMARY KEY (`id`),
+  CONSTRAINT `usage_evaluation_ibfk_1` FOREIGN KEY (`id`) REFERENCES `usage_borrow` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for usage_remind
+-- ----------------------------
+DROP TABLE IF EXISTS `usage_remind`;
+CREATE TABLE `usage_remind` (
+  `id` bigint(20) NOT NULL,
+  `enable` tinyint(4) DEFAULT NULL,
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(20) DEFAULT NULL,
+  `extra_time` datetime DEFAULT NULL,
+  `remind` varchar(50) NOT NULL,
+  PRIMARY KEY (`id`),
+  CONSTRAINT `usage_remind_ibfk_1` FOREIGN KEY (`id`) REFERENCES `usage_borrow` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Table structure for usage_rules
+-- ----------------------------
+DROP TABLE IF EXISTS `usage_rules`;
+CREATE TABLE `usage_rules` (
+  `id` bigint(20) NOT NULL,
+  `enable` tinyint(4) DEFAULT NULL,
+  `remark` varchar(1024) DEFAULT NULL,
+  `create_time` datetime DEFAULT NULL,
+  `create_by` varchar(20) DEFAULT NULL,
+  `update_time` datetime DEFAULT NULL,
+  `update_by` varchar(20) DEFAULT NULL,
+  `borrow_time` datetime DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;