update zh_rpt_cfg set defined_content='{"ctrls":[{"ID":"Default","Wrap":"T","Shrink":"F","Horizon":"left","ShowZero":"T","Vertical":"bottom","CfgDispName":"默认","CloseOutput":"F","ShrinkFirst":"F"},{"ID":"Title","Wrap":"T","Shrink":"F","Horizon":"center","ShowZero":"T","Vertical":"center","CfgDispName":"标题","CloseOutput":"F","ShrinkFirst":"F"},{"ID":"Header","Wrap":"F","Shrink":"F","Horizon":"left","ShowZero":"T","Vertical":"center","CfgDispName":"表头","CloseOutput":"F","ShrinkFirst":"F"},{"ID":"Header_Right","Wrap":"F","Shrink":"F","Horizon":"right","ShowZero":"T","Vertical":"center","CfgDispName":"表头_右","CloseOutput":"F","ShrinkFirst":"F"},{"ID":"Footer","Wrap":"F","Shrink":"F","Horizon":"left","ShowZero":"T","Vertical":"center","CfgDispName":"表尾","CloseOutput":"F","ShrinkFirst":"F"},{"ID":"Footer_Right","Wrap":"F","Shrink":"F","Horizon":"right","ShowZero":"T","Vertical":"center","CfgDispName":"表尾_右","CloseOutput":"F","ShrinkFirst":"F"},{"ID":"Column","Wrap":"T","Shrink":"F","Horizon":"center","ShowZero":"F","Vertical":"center","CfgDispName":"表栏","CloseOutput":"F","ShrinkFirst":"F","FillAfterWrap":"T"},{"ID":"Column_Left","Wrap":"T","Shrink":"F","Horizon":"left","ShowZero":"F","Vertical":"center","CfgDispName":"表栏_左","CloseOutput":"F","ShrinkFirst":"F"},{"ID":"Column_Right","Wrap":"T","Shrink":"F","Horizon":"right","ShowZero":"F","Vertical":"center","CfgDispName":"表栏_右","CloseOutput":"F","ShrinkFirst":"F"},{"ID":"Content_Left","Wrap":"F","Shrink":"T","Horizon":"left","ShowZero":"F","Vertical":"bottom","CfgDispName":"正文内容","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"Content_Right","Wrap":"F","Shrink":"T","Horizon":"right","ShowZero":"F","Vertical":"bottom","CfgDispName":"正文内容_右","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"Content_Center","Wrap":"F","Shrink":"T","Horizon":"center","ShowZero":"F","Vertical":"bottom","CfgDispName":"正文内容_中","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"NewContent_Left","Wrap":"F","Shrink":"T","Horizon":"left","ShowZero":"F","Vertical":"center","CfgDispName":"正文内容(新)","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"NewContent_Right","Wrap":"F","Shrink":"T","Horizon":"right","ShowZero":"F","Vertical":"center","CfgDispName":"正文内容(新)_右","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"NewContent_Center","Wrap":"F","Shrink":"T","Horizon":"center","ShowZero":"F","Vertical":"center","CfgDispName":"正文内容(新)_中","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"Currency","Wrap":"F","Shrink":"T","Horizon":"right","ShowZero":"F","Vertical":"center","CfgDispName":"金额型","CloseOutput":"F","ShrinkFirst":"T"},{"ID":"Left_Top","Wrap":"T","Shrink":"F","Horizon":"left","ShowZero":"T","Vertical":"top","CfgDispName":"上靠_左","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"Center_Top","Wrap":"T","Shrink":"F","Horizon":"center","ShowZero":"T","Vertical":"top","CfgDispName":"上靠_中","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"Right_Top","Wrap":"T","Shrink":"F","Horizon":"right","ShowZero":"T","Vertical":"top","CfgDispName":"上靠_右","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"Left_Center","Wrap":"T","Shrink":"F","Horizon":"left","ShowZero":"T","Vertical":"center","CfgDispName":"中靠_左","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"Center_Center","Wrap":"T","Shrink":"F","Horizon":"center","ShowZero":"T","Vertical":"center","CfgDispName":"中靠_中","CloseOutput":"T","ShrinkFirst":"F"},{"ID":"Right_Center","Wrap":"T","Shrink":"F","Horizon":"right","ShowZero":"T","Vertical":"center","CfgDispName":"中靠_右","CloseOutput":"T","ShrinkFirst":"F"}],"fonts":[{"ID":"ReportTitle_Main","Name":"宋体","FontBold":"T","FontAngle":"0","FontColor":"BLACK","FontHeight":"32","FontItalic":"F","CfgDispName":"主标题","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"ReportTitle_Vice_1","Name":"宋体","FontBold":"T","FontAngle":"0","FontColor":"BLACK","FontHeight":"22","FontItalic":"F","CfgDispName":"副标题","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"ReportTitle_Vice_2","Name":"宋体","FontBold":"T","FontAngle":"0","FontColor":"BLACK","FontHeight":"18","FontItalic":"F","CfgDispName":"副标题2","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"HeaderColumn","Name":"宋体","FontBold":"F","FontAngle":"0","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","CfgDispName":"栏头","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"Header","Name":"宋体","FontBold":"F","FontAngle":"0","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","CfgDispName":"表头","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"FooterColumn","Name":"宋体","FontBold":"F","FontAngle":"0","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","CfgDispName":"栏尾","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"Footer","Name":"宋体","FontBold":"F","FontAngle":"0","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","CfgDispName":"表尾","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"GrandTotal","Name":"宋体","FontBold":"F","FontAngle":"0","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","CfgDispName":"总合计","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"SectionTotal","Name":"宋体","FontBold":"F","FontAngle":"0","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","CfgDispName":"章合计","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"Content","Name":"宋体","FontBold":"F","FontAngle":"0","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","CfgDispName":"正文内容","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"Content_Narrow","Name":"Arial Narrow","FontBold":"F","FontAngle":"0","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","CfgDispName":"正文内容-窄体","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"Header_V1","Name":"宋体","FontBold":"F","FontAngle":"90","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","FontStrikeOut":"F","FontUnderline":"F"},{"ID":"Header_V2","Name":"宋体","FontBold":"F","FontAngle":"-90","FontColor":"BLACK","FontHeight":"12","FontItalic":"F","FontStrikeOut":"F","FontUnderline":"F"}],"styles":[{"ID":"Default_None","CfgDispName":"空白","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"0"}]},{"ID":"Default","CfgDispName":"默认","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"0"}]},{"ID":"Default_Normal","CfgDispName":"正常","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"1"}]},{"ID":"Label_Underline","CfgDispName":"字符底线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"1"}]},{"ID":"Label_Left","CfgDispName":"左边线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"0"}]},{"ID":"Label_Right","CfgDispName":"右边线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"0"}]},{"ID":"Label_Top","CfgDispName":"上边线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"0"}]},{"ID":"Label_LeftTop","CfgDispName":"左上边线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"0"}]},{"ID":"Label_LeftBottom","CfgDispName":"左下边线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"1"}]},{"ID":"Label_RightTop","CfgDispName":"右上边线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"0"}]},{"ID":"Label_RightBottom","CfgDispName":"右下边线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"1"}]},{"ID":"Label_TopBottom","CfgDispName":"上下边线","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"1"}]},{"ID":"Label_TopCover","CfgDispName":"上包围","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"0"}]},{"ID":"Label_BottomCover","CfgDispName":"下包围","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"1"}]},{"ID":"Label_LeftCover","CfgDispName":"左包围","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"1"}]},{"ID":"Label_RightCover","CfgDispName":"右包围","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"1"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"1"}]},{"ID":"BORDER_ALL_AROUND","CfgDispName":"报表边框","border_style":[{"Color":"BLACK","Position":"Left","DashStyle":"SOLID","LineWeight":"2.0"},{"Color":"BLACK","Position":"Right","DashStyle":"SOLID","LineWeight":"2.0"},{"Color":"BLACK","Position":"Top","DashStyle":"SOLID","LineWeight":"2.0"},{"Color":"BLACK","Position":"Bottom","DashStyle":"SOLID","LineWeight":"2.0"}]}]}' where userId='Administrator'; ALTER TABLE `zh_project_account` ADD COLUMN `self_category_level` varchar(255) NOT NULL DEFAULT '' AFTER `invalid_time`; ALTER TABLE `zh_project_account` ADD COLUMN `show_revise_invalid` tinyint(4) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否显示,台账修订作废' AFTER `self_category_level`; ALTER TABLE `zh_project` ADD `payment_setting` JSON NULL DEFAULT NULL COMMENT '支付审批模块设置' AFTER `fun_set`; CREATE TABLE `zh_payment_detail_attachment` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tender_id` int(11) NOT NULL COMMENT '标段id', `tr_id` int(11) NOT NULL COMMENT '表单id', `td_id` int(11) NOT NULL COMMENT '详情id', `uid` int(11) NOT NULL COMMENT '上传者id', `filename` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件名称', `fileext` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件后缀', `filesize` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件大小', `filepath` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '文件存储路径', `upload_time` datetime NOT NULL COMMENT '上传时间', `extra_upload` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否为审核通过后再次上传的文件,0为否', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '支付审批详情附件表'; CREATE TABLE `zh_payment_detail` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自增', `tender_id` int(11) NOT NULL COMMENT '标段id', `tr_id` int(11) NOT NULL COMMENT '标段报表id(tender_rpt)', `type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '详情类型,0为报表审批表单,1为安全生产费', `uid` int(11) NOT NULL COMMENT '创建者id', `status` tinyint(4) NOT NULL DEFAULT 1 COMMENT '审批状态', `order` int(11) NOT NULL COMMENT '期数', `times` tinyint(4) NOT NULL COMMENT '审批次数', `s_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '日期', `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '编号', `report_json` json NULL COMMENT '报表json', `in_time` datetime NOT NULL COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '支付审批详情表'; CREATE TABLE `zh_payment_detail_audit` ( `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键', `tender_id` int(11) NOT NULL COMMENT '标段id', `tr_id` int(11) NOT NULL COMMENT '标段表单关联id', `td_id` int(11) NOT NULL COMMENT '标段报表详情id', `aid` int(11) NOT NULL COMMENT '审批人id', `order` int(11) NOT NULL COMMENT '审批顺序', `times` int(11) NOT NULL COMMENT '审批次数', `status` tinyint(1) NOT NULL COMMENT '审批状态', `begin_time` datetime NULL DEFAULT NULL COMMENT '开始审批时间', `end_time` datetime NULL DEFAULT NULL COMMENT '结束审批时间', `opinion` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '审批意见', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '材料调差审批表'; CREATE TABLE `zh_payment_folder` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pid` int(11) NOT NULL COMMENT '项目id', `uid` int(11) NOT NULL COMMENT '创建人id', `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '名称', `parent_id` int(11) NOT NULL DEFAULT 0 COMMENT '父节点,默认为0', `parent_path` varchar(1000) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT '' COMMENT '层级定位辅助字段,父节点id集合', `level` int(11) NOT NULL COMMENT '层级', `order` int(11) NOT NULL DEFAULT 0 COMMENT '同级排序', `is_leaf` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否为子节点', `had_tender` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否存在标段或子目录下存在标段', `in_time` datetime NOT NULL COMMENT '入库时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '支付审批目录表'; CREATE TABLE `zh_payment_permission_audit` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pid` int(11) NOT NULL COMMENT '项目id', `groupid` int(11) NULL DEFAULT NULL COMMENT '用户组id', `uid` int(11) NULL DEFAULT NULL COMMENT '用户id', `permission_json` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL COMMENT '权限json字符串', `create_time` datetime NOT NULL COMMENT '创建时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '支付审批用户权限表'; CREATE TABLE `zh_payment_rpt_audit` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tender_id` int(11) NOT NULL COMMENT '标段id', `tr_id` int(11) NOT NULL COMMENT '标段报表关联id', `td_id` int(11) NOT NULL COMMENT '详情id', `uid` int(11) NOT NULL COMMENT '用户id', `signature_index` tinyint(3) NOT NULL COMMENT '签名序号,区分签名位置', `signature_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '报表角色', `signature_msg` json NULL COMMENT '签章的内容json', `sign_time` datetime NULL DEFAULT NULL COMMENT '签字内容最后确定时间', `in_time` datetime NOT NULL COMMENT '入库时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '支付审批报表表单角色表'; CREATE TABLE `zh_payment_shenpi_audit` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tid` int(11) NOT NULL COMMENT '标段id', `tr_id` int(11) NOT NULL COMMENT '标段报表关联id(tender_rpt)', `sp_status` tinyint(4) NOT NULL COMMENT '所选审批流程状态', `audit_id` int(11) NOT NULL COMMENT '审批人id', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '审批流程人设置表'; CREATE TABLE `zh_payment_tender` ( `id` int(11) NOT NULL AUTO_INCREMENT, `pid` int(11) NOT NULL COMMENT '项目id', `uid` int(11) NOT NULL COMMENT '创建者id', `folder_id` int(11) NOT NULL COMMENT '目录id', `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL COMMENT '标段名称', `in_time` datetime NOT NULL COMMENT '入库时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '支付审批标段表'; CREATE TABLE `zh_payment_tender_rpt` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tender_id` int(11) NOT NULL COMMENT '标段id', `rpt_id` int(11) NOT NULL COMMENT '报表id,从rpt_node取', `rpt_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NULL DEFAULT NULL COMMENT '报表名称,防止报表删除后无法读取到旧数据', `type` tinyint(2) NOT NULL DEFAULT 0 COMMENT '模块类型,0为表单,1为安全生产费', `uid` int(11) NULL DEFAULT NULL COMMENT '上报人id', `create_uid` int(11) NULL DEFAULT NULL COMMENT '创建者id', `sp_status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '审批流状态,默认为授权审批流', `rpt_audit` json NULL COMMENT '报表签名人员对应的表单人员json', `report_items_json` json NULL COMMENT '报表信息json', `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '报表是否已删除', `is_first` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否未配置角色', `is_change` tinyint(1) NOT NULL DEFAULT 0 COMMENT '判断报表是否有变动过,当新建详情时更新这个值为0(用来判断是否删除详情)', `in_time` datetime NOT NULL COMMENT '入库时间', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_unicode_ci COMMENT = '标段报表关联及审批流程设置表'; CREATE TABLE `zh_sub_project` ( `id` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid', `project_id` int(11) unsigned NOT NULL COMMENT '项目id', `tree_pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid', `tree_order` int(11) unsigned NOT NULL, `tree_level` int(11) unsigned NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '名称', `management` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '管理单位', `user_id` int(11) unsigned NOT NULL COMMENT '用户id', `rela_tender` varchar(1000) CHARACTER SET ascii NOT NULL DEFAULT '' COMMENT '关联标段id('',''分隔)', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', `is_folder` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否为文件夹', `is_delete` tinyint(4) unsigned NOT NULL DEFAULT '0', `budget_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'budget_id(zh_budget)', `std_id` int(11) NOT NULL DEFAULT '0' COMMENT '概算标准id', `std_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '概算标准名称', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE `zh_sub_project_permission` ( `id` varchar(36) COLLATE utf8_unicode_ci NOT NULL, `spid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'sub_project_id(zh_sub_project)', `pid` int(11) unsigned NOT NULL COMMENT 'project_id(zh_project)', `uid` int(11) unsigned NOT NULL COMMENT 'user_id(zh_project_acccount)', `manage_permission` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '管理,权限id列表('',''分隔)', `budget_permission` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '动态投资,权限id列表('',''分隔)', `file_permission` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '资料归集,权限id列表('',''分隔)', `filing_type` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '资料归集,固定分类授权', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '添加时间', `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后修改时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE `zh_filing` ( `id` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid', `spid` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'sub_project_id(zh_sub_project)', `tree_pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'uuid', `tree_order` int(11) unsigned NOT NULL, `tree_level` int(11) unsigned NOT NULL, `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '名称', `filing_type` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '固定分类(具体见代码app/service/filing.js->filingType)', `add_user_id` int(11) NOT NULL DEFAULT '0' COMMENT '添加人', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', `is_fixed` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否为固定项', `is_deleted` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否已删除', `file_count` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '文件数量', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='资料归集,资料分类'; CREATE TABLE `zh_file` ( `id` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'uuid', `spid` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'sub_project_id(zh_sub_project.id)', `filing_id` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '分类id(zh_filing.id)', `filing_type` tinyint(4) unsigned NOT NULL COMMENT '固定分类类型', `user_id` int(11) unsigned NOT NULL COMMENT '用户id(zh_project_account.id)', `user_name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名(缓存)', `user_company` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '公司(缓存)', `user_role` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '角色(缓存)', `filename` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '文件名', `fileext` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT '文件类型', `filesize` int(11) unsigned NOT NULL COMMENT '文件大小', `filepath` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '文件路径(oss路径)', `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间', `is_deleted` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否删除', `is_rela` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否从标段内引用', `rela_info` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '引用信息(json),非引用文件时为空字符串', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- 很重要!!!! -- 请在该sql语句上方添加下一版本升级所需sql UPDATE `zh_sub_project` p LEFT JOIN `zh_budget` b ON p.budget_id = b.id SET p.std_id = IFNULL(b.std_id, 0); UPDATE `zh_sub_project` p LEFT JOIN `zh_budget_std` bs ON p.std_id = bs.id SET p.std_name = IFNULL(bs.name, ''); -- index ALTER TABLE `zh_material_bills_history` ADD INDEX `idx_mbid_mid_mspread` (`mb_id`, `mid`, `m_spread`);