lyh
2025-07-10 15bb3a92879fcbd6fb75d885c1f687dc60c51aa1
Merge remote-tracking branch 'origin/master'
已添加3个文件
722 ■■■■■ 文件已修改
db/ZHR/create_table_zhr.sql 722 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
db/ZHR/dict_zhr.sql 补丁 | 查看 | 原始文档 | blame | 历史
db/ZHR/menu_zhr.sql 补丁 | 查看 | 原始文档 | blame | 历史
db/ZHR/create_table_zhr.sql
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,722 @@
-- HF编码维护
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_base_hf_code]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_base_hf_code];
CREATE TABLE [dbo].[eam_base_hf_code]
(
    id          NVARCHAR(32) NOT NULL,
    create_by   NVARCHAR(50),
    create_time DATETIME2,
    update_by   NVARCHAR(50),
    update_time DATETIME2,
    del_flag    INT,
    hf_code     NVARCHAR(100),
    hf_name     NVARCHAR(255),
    hf_category NVARCHAR(64),
    hf_status   NVARCHAR(64),
    hf_version  NVARCHAR(50),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '报表HFCode维护', 'SCHEMA', dbo, 'table', eam_base_hf_code, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column',
     create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column',
     update_time;
EXEC sp_addextendedproperty 'MS_Description', '删除标记', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column', del_flag;
EXEC sp_addextendedproperty 'MS_Description', 'HF编码', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column', hf_code;
EXEC sp_addextendedproperty 'MS_Description', '模板名称', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column', hf_name;
EXEC sp_addextendedproperty 'MS_Description', '模板分类', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column',
     hf_category;
EXEC sp_addextendedproperty 'MS_Description', '状态;启用、禁用', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column',
     hf_status;
EXEC sp_addextendedproperty 'MS_Description', '版本;V1,V2+', 'SCHEMA', dbo, 'table', eam_base_hf_code, 'column',
     hf_version;
--技术鉴定规范
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_evaluation_standard]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_evaluation_standard];
CREATE TABLE [dbo].[eam_technical_status_evaluation_standard]
(
    id                         NVARCHAR(32) NOT NULL,
    create_by                  NVARCHAR(50),
    create_time                DATETIME2,
    update_by                  NVARCHAR(50),
    update_time                DATETIME2,
    del_flag                   INT,
    standard_name              NVARCHAR(255),
    standard_code              NVARCHAR(50),
    evaluation_period          INT,
    equipment_id               NVARCHAR(32),
    standard_status            NVARCHAR(64),
    has_safety_equipment_check NVARCHAR(64),
    has_precision_check        NVARCHAR(64),
    has_other_check            NVARCHAR(64),
    standard_version           NVARCHAR(50),
    remark                     NVARCHAR(255),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '技术状态鉴定规范', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_standard,
     'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '删除标记', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', del_flag;
EXEC sp_addextendedproperty 'MS_Description', '规范名称', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', standard_name;
EXEC sp_addextendedproperty 'MS_Description', '规范编码', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', standard_code;
EXEC sp_addextendedproperty 'MS_Description', '鉴定周期', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', evaluation_period;
EXEC sp_addextendedproperty 'MS_Description', '设备ID', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', equipment_id;
EXEC sp_addextendedproperty 'MS_Description', '规范状态;待提交、启用、作废', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', standard_status;
EXEC sp_addextendedproperty 'MS_Description', '是否有安全装置检查;是否', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', has_safety_equipment_check;
EXEC sp_addextendedproperty 'MS_Description', '是否有设备精度检查;是否', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', has_precision_check;
EXEC sp_addextendedproperty 'MS_Description', '是否有其他检查;是否', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', has_other_check;
EXEC sp_addextendedproperty 'MS_Description', '版本;V1,V2+', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard, 'column', standard_version;
EXEC sp_addextendedproperty 'MS_Description', '备注', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_standard,
     'column', remark;
--技术状态鉴定规范明细
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_evaluation_standard_detail]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_evaluation_standard_detail];
CREATE TABLE [dbo].[eam_technical_status_evaluation_standard_detail]
(
    id              NVARCHAR(32) NOT NULL,
    create_by       NVARCHAR(50),
    create_time     DATETIME2,
    update_by       NVARCHAR(50),
    update_time     DATETIME2,
    standard_id     NVARCHAR(32),
    check_category  NVARCHAR(64),
    item_code       INT,
    item_name       NVARCHAR(255),
    tolerance_value NVARCHAR(100),
    sub_item_name   NVARCHAR(255),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '技术状态鉴定规范明细', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '规范ID', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', standard_id;
EXEC sp_addextendedproperty 'MS_Description', '检查分类;精度检查、安全装置检查、其他检查', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', check_category;
EXEC sp_addextendedproperty 'MS_Description', '项目序号', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', item_code;
EXEC sp_addextendedproperty 'MS_Description', '检查项目', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', item_name;
EXEC sp_addextendedproperty 'MS_Description', '允差值;精度检查展示', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', tolerance_value;
EXEC sp_addextendedproperty 'MS_Description', '检查子项目;精度检查展示,可以为空', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_standard_detail, 'column', sub_item_name;
--技术状态鉴定工单
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_evaluation_order]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_evaluation_order];
CREATE TABLE [dbo].[eam_technical_status_evaluation_order]
(
    id                                NVARCHAR(32) NOT NULL,
    create_by                         NVARCHAR(50),
    create_time                       DATETIME2,
    update_by                         NVARCHAR(50),
    update_time                       DATETIME2,
    del_flag                          INT,
    order_num                         NVARCHAR(50),
    equipment_id                      NVARCHAR(32),
    standard_id                       NVARCHAR(32),
    evaluation_date                   DATETIME2,
    freeze_order_date                 DATETIME2,
    order_expiration_date             DATETIME2,
    actual_start_time                 DATETIME2,
    actual_end_time                   DATETIME2,
    evaluator                         NVARCHAR(50),
    evaluation_status                 NVARCHAR(64),
    creation_method                   NVARCHAR(64),
    safety_equipment_check_result     NVARCHAR(64),
    precision_check_result            NVARCHAR(64),
    functional_check_result           NVARCHAR(64),
    other_check_result                NVARCHAR(64),
    repair_manager_signature          NVARCHAR(50),
    repair_manager_signature_time_1   DATETIME2,
    sample_check_result               NVARCHAR(64),
    process_technician_signature      NVARCHAR(50),
    process_technician_signature_time DATETIME2,
    evaluation_result                 NVARCHAR(64),
    evaluation_reason                 NVARCHAR(64),
    inspector_signature               NVARCHAR(50),
    inspector_signature_time          DATETIME2,
    hf_code_a                         NVARCHAR(100),
    hf_code_b                         NVARCHAR(100),
    hf_code_c                         NVARCHAR(100),
    hf_code_d                         NVARCHAR(100),
    remark                            NVARCHAR(255),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '技术状态鉴定工单', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '删除标记', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', del_flag;
EXEC sp_addextendedproperty 'MS_Description', '工单号', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', order_num;
EXEC sp_addextendedproperty 'MS_Description', '设备ID', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', equipment_id;
EXEC sp_addextendedproperty 'MS_Description', '规范ID', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', standard_id;
EXEC sp_addextendedproperty 'MS_Description', '计划鉴定日期;提前70天生成工单', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', evaluation_date;
EXEC sp_addextendedproperty 'MS_Description', '锁定工单日期;提前55天锁定工单', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', freeze_order_date;
EXEC sp_addextendedproperty 'MS_Description', '工单过期日期;到期未做直接过期,并修改设备技术状态为禁用', 'SCHEMA', dbo,
     'table', eam_technical_status_evaluation_order, 'column', order_expiration_date;
EXEC sp_addextendedproperty 'MS_Description', '实际开始时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', actual_start_time;
EXEC sp_addextendedproperty 'MS_Description', '实际结束时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', actual_end_time;
EXEC sp_addextendedproperty 'MS_Description', '鉴定人', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', evaluator;
EXEC sp_addextendedproperty 'MS_Description',
     '鉴定状态;待鉴定、鉴定中、维修室主任签字、工艺人员签字、技术主管签字、设备检验员签字、已完成、已锁定、变更中、已过期',
     'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order, 'column', evaluation_status;
EXEC sp_addextendedproperty 'MS_Description', '创建方式', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', creation_method;
EXEC sp_addextendedproperty 'MS_Description', '安全装置检查结果;是、否', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', safety_equipment_check_result;
EXEC sp_addextendedproperty 'MS_Description', '精度参数检查结果;是、否、无', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', precision_check_result;
EXEC sp_addextendedproperty 'MS_Description', '功能状态检查结果;是、否', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', functional_check_result;
EXEC sp_addextendedproperty 'MS_Description', '其他检查结果;是、否、无', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', other_check_result;
EXEC sp_addextendedproperty 'MS_Description', '维修室主任签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', repair_manager_signature;
EXEC sp_addextendedproperty 'MS_Description', '维修室主任签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', repair_manager_signature_time_1;
EXEC sp_addextendedproperty 'MS_Description', '试件检查结果;合格、不合格', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', sample_check_result;
EXEC sp_addextendedproperty 'MS_Description', '工艺员签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', process_technician_signature;
EXEC sp_addextendedproperty 'MS_Description', '工艺员签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', process_technician_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '鉴定结果;合格、限用、禁用', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', evaluation_result;
EXEC sp_addextendedproperty 'MS_Description', '限\禁用原因(多选);安全装置、设备功能、精度、试件、其他', 'SCHEMA', dbo,
     'table', eam_technical_status_evaluation_order, 'column', evaluation_reason;
EXEC sp_addextendedproperty 'MS_Description', '设备检查人签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', inspector_signature;
EXEC sp_addextendedproperty 'MS_Description', '设备检查人签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', inspector_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '附录A HF编码', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', hf_code_a;
EXEC sp_addextendedproperty 'MS_Description', '附录B HF编码', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', hf_code_b;
EXEC sp_addextendedproperty 'MS_Description', '附录C HF编码', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', hf_code_c;
EXEC sp_addextendedproperty 'MS_Description', '附录D HF编码', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order, 'column', hf_code_d;
EXEC sp_addextendedproperty 'MS_Description', '备注', 'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order,
     'column', remark;
--技术状态鉴定工单明细
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_evaluation_order_detail]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_evaluation_order_detail];
CREATE TABLE [dbo].[eam_technical_status_evaluation_order_detail]
(
    id                            NVARCHAR(32) NOT NULL,
    create_by                     NVARCHAR(50),
    create_time                   DATETIME2,
    update_by                     NVARCHAR(50),
    update_time                   DATETIME2,
    item_code                     INT,
    check_category                NVARCHAR(64),
    item_name                     NVARCHAR(255),
    tolerance_value               NVARCHAR(100),
    sub_item_name                 NVARCHAR(255),
    safety_equipment_check_result NVARCHAR(64),
    other_check_result            NVARCHAR(255),
    precision_check_result        NUMERIC(24, 4),
    repairman_signature           NVARCHAR(50),
    repairman_signature_time      DATETIME2,
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '技术状态鉴定工单明细', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '序号', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', item_code;
EXEC sp_addextendedproperty 'MS_Description', '检查分类;精度检查、安全装置检查、其他检查', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', check_category;
EXEC sp_addextendedproperty 'MS_Description', '检查项目', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', item_name;
EXEC sp_addextendedproperty 'MS_Description', '允差值;精度检查展示', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', tolerance_value;
EXEC sp_addextendedproperty 'MS_Description', '检查子项目;精度检查展示,可以为空', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', sub_item_name;
EXEC sp_addextendedproperty 'MS_Description', '安全装置检查结果;是、否、无', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', safety_equipment_check_result;
EXEC sp_addextendedproperty 'MS_Description', '其他检查结果', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', other_check_result;
EXEC sp_addextendedproperty 'MS_Description', '精度检验结果', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', precision_check_result;
EXEC sp_addextendedproperty 'MS_Description', '维修人/精度检查者签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', repairman_signature;
EXEC sp_addextendedproperty 'MS_Description', '维修人/精度检查者签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_detail, 'column', repairman_signature_time;
--技术状态鉴定工单变更
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_evaluation_order_change]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_evaluation_order_change];
CREATE TABLE [dbo].[eam_technical_status_evaluation_order_change]
(
    id                                NVARCHAR(32) NOT NULL,
    create_by                         NVARCHAR(50),
    create_time                       DATETIME2,
    update_by                         NVARCHAR(50),
    update_time                       DATETIME2,
    del_flag                          INT,
    order_id                          NVARCHAR(32),
    change_order_num                  NVARCHAR(100),
    applicant                         NVARCHAR(50),
    factory_org_code                  NVARCHAR(100),
    apply_date                        DATETIME2,
    change_status                     NVARCHAR(64),
    apply_reason                      NVARCHAR(64),
    deferred_maintenance_date         DATETIME2,
    equipment_manager_signature       NVARCHAR(50),
    equipment_manager_signature_time  DATETIME2,
    depart_manager_signature          NVARCHAR(50),
    depart_manager_signature_time     DATETIME2,
    depart_manager_comment            NVARCHAR(255),
    production_support_signature      NVARCHAR(50),
    production_support_signature_time DATETIME2,
    production_support_comment        NVARCHAR(255),
    hf_code                           NVARCHAR(100),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '技术状态鉴定工单变更', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '删除标记', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', del_flag;
EXEC sp_addextendedproperty 'MS_Description', '工单ID', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', order_id;
EXEC sp_addextendedproperty 'MS_Description', '变更单号', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', change_order_num;
EXEC sp_addextendedproperty 'MS_Description', '申请人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', applicant;
EXEC sp_addextendedproperty 'MS_Description', '申请部门', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', factory_org_code;
EXEC sp_addextendedproperty 'MS_Description', '申请日期', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', apply_date;
EXEC sp_addextendedproperty 'MS_Description', '变更状态;待提交、待主管审核、待部门确认、待保障部确认、已作废、已完成',
     'SCHEMA', dbo, 'table', eam_technical_status_evaluation_order_change, 'column', change_status;
EXEC sp_addextendedproperty 'MS_Description',
     '变更原因;生产任务急无法停机、设备故障正处于维修状态、设备已报废、设备大修、搬迁、改造', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', apply_reason;
EXEC sp_addextendedproperty 'MS_Description', '变更鉴定日期', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', deferred_maintenance_date;
EXEC sp_addextendedproperty 'MS_Description', '主管领导签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', equipment_manager_signature;
EXEC sp_addextendedproperty 'MS_Description', '主管领导签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', equipment_manager_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '部门领导签字;根据变更原因类型区分不同的人审批', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', depart_manager_signature;
EXEC sp_addextendedproperty 'MS_Description', '部门领导签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', depart_manager_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '部门领导意见', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', depart_manager_comment;
EXEC sp_addextendedproperty 'MS_Description', '生产保障部领导签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', production_support_signature;
EXEC sp_addextendedproperty 'MS_Description', '生产保障部领导签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', production_support_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '生产保障部领导意见', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', production_support_comment;
EXEC sp_addextendedproperty 'MS_Description', 'HF编码', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_order_change, 'column', hf_code;
--技术状态变更申请
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_change]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_change];
CREATE TABLE [dbo].[eam_technical_status_change]
(
    id                              NVARCHAR(32) NOT NULL,
    create_by                       NVARCHAR(50),
    create_time                     DATETIME2,
    update_by                       NVARCHAR(50),
    update_time                     DATETIME2,
    del_flag                        INT,
    change_order_num                NVARCHAR(100),
    change_status                   NVARCHAR(64),
    designer                        NVARCHAR(50),
    designer_time                   DATETIME2,
    depart_header_signature         NVARCHAR(50),
    depart_header_signature_time    DATETIME2,
    depart_header_signature_comment NVARCHAR(255),
    depart_leader_signature         NVARCHAR(50),
    depart_leader_signature_time    DATETIME2,
    depart_leader_signature_comment NVARCHAR(255),
    hf_code                         NVARCHAR(100),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '技术状态变更申请', 'SCHEMA', dbo, 'table', eam_technical_status_change,
     null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     update_time;
EXEC sp_addextendedproperty 'MS_Description', '删除标记', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     del_flag;
EXEC sp_addextendedproperty 'MS_Description', '变更单号', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     change_order_num;
EXEC sp_addextendedproperty 'MS_Description', '变更单状态', 'SCHEMA', dbo, 'table', eam_technical_status_change,
     'column', change_status;
EXEC sp_addextendedproperty 'MS_Description', '编制人', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     designer;
EXEC sp_addextendedproperty 'MS_Description', '编制时间', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     designer_time;
EXEC sp_addextendedproperty 'MS_Description', '使用单位室主管签字', 'SCHEMA', dbo, 'table', eam_technical_status_change,
     'column', depart_header_signature;
EXEC sp_addextendedproperty 'MS_Description', '使用单位室主管签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_change, 'column', depart_header_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '使用单位室主管意见', 'SCHEMA', dbo, 'table', eam_technical_status_change,
     'column', depart_header_signature_comment;
EXEC sp_addextendedproperty 'MS_Description', '使用单位部主管签字', 'SCHEMA', dbo, 'table', eam_technical_status_change,
     'column', depart_leader_signature;
EXEC sp_addextendedproperty 'MS_Description', '使用单位部主管签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_change, 'column', depart_leader_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '使用单位部主管签字', 'SCHEMA', dbo, 'table', eam_technical_status_change,
     'column', depart_leader_signature_comment;
EXEC sp_addextendedproperty 'MS_Description', 'HF编码', 'SCHEMA', dbo, 'table', eam_technical_status_change, 'column',
     hf_code;
--技术状态变更申请明细
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_change_detail]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_change_detail];
CREATE TABLE [dbo].[eam_technical_status_change_detail]
(
    id                      NVARCHAR(32) NOT NULL,
    create_by               NVARCHAR(50),
    create_time             DATETIME2,
    update_by               NVARCHAR(50),
    update_time             DATETIME2,
    equipment_id            NVARCHAR(32),
    change_category         NVARCHAR(64),
    change_date             DATETIME2,
    change_technical_status NVARCHAR(64),
    acceptance_checker      NVARCHAR(50),
    acceptance_check_time   DATETIME2,
    acceptance_check_result NVARCHAR(64),
    order_id                NVARCHAR(32),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '技术状态变更申请明细', 'SCHEMA', dbo, 'table',
     eam_technical_status_change_detail, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table', eam_technical_status_change_detail,
     'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table', eam_technical_status_change_detail,
     'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table', eam_technical_status_change_detail,
     'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table', eam_technical_status_change_detail,
     'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table', eam_technical_status_change_detail,
     'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '设备ID', 'SCHEMA', dbo, 'table', eam_technical_status_change_detail,
     'column', equipment_id;
EXEC sp_addextendedproperty 'MS_Description', '变更原因;搬迁、大修、改造、其他', 'SCHEMA', dbo, 'table',
     eam_technical_status_change_detail, 'column', change_category;
EXEC sp_addextendedproperty 'MS_Description', '变更日期', 'SCHEMA', dbo, 'table', eam_technical_status_change_detail,
     'column', change_date;
EXEC sp_addextendedproperty 'MS_Description', '变更后技术状态;变更通过后默认设备技术状态改为禁用', 'SCHEMA', dbo,
     'table', eam_technical_status_change_detail, 'column', change_technical_status;
EXEC sp_addextendedproperty 'MS_Description', '验收检查人', 'SCHEMA', dbo, 'table', eam_technical_status_change_detail,
     'column', acceptance_checker;
EXEC sp_addextendedproperty 'MS_Description', '验收检查时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_change_detail, 'column', acceptance_check_time;
EXEC sp_addextendedproperty 'MS_Description',
     '验收检查结果;大修、改造 éœ€è¦å¡«å†™éªŒæ”¶ç»“果,搬迁按照技术状态鉴定工单维护,其他暂未使用到,只预留此类型', 'SCHEMA', dbo,
     'table', eam_technical_status_change_detail, 'column', acceptance_check_result;
EXEC sp_addextendedproperty 'MS_Description', '技术状态鉴定工单ID;搬迁使用', 'SCHEMA', dbo, 'table',
     eam_technical_status_change_detail, 'column', order_id;
--加工设备技术鉴定申请
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_evaluation_application]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_evaluation_application];
CREATE TABLE [dbo].[eam_technical_status_evaluation_application]
(
    id                                NVARCHAR(32) NOT NULL,
    create_by                         NVARCHAR(50),
    create_time                       DATETIME2,
    update_by                         NVARCHAR(50),
    update_time                       DATETIME2,
    del_flag                          INT,
    application_order_num             NVARCHAR(100),
    applicant                         NVARCHAR(50),
    factory_org_code                  NVARCHAR(100),
    apply_date                        DATETIME2,
    application_status                NVARCHAR(64),
    depart_header_signature           NVARCHAR(50),
    depart_header_signature_time      DATETIME2,
    depart_header_comment             NVARCHAR(255),
    production_header_signature       NVARCHAR(50),
    production_header_signature_time  DATETIME2,
    production_header_comment         NVARCHAR(255),
    production_support_signature      NVARCHAR(50),
    production_support_signature_time DATETIME2,
    production_support_comment        NVARCHAR(255),
    hf_code                           NVARCHAR(100),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '加工设备技术鉴定申请;禁用状态的设备或临时进行技术鉴定时使用', 'SCHEMA',
     dbo, 'table', eam_technical_status_evaluation_application, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '删除标记', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', del_flag;
EXEC sp_addextendedproperty 'MS_Description', '申请单号', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', application_order_num;
EXEC sp_addextendedproperty 'MS_Description', '申请人', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', applicant;
EXEC sp_addextendedproperty 'MS_Description', '申请部门', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', factory_org_code;
EXEC sp_addextendedproperty 'MS_Description', '申请日期', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', apply_date;
EXEC sp_addextendedproperty 'MS_Description',
     '申请单状态;待提交、待单位室级领导审核、生产设备管理主管审核、待保障部领导审核、已作废、已完成', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', application_status;
EXEC sp_addextendedproperty 'MS_Description', '申请单位室级领导签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', depart_header_signature;
EXEC sp_addextendedproperty 'MS_Description', '申请单位室级领导签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', depart_header_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '申请单位室级领导意见', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', depart_header_comment;
EXEC sp_addextendedproperty 'MS_Description', '生产设备管理主管签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', production_header_signature;
EXEC sp_addextendedproperty 'MS_Description', '生产设备管理主管签字四件', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', production_header_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '生产设备管理主管意见', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', production_header_comment;
EXEC sp_addextendedproperty 'MS_Description', '生产保障部领导签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', production_support_signature;
EXEC sp_addextendedproperty 'MS_Description', '生产保障部领导签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', production_support_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '生产保障部领导意见', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', production_support_comment;
EXEC sp_addextendedproperty 'MS_Description', 'HF编码', 'SCHEMA', dbo, 'table',
     eam_technical_status_evaluation_application, 'column', hf_code;
--停用加工设备申请单
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_deactivate]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_deactivate];
CREATE TABLE [dbo].[eam_technical_status_deactivate]
(
    id                              NVARCHAR(32) NOT NULL,
    create_by                       NVARCHAR(50),
    create_time                     DATETIME2,
    update_by                       NVARCHAR(50),
    update_time                     DATETIME2,
    del_flag                        INT,
    deactivate_order_num            NVARCHAR(100),
    applicant                       NVARCHAR(50),
    factory_org_code                NVARCHAR(100),
    apply_date                      DATETIME2,
    application_status              NVARCHAR(64),
    depart_header_signature         NVARCHAR(50),
    depart_header_signature_time    DATETIME2,
    depart_header_signature_comment NVARCHAR(255),
    depart_leader_signature         NVARCHAR(50),
    depart_leader_signature_time    DATETIME2,
    depart_leader_signature_comment NVARCHAR(255),
    hf_code                         NVARCHAR(100),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '停用加工设备申请单;申请单位申请停用设备,审批通过后修改设备状态为禁用',
     'SCHEMA', dbo, 'table', eam_technical_status_deactivate, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate, 'column',
     id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '删除标记', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', del_flag;
EXEC sp_addextendedproperty 'MS_Description', '停用单号', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', deactivate_order_num;
EXEC sp_addextendedproperty 'MS_Description', '申请人', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', applicant;
EXEC sp_addextendedproperty 'MS_Description', '申请部门', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', factory_org_code;
EXEC sp_addextendedproperty 'MS_Description', '申请日期', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', apply_date;
EXEC sp_addextendedproperty 'MS_Description',
     '申请单状态;待提交、待单位室级领导审核、生产设备管理主管审核、待保障部领导审核、已作废、已完成', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate, 'column', application_status;
EXEC sp_addextendedproperty 'MS_Description', '使用单位室主管签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate, 'column', depart_header_signature;
EXEC sp_addextendedproperty 'MS_Description', '使用单位室主管签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate, 'column', depart_header_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '使用单位室主管意见', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate, 'column', depart_header_signature_comment;
EXEC sp_addextendedproperty 'MS_Description', '使用单位部主管签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate, 'column', depart_leader_signature;
EXEC sp_addextendedproperty 'MS_Description', '使用单位部主管签字时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate, 'column', depart_leader_signature_time;
EXEC sp_addextendedproperty 'MS_Description', '使用单位部主管签字', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate, 'column', depart_leader_signature_comment;
EXEC sp_addextendedproperty 'MS_Description', 'HF编码', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate,
     'column', hf_code;
--停用加工设备明细
IF EXISTS (SELECT *
           FROM sys.objects
           WHERE object_id = OBJECT_ID(N'[dbo].[eam_technical_status_deactivate_detail]')
             AND type in (N'U'))
    DROP TABLE [dbo].[eam_technical_status_deactivate_detail];
CREATE TABLE [dbo].[eam_technical_status_deactivate_detail]
(
    id                       NVARCHAR(32) NOT NULL,
    create_by                NVARCHAR(50),
    create_time              DATETIME2,
    update_by                NVARCHAR(50),
    update_time              DATETIME2,
    equipment_id             NVARCHAR(32),
    deactivate_reason        NVARCHAR(255),
    deactivate_duration      NUMERIC(24, 4),
    deactivate_duration_unit NVARCHAR(64),
    PRIMARY KEY (id)
);
EXEC sp_addextendedproperty 'MS_Description', '停用加工设备明细', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate_detail, null, null;
EXEC sp_addextendedproperty 'MS_Description', '主键', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate_detail,
     'column', id;
EXEC sp_addextendedproperty 'MS_Description', '创建人', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate_detail,
     'column', create_by;
EXEC sp_addextendedproperty 'MS_Description', '创建时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate_detail, 'column', create_time;
EXEC sp_addextendedproperty 'MS_Description', '更新人', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate_detail,
     'column', update_by;
EXEC sp_addextendedproperty 'MS_Description', '更新时间', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate_detail, 'column', update_time;
EXEC sp_addextendedproperty 'MS_Description', '设备ID', 'SCHEMA', dbo, 'table', eam_technical_status_deactivate_detail,
     'column', equipment_id;
EXEC sp_addextendedproperty 'MS_Description', '停用原因', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate_detail, 'column', deactivate_reason;
EXEC sp_addextendedproperty 'MS_Description', '停用时长', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate_detail, 'column', deactivate_duration;
EXEC sp_addextendedproperty 'MS_Description', '停用时长单位;天、月、年', 'SCHEMA', dbo, 'table',
     eam_technical_status_deactivate_detail, 'column', deactivate_duration_unit;
db/ZHR/dict_zhr.sql
db/ZHR/menu_zhr.sql