IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[order_240_bak]') AND type = 'U')
CREATE TABLE [dbo].[order_240_bak]
(
    [ord_bcid] int NOT NULL,
    [ord_bizid] int NOT NULL,
    [ord_branch] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_cbid] bigint NOT NULL,
    [ord_cmpid] int NOT NULL,
    [ord_createbizids] nvarchar(200) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_createcuid] int NOT NULL,
    [ord_createdepart] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_createdpid] int NOT NULL,
    [ord_creator] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_cuid] int NOT NULL,
    [ord_date] datetime NOT NULL,
    [ord_depart] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_dpid] int NOT NULL,
    [ord_empname] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_enddate] datetime NOT NULL,
    [ord_fbizid] int NOT NULL,
    [ord_finished] int NOT NULL,
    [ord_fjbid] bigint NOT NULL,
    [ord_ford2id] bigint NOT NULL,
    [ord_ford2tag] int NOT NULL,
    [ord_fordid] bigint NOT NULL,
    [ord_ftype] varchar(10) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_groupkey] char(32) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_id] bigint NOT NULL,
    [ord_key] varchar(30) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_no] varchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_noi] int NOT NULL,
    [ord_rbizid] int NOT NULL,
    [ord_rord2id] bigint NOT NULL,
    [ord_rord2tag] int NOT NULL,
    [ord_rordid] bigint NOT NULL,
    [ord_rtype] varchar(10) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_security] int NOT NULL,
    [ord_status] nvarchar(30) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_style] int NOT NULL,
    [ord_template] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_templateid] int NOT NULL,
    [ord_title] nvarchar(100) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_type] nvarchar(50) COLLATE Chinese_PRC_CI_AS NOT NULL,
    [ord_updated] datetime NOT NULL,
    [ord_dqyg] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL,
    [ord_bgyg] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL,
    [ord_dqygcuid] bigint NULL,
    [ord_bgygcuid] bigint NULL,
    [ord_bgyy] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL,
    [ord_dqbmsyrcuid] bigint NULL,
    CONSTRAINT [order_240_bak_pk] PRIMARY KEY ([ord_id] ASC)
)