-- phpMyAdmin SQL Dump
-- version 4.4.13.1deb1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: 2016-09-07 15:48:48
-- 服务器版本： 5.6.27-0ubuntu1
-- PHP Version: 5.6.11-1ubuntu3.1

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `zcju`
--

-- --------------------------------------------------------

--
-- 表的结构 `department`
--

CREATE TABLE IF NOT EXISTS `department` (
  `id` int(10) NOT NULL COMMENT '机构id',
  `department_name` varchar(250) NOT NULL COMMENT '机构名称',
  `department_description` varchar(250) NOT NULL COMMENT '机构描述',
  `display` varchar(10) NOT NULL COMMENT '1显示0隐藏'
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `department`
--

INSERT INTO `department` (`id`, `department_name`, `department_description`, `display`) VALUES
(1, '渤海区征拆局', '渤海区征拆局', '1'),
(2, '测试数据', '测试数据', '1');

-- --------------------------------------------------------

--
-- 表的结构 `project`
--

CREATE TABLE IF NOT EXISTS `project` (
  `id` int(10) NOT NULL,
  `project_name` varchar(255) NOT NULL,
  `display` varchar(10) NOT NULL COMMENT '0隐藏 1显示'
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `project`
--

INSERT INTO `project` (`id`, `project_name`, `display`) VALUES
(1, '项目一', '1'),
(3, '项目二', '0'),
(4, '项目三', '1');

-- --------------------------------------------------------

--
-- 表的结构 `role`
--

CREATE TABLE IF NOT EXISTS `role` (
  `id` int(10) NOT NULL,
  `name` varchar(255) NOT NULL COMMENT '职位名',
  `display_name` varchar(255) NOT NULL COMMENT '职位名',
  `description` varchar(255) NOT NULL COMMENT '描述',
  `role` int(10) NOT NULL COMMENT '权限',
  `display` varchar(10) NOT NULL COMMENT '0隐藏  1显示'
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COMMENT='职位表';

--
-- 转存表中的数据 `role`
--

INSERT INTO `role` (`id`, `name`, `display_name`, `description`, `role`, `display`) VALUES
(1, 'first', '初审', '审核表格', 3, '0'),
(2, 'second', '监审', '复审表格', 4, '1'),
(3, '', '征拆工作人员', '建表', 0, '1'),
(4, '', '核算', '核算提交的表单', 1, '1'),
(5, '', '复核', '复核核算的表单', 2, '1'),
(6, '', '管理员', '后台管理', 5, '1'),
(7, '', '领导', '查看所有表单', 6, '0');

-- --------------------------------------------------------

--
-- 表的结构 `table_list`
--

CREATE TABLE IF NOT EXISTS `table_list` (
  `id` int(10) NOT NULL,
  `table_id` int(10) NOT NULL COMMENT '表类型id',
  `json` text NOT NULL,
  `status` int(10) NOT NULL COMMENT '0:未提交 1已核算  2已复核 3已提交 4：已初审 5：已复审 6已监审',
  `user_id` int(10) NOT NULL,
  `bzc_name` varchar(255) NOT NULL COMMENT '被征收人姓名',
  `bzc_cardid` varchar(200) NOT NULL COMMENT '被征收人身份证',
  `bzc_addr` varchar(255) NOT NULL COMMENT '被征收地址',
  `bzc_area` varchar(50) NOT NULL COMMENT '被征收房屋面积',
  `house_type` varchar(200) NOT NULL COMMENT '房型',
  `bzc_tel` varchar(200) NOT NULL COMMENT '被征收人联系电话',
  `used` varchar(200) DEFAULT '默认：住房' COMMENT '用途',
  `project_name` varchar(200) NOT NULL COMMENT '项目名',
  `num` varchar(200) NOT NULL COMMENT '编号',
  `table_time` varchar(200) NOT NULL COMMENT '填表时间',
  `sub_description` varchar(255) NOT NULL COMMENT '提交描述',
  `hesuan` varchar(100) NOT NULL,
  `fuhe` varchar(100) NOT NULL,
  `chushen` varchar(100) NOT NULL,
  `jianshen` varchar(100) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='总数据表';

--
-- 转存表中的数据 `table_list`
--

INSERT INTO `table_list` (`id`, `table_id`, `json`, `status`, `user_id`, `bzc_name`, `bzc_cardid`, `bzc_addr`, `bzc_area`, `house_type`, `bzc_tel`, `used`, `project_name`, `num`, `table_time`, `sub_description`, `hesuan`, `fuhe`, `chushen`, `jianshen`) VALUES
(2, 1, '{"project_name":"\\u9879\\u76ee\\u4e09","num":"","bzc_name":"\\u6d4b\\u8bd5\\u6570\\u636e","bzc_addr":"\\u6d4b\\u8bd5\\u6570\\u636e","bzc_tel":"132","bzc_cardid":"123","property":"\\u6d4b\\u8bd5\\u6570\\u636e","used":"\\u6d4b\\u8bd5\\u6570\\u636e","total_money":"12345","home_area":"245","money_home_dprice":"254","money_home_price":"254","money_home_jchae":"5632","money_home_tchae":"524","money_bus_area":"56","money_bus_dprice":"263","money_bus_price":"241","money_bus_jchae":"254","money_bus_tchae":"2665","home_addr":"\\u6d4b\\u8bd5\\u6570\\u636e","data1":"\\u6d4b\\u8bd5\\u6570\\u636e","data2":"\\u6d4b\\u8bd5\\u6570\\u636e","data3":"\\u6d4b\\u8bd5\\u6570\\u636e","table_time":"\\u6d4b\\u8bd5\\u6570\\u636e","description":"","sub_description":"\\u6d4b\\u8bd5\\u6570\\u636e"}', 6, 6, '测试数据', '123', '测试数据', '0', '默认:住房', '100', '测试数据', '项目三', '', '测试数据', '测试数据', '', '', '', ''),
(3, 1, '{"project_name":"\\u9879\\u76ee\\u4e09","num":"123","bzc_name":"\\u6d4b\\u8bd5\\u6570\\u636e2","bzc_addr":"\\u6d4b\\u8bd5\\u6570\\u636e2","bzc_tel":"654","bzc_cardid":"123","property":"\\u6d4b\\u8bd5\\u6570\\u636e2","used":"\\u6d4b\\u8bd5\\u6570\\u636e2","total_money":"123546","home_area":"125","money_home_dprice":"154","money_home_price":"263","money_home_jchae":"2541","money_home_tchae":"2562","money_bus_area":"3254","money_bus_dprice":"12563","money_bus_price":"2541","money_bus_jchae":"2562","money_bus_tchae":"5484","home_addr":"\\u6d4b\\u8bd5\\u6570\\u636e2","data1":"\\u6d4b\\u8bd5\\u6570\\u636e2","data2":"\\u6d4b\\u8bd5\\u6570\\u636e2","data3":"\\u6d4b\\u8bd5\\u6570\\u636e2","table_time":"20160509","description":"","sub_description":"\\u6d4b\\u8bd5\\u6570\\u636e2"}', 6, 6, '测试数据2', '123', '测试数据2', '0', '默认:住房', '600', '测试数据2', '项目三', '123', '20160509', '测试数据2', '', '', '', ''),
(4, 9, '{"project_name":"\\u9879\\u76ee\\u4e09","num":"123456","bzc_name":"\\u6d4b\\u8bd59","bzc_addr":"\\u6d4b\\u8bd59","bzc_tel":"123","bzc_cardid":"123","chanquan":"\\u6d4b\\u8bd59","used":"\\u6d4b\\u8bd59","data1":"123","data2":"123","data3":"123","data4":"1231","data5":"123","data6":"123","data7":"123","data8":"123","data9":"123","data10":"123","data11":"123","data12":"123","data13":"123","data14":"123","data15":"123","data16":"123","data17":"123","data18":"123","data19":"123","data20":"123","data21":"123","data22":"123","data23":"231","data24":"12345","data25":"1234567","data26":"123456","data27":"123456","data28":"123456","data29":"a","data30":"12","data31":"12","data32":"a","data33":"21","data34":"11","data35":"a","data36":"12","data37":"11","data38":"a","data39":"21","data40":"11","data41":"","data42":"","data43":"1254","data44":"14252636","zc":"","bzc":"","daili":"","table_time":"","description":"","sub_description":""}', 6, 7, '测试9', '123', '测试9', '0', '默认:住房', '123', '测试9', '项目三', '123456', '16-09-07 07:30:00', '', '王五', '小六', '李四', '染七');

-- --------------------------------------------------------

--
-- 表的结构 `table_name`
--

CREATE TABLE IF NOT EXISTS `table_name` (
  `id` int(10) NOT NULL,
  `table_name` varchar(255) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COMMENT='所有表的名字';

--
-- 转存表中的数据 `table_name`
--

INSERT INTO `table_name` (`id`, `table_name`) VALUES
(1, '国有土地房屋征收与补偿安置单（货币化安置）'),
(2, '违章建筑自行拆除费用申领表'),
(3, '海勃湾区残疾人房屋征收补贴审批确认单'),
(4, '海勃湾区房屋征收提前搬迁奖励单'),
(5, '房屋逾期过渡安置补助费发放单'),
(6, '海勃湾区房屋征收安置补贴单'),
(7, '国有土地上房屋征收与补偿核算单（货币化安置）'),
(8, '国有土地上房屋征收与补偿核算单（产权调换）'),
(9, '国有土地上房屋征收与补偿核算单（货币补偿）');

-- --------------------------------------------------------

--
-- 表的结构 `user`
--

CREATE TABLE IF NOT EXISTS `user` (
  `id` int(10) NOT NULL,
  `name` varchar(250) NOT NULL COMMENT '登录名(账号)',
  `pswd` varchar(255) NOT NULL COMMENT '密码',
  `department` varchar(255) NOT NULL COMMENT '单位',
  `education` varchar(255) NOT NULL,
  `role` int(10) NOT NULL DEFAULT '1' COMMENT '权限（数字越大越高）',
  `surname` varchar(200) NOT NULL COMMENT '姓名',
  `cardname` varchar(250) NOT NULL COMMENT '证件名称',
  `cardid` varchar(100) NOT NULL COMMENT '证件号',
  `role_id` varchar(10) NOT NULL,
  `display` varchar(10) NOT NULL COMMENT '0：停用  1：启用',
  `thumb` varchar(255) NOT NULL COMMENT '头像图路径',
  `job_name` varchar(250) NOT NULL,
  `department_id` varchar(10) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COMMENT='普通用户';

--
-- 转存表中的数据 `user`
--

INSERT INTO `user` (`id`, `name`, `pswd`, `department`, `education`, `role`, `surname`, `cardname`, `cardid`, `role_id`, `display`, `thumb`, `job_name`, `department_id`) VALUES
(1, 'admin04', 'eyJpdiI6IlpyN3ViYWlMRDhCNFlick8wVWFhTmc9PSIsInZhbHVlIjoieTJRY3RBcVdVXC9aODZGUUxxaWpJV1E9PSIsIm1hYyI6IjczYjBjNmFhOWZiZTcyMWYzMjZhZTdhOWI3Y2NmY2EwMDFiYzM1MzRkYTc3MGY4MDVjM2MwYTk0ZGIwMzVmMGUifQ==', '海勃湾征拆局', '二本', 3, '李四', '居民身份证', '123456789321458967', '1', '1', '', '初审', '1'),
(2, 'admin02', 'eyJpdiI6IlZ1R0lHN0RBM3pCV3V4N1BYdndUVkE9PSIsInZhbHVlIjoiUHBNdk9QMzRyR2RXM3FvVHRTYjlEQT09IiwibWFjIjoiNDMyZTlmZjdmNTMwYWJkNjgwYWZkMWFmODZhMjgyNGUwODM0MGNlYjdmNDEzYWM0MzgxYzI5ZDFlMzljOGY1YyJ9', '海勃湾征拆局', '二本', 1, '王五', '居民身份证', '789456321456879654', '4', '1', '', '核算', '1'),
(3, 'admin03', 'eyJpdiI6IkkrRXFURjZJdkVBVEQweUhnSUZOclE9PSIsInZhbHVlIjoid0lTeFlwWTc0dTRkNXpWTUZEODNtUT09IiwibWFjIjoiY2JiZTM3Njk5MTQ1ZjBiMmE3OGJmNDc5ZWU5MTBkMjdmMmQ3MDlmM2E5YTcyMmViMGIzYWFhNDE3OWM0ZWQ4ZiJ9', '海勃湾征拆局', '二本', 2, '小六', '居民身份证', '789654123654789632', '5', '1', '', '复核', '1'),
(5, 'admin05', 'eyJpdiI6IlwvWTZLaVEzMjFQSTBNSTFDbXNsaTlRPT0iLCJ2YWx1ZSI6InJLK2lRODRZc3NIWFBcL0FTa3NPNnhnPT0iLCJtYWMiOiIyMWE0ODM3OWRmNTAxZmUzODRjZTU3MDVmN2JjMWZkZjEzNzdiMDNkZTUwMDRkYzQ4YmRhYTE3YzA0MjRlZjliIn0=', '海勃湾征拆局', '二本', 4, '染七', '居民身份证', '789654123654789632', '2', '1', '', '监审', '1'),
(6, 'admin01', 'eyJpdiI6InBrdlgyc2d5SzgwTDcxKys5XC9xMmFRPT0iLCJ2YWx1ZSI6IlBEVFZaUXZiMmJYWjdPWjVlWXVrVGc9PSIsIm1hYyI6IjdiNjc2N2MyOWNmODgxZTAzMjJhZTVmYTIyM2JlMzViNzVmZDQ5OTdjN2VlNGUzMTFlYjczM2ViY2E4MWM3ZTcifQ==', '海勃湾征拆局', '二本', 0, '赵三', '居民身份证', '789654123654789632', '3', '1', 'img/20160902085742354.jpg', '工作人员', '1'),
(7, 'admin', 'eyJpdiI6Im11VzA4VFQ4aEVXS1lzR3NOazE2Z1E9PSIsInZhbHVlIjoiQkdZTEdUSll3ZkNaWHVPZ1FjeTFUQT09IiwibWFjIjoiZTBhNzE2YjQ1MzIzNzhhZWE3MzdkYzI2MGZkMGU3OTMwNDk1NmQ2YjVmMGY1NWE3ZmJkMzlmNTYzMzcwZTY3YSJ9', '海勃湾征拆局', '二本', 5, '龙傲天', '居民身份证', '789654123654789632', '6', '1', 'img/20160902085742354.jpg', '管理员', '1'),
(12, 'admin06', 'eyJpdiI6ImNBWmFJVUNiUTZVSElRNjIxTmNlQmc9PSIsInZhbHVlIjoidDJLdG9LOHRJVGREVXQxWVlxRVpDdz09IiwibWFjIjoiMDg2ZGI2NGJkNzExNWEyMDNmYjI5ZTg2ZWJlZmUwMTYxOGVhYjc3YmYwZjVjZjAzOWIxOTIxMzY4NmVkNDJmNSJ9', '海勃湾征拆局', '二本', 6, '李富贵', '居民身份证', '789654123654789632', '7', '1', '', '领导', '1');

-- --------------------------------------------------------

--
-- 表的结构 `user_role`
--

CREATE TABLE IF NOT EXISTS `user_role` (
  `user_id` int(10) NOT NULL,
  `role_id` int(10) NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- 转存表中的数据 `user_role`
--

INSERT INTO `user_role` (`user_id`, `role_id`) VALUES
(1, 1),
(2, 1),
(3, 2);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `department`
--
ALTER TABLE `department`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `project`
--
ALTER TABLE `project`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `role`
--
ALTER TABLE `role`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `table_list`
--
ALTER TABLE `table_list`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `table_name`
--
ALTER TABLE `table_name`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user`
--
ALTER TABLE `user`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user_role`
--
ALTER TABLE `user_role`
  ADD PRIMARY KEY (`user_id`,`role_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `department`
--
ALTER TABLE `department`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '机构id',AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `project`
--
ALTER TABLE `project`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `role`
--
ALTER TABLE `role`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8;
--
-- AUTO_INCREMENT for table `table_list`
--
ALTER TABLE `table_list`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `table_name`
--
ALTER TABLE `table_name`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=13;
--
-- AUTO_INCREMENT for table `user_role`
--
ALTER TABLE `user_role`
  MODIFY `user_id` int(10) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
