/*修改上传信息表中的退货信息表字段*/
/*增加主键*/
alter table sun_jk_thxx add lsh char(30)
alter table sun_jk_thxx add qymc char(50)
alter table sun_jk_thxx add updatetime datetime
alter table sun_jk_thxx alter column spm char(32)
alter table sun_jk_thxx alter column pzwh char(32)
alter table sun_jk_thxx add updatetime datetime
ALTER TABLE [dbo].[sun_jk_thxx] WITH NOCHECK ADD DEFAULT (getdate()) FOR [updatetime]
CREATE INDEX [sun_jk_thxx_areabm] ON [dbo].[sun_jk_thxx]([areabm]) ON [PRIMARY]
CREATE INDEX [sun_jk_thxx_qydm] ON [dbo].[sun_jk_thxx]([qydm]) ON [PRIMARY]
CREATE INDEX [sun_jk_thxx_lsh] ON [dbo].[sun_jk_thxx]([lsh]) ON [PRIMARY]
CREATE UNIQUE INDEX [sun_jk_thxx_lsh_key] ON [dbo].[sun_jk_thxx]([areabm], [qydm], [lsh]) ON [PRIMARY]
GO
/*报损信息表*/
alter table sun_jk_bsjl add lsh char(30)
alter table sun_jk_bsjl add qymc char(50)
alter table sun_jk_bsjl add ypm char(32)
alter table sun_jk_bsjl add gg char(20)
alter table sun_jk_bsjl add ypcj char(30)
alter table sun_jk_bsjl add zxdw char(4)
alter table sun_jk_bsjl add pzwh char(40)
alter table sun_jk_bsjl add updatetime datetime
ALTER TABLE [dbo].[sun_jk_bsjl] WITH NOCHECK ADD DEFAULT (getdate()) FOR [updatetime]
CREATE INDEX [sun_jk_bsjl_lsh] ON [dbo].[sun_jk_bsjl]([lsh]) ON [PRIMARY]
CREATE INDEX [sun_jk_bsjl_areabm] ON [dbo].[sun_jk_bsjl]([areabm]) ON [PRIMARY]
CREATE INDEX [sun_jk_bsjl_qydm] ON [dbo].[sun_jk_bsjl]([qydm]) ON [PRIMARY]
CREATE UNIQUE INDEX [sun_jk_bsjl_lsh_key] ON [dbo].[sun_jk_bsjl]([areabm], [qydm], [lsh]) ON [PRIMARY]
GO
/*养护记录*/
alter table sun_jk_yhjl add lsh char(30)
alter table sun_jk_yhjl add qymc char(50)
alter table sun_jk_yhjl add ypm char(32)
alter table sun_jk_yhjl add gg char(20)
alter table sun_jk_yhjl add ypcj char(30)
alter table sun_jk_yhjl add zxdw char(4)
alter table sun_jk_yhjl add pzwh char(40)
alter table sun_jk_yhjl add updatetime datetime
ALTER TABLE [dbo].[sun_jk_yhjl] WITH NOCHECK ADD DEFAULT (getdate()) FOR [updatetime]
CREATE INDEX [sun_jk_yhjl_lsh] ON [dbo].[sun_jk_yhjl]([lsh]) ON [PRIMARY]
CREATE INDEX [sun_jk_yhjl_areabm] ON [dbo].[sun_jk_yhjl]([areabm]) ON [PRIMARY]
CREATE INDEX [sun_jk_yhjl_qydm] ON [dbo].[sun_jk_yhjl]([qydm]) ON [PRIMARY]
CREATE UNIQUE INDEX [sun_jk_yhjl_lsh_key] ON [dbo].[sun_jk_yhjl]([areabm], [qydm], [lsh]) ON [PRIMARY]
GO
/*首营药品记录*/
alter table sun_jk_syyp add lsh char(30)
alter table sun_jk_syyp add qymc char(50)
alter table sun_jk_syyp alter column ghdw char(80)
alter table ssun_jk_syyp add updatetime datetime
ALTER TABLE [dbo].[sun_jk_syyp] WITH NOCHECK ADD DEFAULT (getdate()) FOR [updatetime]
CREATE INDEX [sun_jk_syyp_lsh] ON [dbo].[sun_jk_syyp]([lsh]) ON [PRIMARY]
CREATE INDEX [sun_jk_syyp_areabm] ON [dbo].[sun_jk_syyp]([areabm]) ON [PRIMARY]
CREATE INDEX [sun_jk_syyp_qydm] ON [dbo].[sun_jk_syyp]([qydm]) ON [PRIMARY]
CREATE UNIQUE INDEX [sun_jk_syyp_lsh_key] ON [dbo].[sun_jk_syyp]([areabm], [qydm], [lsh]) ON [PRIMARY]
GO
/*首营企业记录*/
alter table sun_jk_syqy add lsh char(30)
alter table sun_jk_syqy add dw_qymc char(50)
alter table sun_jk_syqy add updatetime datetime
ALTER TABLE [dbo].[sun_jk_syqy] WITH NOCHECK ADD DEFAULT (getdate()) FOR [updatetime]
CREATE INDEX [sun_jk_syqy_lsh] ON [dbo].[sun_jk_syqy]([lsh]) ON [PRIMARY]
CREATE INDEX [sun_jk_syqy_areabm] ON [dbo].[sun_jk_syqy]([areabm]) ON [PRIMARY]
CREATE INDEX [sun_jk_syqy_qydm] ON [dbo].[sun_jk_syqy]([qydm]) ON [PRIMARY]
CREATE UNIQUE INDEX [sun_jk_syqy_lsh_key] ON [dbo].[sun_jk_syqy]([areabm], [qydm], [lsh]) ON [PRIMARY]
GO
/*上传供销信息*/
alter table fg_yj_up_data add areabm char(6)
alter table fg_yj_up_data add updatetime datetime
alter table fg_yj_up_data add ypcj char(30) /*药品厂家*/
alter table fg_yj_up_data add ysrq datetime /*验收日期*/
alter table fg_yj_up_data add ysry char(20) /*验收药师*/
alter table fg_yj_up_data add zlzh char(30) /*质量状况*/
ALTER TABLE [dbo].[fg_yj_up_data] WITH NOCHECK ADD DEFAULT (getdate()) FOR [updatetime]
CREATE INDEX [fg_yj_up_data_lsh] ON [dbo].[fg_yj_up_data]([lsh]) ON [PRIMARY]
CREATE INDEX [fg_yj_up_data_areabm] ON [dbo].[fg_yj_up_data]([areabm]) ON [PRIMARY] /*区域代码*/
CREATE INDEX [fg_yj_up_data_qydm] ON [dbo].[fg_yj_up_data]([bdqqh]) ON [PRIMARY] /*药店代码*/
CREATE UNIQUE INDEX [fg_yj_up_data_lsh_key] ON [dbo].[fg_yj_up_data]([areabm], [bdqqh], [lsh]) ON [PRIMARY]
/**/