shebao_oa.sql 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779
  1. -----------------以下已上线------------------------>
  2. -- 社保黑名单表
  3. CREATE TABLE `biz_emp_blacklist` (
  4. `blacklist_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '黑名单编号',
  5. `name` VARCHAR(64) NOT NULL COMMENT '姓名',
  6. `idcard` VARCHAR(18) NOT NULL COMMENT '身份证',
  7. `memo` VARCHAR(128) NOT NULL COMMENT '备注信息',
  8. PRIMARY KEY (`blacklist_id`)
  9. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT '社保黑名单表';
  10. -- 2018-07-17 chensenlai DB:shebao_oa
  11. -- 后台人员添加邮箱通知
  12. ALTER TABLE `sys_user` ADD COLUMN `email` VARCHAR(64) DEFAULT NULL COMMENT '电子邮箱' AFTER `real_name`;
  13. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`)
  14. VALUES ('22', 'MENU_ACCOUNT_MANAGE', '帐务管理', '1', 'javascript:void(0);', '-1', '26');
  15. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`)
  16. VALUES ('24', 'MENU_ACCOUNT_INVOICE', '开票管理', '1', '/sbo/account/invoice/list', '22', '28');
  17. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`)
  18. VALUES ('25', 'MENU_ACCOUNT_PAYMENT', '打款管理', '1', '/sbo/account/payment/list', '22', '29');
  19. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`)
  20. VALUES ('26', 'MENU_ACCOUNT_DEALINGS_KEFU', '客服明细', '1', '/sbo/account/dealings/kefu/list', '22', '27');
  21. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`)
  22. VALUES ('27', 'MENU_ACCOUNT_DEALINGS_SHEBAO', '专员明细', '1', '/sbo/account/dealings/shebao/list', '22', '27');
  23. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`)
  24. VALUES ('28', 'MENU_ACCOUNT_DEALINGS_DIFF', '核对明细', '1', '/sbo/account/dealings/diff/list', '22', '27');
  25. INSERT INTO `shebao_oa`.`sys_role` (`rid`, `code`, `name`) VALUES ('4', 'FINANCE', '财务人员');
  26. -- 参数配置
  27. CREATE TABLE `cfg_param` (
  28. `param_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '参数编号',
  29. `gcode` VARCHAR(64) NOT NULL COMMENT '参数一级编码',
  30. `mcode` VARCHAR(64) NOT NULL COMMENT '参数二级编码',
  31. `mname` VARCHAR(64) NOT NULL COMMENT '参数名称',
  32. `data` VARCHAR(1024) DEFAULT NULL COMMENT '数据',
  33. `sort` INT(11) DEFAULT 1 COMMENT '排序',
  34. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  35. `update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  36. PRIMARY KEY (`param_id`)
  37. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT '参数配置';
  38. INSERT INTO `cfg_param` (`gcode`, `mcode`, `mname`, `data`) VALUES ('AUDIT', 'INVOICE', '开票审核流程', '');
  39. INSERT INTO `cfg_param` (`gcode`, `mcode`, `mname`, `data`) VALUES ('AUDIT', 'PAYMENT', '打款审核流程', '');
  40. -- 客服帐务往来记录表
  41. CREATE TABLE `account_dealings_kefu` (
  42. `dealings_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '客服往来交易编号',
  43. `op_user_id` INT(11) UNSIGNED NOT NULL COMMENT '操作员编号',
  44. `city_id` INT(11) UNSIGNED NOT NULL COMMENT '城市编号',
  45. `com_name` VARCHAR(64) NOT NULL COMMENT '公司名称',
  46. `op_month` VARCHAR(8) NOT NULL COMMENT '操作月份',
  47. `dealings_type` TINYINT(4) UNSIGNED NOT NULL COMMENT '交易类型',
  48. `memo` VARCHAR(1024) DEFAULT NULL COMMENT '备注信息',
  49. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  50. `update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  51. `invoice_status` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '开票状态',
  52. `invoice_no` VARCHAR(32) DEFAULT NULL COMMENT '开票流水号',
  53. `payment_status` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '收款状态',
  54. PRIMARY KEY (`dealings_id`)
  55. ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8 COMMENT '客服帐务往来记录表';
  56. -- 客服社保公积金往来记录表
  57. CREATE TABLE `account_dealings_kefu_shebao_fund` (
  58. `dealings_id` INT(11) UNSIGNED NOT NULL COMMENT '客服往来交易编号',
  59. `kefu_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '客服编号',
  60. `shebao_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '社保专员编号',
  61. `shebao_month` VARCHAR(8) DEFAULT NULL COMMENT '社保月份',
  62. `fund_month` VARCHAR(8) DEFAULT NULL COMMENT '公积金月份',
  63. `employ_num` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '员工数量',
  64. `shebao_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '社保费',
  65. `fund_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '公积金费',
  66. `residual_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '残保金',
  67. `detention_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '违约金',
  68. `service_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '服务费',
  69. PRIMARY KEY (`dealings_id`)
  70. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '客服社保公积金';
  71. -- 客服商保往来记录表
  72. CREATE TABLE `account_dealings_kefu_insurance` (
  73. `dealings_id` INT(11) UNSIGNED NOT NULL COMMENT '客服往来交易编号',
  74. `insurance_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '商保费',
  75. PRIMARY KEY (`dealings_id`)
  76. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '客服商保费';
  77. -- 客服工资往来记录表
  78. CREATE TABLE `account_dealings_kefu_salary` (
  79. `dealings_id` INT(11) UNSIGNED NOT NULL COMMENT '客服往来交易编号',
  80. `salary_month` VARCHAR(8) NOT NULL COMMENT '工资月份',
  81. `salary_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '实发工资',
  82. `salary_tax_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '个税',
  83. `tax_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '税费',
  84. `other_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '其他费',
  85. `service_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '服务费',
  86. PRIMARY KEY (`dealings_id`)
  87. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '客服工资';
  88. -- 社保专员帐务往来记录表
  89. CREATE TABLE `account_dealings_shebao` (
  90. `dealings_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '社保专员往来交易编号',
  91. `op_user_id` INT(11) UNSIGNED NOT NULL COMMENT '操作员编号',
  92. `city_id` INT(11) UNSIGNED NOT NULL COMMENT '城市编号',
  93. `com_name` VARCHAR(64) NOT NULL COMMENT '公司名称',
  94. `op_month` VARCHAR(8) NOT NULL COMMENT '操作月份',
  95. `dealings_type` TINYINT(4) UNSIGNED NOT NULL COMMENT '交易类型',
  96. `memo` VARCHAR(1024) DEFAULT NULL COMMENT '备注信息',
  97. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  98. `update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  99. `payment_status` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '打款状态',
  100. `payment_no` VARCHAR(1024) DEFAULT NULL COMMENT '打款流水号',
  101. `invoice_status` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '收票状态',
  102. PRIMARY KEY (`dealings_id`)
  103. ) ENGINE=InnoDB AUTO_INCREMENT=10000001 DEFAULT CHARSET=utf8 COMMENT '社保专员帐务往来记录表';
  104. -- 社保专员社保公积金往来记录表
  105. CREATE TABLE `account_dealings_shebao_shebao_fund` (
  106. `dealings_id` INT(11) UNSIGNED NOT NULL COMMENT '社保专员往来交易编号',
  107. `kefu_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '客服编号',
  108. `shebao_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '社保专员编号',
  109. `shebao_month` VARCHAR(8) DEFAULT NULL COMMENT '社保月份',
  110. `fund_month` VARCHAR(8) DEFAULT NULL COMMENT '公积金月份',
  111. `supplier_name` VARCHAR(64) DEFAULT NULL COMMENT '供应商',
  112. `employ_num` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '员工数量',
  113. `shebao_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '社保费',
  114. `fund_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '公积金费',
  115. `residual_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '残保金',
  116. `detention_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '违约金',
  117. `service_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '服务费',
  118. PRIMARY KEY (`dealings_id`)
  119. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '社保专员社保公积金';
  120. -- 帐务核对记录表
  121. CREATE TABLE `account_dealings_diff` (
  122. `diff_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '核对编号',
  123. `city_id` INT(11) UNSIGNED NOT NULL COMMENT '城市编号',
  124. `com_name` VARCHAR(64) NOT NULL COMMENT '公司名称',
  125. `month` VARCHAR(8) NOT NULL COMMENT '月份',
  126. `kefu_user_id` INT(11) UNSIGNED NOT NULL COMMENT '客服编号',
  127. `shebao_user_id` INT(11) UNSIGNED NOT NULL COMMENT '社保专员编号',
  128. `kefu_shebao_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '客服社保费用',
  129. `kefu_fund_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '客服公积金费用',
  130. `kefu_residual_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '客服残保金',
  131. `shebao_shebao_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '专员社保费用',
  132. `shebao_fund_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '专员公积金费用',
  133. `shebao_residual_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '专员残保金',
  134. `diff_status` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '核对状态',
  135. `force_diff_status` TINYINT(4) UNSIGNED NOT NULL DEFAULT 1 COMMENT '强制通过',
  136. `memo` VARCHAR(1024) DEFAULT NULL COMMENT '备注信息',
  137. `update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  138. PRIMARY KEY (`diff_id`)
  139. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT '帐务核对记录表';
  140. -- 客服开票表
  141. CREATE TABLE `account_invoice` (
  142. `invoice_no` VARCHAR(32) NOT NULL COMMENT '开票流水号',
  143. `month` VARCHAR(8) NOT NULL COMMENT '月份',
  144. `shebao_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '社保费用',
  145. `fund_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '公积金费用',
  146. `residual_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '残保金',
  147. `detention_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '滞纳金',
  148. `service_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '服务费',
  149. `insurance_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '商保费',
  150. `salary_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '实发工资',
  151. `salary_tax_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '个税',
  152. `tax_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '税费',
  153. `other_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '其他费用',
  154. `salary_service_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '工资服务费',
  155. `kefu_user_id` INT(11) UNSIGNED NOT NULL COMMENT '客服编号',
  156. `invoice_status` TINYINT(4) UNSIGNED NOT NULL COMMENT '开票状态',
  157. `payment_status` TINYINT(4) UNSIGNED DEFAULT NULL COMMENT '打款状态',
  158. `memo` VARCHAR(1024) DEFAULT NULL COMMENT '备注信息',
  159. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  160. `update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  161. PRIMARY KEY (`invoice_no`)
  162. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '客服开票表';
  163. -- 客服开票项表
  164. CREATE TABLE `account_invoice_item` (
  165. `invoice_item_no` VARCHAR(32) NOT NULL COMMENT '客服开票项号',
  166. `invoice_no` VARCHAR(32) NOT NULL COMMENT '开票编号',
  167. `com_name` VARCHAR(64) NOT NULL COMMENT '公司名称',
  168. `tax_type` TINYINT(4) UNSIGNED NOT NULL COMMENT '纳税人类型',
  169. `tax_no` VARCHAR(64) DEFAULT NULL COMMENT '纳税编号',
  170. `bank_name` VARCHAR(64) NOT NULL COMMENT '银行名称',
  171. `bank_no` VARCHAR(64) NOT NULL COMMENT '银行卡号',
  172. `purpose` VARCHAR(1024) NOT NULL COMMENT '用途',
  173. `inv_no` VARCHAR(64) DEFAULT NULL COMMENT '开票号',
  174. `inv_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '开票金额',
  175. `memo` VARCHAR(1024) DEFAULT NULL COMMENT '开票备注',
  176. `finance_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '财务编号',
  177. `invoice_status` TINYINT(4) UNSIGNED NOT NULL COMMENT '开票状态',
  178. `audit_status` TINYINT(4) UNSIGNED NOT NULL COMMENT '审核状态',
  179. `audit_user_ids` VARCHAR(11) DEFAULT NULL COMMENT '审核人员',
  180. `audit_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '当前审核人员',
  181. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  182. `update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  183. PRIMARY KEY (`invoice_item_no`),
  184. KEY(`invoice_no`)
  185. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '客服开票项表';
  186. -- 客服开票收款表
  187. CREATE TABLE `account_invoice_payment` (
  188. `invoice_payment_no` VARCHAR(32) NOT NULL COMMENT '客服开票收款号',
  189. `invoice_no` VARCHAR(32) NOT NULL COMMENT '开票编号',
  190. `payment_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '收款金额',
  191. `finance_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '财务编号',
  192. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  193. PRIMARY KEY (`invoice_payment_no`),
  194. KEY(`invoice_no`)
  195. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '客服开票收款表';
  196. -- 客服开票客户表
  197. CREATE TABLE `account_invoice_cust` (
  198. `cust_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '客户编号',
  199. `com_name` VARCHAR(64) NOT NULL COMMENT '公司名称',
  200. `tax_type` TINYINT(4) UNSIGNED NOT NULL COMMENT '纳税人类型',
  201. `tax_no` VARCHAR(64) DEFAULT NULL COMMENT '纳税编号',
  202. `bank_name` VARCHAR(64) NOT NULL COMMENT '银行名称',
  203. `bank_no` VARCHAR(64) NOT NULL COMMENT '银行卡号',
  204. PRIMARY KEY (`cust_id`),
  205. UNIQUE(`com_name`)
  206. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '客服开票客户表';
  207. -- 帐务打款表
  208. CREATE TABLE `account_payment` (
  209. `payment_no` VARCHAR(32) NOT NULL COMMENT '打款流水号',
  210. `shebao_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '社保费',
  211. `fund_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '公积金费',
  212. `residual_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '残保金',
  213. `detention_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '滞纳金',
  214. `service_fee` INT(11) NOT NULL DEFAULT 0 COMMENT '服务费',
  215. `shebao_user_id` INT(11) UNSIGNED NOT NULL COMMENT '社保专员编号',
  216. `payment_status` TINYINT(4) UNSIGNED NOT NULL COMMENT '打款状态',
  217. `invoice_status` TINYINT(4) UNSIGNED DEFAULT NULL COMMENT '收票状态',
  218. `memo` VARCHAR(1024) DEFAULT NULL COMMENT '备注信息',
  219. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  220. `update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  221. PRIMARY KEY (`payment_no`)
  222. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '打款表';
  223. -- 打款项表
  224. CREATE TABLE `account_payment_item` (
  225. `payment_item_no` VARCHAR(32) NOT NULL COMMENT '打款项编号',
  226. `payment_no` VARCHAR(32) NOT NULL COMMENT '打款流水号',
  227. `account_name` VARCHAR(64) DEFAULT NULL COMMENT '账户名',
  228. `account` VARCHAR(64) DEFAULT NULL COMMENT '账户',
  229. `purpose` VARCHAR(64) DEFAULT NULL COMMENT '打款用途',
  230. `apply_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '申请金额',
  231. `payment_fee` INT(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '打款金额',
  232. `memo` VARCHAR(1024) DEFAULT NULL COMMENT '备注信息',
  233. `finance_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '财务编号',
  234. `payment_status` TINYINT(4) UNSIGNED NOT NULL COMMENT '打款状态',
  235. `audit_status` TINYINT(4) UNSIGNED NOT NULL COMMENT '审核状态',
  236. `audit_user_ids` VARCHAR(11) DEFAULT NULL COMMENT '审核人员',
  237. `audit_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '当前审核人员',
  238. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  239. `update_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  240. KEY(`payment_no`),
  241. PRIMARY KEY (`payment_item_no`)
  242. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '打款明细表';
  243. -- 打款收票表
  244. CREATE TABLE `account_payment_invoice` (
  245. `payment_invoice_no` VARCHAR(32) NOT NULL COMMENT '打款收票编号',
  246. `payment_no` VARCHAR(32) NOT NULL COMMENT '打款流水号',
  247. `inv_no` VARCHAR(64) DEFAULT NULL COMMENT '发票号',
  248. `finance_user_id` INT(11) UNSIGNED DEFAULT NULL COMMENT '财务编号',
  249. `create_time` TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  250. KEY(`payment_no`),
  251. PRIMARY KEY (`payment_invoice_no`)
  252. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT '打款收票表';
  253. -- 2018-06-21 chensenlai DB:shebao_oa
  254. -- 城市配置表增加城市待遇配置
  255. ALTER TABLE `sys_city` ADD COLUMN `treatment_path` VARCHAR(64) DEFAULT NULL COMMENT '城市待遇' AFTER `proxy_memo`;
  256. -- 2018-06-19 chensenlai DB:shebao_oa
  257. -- 供应商信息表
  258. CREATE TABLE `sys_supplier` (
  259. `sid` int(11) NOT NULL AUTO_INCREMENT COMMENT '供应商编号',
  260. `supplier_name` VARCHAR(64) NOT NULL COMMENT '供应商名称',
  261. `company_name` VARCHAR(64) DEFAULT NULL COMMENT '公司名称',
  262. `cid` INT(11) UNSIGNED NOT NULL COMMENT '城市编号',
  263. `area` VARCHAR(16) DEFAULT NULL COMMENT '所属区域',
  264. `proxy_price` INT(11) DEFAULT NULL COMMENT '代理价格',
  265. `proxy_sort` TINYINT(4) DEFAULT 1 COMMENT '代理选择顺序',
  266. `op_sb` INT(11) NOT NULL COMMENT '社保专员',
  267. `shebao_deadline_op` VARCHAR(16) DEFAULT NULL COMMENT '社保专员截止时间',
  268. `shebao_deadline_sys` VARCHAR(16) DEFAULT NULL COMMENT '社保系统截止时间',
  269. `shebao_rule` VARCHAR(64) DEFAULT NULL COMMENT '社保操作规则',
  270. `shebao_material_first` VARCHAR(2048) DEFAULT NULL COMMENT '社保首参资料',
  271. `shebao_material_notfirst` VARCHAR(2048) DEFAULT NULL COMMENT '社保非首参资料',
  272. `fund_deadline_op` VARCHAR(16) DEFAULT NULL COMMENT '公积金专员截止时间',
  273. `fund_deadline_sys` VARCHAR(16) DEFAULT NULL COMMENT '公积金系统截止时间',
  274. `fund_rule` VARCHAR(64) DEFAULT NULL COMMENT '公积金操作规则',
  275. `fund_material_first` VARCHAR(2048) DEFAULT NULL COMMENT '公积金首参资料',
  276. `fund_material_notfirst` VARCHAR(2048) DEFAULT NULL COMMENT '公积金非首参资料',
  277. `fund_buy_only` VARCHAR(64) DEFAULT NULL COMMENT '公积金单独购买',
  278. `fund_rate` VARCHAR(64) DEFAULT NULL COMMENT '公积金比例',
  279. PRIMARY KEY (`sid`)
  280. ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT '供应商资料表(主要提供客服查看,表字段没有标准化)';
  281. ALTER TABLE `biz_data_desc` ADD COLUMN `ext1` varchar(128) DEFAULT NULL COMMENT '补充信息1' AFTER `fund_month`;
  282. ALTER TABLE `biz_data_desc` ADD COLUMN `ext2` varchar(128) DEFAULT NULL COMMENT '补充信息2' AFTER `ext1`;
  283. ALTER TABLE `biz_data_desc` ADD COLUMN `ext3` varchar(128) DEFAULT NULL COMMENT '补充信息3' AFTER `ext2`;
  284. ALTER TABLE `biz_data_desc` ADD COLUMN `ext4` varchar(128) DEFAULT NULL COMMENT '补充信息4' AFTER `ext3`;
  285. ALTER TABLE `biz_data_desc` ADD COLUMN `ext5` varchar(128) DEFAULT NULL COMMENT '补充信息5' AFTER `ext4`;
  286. ALTER TABLE `biz_emp_desc` ADD COLUMN `ext1` varchar(128) DEFAULT NULL COMMENT '补充信息1' AFTER `fund_month`;
  287. ALTER TABLE `biz_emp_desc` ADD COLUMN `ext2` varchar(128) DEFAULT NULL COMMENT '补充信息2' AFTER `ext1`;
  288. ALTER TABLE `biz_emp_desc` ADD COLUMN `ext3` varchar(128) DEFAULT NULL COMMENT '补充信息3' AFTER `ext2`;
  289. ALTER TABLE `biz_emp_desc` ADD COLUMN `ext4` varchar(128) DEFAULT NULL COMMENT '补充信息4' AFTER `ext3`;
  290. ALTER TABLE `biz_emp_desc` ADD COLUMN `ext5` varchar(128) DEFAULT NULL COMMENT '补充信息5' AFTER `ext4`;
  291. ALTER TABLE `sys_city` ADD COLUMN `proxy_memo` varchar(256) DEFAULT NULL COMMENT '代理备注' AFTER `p_cid`;
  292. ALTER TABLE `sys_city` ADD COLUMN `proxy_name` varchar(64) DEFAULT NULL COMMENT '代理名称' AFTER `p_cid`;
  293. ALTER TABLE `sys_city` ADD COLUMN `proxy_type` INT (4) DEFAULT NULL COMMENT '代理类型 1-直营 2-代理' AFTER `p_cid`;
  294. alter table cfg_shebao_param modify column hukou_type varchar(12) NOT NULL COMMENT '户口类型';
  295. update cfg_shebao_param set hukou_type='1,2,3,4' where hukou_type <= 0;
  296. ALTER TABLE `sys_city` ADD COLUMN `sb_deadline` INT(4) DEFAULT 0 COMMENT '社保截止时间' AFTER `p_cid`;
  297. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`) VALUES ('20', 'MENU_SYS_CITY', '城市管理', '1', '/sbo/city/prov/list', '18', '32');
  298. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '20');
  299. INSERT INTO `shebao_oa`.`sys_role` (`rid`, `code`, `name`) VALUES ('3', 'ADMIN', '管理员');
  300. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '5');
  301. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '6');
  302. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '7');
  303. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '8');
  304. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '9');
  305. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '10');
  306. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '11');
  307. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '12');
  308. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '13');
  309. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '14');
  310. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '15');
  311. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '16');
  312. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '18');
  313. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('3', '19');
  314. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`) VALUES ('18', 'MENU_SYS_MANAGE', '后台管理', '1', 'javascript:void(0);', '-1', '30');
  315. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`) VALUES ('19', 'MENU_SYS_USER', '用户管理', '1', '/sbo/user/list', '18', '31');
  316. ALTER TABLE `sys_user` ADD COLUMN `disabled` INT(4) DEFAULT 1 COMMENT '1-启用,2-禁用' AFTER `password`;
  317. ALTER TABLE `cfg_shebao_param` ADD COLUMN `shebao_inc_date` INT(4) DEFAULT NULL COMMENT '社保增员截止日期' AFTER `shebao_inc_rule`;
  318. ALTER TABLE `cfg_shebao_param` ADD COLUMN `shebao_desc_date` INT(4) DEFAULT NULL COMMENT '社保减员截止日期' AFTER `shebao_desc_rule`;
  319. ALTER TABLE `cfg_shebao_param` ADD COLUMN `fund_inc_date` INT(4) DEFAULT NULL COMMENT '公积金增员截止日期' AFTER `fund_inc_rule`;
  320. ALTER TABLE `cfg_shebao_param` ADD COLUMN `fund_desc_date` INT(4) DEFAULT NULL COMMENT '公积金减员截止日期' AFTER `fund_desc_rule`;
  321. alter table `cfg_shebao_param` add column `fund_scale` int(4) DEFAULT 2 COMMENT '公积金金额精算精度(默认保留小数点后两位)' AFTER `scale` ;
  322. alter table `cfg_shebao_param` add column `shebao_card_material` VARCHAR(128) DEFAULT NULL COMMENT '社保卡提交材料' AFTER `shebao_material` ;
  323. -----------------以下已上线------------------------>
  324. alter table `cfg_shebao_param` add column `scale` int(4) DEFAULT 2 COMMENT '金额精算精度(默认保留小数点后两位)' AFTER `fund_memo` ;
  325. alter table `cfg_shebao_param` add column `shebao_inc_rule` int(4) DEFAULT 1 COMMENT '社保增员 1-当月 2-下月' AFTER `shebao_execute_time` ;
  326. alter table `cfg_shebao_param` add column `shebao_desc_rule` int(4) DEFAULT 1 COMMENT '社保减员 1-当月 2-下月' AFTER `shebao_inc_rule` ;
  327. alter table `cfg_shebao_param` add column `shebao_material` VARCHAR(128) DEFAULT NULL COMMENT '社保提交材料' AFTER `shebao_desc_rule` ;
  328. alter table `cfg_shebao_param` add column `fund_inc_rule` int(4) DEFAULT 1 COMMENT '公积金增员 1-当月 2-下月' AFTER `fund_execute_time` ;
  329. alter table `cfg_shebao_param` add column `fund_desc_rule` int(4) DEFAULT 1 COMMENT '公积金减员 1-当月 2-下月' AFTER `fund_inc_rule` ;
  330. alter table `cfg_shebao_param` add column `fund_material` VARCHAR(128) DEFAULT NULL COMMENT '公积金提交材料' AFTER `fund_desc_rule` ;
  331. CREATE TABLE `cfg_shebao_param` (
  332. `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  333. `city_id` int(11) NOT NULL COMMENT '城市编号',
  334. `proj_name` varchar(32) NOT NULL COMMENT '社保方案',
  335. `hukou_type` int(4) NOT NULL COMMENT '户口类型',
  336. `pension` varchar(128) DEFAULT NULL COMMENT '养老保险',
  337. `injury` varchar(128) DEFAULT NULL COMMENT '工伤保险',
  338. `lose_job` varchar(128) DEFAULT NULL COMMENT '失业保险',
  339. `birth` varchar(128) DEFAULT NULL COMMENT '生育保险',
  340. `medical` varchar(128) DEFAULT NULL COMMENT '基本医疗保险',
  341. `disabled` varchar(128) DEFAULT NULL COMMENT '残保金-定额',
  342. `hospital` varchar(128) DEFAULT NULL COMMENT '住院医疗',
  343. `major` varchar(128) DEFAULT NULL COMMENT '重大疾病',
  344. `large_major` varchar(128) DEFAULT NULL COMMENT '大病(额)医疗',
  345. `village` varchar(128) DEFAULT NULL COMMENT '农民工医疗',
  346. `education` varchar(128) DEFAULT NULL COMMENT '教育统筹经费',
  347. `warm` varchar(128) DEFAULT NULL COMMENT '采暖费',
  348. `archives` varchar(128) DEFAULT NULL COMMENT '档案费',
  349. `added` varchar(128) DEFAULT NULL COMMENT '补充医疗',
  350. `shebao_execute_time` varchar(16) DEFAULT NULL COMMENT '执行时间',
  351. `shebao_memo` varchar(128) DEFAULT NULL COMMENT '备注信息',
  352. `fund` varchar(128) DEFAULT NULL COMMENT '公积金',
  353. `fund_execute_time` varchar(16) DEFAULT NULL COMMENT '公积金执行时间',
  354. `fund_memo` varchar(128) DEFAULT NULL COMMENT '公积金备注信息',
  355. `update_by` int(11) NOT NULL COMMENT '更新者',
  356. `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  357. `create_by` int(11) NOT NULL COMMENT '创建者',
  358. `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  359. PRIMARY KEY (`id`),
  360. KEY `idx_city_id` (`city_id`)
  361. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='社保数据配置表';
  362. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`) VALUES ('15', 'MENU_CFG_SHEBAO', '参数配置', '1', 'javascript:void(0);', '-1', '25');
  363. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`) VALUES ('16', 'MENU_CFG_SHEBAO_PARAM', '社保参数', '1', '/sbo/cfg/shebaoParam/list', '15', '26');
  364. INSERT INTO `shebao_oa`.`sys_privilege` (`pid`, `code`, `name`, `type`, `url`, `p_pid`, `sort`) VALUES ('17', 'MENU_CFG_SHEBAO_PARAM_LOG', '修改日志', '2', NULL, '15', '27');
  365. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('1', '15');
  366. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('1', '16');
  367. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('2', '15');
  368. INSERT INTO `shebao_oa`.`sys_role_privilege` (`rid`, `pid`) VALUES ('2', '16');
  369. CREATE TABLE `biz_data_batch` (
  370. `batch_no` varchar(32) NOT NULL COMMENT '批次号',
  371. `type` int(4) NOT NULL COMMENT '操作类型',
  372. `file` varchar(128) DEFAULT NULL COMMENT '上传文件',
  373. `path` varchar(128) DEFAULT NULL COMMENT '上传路径',
  374. `total` int(11) DEFAULT NULL COMMENT '总记录数',
  375. `create_time` datetime NOT NULL COMMENT '创建时间',
  376. `opid` int(11) NOT NULL COMMENT '操作员编号',
  377. PRIMARY KEY (`batch_no`),
  378. KEY `idx_opid` (`opid`)
  379. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据操作批次表';
  380. CREATE TABLE `biz_data_desc` (
  381. `descid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  382. `batch_no` varchar(32) NOT NULL COMMENT '批次号',
  383. `prov` varchar(32) DEFAULT NULL COMMENT '省份',
  384. `city` varchar(32) DEFAULT NULL COMMENT '城市',
  385. `op_sb` varchar(11) DEFAULT NULL COMMENT '社保专员',
  386. `op_kefu` varchar(11) DEFAULT NULL COMMENT '客服',
  387. `emp_company` varchar(128) DEFAULT NULL COMMENT '客户名称',
  388. `emp_name` varchar(32) DEFAULT NULL COMMENT '姓名',
  389. `emp_idcard` varchar(32) DEFAULT NULL COMMENT '身份证',
  390. `emp_sex` varchar(4) DEFAULT NULL COMMENT '性别',
  391. `sb_month_op` varchar(8) DEFAULT NULL COMMENT '社保操作月份',
  392. `sb_month` varchar(8) DEFAULT NULL COMMENT '社保月份',
  393. `fund_month_op` varchar(8) DEFAULT NULL COMMENT '公积金操作月份',
  394. `fund_month` varchar(8) DEFAULT NULL COMMENT '公积金月份',
  395. `state` int(4) NOT NULL COMMENT '状态',
  396. `tip` varchar(512) DEFAULT NULL COMMENT '提示',
  397. `opid` int(11) NOT NULL COMMENT '操作员编号',
  398. `create_time` datetime NOT NULL COMMENT '创建时间',
  399. PRIMARY KEY (`descid`),
  400. KEY `idx_opid` (`opid`)
  401. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COMMENT='数据操作减员表';
  402. CREATE TABLE `biz_data_inc` (
  403. `incid` int(4) NOT NULL AUTO_INCREMENT COMMENT '主键',
  404. `batch_no` varchar(32) NOT NULL COMMENT '批次号',
  405. `prov` varchar(32) DEFAULT NULL COMMENT '省份',
  406. `city` varchar(32) DEFAULT NULL COMMENT '城市',
  407. `op_kefu` varchar(32) DEFAULT NULL COMMENT '客服',
  408. `op_sb` varchar(32) DEFAULT NULL COMMENT '社保专员',
  409. `emp_company` varchar(128) DEFAULT NULL COMMENT '客户名称',
  410. `emp_name` varchar(32) DEFAULT NULL COMMENT '姓名',
  411. `emp_idcard` varchar(32) DEFAULT NULL COMMENT '身份证',
  412. `emp_sex` varchar(8) DEFAULT NULL COMMENT '性别',
  413. `emp_nation` varchar(32) DEFAULT NULL COMMENT '民族',
  414. `emp_reged` varchar(32) DEFAULT NULL COMMENT '户籍',
  415. `sb_month_op` varchar(8) DEFAULT NULL COMMENT '社保操作月份',
  416. `sb_month` varchar(8) DEFAULT NULL COMMENT '社保月份',
  417. `sb_month_added` varchar(128) DEFAULT NULL COMMENT '社保补缴月份',
  418. `sb_base` varchar(16) DEFAULT NULL COMMENT '社保补缴月份',
  419. `sb_proj` varchar(128) DEFAULT NULL COMMENT '社保项目',
  420. `fund_month_op` varchar(8) DEFAULT NULL COMMENT '公积金操作月份',
  421. `fund_month` varchar(8) DEFAULT NULL COMMENT '公积金月份',
  422. `fund_month_added` varchar(128) DEFAULT NULL COMMENT '公积金补缴月份',
  423. `fund_base` varchar(16) DEFAULT NULL COMMENT '公积金基数',
  424. `fund_company_rate` varchar(16) DEFAULT NULL COMMENT '单位比例',
  425. `fund_emp_rate` varchar(16) DEFAULT NULL COMMENT '个人比例',
  426. `ext1` varchar(128) DEFAULT NULL COMMENT '补充信息1',
  427. `ext2` varchar(128) DEFAULT NULL COMMENT '补充信息2',
  428. `ext3` varchar(128) DEFAULT NULL COMMENT '补充信息3',
  429. `ext4` varchar(128) DEFAULT NULL COMMENT '补充信息4',
  430. `ext5` varchar(128) DEFAULT NULL COMMENT '补充信息5',
  431. `state` int(4) NOT NULL COMMENT '处理状态',
  432. `tip` varchar(512) DEFAULT NULL COMMENT '提示信息',
  433. `opid` int(11) NOT NULL COMMENT '操作员编号',
  434. `create_time` datetime NOT NULL COMMENT '创建时间',
  435. PRIMARY KEY (`incid`),
  436. KEY `idx_opid` (`opid`)
  437. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据操作增员表';
  438. CREATE TABLE `biz_emp_desc` (
  439. `descid` int(11) NOT NULL COMMENT '主键',
  440. `batch_no` varchar(32) NOT NULL COMMENT '批次号',
  441. `prov_id` int(11) NOT NULL COMMENT '省份编号',
  442. `city_id` int(11) NOT NULL COMMENT '城市编号',
  443. `op_sb` int(11) NOT NULL COMMENT '社保专员',
  444. `op_kefu` int(11) NOT NULL COMMENT '客服',
  445. `emp_company` varchar(32) NOT NULL COMMENT '客户名称',
  446. `emp_name` varchar(32) NOT NULL COMMENT '姓名',
  447. `emp_idcard` varchar(32) NOT NULL COMMENT '身份证',
  448. `emp_sex` int(4) NOT NULL COMMENT '性别',
  449. `sb_month_op` int(11) DEFAULT NULL COMMENT '社保操作月份',
  450. `sb_month` int(11) DEFAULT NULL COMMENT '社保月份',
  451. `fund_month_op` int(11) DEFAULT NULL COMMENT '公积金操作月份',
  452. `fund_month` int(11) DEFAULT NULL COMMENT '公积金月份',
  453. `reply_sb` int(11) DEFAULT NULL COMMENT '社保处理状态',
  454. `reply_fund` int(11) DEFAULT NULL COMMENT '公积金处理状态',
  455. `reply_memo` varchar(255) DEFAULT NULL COMMENT '回复备注',
  456. `state` int(11) NOT NULL COMMENT '处理状态',
  457. `opid_tosb` int(11) DEFAULT NULL COMMENT '提交给社保专员的操作员编号',
  458. `time_tosb` datetime DEFAULT NULL COMMENT '提交给社保专员的时间',
  459. `opid_reply` int(11) DEFAULT NULL COMMENT '回复处理状态的操作员编号',
  460. `time_reply` datetime DEFAULT NULL COMMENT '回复处理状态的时间',
  461. PRIMARY KEY (`descid`),
  462. KEY `idx_op_sb` (`op_sb`)
  463. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='员工减员表';
  464. CREATE TABLE `biz_emp_inc` (
  465. `incid` int(11) NOT NULL COMMENT '主键',
  466. `batch_no` varchar(32) NOT NULL COMMENT '批次号',
  467. `prov_id` int(11) NOT NULL COMMENT '省份编号',
  468. `city_id` int(11) NOT NULL COMMENT '城市编号',
  469. `op_kefu` int(11) NOT NULL COMMENT '客服',
  470. `op_sb` int(11) NOT NULL COMMENT '社保专员',
  471. `emp_company` varchar(32) NOT NULL COMMENT '客户名称',
  472. `emp_name` varchar(32) NOT NULL COMMENT '姓名',
  473. `emp_idcard` varchar(32) NOT NULL COMMENT '身份证',
  474. `emp_sex` int(4) NOT NULL COMMENT '性别',
  475. `emp_nation` varchar(32) NOT NULL COMMENT '民族',
  476. `emp_reged` int(4) NOT NULL COMMENT '户籍',
  477. `sb_month_op` int(8) DEFAULT NULL COMMENT '社保操作月份',
  478. `sb_month` int(8) DEFAULT NULL COMMENT '社保月份',
  479. `sb_month_added` varchar(128) DEFAULT NULL COMMENT '社保补缴月份',
  480. `sb_base` varchar(32) DEFAULT NULL COMMENT '社保基数',
  481. `sb_proj` varchar(128) DEFAULT NULL COMMENT '社保项目',
  482. `fund_month_op` int(8) DEFAULT NULL COMMENT '公积金操作月份',
  483. `fund_month` int(8) DEFAULT NULL COMMENT '公积金月份',
  484. `fund_month_added` varchar(128) DEFAULT NULL COMMENT '公积金补缴月份',
  485. `fund_base` varchar(32) DEFAULT NULL COMMENT '公积金基数',
  486. `fund_company_rate` double(8,4) DEFAULT NULL COMMENT '单位比例',
  487. `fund_emp_rate` double(8,4) DEFAULT NULL COMMENT '个人比例',
  488. `ext1` varchar(128) DEFAULT NULL COMMENT '补充信息1',
  489. `ext2` varchar(128) DEFAULT NULL COMMENT '补充信息2',
  490. `ext3` varchar(128) DEFAULT NULL COMMENT '补充信息3',
  491. `ext4` varchar(128) DEFAULT NULL COMMENT '补充信息4',
  492. `ext5` varchar(128) DEFAULT NULL COMMENT '补充信息5',
  493. `reply_sb` int(11) DEFAULT NULL COMMENT '社保处理状态',
  494. `reply_fund` int(11) DEFAULT NULL COMMENT '公积金处理状态',
  495. `reply_memo` varchar(255) DEFAULT NULL COMMENT '回复备注',
  496. `state` int(4) NOT NULL COMMENT '处理状态',
  497. `opid_tosb` int(11) DEFAULT NULL COMMENT '提交给社保专员的操作员编号',
  498. `time_tosb` datetime DEFAULT NULL COMMENT '提交给社保专员的时间',
  499. `opid_reply` varchar(255) DEFAULT NULL COMMENT '回复处理状态的操作员编号',
  500. `time_reply` datetime DEFAULT NULL COMMENT '回复处理状态的时间',
  501. PRIMARY KEY (`incid`),
  502. KEY `idx_op_sb` (`op_sb`)
  503. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  504. CREATE TABLE `sys_city` (
  505. `cid` int(11) NOT NULL,
  506. `name` varchar(32) NOT NULL,
  507. `level` int(4) NOT NULL,
  508. `p_cid` int(11) NOT NULL,
  509. `sort` int(11) NOT NULL,
  510. PRIMARY KEY (`cid`)
  511. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  512. INSERT INTO `sys_city` VALUES ('1000', '广东省', '1', '-1', '1');
  513. INSERT INTO `sys_city` VALUES ('1001', '东莞市', '2', '1000', '2');
  514. INSERT INTO `sys_city` VALUES ('1002', '汕头市', '2', '1000', '3');
  515. INSERT INTO `sys_city` VALUES ('1003', '韶关市', '2', '1000', '4');
  516. INSERT INTO `sys_city` VALUES ('1004', '深圳市', '2', '1000', '5');
  517. INSERT INTO `sys_city` VALUES ('1005', '江门市', '2', '1000', '6');
  518. INSERT INTO `sys_city` VALUES ('1006', '阳江市', '2', '1000', '7');
  519. INSERT INTO `sys_city` VALUES ('1007', '云浮市', '2', '1000', '8');
  520. INSERT INTO `sys_city` VALUES ('1008', '湛江市', '2', '1000', '9');
  521. INSERT INTO `sys_city` VALUES ('1009', '肇庆市', '2', '1000', '10');
  522. INSERT INTO `sys_city` VALUES ('1010', '中山市', '2', '1000', '11');
  523. INSERT INTO `sys_city` VALUES ('1011', '珠海市', '2', '1000', '12');
  524. INSERT INTO `sys_city` VALUES ('1012', '惠州市', '2', '1000', '13');
  525. INSERT INTO `sys_city` VALUES ('1013', '茂名市', '2', '1000', '14');
  526. INSERT INTO `sys_city` VALUES ('1014', '清远市', '2', '1000', '15');
  527. INSERT INTO `sys_city` VALUES ('1015', '佛山市南海区', '2', '1000', '16');
  528. INSERT INTO `sys_city` VALUES ('1016', '佛山市顺德区', '2', '1000', '17');
  529. INSERT INTO `sys_city` VALUES ('1017', '佛山市禅城区', '2', '1000', '18');
  530. INSERT INTO `sys_city` VALUES ('1018', '广州市', '2', '1000', '19');
  531. INSERT INTO `sys_city` VALUES ('2000', '安徽省', '1', '-1', '20');
  532. INSERT INTO `sys_city` VALUES ('2001', '合肥市', '2', '2000', '21');
  533. INSERT INTO `sys_city` VALUES ('2002', '马鞍山', '2', '2000', '22');
  534. INSERT INTO `sys_city` VALUES ('2003', '芜湖市', '2', '2000', '23');
  535. INSERT INTO `sys_city` VALUES ('3000', '福建省', '1', '-1', '24');
  536. INSERT INTO `sys_city` VALUES ('3001', '福州市', '2', '3000', '25');
  537. INSERT INTO `sys_city` VALUES ('3002', '泉州市', '2', '3000', '26');
  538. INSERT INTO `sys_city` VALUES ('4000', '甘肃省', '1', '-1', '27');
  539. INSERT INTO `sys_city` VALUES ('4001', '兰州市', '2', '4000', '28');
  540. INSERT INTO `sys_city` VALUES ('5000', '广西省', '1', '-1', '29');
  541. INSERT INTO `sys_city` VALUES ('5001', '南宁市', '2', '5000', '30');
  542. INSERT INTO `sys_city` VALUES ('6000', '贵州省', '1', '-1', '31');
  543. INSERT INTO `sys_city` VALUES ('6001', '贵阳市', '2', '6000', '32');
  544. INSERT INTO `sys_city` VALUES ('7000', '河南省', '1', '-1', '33');
  545. INSERT INTO `sys_city` VALUES ('7001', '商丘市', '2', '7000', '34');
  546. INSERT INTO `sys_city` VALUES ('7002', '郑州市', '2', '7000', '35');
  547. INSERT INTO `sys_city` VALUES ('8000', '黑龙江省', '1', '-1', '36');
  548. INSERT INTO `sys_city` VALUES ('8001', '哈尔滨市', '2', '8000', '37');
  549. INSERT INTO `sys_city` VALUES ('9000', '湖北省', '1', '-1', '38');
  550. INSERT INTO `sys_city` VALUES ('9001', '武汉市', '2', '9000', '39');
  551. INSERT INTO `sys_city` VALUES ('10000', '湖南省', '1', '-1', '40');
  552. INSERT INTO `sys_city` VALUES ('10001', '长沙市', '2', '10000', '41');
  553. INSERT INTO `sys_city` VALUES ('10002', '邵阳市', '2', '10000', '42');
  554. INSERT INTO `sys_city` VALUES ('10003', '岳阳市', '2', '10000', '43');
  555. INSERT INTO `sys_city` VALUES ('11000', '江苏省', '1', '-1', '44');
  556. INSERT INTO `sys_city` VALUES ('11001', '昆山市', '2', '11000', '45');
  557. INSERT INTO `sys_city` VALUES ('11002', '南京市', '2', '11000', '46');
  558. INSERT INTO `sys_city` VALUES ('11003', '南通市', '2', '11000', '47');
  559. INSERT INTO `sys_city` VALUES ('11004', '苏州市新区', '2', '11000', '48');
  560. INSERT INTO `sys_city` VALUES ('11005', '苏州市园区', '2', '11000', '49');
  561. INSERT INTO `sys_city` VALUES ('11006', '泰州市', '2', '11000', '50');
  562. INSERT INTO `sys_city` VALUES ('11007', '无锡市', '2', '11000', '51');
  563. INSERT INTO `sys_city` VALUES ('11008', '徐州市', '2', '11000', '52');
  564. INSERT INTO `sys_city` VALUES ('11009', '张家港市', '2', '11000', '53');
  565. INSERT INTO `sys_city` VALUES ('11010', '镇江市', '2', '11000', '54');
  566. INSERT INTO `sys_city` VALUES ('11011', '宜兴市', '2', '11000', '55');
  567. INSERT INTO `sys_city` VALUES ('12000', '江西省', '1', '-1', '56');
  568. INSERT INTO `sys_city` VALUES ('12001', '九江市', '2', '12000', '57');
  569. INSERT INTO `sys_city` VALUES ('12002', '南昌市', '2', '12000', '58');
  570. INSERT INTO `sys_city` VALUES ('13000', '宁夏省', '1', '-1', '59');
  571. INSERT INTO `sys_city` VALUES ('13001', '银川市', '2', '13000', '60');
  572. INSERT INTO `sys_city` VALUES ('14000', '四川省', '1', '-1', '61');
  573. INSERT INTO `sys_city` VALUES ('14001', '巴中市', '2', '14000', '62');
  574. INSERT INTO `sys_city` VALUES ('14002', '成都市', '2', '14000', '63');
  575. INSERT INTO `sys_city` VALUES ('14003', '南充市', '2', '14000', '64');
  576. INSERT INTO `sys_city` VALUES ('15000', '新疆维吾尔自治区', '1', '-1', '65');
  577. INSERT INTO `sys_city` VALUES ('15001', '乌鲁木齐市', '2', '15000', '66');
  578. INSERT INTO `sys_city` VALUES ('16000', '浙江省', '1', '-1', '67');
  579. INSERT INTO `sys_city` VALUES ('16001', '杭州市开发区', '2', '16000', '69');
  580. INSERT INTO `sys_city` VALUES ('16002', '杭州市滨江区', '2', '16000', '70');
  581. INSERT INTO `sys_city` VALUES ('16003', '嘉兴市', '2', '16000', '71');
  582. INSERT INTO `sys_city` VALUES ('16004', '金华市', '2', '16000', '72');
  583. INSERT INTO `sys_city` VALUES ('16005', '宁波市鄞州区', '2', '16000', '73');
  584. INSERT INTO `sys_city` VALUES ('16006', '绍兴市', '2', '16000', '74');
  585. INSERT INTO `sys_city` VALUES ('16007', '台州市', '2', '16000', '75');
  586. INSERT INTO `sys_city` VALUES ('16008', '温州市', '2', '16000', '76');
  587. INSERT INTO `sys_city` VALUES ('16009', '萧山市', '2', '16000', '77');
  588. INSERT INTO `sys_city` VALUES ('16010', '扬州市', '2', '16000', '78');
  589. INSERT INTO `sys_city` VALUES ('99000', '直辖市', '1', '-1', '9999');
  590. INSERT INTO `sys_city` VALUES ('99001', '北京市', '2', '99000', '9999');
  591. INSERT INTO `sys_city` VALUES ('99002', '上海市', '2', '99000', '9999');
  592. INSERT INTO `sys_city` VALUES ('99003', '天津市', '2', '99000', '9999');
  593. INSERT INTO `sys_city` VALUES ('99004', '重庆市', '2', '99000', '9999');
  594. CREATE TABLE `sys_privilege` (
  595. `pid` int(11) NOT NULL,
  596. `code` varchar(32) NOT NULL,
  597. `name` varchar(32) NOT NULL,
  598. `type` int(4) NOT NULL,
  599. `url` varchar(255) DEFAULT NULL,
  600. `p_pid` int(11) NOT NULL,
  601. `sort` int(11) NOT NULL,
  602. PRIMARY KEY (`pid`)
  603. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  604. INSERT INTO `sys_privilege` VALUES ('5', 'MENU_DATA_IMPORT_MANAGE', '增减员导入', '1', 'javascript:void(0);', '-1', '5');
  605. INSERT INTO `sys_privilege` VALUES ('6', 'MENU_DATE_IMPORT_BATCH', '批次管理', '1', '/sbo/data/batch/list', '5', '6');
  606. INSERT INTO `sys_privilege` VALUES ('7', 'MENU_DATA_IMPORT_INC', '增员导入', '1', '/sbo/data/inc/list', '5', '7');
  607. INSERT INTO `sys_privilege` VALUES ('8', 'MENU_DATA_IMPORT_DESC', '减员导入', '1', '/sbo/data/desc/list', '5', '8');
  608. INSERT INTO `sys_privilege` VALUES ('9', 'MENU_EMP_REPLY_MANAGE', '增减员反馈', '1', 'javascript:void(0);', '-1', '19');
  609. INSERT INTO `sys_privilege` VALUES ('10', 'MENU_EMP_REPLY_INC', '增员反馈', '1', '/sbo/emp/inc/list', '9', '20');
  610. INSERT INTO `sys_privilege` VALUES ('11', 'MENU_EMP_REPLY_DESC', '减员反馈', '1', '/sbo/emp/desc/list', '9', '21');
  611. INSERT INTO `sys_privilege` VALUES ('12', 'MENU_EMP_ON_MANAGE', '增减员在册', '1', 'javascript:void(0);', '-1', '12');
  612. INSERT INTO `sys_privilege` VALUES ('13', 'MENU_EMP_ON_INC', '增员在册', '1', '/sbo/emp/inc/kefu/list', '12', '13');
  613. INSERT INTO `sys_privilege` VALUES ('14', 'MENU_EMP_ON_DESC', '减员在册', '1', '/sbo/emp/desc/kefu/list', '12', '14');
  614. CREATE TABLE `sys_role` (
  615. `rid` int(11) NOT NULL,
  616. `code` varchar(32) NOT NULL,
  617. `name` varchar(32) NOT NULL,
  618. PRIMARY KEY (`rid`)
  619. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  620. INSERT INTO `sys_role` VALUES ('1', 'KEFU', '客服');
  621. INSERT INTO `sys_role` VALUES ('2', 'SHEBAO', '社保专员');
  622. CREATE TABLE `sys_role_privilege` (
  623. `rid` int(11) NOT NULL,
  624. `pid` int(11) NOT NULL
  625. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  626. INSERT INTO `sys_role_privilege` VALUES ('1', '5');
  627. INSERT INTO `sys_role_privilege` VALUES ('1', '6');
  628. INSERT INTO `sys_role_privilege` VALUES ('1', '7');
  629. INSERT INTO `sys_role_privilege` VALUES ('1', '8');
  630. INSERT INTO `sys_role_privilege` VALUES ('2', '9');
  631. INSERT INTO `sys_role_privilege` VALUES ('2', '10');
  632. INSERT INTO `sys_role_privilege` VALUES ('2', '11');
  633. INSERT INTO `sys_role_privilege` VALUES ('1', '12');
  634. INSERT INTO `sys_role_privilege` VALUES ('1', '13');
  635. INSERT INTO `sys_role_privilege` VALUES ('1', '14');
  636. CREATE TABLE `sys_user` (
  637. `uid` int(11) NOT NULL AUTO_INCREMENT,
  638. `login_name` varchar(32) NOT NULL,
  639. `real_name` varchar(32) NOT NULL,
  640. `password` varchar(128) NOT NULL,
  641. `reg_time` datetime NOT NULL,
  642. `login_time` datetime NOT NULL,
  643. PRIMARY KEY (`uid`)
  644. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  645. INSERT INTO `sys_user` VALUES ('1', 'admin', '管理员', '123456shanp', '2016-06-19 14:33:30', '2016-06-19 14:33:36');
  646. INSERT INTO `sys_user` VALUES ('4', 'zhanglisan', '张丽三', '123456', '2016-07-06 10:55:19', '2016-07-06 10:55:22');
  647. INSERT INTO `sys_user` VALUES ('5', 'zhonglizhuan', '钟丽转', '123456', '2016-07-06 10:55:54', '2016-07-06 10:55:57');
  648. INSERT INTO `sys_user` VALUES ('6', 'lilihua', '黎丽华', '123456', '2016-07-06 10:56:29', '2016-07-06 10:56:34');
  649. INSERT INTO `sys_user` VALUES ('7', 'konghuanxia', '孔焕霞', '123456', '2016-07-06 10:57:30', '2016-07-06 10:57:33');
  650. INSERT INTO `sys_user` VALUES ('8', 'panqiurong', '潘秋荣', '123456', '2016-07-06 10:59:56', '2016-07-06 10:59:59');
  651. INSERT INTO `sys_user` VALUES ('9', 'zhonglishan', '钟丽珊', '123456', '2016-07-06 11:00:33', '2016-07-06 11:00:38');
  652. INSERT INTO `sys_user` VALUES ('10', 'jinlan', '金兰', '123456', '2016-07-06 11:01:08', '2016-07-06 11:01:12');
  653. INSERT INTO `sys_user` VALUES ('11', 'zhouhui', '周慧', '123456', '2016-07-06 11:01:31', '2016-07-06 11:01:34');
  654. INSERT INTO `sys_user` VALUES ('12', 'chenziyun', '陈紫韵', '123456', '2016-07-06 11:01:56', '2016-07-06 11:01:58');
  655. INSERT INTO `sys_user` VALUES ('13', 'chenjia', '陈嘉', '123456', '2016-07-06 11:02:19', '2016-07-06 11:02:21');
  656. INSERT INTO `sys_user` VALUES ('14', 'wuqinyun', '吴青云', '123456', '2016-07-06 11:02:47', '2016-07-06 11:02:49');
  657. DROP TABLE IF EXISTS `sys_user_city`;
  658. CREATE TABLE `sys_user_city` (
  659. `uid` int(11) NOT NULL,
  660. `cid` int(11) NOT NULL
  661. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  662. CREATE TABLE `sys_user_role` (
  663. `uid` int(11) NOT NULL,
  664. `rid` int(11) NOT NULL
  665. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  666. INSERT INTO `sys_user_role` VALUES ('1', '1');
  667. INSERT INTO `sys_user_role` VALUES ('1', '2');
  668. INSERT INTO `sys_user_role` VALUES ('4', '2');
  669. INSERT INTO `sys_user_role` VALUES ('5', '2');
  670. INSERT INTO `sys_user_role` VALUES ('6', '2');
  671. INSERT INTO `sys_user_role` VALUES ('7', '2');
  672. INSERT INTO `sys_user_role` VALUES ('6', '1');
  673. INSERT INTO `sys_user_role` VALUES ('8', '1');
  674. INSERT INTO `sys_user_role` VALUES ('9', '1');
  675. INSERT INTO `sys_user_role` VALUES ('10', '1');
  676. INSERT INTO `sys_user_role` VALUES ('11', '1');
  677. INSERT INTO `sys_user_role` VALUES ('12', '1');
  678. INSERT INTO `sys_user_role` VALUES ('13', '1');
  679. INSERT INTO `sys_user_role` VALUES ('14', '1');
  680. ALTER TABLE `biz_data_desc`
  681. ADD COLUMN `force_pass` INT(2) NOT NULL DEFAULT 1 COMMENT '强制通过记录 1-否 2-是' AFTER `fund_month`;
  682. ALTER TABLE `biz_data_inc`
  683. ADD COLUMN `force_pass` INT(2) NOT NULL DEFAULT 1 COMMENT '强制通过记录 1-否 2-是' AFTER `ext5`;