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

-- 生成时间:2018-05-31 10:51:34 by ebs-core  
CREATE  procedure order_141_modify_102_after(
     @cmpid int,
     @branchid int,
     @userdpid int,
     @useruid int,
     @userotid int,
     @jbid bigint,
     @ordid bigint,
     @ord2tag int,
     @ord2id bigint
  ) 
as  
begin  
set nocount on  
declare @sys_recid bigint 
set @sys_recid = 0 
 declare @nonedate datetime 
set @nonedate = CONVERT(datetime,'1910-1-1')
declare @ord2group2 nvarchar(50) 
set @ord2group2 = '' 
 --- 以下是预处理事件中的临时表
 --- #old 与 #new 在主体中已经生成
 
 ---- 以下是开发人员写的 after modify details order 事件 --------------
 /*判断当前交接信息不为空，在交接状态不为空的情况下删除当前负责人的任务*/
delete mps_task 
from order_141_102 
where   tsk_cuid = ord2_fzcuid  
and isnull(ord2_zt,'')!='' 
and ord2_ordid = @ordid 
and ord2_fzcuid = @useruid
and tsk_objid = @ordid
and tsk_objtype='biz'
 ---- 以上是开发人员写的 after modify details order 事件 --------------
 
 
--- 清除临时表 

set nocount off 
end