/*
Navicat MySQL Data Transfer
Source Server : mysql5.4
Source Server Version : 50540
Source Host : localhost:3306
Source Database : testdemo
Target Server Type : MYSQL
Target Server Version : 50540
File Encoding : 65001
Date: 2018-04-08 12:54:08
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `equipment_check_item`
-- ----------------------------
DROP TABLE IF EXISTS `equipment_check_item`;
CREATE TABLE `equipment_check_item` (
`id_` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`eci_code` bigint(20) NOT NULL COMMENT '点检项目编号',
`et_code` bigint(20) NOT NULL COMMENT '项目类型编号',
`eci_name` varchar(60) NOT NULL COMMENT '点检项目名称',
`eci_order` mediumint(4) NOT NULL COMMENT '点检项目顺序',
`enable_` tinyint(1) NOT NULL COMMENT '记录有效性',
`remark_` varchar(100) NOT NULL,
`create_by` bigint(20) NOT NULL,
`create_time` datetime NOT NULL,
`update_by` bigint(20) NOT NULL,
`update_time` datetime NOT NULL,
PRIMARY KEY (`id_`),
UNIQUE KEY `eci_code` (`eci_code`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of equipment_check_item
-- ----------------------------
INSERT INTO `equipment_check_item` VALUES ('1', '20180001', '20180001', '油量检查', '1', '1', '测试', '1', '2018-04-01 19:05:10', '1', '2018-04-04 19:05:23');
-- ----------------------------
-- Table structure for `equipment_check_resord`
-- ----------------------------
DROP TABLE IF EXISTS `equipment_check_resord`;
CREATE TABLE `equipment_check_resord` (
`id_` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`erc_code` bigint(20) NOT NULL COMMENT '设备点检记录编码',
`ei_code` bigint(20) NOT NULL COMMENT '点检设备编码',
`ci_code` bigint(20) NOT NULL COMMENT '点检职员编码',
`erc_result` tinyint(1) NOT NULL DEFAULT '6' COMMENT '点检结果:0正常 1故障 2报废 3待报废 4停用 5未使用 6待检',
`erc_work` tinyint(1) NOT NULL DEFAULT '0' COMMENT '点检后是否可作业:1可接收作业 0不可接收作业',
`erc_date` datetime NOT NULL COMMENT '点检日期',
`enable_` tinyint(1) NOT NULL DEFAULT '1' COMMENT '记录状态:0无效,1有效',
`remark_` varchar(100) DEFAULT NULL COMMENT '备注信息',
`create_by` bigint(20) NOT NULL COMMENT '点检记录创建者',
`create_time` datetime NOT NULL COMMENT '点检记录创建时间',
`update_by` bigint(20) NOT NULL COMMENT '点检记录更新者',
`update_time` datetime NOT NULL COMMENT '点检记录更新时间',
PRIMARY KEY (`id_`),
UNIQUE KEY `erc_code` (`erc_code`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of equipment_check_resord
-- ----------------------------
INSERT INTO `equipment_check_resord` VALUES ('1', '2018040501', '2018040501', '2018040501', '6', '0', '2018-04-01 13:51:41', '1', null, '2018040501', '2018-04-05 13:51:53', '2018040501', '2018-04-05 13:51:57');
INSERT INTO `equipment_check_resord` VALUES ('2', '2018040502', '2018040502', '2018040502', '5', '0', '2018-04-01 13:51:41', '1', null, '2018040501', '2018-04-05 13:51:53', '2018040501', '2018-04-05 13:51:57');
INSERT INTO `equipment_check_resord` VALUES ('3', '2018040503', '2018040503', '2018040503', '4', '0', '2018-04-01 13:51:41', '1', null, '2018040501', '2018-04-05 13:51:53', '2018040501', '2018-04-05 13:51:57');
INSERT INTO `equipment_check_resord` VALUES ('4', '2018040504', '2018040504', '2018040503', '3', '0', '2018-04-01 13:51:41', '1', null, '2018040501', '2018-04-05 13:51:53', '2018040501', '2018-04-05 13:51:57');
INSERT INTO `equipment_check_resord` VALUES ('5', '2018040505', '2018040505', '2018040503', '2', '0', '2018-04-01 13:51:41', '1', null, '2018040501', '2018-04-05 13:51:53', '2018040501', '2018-04-05 13:51:57');
INSERT INTO `equipment_check_resord` VALUES ('6', '2018040506', '2018040506', '2018040506', '1', '0', '2018-04-01 13:51:41', '1', '设备出现故障', '2018040501', '2018-04-05 13:51:53', '2018040501', '2018-04-05 13:51:57');
INSERT INTO `equipment_check_resord` VALUES ('7', '2018040507', '2018040507', '2018040507', '0', '0', '2018-04-01 13:51:41', '1', '设备一切正常', '2018040501', '2018-04-05 13:51:53', '2018040501', '2018-04-05 13:51:57');
INSERT INTO `equipment_check_resord` VALUES ('8', '2018040508', '2018040508', '2018040508', '0', '0', '2018-04-04 20:07:29', '1', 'Hello Boy', '2018040508', '2018-04-05 20:07:43', '2018040508', '2018-04-05 20:07:47');
-- ----------------------------
-- Table structure for `equipment_info`
-- ----------------------------
DROP TABLE IF EXISTS `equipment_info`;
CREATE TABLE `equipment_info` (
`id_` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`ei_code` bigint(20) NOT NULL COMMENT '设备编号_唯一约束',
`et_code` bigint(20) NOT NULL COMMENT '设备类型编号_最好添加外键约束',
`di_code` bigint(20) NOT NULL COMMENT '部门编号_最好添加外键约束',
`ci_code` bigint(20) NOT NULL COMMENT '负责员工编号_最好添加外键约束',
`ei_name` varchar(60) NOT NULL COMMENT '设备名称',
`ei_place` varchar(60) NOT NULL COMMENT '设备存放地址',
`ei_specification` varchar(100) NOT NULL COMMENT '设备规格信息',
`ei_manufacturer` varchar(60) NOT NULL COMMENT '设备制造商',
`ei_price` double(10,0) NOT NULL COMMENT '设备单价',
`ei_purchase_date` datetime NOT NULL COMMENT '设备购置日期',
`ei_lifetime` mediumint(4) NOT NULL COMMENT '设备使用年限',
`ei_galleryful` mediumint(4) NOT NULL COMMENT '设备工位数',
`ei_desc` varchar(100) DEFAULT NULL,
`enable_` tinyint(1) NOT NULL,
`remark_` varchar(100) DEFAULT NULL,
`create_by` bigint(20) NOT NULL,
`create_time` datetime NOT NULL,
`update_by` bigint(20) NOT NULL,
`update_time` datetime NOT NULL,
PRIMARY KEY (`id_`),
UNIQUE KEY `et_code` (`et_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of equipment_info
-- ----------------------------
-- ----------------------------
-- Table structure for `equipment_type`
-- ----------------------------
DROP TABLE IF EXISTS `equipment_type`;
CREATE TABLE `equipment_type` (
`id_` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '记录ID',
`et_code` bigint(20) NOT NULL COMMENT '设备类型编号',
`et_name` varchar(60) NOT NULL COMMENT '设备类型名称',
`et_desc` varchar(100) DEFAULT NULL COMMENT '设备类型描述',
`enable_` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用: 0失效 1启用',
`remark_` varchar(100) DEFAULT NULL COMMENT '备注信息',
`create_by` bigint(20) NOT NULL,
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_by` bigint(20) NOT NULL COMMENT '更新者编号',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id_`),
UNIQUE KEY `et_code_2` (`et_code`),
KEY `et_code` (`et_code`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Records of equipment_type
-- ----------------------------
INSERT INTO `equipment_type` VALUES ('1', '20180001', '铣床类', '主要加工硬质钢铁原型', '1', null, '19930001', '2018-02-01 15:09:09', '1', '2018-04-03 16:36:21');
INSERT INTO `equipment_type` VALUES ('2', '20180002', '切削类', '主要对原材料进行切削加工', '1', null, '19930002', '2018-07-03 10:32:53', '1', '2018-04-03 16:40:58');
INSERT INTO `equipment_type` VALUES ('3', '20180003', '钻孔类', '对产品进行钻孔擦操作', '0', null, '19930003', '2018-04-02 10:35:37', '1', '2018-04-03 18:30:43');
INSERT INTO `equipment_type` VALUES ('4', '20180004', '包装类_修改', '主要对产品及逆行打包操作', '0', null, '19930004', '2018-03-28 10:57:18', '1', '2018-04-04 22:22:30');
INSERT INTO `equipment_type` VALUES ('5', '20180006', '测试类_修改', '测试类型的设备负责成品的测试工作', '1', null, '1', '2018-04-03 19:03:41', '1', '2018-04-03 19:40:34');
INSERT INTO `equipment_type` VALUES ('6', '20180005', '钻孔类', '这种设备类型主要负责对产品进行钻孔操作', '0', null, '1', '2018-04-03 20:42:35', '1', '2018-04-05 10:39:58');
INSERT INTO `equipment_type` VALUES ('7', '20180007', '测试', '饿啊', '0', null, '1', '2018-04-04 12:20:57', '1', '2018-04-05 10:58:46');
-- ----------------------------
-- Table structure for `tb_area`
-- ----------------------------
DROP TABLE IF EXISTS `tb_area`;
CREATE TABLE `tb_area` (
`area_id` int(2) NOT NULL AUTO_INCREMENT,
`area_name` varchar(200) NOT NULL,
`priority` int(2) NOT NULL DEFAULT '0',
`create_time` datetime NOT NULL,
`last_edit_time` datetime NOT NULL,
PRIMARY KEY (`area_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Records of tb_area
-- ----------------------------
INSERT INTO `tb_area` VALUES ('1', '东苑', '0', '2018-03-07 08:50:37', '2018-04-08 09:58:01');
INSERT INTO `tb_area` VALUES ('2', '南苑', '1', '2018-04-08 09:44:48', '2018-04-08 09:44:48');