IF NOT EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND type = 'U')
CREATE TABLE [dbo].[order_260]
(
    [ord_bcid] int NULL DEFAULT((0)),
    [ord_bizid] int NULL DEFAULT((0)),
    [ord_branch] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_cbid] bigint NULL DEFAULT((0)),
    [ord_cmpid] int NULL DEFAULT((0)),
    [ord_createbizids] nvarchar(200) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_createcuid] int NULL DEFAULT((0)),
    [ord_createdepart] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_createdpid] int NULL DEFAULT((0)),
    [ord_creator] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_cuid] int NULL DEFAULT((0)),
    [ord_date] datetime NULL DEFAULT(getdate()),
    [ord_depart] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_dpid] int NULL DEFAULT((0)),
    [ord_empname] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_enddate] datetime NULL DEFAULT('1900-1-1'),
    [ord_fbizid] int NULL DEFAULT((0)),
    [ord_finished] int NULL DEFAULT((0)),
    [ord_fjbid] bigint NULL DEFAULT((0)),
    [ord_ford2id] bigint NULL DEFAULT((0)),
    [ord_ford2tag] int NULL DEFAULT((0)),
    [ord_fordid] bigint NULL DEFAULT((0)),
    [ord_ftype] varchar(10) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_groupkey] char(32) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_id] bigint NOT NULL IDENTITY(1, 1),
    [ord_key] varchar(30) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_no] varchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_noi] int NULL DEFAULT((0)),
    [ord_rbizid] int NULL DEFAULT((0)),
    [ord_rord2id] bigint NULL DEFAULT((0)),
    [ord_rord2tag] int NULL DEFAULT((0)),
    [ord_rordid] bigint NULL DEFAULT((0)),
    [ord_rtype] varchar(10) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_security] int NULL DEFAULT((3)),
    [ord_sobjid] bigint NULL DEFAULT((0)),
    [ord_status] nvarchar(30) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_style] int NULL DEFAULT((0)),
    [ord_sxly] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_template] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_templateid] int NULL DEFAULT((0)),
    [ord_title] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_type] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_updated] datetime NULL DEFAULT(getdate()),
    [ord_xm] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_wxlx] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_bjbz] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_fwbid] int NULL DEFAULT((0)),
    [ord_fwbmc] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_fwlx] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_gjrq] datetime NULL DEFAULT('1900-1-1'),
    [ord_imei] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_jjmd] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_jjrq] datetime NULL DEFAULT('1900-1-1'),
    [ord_mdbh] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_mddpid] bigint NULL DEFAULT((0)),
    [ord_sfzh] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_sjh] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_sjmc] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_sn] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_ys] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_zdlx] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_zdpp] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_zdxh] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_fwfyy] decimal(18, 2) NULL DEFAULT((0)),
    [ord_gzfl1j] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_gzfl2j] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_gzms] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_hxfs] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_rjclff] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_sjwcsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_tcck] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_trck] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_wgzk] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_wlfyy] decimal(18, 2) NULL DEFAULT((0)),
    [ord_wxbz] nvarchar(2000) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_wxgcs] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_wxgcs2] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_wxkssj] datetime NULL DEFAULT('1900-1-1'),
    [ord_wxmd] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_xjimei] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_xjsn] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_yjclff] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_zbts] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_cfsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_ddsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_wxwcsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_dqzt] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_fcbz] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_fzbsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_khqjsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_mdsjsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_zbfcsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_zbfdsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_zbsjsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_zbsjsjfc] datetime NULL DEFAULT('1900-1-1'),
    [ord_dqbmsyrcuid] bigint NULL DEFAULT((0)),
    [ord_zdmddgcsid] bigint NULL DEFAULT((0)),
    [ord_dqmdgcsid] bigint NULL DEFAULT((0)),
    [ord_czfwbid] bigint NULL DEFAULT((0)),
    [ord_sxfj] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_ssgzmsid] bigint NULL DEFAULT((0)),
    [ord_xzppxhid] bigint NULL DEFAULT((0)),
    [ord_xzsjid] bigint NULL DEFAULT((0)),
    [ord_rjclid] bigint NULL DEFAULT((0)),
    [ord_yjclid] bigint NULL DEFAULT((0)),
    [ord_cjjj] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT('否'),
    [ord_xzxhid] bigint NULL DEFAULT((0)),
    [ord_xzsjppid] bigint NULL DEFAULT((0)),
    [ord_xzppid] bigint NULL DEFAULT((0)),
    [ord_cjclff] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_cxshbh] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_return2head] int NULL DEFAULT((0)),
    [ord_tzqjsj] datetime NULL DEFAULT('1900-1-1'),
    [ord_fcsc] decimal(18, 2) NULL DEFAULT((0)),
    [ord_fwsc] decimal(18, 2) NULL DEFAULT((0)),
    [ord_qjjsr] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_wxje] nvarchar(100) COLLATE Chinese_PRC_CI_AS NULL DEFAULT(''),
    [ord_wxzq] decimal(18, 2) NULL DEFAULT((0)),
    [ord_authority_factor] int NULL DEFAULT((0)),
    CONSTRAINT [order_260_pk] PRIMARY KEY ([ord_id] ASC)
)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'order_260_index_1')
CREATE NONCLUSTERED INDEX [order_260_index_1] ON [dbo].[order_260]([ord_cmpid] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'order_260_index_1')
CREATE NONCLUSTERED INDEX [order_260_index_1] ON [dbo].[order_260]([ord_bizid] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'order_260_index_1')
CREATE NONCLUSTERED INDEX [order_260_index_1] ON [dbo].[order_260]([ord_finished] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'order_260_index_1')
CREATE NONCLUSTERED INDEX [order_260_index_1] ON [dbo].[order_260]([ord_date] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'order_260_index_1')
CREATE NONCLUSTERED INDEX [order_260_index_1] ON [dbo].[order_260]([ord_groupkey] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'index_order_260_ord_cmpid')
CREATE NONCLUSTERED INDEX [index_order_260_ord_cmpid] ON [dbo].[order_260]([ord_cmpid] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'index_order_260_ord_bizid')
CREATE NONCLUSTERED INDEX [index_order_260_ord_bizid] ON [dbo].[order_260]([ord_bizid] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'index_order_260_ord_finished')
CREATE NONCLUSTERED INDEX [index_order_260_ord_finished] ON [dbo].[order_260]([ord_finished] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'index_order_260_ord_date')
CREATE NONCLUSTERED INDEX [index_order_260_ord_date] ON [dbo].[order_260]([ord_date] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'index_order_260_ord_groupkey')
CREATE NONCLUSTERED INDEX [index_order_260_ord_groupkey] ON [dbo].[order_260]([ord_groupkey] ASC)

IF NOT EXISTS (SELECT 1 FROM sys.indexes WHERE object_id = OBJECT_ID('[dbo].[order_260]') AND name = 'INDEX_ORD_AUTHORITY_FACTOR')
CREATE NONCLUSTERED INDEX [INDEX_ORD_AUTHORITY_FACTOR] ON [dbo].[order_260]([ord_authority_factor] ASC)