/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50717
Source Host           : localhost:3306
Source Database       : delphi

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

Date: 2018-06-09 13:53:12
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for bill
-- ----------------------------
DROP TABLE IF EXISTS `bill`;
CREATE TABLE `bill` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `billCode` varchar(20) DEFAULT NULL,
  `materielId` bigint(20) DEFAULT '0',
  `number` int(10) DEFAULT '0',
  `qualifiedNum` int(10) DEFAULT '0',
  `UnqualifiedNum` int(10) DEFAULT '0',
  `state` int(1) DEFAULT '0',
  `createTime` varchar(19) DEFAULT NULL,
  `modifyTime` varchar(19) DEFAULT NULL,
  `delFlag` int(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of bill
-- ----------------------------

-- ----------------------------
-- Table structure for bill_detail
-- ----------------------------
DROP TABLE IF EXISTS `bill_detail`;
CREATE TABLE `bill_detail` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `billId` bigint(20) DEFAULT '0',
  `materielId` bigint(20) DEFAULT '0',
  `qrCode` varchar(255) DEFAULT NULL,
  `collectionCode` varchar(255) DEFAULT NULL,
  `state` int(1) DEFAULT '0',
  `createTime` varchar(19) DEFAULT NULL,
  `modifyTime` varchar(19) DEFAULT NULL,
  `delFlag` int(1) DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `qrCode_idx` (`qrCode`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of bill_detail
-- ----------------------------

-- ----------------------------
-- Table structure for dc_role
-- ----------------------------
DROP TABLE IF EXISTS `dc_role`;
CREATE TABLE `dc_role` (
  `id` bigint(50) NOT NULL AUTO_INCREMENT COMMENT '自增长id',
  `rolename` varchar(255) DEFAULT '' COMMENT '角色名称',
  `powers` varchar(255) DEFAULT '' COMMENT '所拥有的权限',
  `delflag` varchar(50) DEFAULT '0' COMMENT '删除标志',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of dc_role
-- ----------------------------
INSERT INTO `dc_role` VALUES ('1', '管理员', '管理用户、修改权限、修改密码、添加用户、删除用户', '0');
INSERT INTO `dc_role` VALUES ('2', '操作员', '修改密码', '0');

-- ----------------------------
-- Table structure for dc_user
-- ----------------------------
DROP TABLE IF EXISTS `dc_user`;
CREATE TABLE `dc_user` (
  `id` bigint(50) NOT NULL AUTO_INCREMENT COMMENT '自增长id',
  `loginname` varchar(255) DEFAULT 'loginname' COMMENT '登陆名称',
  `password` varchar(255) DEFAULT '123456' COMMENT '登录密码',
  `realname` varchar(255) DEFAULT '' COMMENT '真实姓名',
  `roleid` bigint(50) DEFAULT '0' COMMENT '角色id',
  `delflag` varchar(50) DEFAULT '0' COMMENT '删除标志',
  `loginstatus` varchar(50) DEFAULT '0' COMMENT '0未登录/退出  1登陆中',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of dc_user
-- ----------------------------
INSERT INTO `dc_user` VALUES ('1', 'admin', '123456', '超级管理员', '1', '0', '0');

-- ----------------------------
-- Table structure for materiel
-- ----------------------------
DROP TABLE IF EXISTS `materiel`;
CREATE TABLE `materiel` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `cpn` varchar(20) DEFAULT NULL,
  `dpn` varchar(20) DEFAULT NULL,
  `type` varchar(20) DEFAULT NULL,
  `maxNum` bigint(20) DEFAULT '1',
  `createTime` varchar(19) DEFAULT NULL,
  `modifyTime` varchar(19) DEFAULT NULL,
  `delFlag` int(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of materiel
-- ----------------------------
INSERT INTO `materiel` VALUES ('1', '643358100B', '35096483', 'I1', '1', '2018-05-03 16:07:00', '2018-06-09 13:29:04', '0');
INSERT INTO `materiel` VALUES ('2', '643358000B', '35096484', 'H1', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('3', '643357900B', '35096485', 'G1', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('4', '643246000B', '35096486', 'F ', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('5', '643245900B', '35096487', 'E ', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('6', '643245800B', '35096488', 'D ', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('7', '643245700B', '35096489', 'C ', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('8', '643245400B', '35096490', 'B ', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('9', '643245100B', '35096491', 'A ', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('10', '646350000A', '35153500', 'M1', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('11', '646499900A', '35153501', 'G2', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('12', '646500000A', '35153502', 'H2', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('13', '646500100A', '35153503', 'I2', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('14', '646499800A', '35153504', 'M2', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('15', '645918100B', '35153505', 'G3', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('16', '645918200B', '35153506', 'H3', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('17', '645918300B', '35153507', 'I3', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
INSERT INTO `materiel` VALUES ('18', '646499700A', '35153508', 'M3', '1', '2018-05-03 16:07:00', '2018-05-03 16:07:00', '0');
