IF EXISTS (SELECT 1 FROM sys.objects WHERE object_id = OBJECT_ID('[dbo].[order_239_3056_wrkapply_after]') AND type = 'P')
DROP PROCEDURE [dbo].[order_239_3056_wrkapply_after]
GO

-- 生成时间:2018-11-22 18:21:18 by ebs-core  
CREATE  procedure order_239_3056_wrkapply_after(
     @cmpid int, 
     @useruid int,
     @bizid int, 
     @ordid bigint, 
     @wrkid int, 
     @jbid bigint, 
     @wsid int, 
     @wsstatus nvarchar(50) 
  ) 
as  
begin  
set nocount on  
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
declare @nonedate datetime 
declare @autoapplycode varchar(50) 
  set @autoapplycode =  ''
set @nonedate = CONVERT(datetime,'1910-1-1')
declare @ord2group2 nvarchar(50) 
set @ord2group2 = '' 
declare @sys_recid bigint 
set @sys_recid = 0 
 
 --- 以下是预处理事件中的临时表
 
exec drop_temp_table '#romaster' 
select * into #romaster from order_239 with(nolock) where ord_id=@ordid 
 ---- 以下是开发人员写的 after apply job 事件 --------------
 
update order_241_2
set ord2_sfbd='是',ord2_whordid = @ordid
from #romaster  as m
where ord2_id = m.ord_ccid;


 ---- 以上是开发人员写的 after apply job 事件 --------------
 
  
 
--- 清除临时表 
exec drop_temp_table '#romaster' 

set nocount off 
end