--20260624
ALTER TABLE "PRESSURE2_DYNAMIC_TB" ADD COLUMN "SKIP_PAGE_COUNT" INT DEFAULT (0);
COMMENT ON COLUMN "PRESSURE2_DYNAMIC_TB"."SKIP_PAGE_COUNT" IS '跳过的页码数';
--已加

--20260630
ALTER TABLE "PRESSURE2_DYNAMIC_TB" ADD COLUMN "IMAGE_OFFSET" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE2_DYNAMIC_TB"."IMAGE_OFFSET" IS '图片偏移量，格式：x,y';

ALTER TABLE "PRESSURE2_BOILER_CONNECT_RECORD_REPORT" ADD COLUMN "IS_SIGN" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE2_BOILER_CONNECT_RECORD_REPORT"."IS_SIGN" IS '是否需要签名';

ALTER TABLE "PRESSURE2_INSPECTION_NATURE_TEMPLATE" ADD COLUMN "DEFAULT_COUNT" INT DEFAULT (1);
COMMENT ON COLUMN "PRESSURE2_INSPECTION_NATURE_TEMPLATE"."DEFAULT_COUNT" IS '默认数量';

ALTER TABLE "PRESSURE2_EQUIP_BOILER_SCHEDULING_CHECK" ADD COLUMN "DEFAULT_COUNT" INT;
COMMENT ON COLUMN "PRESSURE2_EQUIP_BOILER_SCHEDULING_CHECK"."DEFAULT_COUNT" IS '默认数量';

ALTER TABLE "PRESSURE2_EQUIP_PIPE_SCHEDULING_CHECK" ADD COLUMN "DEFAULT_COUNT" INT;
COMMENT ON COLUMN "PRESSURE2_EQUIP_PIPE_SCHEDULING_CHECK"."DEFAULT_COUNT" IS '默认数量';

ALTER TABLE "PRESSURE2_EQUIP_PIPE_SCHEDULING_CHECK" MODIFY "DEFAULT_COUNT" INT DEFAULT (1) NULL;

ALTER TABLE "PRESSURE2_EQUIP_BOILER_SCHEDULING_CHECK" MODIFY "DEFAULT_COUNT" INT DEFAULT (1) NULL;

ALTER TABLE "PRESSURE2_BOILER_CONNECT_RECORD_REPORT" ADD COLUMN "IS_FEE" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE2_BOILER_CONNECT_RECORD_REPORT"."IS_FEE" IS '是否收费';

--已加

--20260627
ALTER TABLE "PRESSURE_TASK_ORDER" ADD COLUMN "SCHEME_ENTER_TIME" DATETIME(6);
ALTER TABLE "PRESSURE_TASK_ORDER" ADD COLUMN "SCHEME_APPROVAL_TIME" VARCHAR(50);
ALTER TABLE "PRESSURE_TASK_ORDER" ADD COLUMN "SCHEME_RATIFY_TIME" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE_TASK_ORDER"."SCHEME_ENTER_TIME" IS '检验方案录入时间';
COMMENT ON COLUMN "PRESSURE_TASK_ORDER"."SCHEME_APPROVAL_TIME" IS '检验方案审核时间';
COMMENT ON COLUMN "PRESSURE_TASK_ORDER"."SCHEME_RATIFY_TIME" IS '检验方案审批时间';

ALTER TABLE "PRESSURE2_BOILER_TASK_ORDER_ITEM" ADD COLUMN "SCHEME_ENTER_TIME" DATETIME(6);
ALTER TABLE "PRESSURE2_BOILER_TASK_ORDER_ITEM" ADD COLUMN "SCHEME_APPROVAL_TIME" VARCHAR(50);
ALTER TABLE "PRESSURE2_BOILER_TASK_ORDER_ITEM" ADD COLUMN "SCHEME_RATIFY_TIME" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM"."SCHEME_ENTER_TIME" IS '检验方案录入时间';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM"."SCHEME_APPROVAL_TIME" IS '检验方案审核时间';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM"."SCHEME_RATIFY_TIME" IS '检验方案审批时间';

--已加

