IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[mps_gen_dpt_base_proc]') AND type = 'P')
DROP PROCEDURE [dbo].[mps_gen_dpt_base_proc]
GO
create procedure [dbo].[mps_gen_dpt_base_proc](
@cmpid int
)
as
begin
set nocount on
-- 这里要判断一下，是否可以生成
exec mps_gen_dptnew_beforecreate @cmpid 
exec mps_gen_dptnew_aftercreate @cmpid 
exec mps_gen_dptmodify @cmpid
exec mps_gen_dptmodify_before @cmpid
exec mps_gen_dptcheck  @cmpid
exec mps_gen_dptmodify_after @cmpid
exec mps_gen_dptdelete_before @cmpid
exec mps_gen_dptdelete_after @cmpid
exec mps_gen_dptdelete_trg @cmpid
exec mps_gen_dptcreate_trg @cmpid
exec mps_gen_dptmodify_trg @cmpid
set nocount off
end