create.sql 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. -- ----------------------------
  2. -- 审计记录表
  3. -- ----------------------------
  4. create table t_audit (
  5. id bigint(20) comment 'id' not null auto_increment,
  6. `year` year comment '年份',
  7. pre_audit_time datetime comment '预审时间',
  8. audit_time datetime comment '审计时间',
  9. audit_result varchar(500) comment '审计结果',
  10. remarks varchar(500) comment '备注',
  11. dept_id bigint(20) comment '装置id',
  12. primary key (id)
  13. ) engine=innodb auto_increment=100 comment = '审计记录表';
  14. -- ----------------------------
  15. -- 装置信息表
  16. -- ----------------------------
  17. create table t_dept_info (
  18. id bigint(20) comment 'id' not null auto_increment,
  19. `year` year comment '年份',
  20. dept_info varchar(500) comment '装置信息',
  21. dept_id bigint(20) comment '装置id',
  22. primary key (id)
  23. ) engine=innodb auto_increment=100 comment = '装置信息表';
  24. -- ----------------------------
  25. -- 问卷章节表
  26. -- ----------------------------
  27. create table t_chap (
  28. id bigint(20) comment 'id' not null auto_increment,
  29. audit_id bigint(20) comment '审计记录id',
  30. name varchar(500) comment '名称',
  31. dept_id bigint(20) comment '装置id',
  32. primary key (id)
  33. ) engine=innodb auto_increment=100 comment = '问卷章节表';
  34. -- ----------------------------
  35. -- 问卷细分章节表
  36. -- ----------------------------
  37. create table t_sub_chap (
  38. id bigint(20) comment 'id' not null auto_increment,
  39. audit_id bigint(20) comment '审计记录id',
  40. chap_id bigint(20) comment '问卷章节id',
  41. name varchar(500) comment '名称',
  42. dept_id bigint(20) comment '装置id',
  43. primary key (id)
  44. ) engine=innodb auto_increment=100 comment = '问卷细分章节表';
  45. -- ----------------------------
  46. -- 问卷二级细分章节表
  47. -- ----------------------------
  48. create table t_sec_sub_chap (
  49. id bigint(20) comment 'id' not null auto_increment,
  50. audit_id bigint(20) comment '审计记录id',
  51. sub_chap_id bigint(20) comment '问卷细分章节id',
  52. year year comment '年份',
  53. type char(1) comment '问卷类型',
  54. directory varchar(500) comment '目录',
  55. code bigint(20) comment '序号',
  56. name varchar(500) comment '名称',
  57. yes_no_na char(1) comment 'YES/NO/NA',
  58. minimum_standard varchar(500) comment 'MinimumStandard',
  59. good_practices varchar(500) comment 'Good Practices',
  60. standard char(1) comment '标准',
  61. completion_status char(1) comment '完成情况',
  62. person_in_charge bigint(20) comment '负责人',
  63. reviewer bigint(20) comment '审核人',
  64. remarks varchar(500) comment '备注',
  65. dept_id bigint(20) comment '装置id',
  66. primary key (id)
  67. ) engine=innodb auto_increment=100 comment = '问卷二级细分章节表';
  68. -- ----------------------------
  69. -- 进度表
  70. -- ----------------------------
  71. create table t_progress (
  72. id bigint(20) comment 'id' not null auto_increment,
  73. sec_sub_chap_id bigint(20) comment '二级细分章节id',
  74. chap_name varchar(500) comment '章节',
  75. sub_chap_name varchar(500) comment '细分章节',
  76. sec_sub_chap_name varchar(500) comment '二级细分章节',
  77. content varchar(500) comment '内容',
  78. person_in_charge bigint(20) comment '负责人',
  79. supporter bigint(20) comment '支持人',
  80. start_date datetime comment '开始日期',
  81. target_date datetime comment '目标日期',
  82. finish_date datetime comment '实际完成日期',
  83. preparation char(1) comment '准备情况',
  84. description char(1) comment '进度描述',
  85. apply_status char(1) comment '审批状态',
  86. remarks varchar(500) comment '备注',
  87. dept_id bigint(20) comment '装置id',
  88. primary key (id)
  89. ) engine=innodb auto_increment=100 comment = '进度表';
  90. -- ----------------------------
  91. -- 会议表
  92. -- ----------------------------
  93. create table t_meeting (
  94. id bigint(20) comment 'id' not null auto_increment,
  95. year year comment '年份',
  96. sec_sub_chap_id bigint(20) comment '涉及code',
  97. person_in_charge bigint(20) comment '负责人',
  98. remarks varchar(500) comment '备注',
  99. dept_id bigint(20) comment '装置id',
  100. primary key (id)
  101. ) engine=innodb auto_increment=100 comment = '会议表';
  102. -- ----------------------------
  103. -- 开项表
  104. -- ----------------------------
  105. create table t_open_item (
  106. id bigint(20) comment 'id' not null auto_increment,
  107. type char(1) comment '问题类型',
  108. sec_sub_chap_id bigint(20) comment '涉及整改code',
  109. description varchar(500) comment '存在问题描述',
  110. level char(1) comment '开项级别',
  111. open_time datetime comment '开项时间',
  112. close_time datetime comment '闭项时间',
  113. status char(1) comment '问题处理状态',
  114. person_in_charge bigint(20) comment '负责人',
  115. reviewer bigint(20) comment '审核人',
  116. result char(1) comment '责任人确认',
  117. deadline datetime comment '截至时间',
  118. remarks varchar(500) comment '备注',
  119. dept_id bigint(20) comment '装置id',
  120. primary key (id)
  121. ) engine=innodb auto_increment=100 comment = '开项表';