--20260629
ALTER TABLE "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT" ADD COLUMN "RECYCLE_EXPIRE_DATE" DATETIME(6);
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT"."RECYCLE_EXPIRE_DATE" IS '检验意见通知书回收截止时间';

ALTER TABLE "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT" ADD COLUMN "RECYCLE_EXPIRE_DATE" DATETIME(6);
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT"."RECYCLE_EXPIRE_DATE" IS '检验意见通知书回收截止时间';

--已加
        
--20260630
ALTER TABLE "PRESSURE2_ORDER_REPORT" ADD COLUMN "ACCEPT_ORDER_NO" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE2_ORDER_REPORT"."ACCEPT_ORDER_NO" IS '受理单/服务单编号';

ALTER TABLE "PRESSURE_APPOINTMENT_CONFIRM_ORDER" ADD COLUMN "ANNOTATOR_DATE" DATETIME(6);
ALTER TABLE "PRESSURE_APPOINTMENT_CONFIRM_ORDER" ADD COLUMN "ANNOTATOR_ID" VARCHAR(64);
ALTER TABLE "PRESSURE_APPOINTMENT_CONFIRM_ORDER" ADD COLUMN "ANNOTATOR_NAME" VARCHAR(64);
COMMENT ON COLUMN "PRESSURE_APPOINTMENT_CONFIRM_ORDER"."ANNOTATOR_DATE" IS '备注日期时间';
COMMENT ON COLUMN "PRESSURE_APPOINTMENT_CONFIRM_ORDER"."ANNOTATOR_ID" IS '备注人ID';
COMMENT ON COLUMN "PRESSURE_APPOINTMENT_CONFIRM_ORDER"."ANNOTATOR_NAME" IS '备注人名称';

