1.1.3.sql 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. USE sop_db;
  2. -- 2024-11-04
  3. UPDATE t_d_form_widget
  4. SET code='TABLE', `type`='FORM', form_id='project_contacts_table', form_name='project_contacts_table', title='项目联系人表格', input_type='STRING', required=0, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=24
  5. WHERE id=112;
  6. UPDATE t_d_form_widget
  7. SET code='TEXT', `type`='TABLE', form_id='school_college', form_name='school_college', title='项目联系人表格_机构输入框', input_type='STRING', required=0, readable=0, writable=1, visable=1, `scale`=NULL, `length`=100, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=25
  8. WHERE id=113;
  9. UPDATE t_d_form_widget
  10. SET code='TEXT', `type`='TABLE', form_id='school_name', form_name='school_name', title='项目联系人表格_姓名输入框', input_type='STRING', required=0, readable=0, writable=1, visable=1, `scale`=NULL, `length`=100, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=26
  11. WHERE id=114;
  12. UPDATE t_d_form_widget
  13. SET code='TEXT', `type`='TABLE', form_id='school_job', form_name='school_job', title='项目联系人表格_职务输入框', input_type='STRING', required=0, readable=0, writable=1, visable=1, `scale`=NULL, `length`=100, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=27
  14. WHERE id=115;
  15. UPDATE t_d_form_widget
  16. SET code='TEXT', `type`='TABLE', form_id='school_tel', form_name='school_tel', title='项目联系人表格_电话输入框', input_type='STRING', required=0, readable=0, writable=1, visable=1, `scale`=NULL, `length`=100, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=1, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=28
  17. WHERE id=116;
  18. UPDATE t_d_form_widget
  19. SET code='FILE', `type`='FORM', form_id='upload_device_version_photos', form_name='upload_device_version_photos', title='上传每台扫描仪序列号拍照', input_type='ARRAY', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=4, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
  20. WHERE id=188;
  21. UPDATE t_d_form_widget
  22. SET code='CHECKBOX', `type`='FORM', form_id='missing_list_cb', form_name='missing_list_cb', title='缺考名单比对', input_type='STRING', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`='[{"value":"1","label":"核对“无答题卡考生”的考生是否与学校提供的缺考名单吻合"},{"value":"2","label":"人工指定为缺考(缺考一致性>导入缺考>导入缺考缺页)"},{"value":"3","label":"需核对平台“考生管理”中状态为“未上传”的考生是否全部为缺考、是否全部变为“人工指定”"}]', flow_type='CLOUD_MARK_SOP_FLOW', form_setup=6, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=1
  23. WHERE id=162;
  24. UPDATE t_d_form_widget
  25. SET code='NUMBER', `type`='FORM', form_id='scan_page_count', form_name='scan_page_count', title='扫描张数', input_type='INT', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=3, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=9, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=8
  26. WHERE id=195;
  27. UPDATE t_d_form_widget
  28. SET code='LABEL', `type`='FORM', form_id='scan_page_count_label', form_name='scan_page_count_label', title='[{"label":"操作说明","color":"black"},{"label":"1、考试管理>选择对应的考试点击“详情”","color":"black"},{"label":"2、查看“扫描张数” 或者点击验收报告查看扫描总张数","color":"black"}]', input_type='STRING', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=NULL, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=6, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=9, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=8
  29. WHERE id=196;
  30. UPDATE t_d_form_widget
  31. SET code='FILE', `type`='FORM', form_id='upload_check_report_photos', form_name='upload_check_report_photos', title='上传验收报告(纸质)拍照', input_type='ARRAY', required=1, readable=0, writable=1, visable=1, `scale`=NULL, `length`=5, binding=NULL, data_grid=NULL, tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=9, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=9
  32. WHERE id=184;
  33. -- 2024-11-05
  34. INSERT INTO t_d_form_widget
  35. (id, code, `type`, form_id, form_name, title, input_type, required, readable, writable, visable, `scale`, `length`, binding, data_grid, tips, format, span, sub_title, `options`, flow_type, form_setup, handle, form_group, role_type, create_id, create_time)
  36. VALUES(201, 'FILE', 'FORM', 'example_photos', 'example_photos', '示例', 'ARRAY', 0, 1, 0, 1, NULL, 2, NULL, 'https://sop-file.qmth.com.cn/logo/logo.png,https://sop-file.qmth.com.cn/logo/operation.png', NULL, NULL, 12, NULL, NULL, 'CLOUD_MARK_SOP_FLOW', 4, 0, NULL, NULL, 1, 2);
  37. -- 2024-11-04
  38. ALTER TABLE t_b_ding
  39. ADD COLUMN sign_in_custom_id BIGINT NULL COMMENT '签到客户id' AFTER sign_in_address,
  40. ADD COLUMN sign_out_custom_id BIGINT NULL COMMENT '签退客户id' AFTER sign_out_address;
  41. CREATE TABLE `t_b_ding_add` (
  42. `id` BIGINT NOT NULL,
  43. `service_id` BIGINT NOT NULL COMMENT '服务单元id',
  44. `sop_no` VARCHAR(100) DEFAULT NULL COMMENT 'sop号',
  45. `user_id` BIGINT NOT NULL COMMENT '用户id',
  46. `add_days` DECIMAL(8 , 2 ) DEFAULT NULL COMMENT '追加人天(天)',
  47. `add_hours` DECIMAL(8 , 2 ) DEFAULT NULL COMMENT '追加小时(小时)',
  48. `create_id` BIGINT DEFAULT NULL COMMENT '创建人id',
  49. `create_time` BIGINT DEFAULT NULL COMMENT '创建时间',
  50. `update_id` BIGINT DEFAULT NULL COMMENT '更新人id',
  51. `update_time` BIGINT DEFAULT NULL COMMENT '更新时间',
  52. PRIMARY KEY (`id`) USING BTREE
  53. ) ENGINE=INNODB DEFAULT CHARSET=UTF8MB4 COMMENT='工时追加表';
  54. ALTER TABLE t_b_ding_apply
  55. ADD COLUMN apply_custom_id BIGINT NULL COMMENT '区协补卡选择的客户id' AFTER reason;
  56. -- 2024-11-05
  57. ALTER TABLE t_b_ding_add
  58. ADD UNIQUE INDEX ding_add_unique (service_id ASC, user_id ASC);
  59. ALTER TABLE t_b_ding_statistic_by_crm
  60. ADD COLUMN add_days DECIMAL(8,2) NULL COMMENT '增加人天(天)' AFTER mark_paper_period,
  61. ADD COLUMN add_hours DECIMAL(8,2) NULL COMMENT '增加小时(小时)' AFTER add_days,
  62. ADD COLUMN work_days DECIMAL(8,2) NULL COMMENT '累计人天(天)' AFTER add_hours,
  63. CHANGE COLUMN work_hours work_hours DECIMAL(8,2) NULL COMMENT '累计工时(小时)' ;
  64. ALTER TABLE t_b_ding_statistic_by_custom
  65. ADD COLUMN add_days DECIMAL(8,2) NULL COMMENT '增加人天(天)' AFTER mark_paper_period,
  66. ADD COLUMN add_hours DECIMAL(8,2) NULL COMMENT '增加小时(小时)' AFTER add_days,
  67. ADD COLUMN work_days DECIMAL(8,2) NULL COMMENT '累计人天(天)' AFTER add_hours,
  68. CHANGE COLUMN work_hours work_hours DECIMAL(8,2) NULL COMMENT '累计工时(小时)' ;
  69. ALTER TABLE t_b_ding_statistic_by_person
  70. ADD COLUMN add_days DECIMAL(8,2) NULL COMMENT '增加人天(天)' AFTER legal_holidays,
  71. ADD COLUMN add_hours DECIMAL(8,2) NULL COMMENT '增加小时(小时)' AFTER add_days,
  72. ADD COLUMN work_days DECIMAL(8,2) NULL COMMENT '累计人天(天)' AFTER add_hours,
  73. CHANGE COLUMN work_hours work_hours DECIMAL(8,2) NULL COMMENT '累计工时(小时)' ;
  74. ALTER TABLE t_b_ding_statistic_by_sop
  75. ADD COLUMN add_days DECIMAL(8,2) NULL COMMENT '增加人天(天)' AFTER legal_holidays,
  76. ADD COLUMN add_hours DECIMAL(8,2) NULL COMMENT '增加小时(小时)' AFTER add_days,
  77. ADD COLUMN work_days DECIMAL(8,2) NULL COMMENT '累计人天(天)' AFTER add_hours,
  78. CHANGE COLUMN work_hours work_hours DECIMAL(8,2) NULL COMMENT '累计工时(小时)' ;
  79. ALTER TABLE t_b_ding_statistic_by_supplier
  80. ADD COLUMN add_days DECIMAL(8,2) NULL COMMENT '增加人天(天)' AFTER legal_holidays,
  81. ADD COLUMN add_hours DECIMAL(8,2) NULL COMMENT '增加小时(小时)' AFTER add_days,
  82. ADD COLUMN work_days DECIMAL(8,2) NULL COMMENT '累计人天(天)' AFTER add_hours,
  83. CHANGE COLUMN work_hours work_hours DECIMAL(8,2) NULL COMMENT '累计工时(小时)' ;
  84. -- 2024-11-06
  85. INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, enable, default_auth, front_display) VALUES ('2110', '查询区协可选择的客户', '/api/admin/tb/ding/find_custom', 'URL', '26', '6', 'SYS', '1', '1', '0');
  86. INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, enable, default_auth, front_display) VALUES ('2120', '增加工时-查询可选sop', '/api/admin/tb/ding/add/find_sop_list', 'URL', '29', '3', 'AUTH', '1', '1', '0');
  87. INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, enable, default_auth, front_display) VALUES ('2121', '增加工时-提交', '/api/admin/tb/ding/add/submit', 'URL', '29', '4', 'AUTH', '1', '1', '0');
  88. INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, related, enable, default_auth, front_display) VALUES ('2122', '添加工时', 'AddDing', 'LINK', '29', '3', 'AUTH', '2120,2121', '1', '0', '1');
  89. ALTER TABLE t_b_ding_statistic_by_person
  90. ADD COLUMN user_id BIGINT NULL COMMENT '用户id' AFTER service_name;
  91. INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, enable, default_auth, front_display) VALUES ('2123', '工时统计-统计计算', '/api/admin/tb/ding/statistic/calculate', 'URL', '29', '4', 'AUTH', '1', '1', '0');
  92. INSERT INTO sys_privilege (id, name, url, type, parent_id, sequence, property, related, enable, default_auth, front_display) VALUES ('2124', '统计计算', 'Calculate', 'BUTTON', '29', '5', 'AUTH', '2123', '1', '0', '1');
  93. DELETE FROM sys_privilege WHERE (id = '2123');
  94. DELETE FROM sys_privilege WHERE (id = '2124');
  95. UPDATE t_d_form_widget
  96. SET code='FILE', `type`='FORM', form_id='example_photos', form_name='example_photos', title='示例', input_type='ARRAY', required=0, readable=1, writable=0, visable=1, `scale`=NULL, `length`=2, binding=NULL, data_grid='https://sop-file.qmth.com.cn/logo/1.png,https://sop-file.qmth.com.cn/logo/2.png', tips=NULL, format=NULL, span=12, sub_title=NULL, `options`=NULL, flow_type='CLOUD_MARK_SOP_FLOW', form_setup=4, handle=0, form_group=NULL, role_type=NULL, create_id=1, create_time=2
  97. WHERE id=201;
  98. -- 2024-11-11
  99. ALTER TABLE t_b_ding_statistic_by_person
  100. ADD COLUMN add_days_detail TEXT NULL COMMENT '追加详情(天)' AFTER add_days,
  101. ADD COLUMN add_hours_detail TEXT NULL COMMENT '追加详情(时)' AFTER add_hours;
  102. ALTER TABLE t_b_ding_add
  103. DROP INDEX ding_add_unique ;
  104. -- 2024-11-12
  105. UPDATE sys_privilege SET enable = '0' WHERE (id = '2056');
  106. UPDATE sys_privilege SET enable = '0' WHERE (id = '1028');
  107. UPDATE sys_privilege SET enable = '0' WHERE (id = '1027');
  108. UPDATE sys_privilege SET enable = '0' WHERE (id = '1026');
  109. UPDATE sys_privilege SET enable = '0' WHERE (id = '149');
  110. UPDATE sys_privilege SET enable = '0' WHERE (id = '151');
  111. UPDATE sys_privilege SET enable = '0' WHERE (id = '152');
  112. UPDATE sys_privilege SET enable = '0' WHERE (id = '2057');
  113. UPDATE sys_privilege SET related = '2100' WHERE (id = '148');
  114. UPDATE sys_privilege SET related = '2100' WHERE (id = '150');
  115. UPDATE sys_privilege SET name = '追加工时' WHERE (id = '2122');
  116. INSERT INTO sys_ding_date
  117. (id, `year`, `month`, `day`, `type`)
  118. VALUES(50, 2024, 10, 6, 'LEGAL_HOLIDAYS');
  119. INSERT INTO sys_ding_date
  120. (id, `year`, `month`, `day`, `type`)
  121. VALUES(51, 2025, 1, 1, 'LEGAL_HOLIDAYS');
  122. INSERT INTO sys_ding_date
  123. (id, `year`, `month`, `day`, `type`)
  124. VALUES(52, 2025, 1, 26, 'WEEKDAY');
  125. INSERT INTO sys_ding_date
  126. (id, `year`, `month`, `day`, `type`)
  127. VALUES(53, 2025, 1, 28, 'LEGAL_HOLIDAYS');
  128. INSERT INTO sys_ding_date
  129. (id, `year`, `month`, `day`, `type`)
  130. VALUES(54, 2025, 1, 29, 'LEGAL_HOLIDAYS');
  131. INSERT INTO sys_ding_date
  132. (id, `year`, `month`, `day`, `type`)
  133. VALUES(55, 2025, 1, 30, 'LEGAL_HOLIDAYS');
  134. INSERT INTO sys_ding_date
  135. (id, `year`, `month`, `day`, `type`)
  136. VALUES(56, 2025, 1, 31, 'LEGAL_HOLIDAYS');
  137. INSERT INTO sys_ding_date
  138. (id, `year`, `month`, `day`, `type`)
  139. VALUES(57, 2025, 2, 1, 'LEGAL_HOLIDAYS');
  140. INSERT INTO sys_ding_date
  141. (id, `year`, `month`, `day`, `type`)
  142. VALUES(58, 2025, 2, 2, 'LEGAL_HOLIDAYS');
  143. INSERT INTO sys_ding_date
  144. (id, `year`, `month`, `day`, `type`)
  145. VALUES(59, 2025, 2, 3, 'LEGAL_HOLIDAYS');
  146. INSERT INTO sys_ding_date
  147. (id, `year`, `month`, `day`, `type`)
  148. VALUES(60, 2025, 2, 4, 'LEGAL_HOLIDAYS');
  149. INSERT INTO sys_ding_date
  150. (id, `year`, `month`, `day`, `type`)
  151. VALUES(61, 2025, 2, 8, 'WEEKDAY');
  152. INSERT INTO sys_ding_date
  153. (id, `year`, `month`, `day`, `type`)
  154. VALUES(62, 2025, 4, 4, 'LEGAL_HOLIDAYS');
  155. INSERT INTO sys_ding_date
  156. (id, `year`, `month`, `day`, `type`)
  157. VALUES(63, 2025, 4, 5, 'LEGAL_HOLIDAYS');
  158. INSERT INTO sys_ding_date
  159. (id, `year`, `month`, `day`, `type`)
  160. VALUES(64, 2025, 4, 6, 'LEGAL_HOLIDAYS');
  161. INSERT INTO sys_ding_date
  162. (id, `year`, `month`, `day`, `type`)
  163. VALUES(65, 2025, 4, 27, 'WEEKDAY');
  164. INSERT INTO sys_ding_date
  165. (id, `year`, `month`, `day`, `type`)
  166. VALUES(66, 2025, 5, 1, 'LEGAL_HOLIDAYS');
  167. INSERT INTO sys_ding_date
  168. (id, `year`, `month`, `day`, `type`)
  169. VALUES(67, 2025, 5, 2, 'LEGAL_HOLIDAYS');
  170. INSERT INTO sys_ding_date
  171. (id, `year`, `month`, `day`, `type`)
  172. VALUES(68, 2025, 5, 3, 'LEGAL_HOLIDAYS');
  173. INSERT INTO sys_ding_date
  174. (id, `year`, `month`, `day`, `type`)
  175. VALUES(69, 2025, 5, 4, 'LEGAL_HOLIDAYS');
  176. INSERT INTO sys_ding_date
  177. (id, `year`, `month`, `day`, `type`)
  178. VALUES(70, 2025, 5, 5, 'LEGAL_HOLIDAYS');
  179. INSERT INTO sys_ding_date
  180. (id, `year`, `month`, `day`, `type`)
  181. VALUES(71, 2025, 5, 31, 'LEGAL_HOLIDAYS');
  182. INSERT INTO sys_ding_date
  183. (id, `year`, `month`, `day`, `type`)
  184. VALUES(72, 2025, 6, 1, 'LEGAL_HOLIDAYS');
  185. INSERT INTO sys_ding_date
  186. (id, `year`, `month`, `day`, `type`)
  187. VALUES(73, 2025, 6, 2, 'LEGAL_HOLIDAYS');
  188. INSERT INTO sys_ding_date
  189. (id, `year`, `month`, `day`, `type`)
  190. VALUES(74, 2025, 9, 28, 'WEEKDAY');
  191. INSERT INTO sys_ding_date
  192. (id, `year`, `month`, `day`, `type`)
  193. VALUES(75, 2025, 10, 1, 'LEGAL_HOLIDAYS');
  194. INSERT INTO sys_ding_date
  195. (id, `year`, `month`, `day`, `type`)
  196. VALUES(76, 2025, 10, 2, 'LEGAL_HOLIDAYS');
  197. INSERT INTO sys_ding_date
  198. (id, `year`, `month`, `day`, `type`)
  199. VALUES(77, 2025, 10, 3, 'LEGAL_HOLIDAYS');
  200. INSERT INTO sys_ding_date
  201. (id, `year`, `month`, `day`, `type`)
  202. VALUES(78, 2025, 10, 4, 'LEGAL_HOLIDAYS');
  203. INSERT INTO sys_ding_date
  204. (id, `year`, `month`, `day`, `type`)
  205. VALUES(79, 2025, 10, 5, 'LEGAL_HOLIDAYS');
  206. INSERT INTO sys_ding_date
  207. (id, `year`, `month`, `day`, `type`)
  208. VALUES(80, 2025, 10, 6, 'LEGAL_HOLIDAYS');
  209. INSERT INTO sys_ding_date
  210. (id, `year`, `month`, `day`, `type`)
  211. VALUES(81, 2025, 10, 7, 'LEGAL_HOLIDAYS');
  212. INSERT INTO sys_ding_date
  213. (id, `year`, `month`, `day`, `type`)
  214. VALUES(82, 2025, 10, 8, 'LEGAL_HOLIDAYS');
  215. INSERT INTO sys_ding_date
  216. (id, `year`, `month`, `day`, `type`)
  217. VALUES(83, 2025, 10, 11, 'WEEKDAY');
  218. INSERT INTO sys_privilege
  219. (id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
  220. VALUES(291, '客户表查询', '/api/sys/custom/list/by/serviceUnit', 'URL', 64, 34, 'SYS', NULL, 1, 1, 0);