CREATE TABLE `zh_change_project_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tid` int(11) NOT NULL COMMENT '标段id',
  `cpid` int(11) NOT NULL COMMENT '变更立项id',
  `info_json` json DEFAULT NULL COMMENT '内容json值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='变更立项内容临时保存表，用于修订撤销与撤回';

CREATE TABLE `zh_change_apply_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tid` int(11) NOT NULL COMMENT '标段id',
  `caid` int(11) NOT NULL COMMENT '变更申请id',
  `info_json` json DEFAULT NULL COMMENT '内容json值',
  `list_json` json DEFAULT NULL COMMENT '清单json值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='变更申请内容临时保存表，用于修订撤销与撤回';

CREATE TABLE `zh_change_plan_history` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tid` int(11) NOT NULL COMMENT '标段id',
  `cpid` int(11) NOT NULL COMMENT '变更方案id',
  `info_json` json DEFAULT NULL COMMENT '内容json值',
  `list_json` json DEFAULT NULL COMMENT '清单json值',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='变更方案内容临时保存表，用于修订撤销与撤回';

ALTER TABLE `zh_ledger_tag`
ADD COLUMN `settle_id`  int(11) NOT NULL DEFAULT -1 AFTER `sorder`,
ADD COLUMN `settle_order`  tinyint(4) NOT NULL DEFAULT -1 AFTER `settle_id`;

ALTER TABLE `zh_ledger_attachment`
ADD COLUMN `settle_id`  int(11) NOT NULL DEFAULT -1 COMMENT '结算id' AFTER `tid`,
ADD COLUMN `settle_order`  tinyint(4) NOT NULL DEFAULT -1 COMMENT '结算期序号' AFTER `settle_id`;

ALTER TABLE `zh_s2b_spec_msg`
ADD COLUMN `advance_id`  int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '预付款期id' AFTER `rid`,
ADD COLUMN `material_id`  int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '材差期id' AFTER `advance_id`,
ADD COLUMN `c_apply_id`  int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '变更申请id' AFTER `material_id`,
ADD COLUMN `c_proj_id`  int(11) UNSIGNED NOT NULL COMMENT '变更立项id' AFTER `c_apply_id`,
ADD COLUMN `c_plan_id`  int(11) UNSIGNED NOT NULL COMMENT '变更方案id' AFTER `c_proj_id`,
ADD COLUMN `extra_info`  varchar(1000) NOT NULL DEFAULT '' COMMENT '附加信息（主要用于报表）' AFTER `timing`;

ALTER TABLE `zh_s2b_spec_push_log`
ADD COLUMN `push_3f_id`  varchar(255) NOT NULL DEFAULT '' COMMENT '3方交互key（对方id）' AFTER `multi_content`,
ADD COLUMN `push_3f_res`  text NULL COMMENT '3方交互，确认结果（对方推送）' AFTER `push_3f_id`,
ADD COLUMN `push_3f_tag`  varchar(50) NOT NULL DEFAULT '' COMMENT '3方交互标记(关键信息，通过/拒签/过期等)' AFTER `push_3f_res`;

CREATE TABLE `zh_settle` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `add_sid` int(11) unsigned NOT NULL COMMENT '新增时的期id',
  `add_sorder` tinyint(4) unsigned NOT NULL COMMENT '新增时的期序号',
  `user_id` int(11) unsigned NOT NULL COMMENT '创建人id',
  `final_sid` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上报时，结算数据管理的最大期id',
  `final_sorder` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上报时，结算数据管理的最大期序号',
  `settle_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算期序号',
  `settle_time` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '结算年月',
  `settle_period` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '结算周期',
  `audit_times` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '审批次',
  `audit_status` tinyint(4) unsigned NOT NULL DEFAULT '1' COMMENT '审批状态',
  `audit_start_time` timestamp NULL DEFAULT NULL COMMENT '上报时间(最新一次审批)',
  `audit_finsih_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '审批完成时间',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
  `contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同金额',
  `positive_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-正变更金额',
  `negative_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-负变更金额',
  `qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-变更金额',
  `tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期金额',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同金额',
  `pre_positive_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-正变更金额',
  `pre_negative_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-负变更金额',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-变更金额',
  `pre_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期金额',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='过程结算';

CREATE TABLE `zh_settle_audit` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` bigint(20) unsigned NOT NULL COMMENT '结算id',
  `audit_id` int(11) unsigned NOT NULL COMMENT '流程参与人id(含原报)',
  `name` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-姓名',
  `company` varchar(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-单位',
  `role` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-角色',
  `mobile` varchar(15) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '参与人-电话',
  `audit_times` int(11) unsigned NOT NULL DEFAULT '1' COMMENT '审批次数',
  `audit_order` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '预定流程顺序',
  `audit_type` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '流程类型',
  `active_order` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '实际流程顺序',
  `audit_status` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '流程状态',
  `audit_time` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '流程结束时间',
  `create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '最后更新时间',
  `opinion` varchar(1000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '意见',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_select` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '结算台账节点id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '结算计量单元节点id',
  `user_id` int(11) unsigned NOT NULL COMMENT '添加人',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_0` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_1` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_2` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_3` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_4` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_5` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_6` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_7` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_8` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_bills_9` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) NOT NULL,
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `tree_id` int(11) unsigned NOT NULL COMMENT '树结构-id',
  `tree_pid` int(11) NOT NULL COMMENT '树结构-父id',
  `tree_full_path` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '树结构-完整路径',
  `tree_is_leaf` tinyint(4) unsigned NOT NULL COMMENT '树结构-是否最底层',
  `tree_level` tinyint(4) unsigned NOT NULL COMMENT '树结构-层次',
  `tree_order` tinyint(4) unsigned NOT NULL COMMENT '树结构-同层排序',
  `code` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '项目节编号',
  `b_code` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '清单编号',
  `name` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `unit` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '单位',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `unit_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '单价',
  `total_price` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '金额',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `memo` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注',
  `node_type` int(4) unsigned NOT NULL DEFAULT '0' COMMENT '节点类别',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-数量',
  `cur_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-合同-金额',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-金额',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-金额',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-金额',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_contract_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-金额',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_tp` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-金额',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_0` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_1` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_2` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_3` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_4` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_5` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_6` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_7` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_8` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_9` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_10` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_11` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_12` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_13` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_14` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_15` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_16` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_17` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_18` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

CREATE TABLE `zh_settle_pos_19` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tid` int(11) unsigned NOT NULL COMMENT '标段id',
  `settle_id` int(11) unsigned NOT NULL COMMENT '结算期id',
  `settle_order` tinyint(4) unsigned NOT NULL COMMENT '结算期序号',
  `lid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_ledger.id',
  `pid` varchar(36) COLLATE utf8_unicode_ci NOT NULL COMMENT 'zh_pos.id',
  `name` varchar(1000) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '名称',
  `drawing_code` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '图册号',
  `quantity` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '数量',
  `cur_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期计算-合同-数量',
  `cur_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期结算-数量变更-数量',
  `cur_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '本期变更-不计价',
  `pre_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-合同-数量',
  `pre_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-数量变更-数量',
  `pre_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止上期结算-不计价',
  `end_contract_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-合同-数量',
  `end_qc_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-数量变更-数量',
  `end_qc_minus_qty` decimal(24,8) NOT NULL DEFAULT '0.00000000' COMMENT '截止本期结算-不计价',
  `is_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否结算',
  `pre_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '上期是否结算',
  `settle_status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算状态',
  `settle_done_order` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '结算完成期',
  `is_org_settle` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '是否原始勾选台账',
  `porder` int(11) unsigned NOT NULL DEFAULT '1',
  `position` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '位置',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
