alter table form_template_field add fmt_constraint varchar(100) null comment '格式约束:int、double、str、boolean、date、select(下拉选择)' after `fixed`; alter table form_template_field add edit tinyint(1) null comment '是否可编辑' after `fixed`; alter table form_template_field add show_cascade varchar(2000) null comment '字典级联显示' after sort_order; alter table form_template_field add line tinyint null comment '占行数量(0-不占一行,其他-占的行数)' after `fixed`; alter table form_template_field add dcode varchar(50) null comment '字典code' after `show`; alter table form_template_field add parent_id bigint null comment '父id' after `code`; alter table form_template_field add edit_disabled tinyint(1) null comment '可编辑按钮禁用' after `sort_order`; alter table form_template_field add edit_disabled_msg varchar(500) null comment '可编辑按钮禁用提示' after `sort_order`; alter table form_template_field add cascade_open varchar(2000) null comment '级联显示关' after sort_order; alter table form_template_field add cascade_close varchar(2000) null comment '级联显示开' after sort_order; alter table form_template add content_encoding varchar(100) null comment '内容编码,保存时和上次的编码是否一致,一致时则不进行更新' after `version`; -- 同步抽数据时不能为空 alter table form_field_dict modify update_time datetime default CURRENT_TIMESTAMP null on update CURRENT_TIMESTAMP comment '更新时间'; -- 表单打印需求 alter table form_print_config modify main_title varchar(255) null comment '主标题'; alter table form_print_config add file_name varchar(500) null comment '模板文件name' after print_fields; alter table form_print_config add file_url varchar(500) null comment '模板文件url' after print_fields; alter table form_print_config add file_size int null comment '模板文件大小' after print_fields; alter table form_print_config add file_url_ai varchar(500) null comment 'ai模板文件url' after print_fields; alter table form_print_config add file_wps_id varchar(255) null comment 'file_wps_id' after print_fields; alter table form_print_config add file_type varchar(20) null comment '文件类型:doc、excel' after print_fields; ## 模板字典数据初始化 -- 执行插入前先查询是否存在,存在就不插入 select * from form_dict where agent_id =-1 and code = ? ; INSERT INTO form_dict (name, code, remarks, created_by, updated_by, agent_id, deleted) VALUES ('费用科目', 'expenseSubject', null, 119, null, -1, 0); INSERT INTO form_dict (name, code, remarks, created_by, updated_by, agent_id, deleted) VALUES ('往来单位', 'contactUnit', null, 119, null, -1, 0); INSERT INTO form_dict (name, code, remarks, created_by, updated_by, agent_id, deleted) VALUES ('著作方式', 'writingType', null, 119, null, -1, 0); INSERT INTO form_dict (name, code, remarks, created_by, updated_by, agent_id, deleted) VALUES ('仓库管理', 'warehouse', null, 119, null, -1, 0);