ALTER TABLE "PRESSURE2_DYNAMIC_TB" ADD COLUMN "IMAGE_OFFSET" VARCHAR(150);
COMMENT ON COLUMN "PRESSURE2_DYNAMIC_TB"."IMAGE_OFFSET" IS '偏移量';
--已加
CREATE TABLE "PRESSURE2_DEFAULT_APPROVAL"
(
    "ID" VARCHAR(64) NOT NULL,
    "USER_ID" VARCHAR(64) DEFAULT NULL,
    "RECHECK_ID" VARCHAR(64) DEFAULT NULL,
    "APPROVE_EMPLOYEE_NO" VARCHAR(64) DEFAULT NULL,
    "CREATOR" VARCHAR(64) DEFAULT '',
    "CREATE_TIME" DATETIME(6) DEFAULT CURRENT_TIMESTAMP NOT NULL,
    "UPDATER" VARCHAR(64) DEFAULT '',
    "UPDATE_TIME" DATETIME(6) DEFAULT CURRENT_TIMESTAMP NOT NULL,
    "DELETED" BIT DEFAULT 0 NOT NULL,
    NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "PRESSURE2_DEFAULT_APPROVAL" IS '承压2默认审批配置表';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."ID" IS 'ID';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."USER_ID" IS '用户ID';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."RECHECK_ID" IS '校核人ID';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."APPROVE_EMPLOYEE_NO" IS '审核人工号';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."CREATOR" IS '创建者';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."UPDATER" IS '更新者';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "PRESSURE2_DEFAULT_APPROVAL"."DELETED" IS '是否删除';

--20260704
ALTER TABLE "PRESSURE2_BOILER_TASK_ORDER_ITEM" ADD COLUMN "ENTER_PDF_URL" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM"."ENTER_PDF_URL" IS '总记录PDF';

ALTER TABLE "PRESSURE2_PIPE_TASK_ORDER_ITEM" ADD COLUMN "ENTER_PDF_URL" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM"."ENTER_PDF_URL" IS '总记录PDF';

ALTER TABLE "PRESSURE_TASK_ORDER" ADD COLUMN "ENTER_PDF_URL" VARCHAR(50);
COMMENT ON COLUMN "PRESSURE_TASK_ORDER"."ENTER_PDF_URL" IS '总记录PDF';

CREATE TABLE "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"
(
    "ID" VARCHAR(64),
    "ORDER_ID" VARCHAR(50),
    "ORDER_ITEM_ID" VARCHAR(50),
    "REPORT_NO" VARCHAR(50),
    "REPORT_TYPE" INTEGER,
    "REPORT_VERSION" INTEGER,
    "ISSUE_URL" VARCHAR(50),
    "CREATOR" VARCHAR(64 CHAR),
"CREATE_TIME" TIMESTAMP(0) NOT NULL,
"UPDATER" VARCHAR(64 CHAR),
"UPDATE_TIME" TIMESTAMP(0) NOT NULL,
"DELETED" BIT DEFAULT 0) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION" IS '锅炉记录报告版本记录';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."ID" IS 'id';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."ORDER_ID" IS '订单号';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."ORDER_ITEM_ID" IS '订单设备编号';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."REPORT_NO" IS '记录/报告编号';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."REPORT_TYPE" IS '100记录/200报告';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."REPORT_VERSION" IS '版本号';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."ISSUE_URL" IS '文件URL';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."CREATOR" IS '创建人';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."UPDATER" IS '更新人';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ISSUE_REPORT_VERSION"."DELETED" IS '删除状态';

CREATE TABLE "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"
(
    "ID" VARCHAR(64),
    "ORDER_ID" VARCHAR(50),
    "ORDER_ITEM_ID" VARCHAR(50),
    "REPORT_NO" VARCHAR(50),
    "REPORT_TYPE" INTEGER,
    "REPORT_VERSION" INTEGER,
    "ISSUE_URL" VARCHAR(50),
    "CREATOR" VARCHAR(64 CHAR),
"CREATE_TIME" TIMESTAMP(0) NOT NULL,
"UPDATER" VARCHAR(64 CHAR),
"UPDATE_TIME" TIMESTAMP(0) NOT NULL,
"DELETED" BIT DEFAULT 0) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION" IS '管道记录报告版本记录';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."ID" IS 'id';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."ORDER_ID" IS '订单号';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."ORDER_ITEM_ID" IS '订单设备编号';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."REPORT_NO" IS '记录/报告编号';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."REPORT_TYPE" IS '100记录/200报告';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."REPORT_VERSION" IS '版本号';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."ISSUE_URL" IS '文件URL';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."CREATOR" IS '创建人';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."UPDATER" IS '更新人';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ISSUE_REPORT_VERSION"."DELETED" IS '删除状态';

--已更新

--20260707

CREATE TABLE "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"
(
    "ID" VARCHAR2(64) NOT NULL,
    "REPORT_ID" VARCHAR2(64),
    "OLD_REPORT_URL" VARCHAR2(100),
    "OLD_PREPARE_JSON" TEXT,
    "NEW_REPORT_URL" VARCHAR2(100),
    "NEW_PREPARE_JSON" TEXT,
    "VERSION_NO" INT,
    "MODIFIED_REASON" VARCHAR2(32),
    "CREATOR" VARCHAR2(64),
    "CREATE_TIME" TIMESTAMP(6) NOT NULL,
    "UPDATER" VARCHAR2(64),
    "UPDATE_TIME" TIMESTAMP(6) NOT NULL,
    "DELETED" BIT,
    "REPORT_TYPE" INTEGER,
    "ORDER_ID" VARCHAR(50),
    "ORDER_ITEM_ID" VARCHAR(50),
    "DYNAMIC_TB_CODE" VARCHAR(50),
    NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING" IS '管道报告归档检验项目版本信息';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."ID" IS 'ID';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."REPORT_ID" IS '报表ID';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."OLD_REPORT_URL" IS '旧PDF地址';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."OLD_PREPARE_JSON" IS '旧JSON值';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."NEW_REPORT_URL" IS '新PDF地址';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."NEW_PREPARE_JSON" IS '新JSON值';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."VERSION_NO" IS '版本号';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."MODIFIED_REASON" IS '修改原因';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."CREATOR" IS '创建人';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."UPDATER" IS '修改人';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."UPDATE_TIME" IS '修改时间';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."DELETED" IS '是否删除';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."REPORT_TYPE" IS '100记录/200报告';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."ORDER_ID" IS '订单号';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."ORDER_ITEM_ID" IS '订单设备编号';
COMMENT ON COLUMN "PRESSURE2_PIPE_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."DYNAMIC_TB_CODE" IS '模板编号CODE';

CREATE TABLE "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"
(
    "ID" VARCHAR2(64) NOT NULL,
    "REPORT_ID" VARCHAR2(64),
    "OLD_REPORT_URL" VARCHAR2(100),
    "OLD_PREPARE_JSON" TEXT,
    "NEW_REPORT_URL" VARCHAR2(100),
    "NEW_PREPARE_JSON" TEXT,
    "VERSION_NO" INT,
    "MODIFIED_REASON" VARCHAR2(32),
    "CREATOR" VARCHAR2(64),
    "CREATE_TIME" TIMESTAMP(6) NOT NULL,
    "UPDATER" VARCHAR2(64),
    "UPDATE_TIME" TIMESTAMP(6) NOT NULL,
    "DELETED" BIT,
    "REPORT_TYPE" INTEGER,
    "ORDER_ID" VARCHAR(50),
    "ORDER_ITEM_ID" VARCHAR(50),
    "DYNAMIC_TB_CODE" VARCHAR(50),
    NOT CLUSTER PRIMARY KEY("ID")) STORAGE(ON "MAIN", CLUSTERBTR) ;

COMMENT ON TABLE "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING" IS '锅炉报告归档检验项目版本信息';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."ID" IS 'ID';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."REPORT_ID" IS '报表ID';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."OLD_REPORT_URL" IS '旧PDF地址';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."OLD_PREPARE_JSON" IS '旧JSON值';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."NEW_REPORT_URL" IS '新PDF地址';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."NEW_PREPARE_JSON" IS '新JSON值';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."VERSION_NO" IS '版本号';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."MODIFIED_REASON" IS '修改原因';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."CREATOR" IS '创建人';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."UPDATER" IS '修改人';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."UPDATE_TIME" IS '修改时间';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."DELETED" IS '是否删除';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."REPORT_TYPE" IS '100记录/200报告';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."ORDER_ID" IS '订单号';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."ORDER_ITEM_ID" IS '订单设备编号';
COMMENT ON COLUMN "PRESSURE2_BOILER_TASK_ORDER_ITEM_REPORT_VERSION_ARCHIVING"."DYNAMIC_TB_CODE" IS '模板编号CODE';

--已加


ALTER TABLE "PRESSURE2_EQUIP_PIPE_SCHEDULING" ADD COLUMN "MANAGER_ID" VARCHAR(64);
COMMENT ON COLUMN "PRESSURE2_EQUIP_PIPE_SCHEDULING"."MANAGER_ID" IS '负责人';

ALTER TABLE "PRESSURE2_EQUIP_BOILER_SCHEDULING" ADD COLUMN "MANAGER_ID" VARCHAR(64);
COMMENT ON COLUMN "PRESSURE2_EQUIP_BOILER_SCHEDULING"."MANAGER_ID" IS '负责人';

ALTER TABLE "PRESSURE_APPOINTMENT_CONFIRM_ORDER" ADD COLUMN "MANAGER_ID" VARCHAR(64);
COMMENT ON COLUMN "PRESSURE_APPOINTMENT_CONFIRM_ORDER"."MANAGER_ID" IS '负责人';

ALTER TABLE "PRESSURE_ACCEPT_ORDER" ADD COLUMN "MANAGER_ID" VARCHAR(64);
COMMENT ON COLUMN "PRESSURE_ACCEPT_ORDER"."MANAGER_ID" IS '负责人';

-- 以上已加
-- ============================================================
-- 检验项目新增 itemType + projectCategory 字段 DDL
-- 执行前请备份数据库
-- ============================================================

-- 1. 项目类别表（锅炉+管道通用）
CREATE TABLE PRESSURE2_CONNECT_RECORD_REPORT_CATEGORY (
                                                          ID VARCHAR(64) NOT NULL,
                                                          NAME VARCHAR(100) NOT NULL,
                                                          SORT INT DEFAULT 0,
                                                          STATUS VARCHAR(1) DEFAULT '0',
                                                          CREATOR VARCHAR(64),
                                                          CREATE_TIME DATETIME,
                                                          UPDATER VARCHAR(64),
                                                          UPDATE_TIME DATETIME,
                                                          DELETED BIT DEFAULT 0,
                                                          PRIMARY KEY (ID)
);
COMMENT ON TABLE PRESSURE2_CONNECT_RECORD_REPORT_CATEGORY IS '检验项目类别（锅炉+管道通用）';
COMMENT ON COLUMN PRESSURE2_CONNECT_RECORD_REPORT_CATEGORY.NAME IS '类别名称';
COMMENT ON COLUMN PRESSURE2_CONNECT_RECORD_REPORT_CATEGORY.SORT IS '显示顺序';
COMMENT ON COLUMN PRESSURE2_CONNECT_RECORD_REPORT_CATEGORY.STATUS IS '状态 0正常 1停用';

-- 2. 检验项目配置表加字段
ALTER TABLE PRESSURE2_BOILER_CONNECT_RECORD_REPORT
    ADD COLUMN ITEM_TYPE VARCHAR(20) DEFAULT 'INSPECTION';
ALTER TABLE PRESSURE2_BOILER_CONNECT_RECORD_REPORT
    ADD COLUMN PROJECT_CATEGORY VARCHAR(64);

-- 数据迁移：现有记录默认为 INSPECTION
UPDATE PRESSURE2_BOILER_CONNECT_RECORD_REPORT SET ITEM_TYPE = 'INSPECTION' WHERE ITEM_TYPE IS NULL;

-- 3. 锅炉任务单 FEE 实例表
CREATE TABLE PRESSURE2_BOILER_TASK_ORDER_ITEM_FEE (
                                                      ID VARCHAR(64) NOT NULL,
                                                      ORDER_ID VARCHAR(64) NOT NULL,
                                                      ORDER_ITEM_ID VARCHAR(64) NOT NULL,
                                                      PROJECT_ID VARCHAR(64) NOT NULL,
                                                      PROJECT_NAME VARCHAR(200),
                                                      FEE DECIMAL(18,2),
                                                      FEE_TYPE VARCHAR(2),
                                                      FEE_CALCULATE_JSON TEXT,
                                                      SORT INT DEFAULT 0,
                                                      CREATOR VARCHAR(64),
                                                      CREATE_TIME DATETIME,
                                                      UPDATER VARCHAR(64),
                                                      UPDATE_TIME DATETIME,
                                                      DELETED BIT DEFAULT 0,
                                                      PRIMARY KEY (ID)
);
CREATE INDEX IDX_BOILER_TASK_ORDER_ITEM_FEE_ORDER_ID ON PRESSURE2_BOILER_TASK_ORDER_ITEM_FEE(ORDER_ID);
CREATE INDEX IDX_BOILER_TASK_ORDER_ITEM_FEE_ORDER_ITEM_ID ON PRESSURE2_BOILER_TASK_ORDER_ITEM_FEE(ORDER_ITEM_ID);

-- 4. 管道任务单 FEE 实例表
CREATE TABLE PRESSURE2_PIPE_TASK_ORDER_ITEM_FEE (
                                                    ID VARCHAR(64) NOT NULL,
                                                    ORDER_ID VARCHAR(64) NOT NULL,
                                                    ORDER_ITEM_ID VARCHAR(64),
                                                    PROJECT_ID VARCHAR(64) NOT NULL,
                                                    PROJECT_NAME VARCHAR(200),
                                                    FEE DECIMAL(18,2),
                                                    FEE_TYPE VARCHAR(2),
                                                    FEE_CALCULATE_JSON TEXT,
                                                    SORT INT DEFAULT 0,
                                                    CREATOR VARCHAR(64),
                                                    CREATE_TIME DATETIME,
                                                    UPDATER VARCHAR(64),
                                                    UPDATE_TIME DATETIME,
                                                    DELETED BIT DEFAULT 0,
                                                    PRIMARY KEY (ID)
);
CREATE INDEX IDX_PIPE_TASK_ORDER_ITEM_FEE_ORDER_ID ON PRESSURE2_PIPE_TASK_ORDER_ITEM_FEE(ORDER_ID);
CREATE INDEX IDX_PIPE_TASK_ORDER_ITEM_FEE_ORDER_ITEM_ID ON PRESSURE2_PIPE_TASK_ORDER_ITEM_FEE(ORDER_ITEM_ID);

-- 已加