ALTER TABLE `zh_project_account` CHANGE `stamp_path` `stamp_path` VARCHAR(5000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户签章oss地址';

ALTER TABLE `zh_revise_price`
ADD COLUMN `rela_lid`  varchar(1000) NOT NULL DEFAULT '' COMMENT '关联台账id(zh_ledger.ledger_id)' AFTER `use_stage_order`;

ALTER TABLE `zh_revise_price`
ADD COLUMN `rela_cid`  varchar(5000) NOT NULL DEFAULT '' COMMENT '关联变更令id(zh_change.cid)' AFTER `rela_lid`;

CREATE TABLE `zh_audit_ass` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `pid` int(11) unsigned NOT NULL COMMENT '项目id',
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `user_id` int(11) unsigned NOT NULL COMMENT '主账号id',
  `ass_user_id` int(11) unsigned NOT NULL COMMENT '协审账号id',
  `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名',
  `company` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '单位',
  `role` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '角色',
  `ass_ledger_id` varchar(1000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '协审台账id(zh_ledger.ledger_id)',
  PRIMARY KEY (`id`),
  KEY `idx_tid` (`tid`) USING BTREE,
  KEY `idx_tid_user` (`tid`,`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_stage_audit_ass` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `pid` int(11) unsigned NOT NULL COMMENT '项目id',
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `sid` int(11) unsigned NOT NULL COMMENT '期id',
  `times` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '审批次',
  `user_id` int(11) unsigned NOT NULL COMMENT '主账号id',
  `ass_user_id` int(11) unsigned NOT NULL COMMENT '协审人账号id',
  `ass_ledger_id` varchar(5000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '协审台账id(zh_ledger.ledger_id)',
  `name` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '名称',
  `company` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '单位',
  `role` 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 '更新时间',
  `confirm` tinyint(4) unsigned NOT NULL DEFAULT '1',
  `locked` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '锁定',
  PRIMARY KEY (`id`),
  KEY `idx_sid_times` (`sid`,`times`) USING BTREE,
  KEY `idx_sid_times_user` (`sid`,`times`,`user_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

ALTER TABLE `zh_budget_final`
ADD COLUMN `deal_dgn_qty1`  decimal(24,8) NOT NULL DEFAULT 0 COMMENT '决算-合同-数量1' AFTER `dgn_qty`,
ADD COLUMN `deal_dgn_qty2`  decimal(24,8) NOT NULL DEFAULT 0 COMMENT '决算-合同-数量2' AFTER `deal_dgn_qty1`,
ADD COLUMN `c_dgn_qty1`  decimal(24,8) NOT NULL DEFAULT 0 COMMENT '决算-变更-数量1' AFTER `deal_dgn_qty2`,
ADD COLUMN `c_dgn_qty2`  decimal(24,8) NOT NULL DEFAULT 0 COMMENT '决算-变更-数量2' AFTER `c_dgn_qty1`,
ADD COLUMN `final_cotnract_tp`  decimal(24,8) NOT NULL DEFAULT 0 COMMENT '决算-合同金额' AFTER `final_dgn_qty2`,
ADD COLUMN `final_qc_tp`  decimal(24,8) NOT NULL DEFAULT 0 COMMENT '决算-变更金额' AFTER `final_cotnract_tp`;

ALTER TABLE `zh_tender`
ADD COLUMN `rpt_show_level`  varchar(50) NOT NULL DEFAULT 'last' AFTER `c_plan_list_rule`;