/*
Navicat MySQL Data Transfer

Source Server         : 百保盾内网库
Source Server Version : 50720
Source Host           : 183.250.166.207:3345
Source Database       : gxbbd

Target Server Type    : MYSQL
Target Server Version : 50720
File Encoding         : 65001

Date: 2019-03-27 14:17:28
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- 保安师库
-- Table structure for security_guard
-- ----------------------------
DROP TABLE IF EXISTS `security_guard`;
CREATE TABLE `security_guard` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `active` bit(1) NOT NULL COMMENT '是否有效',
  `create_time` datetime NOT NULL COMMENT '创建时间',
  `update_time` datetime DEFAULT NULL COMMENT '更新时间',
  `update_by` varchar(50) DEFAULT NULL COMMENT '更新人',
  `id_number` varchar(50) DEFAULT NULL COMMENT '身份证号',
  `name` varchar(50) DEFAULT NULL COMMENT '姓名',
  `sex` varchar(5) DEFAULT NULL COMMENT '性别',
  `profession` varchar(20) DEFAULT NULL COMMENT '职业',
  `profession_level` int(50) DEFAULT NULL COMMENT '职业水平',
  `edu` int(10) DEFAULT '4' COMMENT '学历',
  `phone` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `serviceStartTime` varchar(16) DEFAULT NULL COMMENT '服务开始时间',
  `credential` varchar(50) DEFAULT NULL COMMENT '证书编号',
  `certificatejgtime` varchar(16) DEFAULT NULL COMMENT '颁证日期',
  `security_company` varchar(50) DEFAULT NULL COMMENT '服务保安公司',
  `workPlace` varchar(50) DEFAULT NULL COMMENT '工作地点',
  `ticketNum` varchar(50) DEFAULT NULL COMMENT '准考证号',
  `written_score` varchar(6) DEFAULT NULL COMMENT '笔试成绩',
  `operate_score` varchar(6) DEFAULT NULL COMMENT '实操成绩',
  `sum_score` varchar(6) DEFAULT NULL COMMENT '综合成绩',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `idx_id` (`id`) USING BTREE,
  KEY `security_person_id_number` (`id_number`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=556220753536614402 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;


/*
Navicat MySQL Data Transfer

Source Server         : 百保盾内网库
Source Server Version : 50720
Source Host           : 183.250.166.207:3345
Source Database       : gxbbd

Target Server Type    : MYSQL
Target Server Version : 50720
File Encoding         : 65001

Date: 2019-03-27 14:17:58
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- 批量导入保安师库临时表
-- Table structure for temp_batch_security_guard_import
-- ----------------------------
DROP TABLE IF EXISTS `temp_batch_security_guard_import`;
CREATE TABLE `temp_batch_security_guard_import` (
  `tempBatchGuardImportId` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '离职批次ID',
  `createTime` datetime NOT NULL COMMENT '创建时间',
  `id_number` varchar(50) DEFAULT NULL COMMENT '身份证号',
  `name` varchar(100) DEFAULT NULL COMMENT '姓名',
  `sex` varchar(5) DEFAULT NULL COMMENT '性别',
  `profession` varchar(20) DEFAULT NULL COMMENT '职业',
  `profession_level` varchar(10) DEFAULT NULL COMMENT '职业水平',
  `edu` varchar(10) DEFAULT '4' COMMENT '学历',
  `phone` varchar(20) DEFAULT NULL COMMENT '联系电话',
  `credential` varchar(50) DEFAULT NULL COMMENT '证书编号',
  `certificatejgtime` varchar(16) DEFAULT NULL COMMENT '颁证日期',
  `security_company` varchar(50) DEFAULT NULL COMMENT '服务保安公司',
  `isSuccess` varchar(1) DEFAULT '1' COMMENT '成功标志(0:失败, 1:成功)',
  `importBatchId` bigint(20) NOT NULL COMMENT '导入批次ID',
  `errorMsg` varchar(1000) DEFAULT NULL COMMENT '错误信息',
  PRIMARY KEY (`tempBatchGuardImportId`),
  KEY `index_temp_batch_per_import_importBatchId` (`importBatchId`)
) ENGINE=InnoDB AUTO_INCREMENT=1030 DEFAULT CHARSET=utf8 COMMENT='批量人员导入临时表';

INSERT INTO `file_temp` (`id`, `createTime`, `createBy`, `updateTime`, `updateBy`, `fileTempName`, `fileTempType`, `title`, `path`, `description`) VALUES ('3', '2019-03-25 17:52:39', '', '2019-03-25 17:52:44', '', 'securityGuardTemp.xls', 'xls', '历史保安师导入模板', 'C:\\data\\ars\\temp\\securityGuardTemp.xls', '历史保安师导入模板');
INSERT INTO `file_temp` (`id`, `createTime`, `createBy`, `updateTime`, `updateBy`, `fileTempName`, `fileTempType`, `title`, `path`, `description`) VALUES ('4', '2019-03-25 17:52:39', '', '2019-03-25 17:52:44', '', 'securityGuardFailTemp.xls', 'xls', '历史保安师失败导出模板', 'C:\\data\\ars\\temp\\securityGuardFailTemp.xls', '历史保安师失败导出模板');

ALTER TABLE `security_guard`
ADD COLUMN `updateflag`  bit NULL DEFAULT b'0'  COMMENT '新增，修改标志' AFTER `sum_score`;


ALTER TABLE `security_guard`
MODIFY COLUMN `written_score`  varchar(6) NULL DEFAULT NULL COMMENT '笔试成绩' AFTER `ticketNum`,
MODIFY COLUMN `operate_score`  varchar(6) NULL DEFAULT NULL COMMENT '实操成绩' AFTER `written_score`,
MODIFY COLUMN `sum_score`  varchar(6) NULL DEFAULT NULL COMMENT '综合成绩' AFTER `operate_score`;

ALTER TABLE `security_guard`
MODIFY COLUMN `profession_level`  varchar(10) NULL DEFAULT NULL COMMENT '职业水平' AFTER `profession`,
MODIFY COLUMN `edu`  varchar(10) NULL DEFAULT '4' COMMENT '学历' AFTER `profession_level`;

